heroku_pipeline_config_var

Provides a resource to manage a pipeline's config vars.

The pipeline config var API can only retrieve config vars that can be set at the pipeline level. Additionally, these two supported pipeline stages are:

The development, staging & production stages do not have stage-level config vars, only those on the apps within each stage.

Example Usage

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

resource "heroku_pipeline_config_var" "configs" {
  pipeline_id = heroku_pipeline.test-pipeline.id
  pipeline_stage = "test"

  vars = {
    ENV = "test"
    TARGET = "develop"
  }

  sensitive_vars = {
    TEST_ACCESS_TOKEN = "some_access token"
  }
}

Argument Reference

The following arguments are supported:

Attributes Reference

The following attributes are exported:

Import

This resource defines two config var attributes with one of them used for masking any sensitive/secret variables during a terraform plan|apply in a CI build, terminal, etc. This 'sensitive' distinction for config vars is unique to this provider and not a built-in feature of the Heroku Platform API. Therefore, it will not be possible to import this resource.

However, it is safe to define the resource in your configuration file and execute a terraform apply as the end result is noop when the config vars already exist on the remote resource.