Categorygithub.com/IBM/terraform-provider-compose
modulepackage
0.0.0-20200219041403-aa3b81a1cfbe
Repository: https://github.com/ibm/terraform-provider-compose.git
Documentation: pkg.go.dev

# 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.

# Packages

No description provided by the author