» heroku_pipeline_coupling

Provides a Heroku Pipeline Coupling resource.

A pipeline is a group of Heroku apps that share the same codebase. Once a pipeline is created using heroku_pipeline, and apps are added to different stages using heroku_pipeline_coupling, you can promote app slugs to the downstream stages.

» Example Usage

# Create Heroku apps for staging and production
resource "heroku_app" "staging" {
  name = "test-app-staging"

resource "heroku_app" "production" {
  name = "test-app-production"

# Create a Heroku pipeline
resource "heroku_pipeline" "test-app" {
  name = "test-app"

# Couple apps to different pipeline stages
resource "heroku_pipeline_coupling" "staging" {
  app      = "${heroku_app.staging.id}"
  pipeline = "${heroku_pipeline.test-app.id}"
  stage    = "staging"

resource "heroku_pipeline_coupling" "production" {
  app      = "${heroku_app.production.id}"
  pipeline = "${heroku_pipeline.test-app.id}"
  stage    = "production"

» Argument Reference

The following arguments are supported:

  • app - (Required) A Heroku app's UUID. Can also be the name of the Heroku app but UUID is preferred as it is idempotent.
  • pipeline - (Required) The ID of the pipeline to add this app to.
  • stage - (Required) The stage to couple this app to. Must be one of review, development, staging, or production.

» Attributes Reference

The following attributes are exported:

  • id - The UUID of this pipeline coupling.
  • app - The name of the application.
  • app_id - The ID of the application.
  • pipeline - The UUID of the pipeline.
  • stage - The stage for this coupling.

» Import

Pipeline couplings can be imported using the Pipeline coupling id, e.g.

$ terraform import heroku_pipeline_coupling.foobar 12345678