terraform-provider-compose

command module
v0.0.0-...-aa3b81a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 19, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

README

terraform-provider-compose

Go Report Card Build Status

Installation:

Download a release for your operating system and place it in your third-party plugins directory.

Usage

Export your compose api key as an environment variable:

export COMPOSE_API_KEY="my compose api key"

or directly in your terraform configuration file (not recommended):

provider "compose" {
  api_token = "my compose api key"
}
Example
provider "compose" {}

data "compose_account" "account" {}

resource "compose_deployment" "postgres" {
  name       = "mypostgres"
  account_id = "${data.compose_account.account.id}"
  datacenter = "aws:us-east-1"
  type       = "postgresql"
  units      = 1
  version = "9.6.16"
}

provider "postgresql" {
  host     = "${compose_deployment.deployment.connection_details.0.host}"
  port     = "${compose_deployment.deployment.connection_details.0.port}"
  database = "${compose_deployment.deployment.connection_details.0.database}"
  username = "${compose_deployment.deployment.connection_details.0.admin_username}"
  password = "${compose_deployment.deployment.connection_details.0.admin_password}"
}

resource "postgresql_database" "test" {
  name = "test"
}

Contributing

For information on how to build and develop this project, see CONTRIBUTING.md.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL