Data Source: tfe_outputs

This data source is used to retrieve the state outputs for a given workspace. It enables output values in one Terraform configuration to be used in another.

Example Usage

Using the tfe_outputs data source, the outputs foo and bar can be used as seen below:

In the example below, assume we have outputs defined in a my-org/my-workspace:

data "tfe_outputs" "foo" {
  organization = "my-org"
  workspace = "my-workspace"
}

resource "random_id" "vpc_id" {
  keepers = {
    # Generate a new ID any time the value of 'bar' in workspace 'my-org/my-workspace' changes.
    bar = data.tfe_outputs.foo.values.bar
  }

  byte_length = 8
}

Argument Reference

The following arguments are supported:

Attributes Reference

The following attributes are exported: