Skip to content
GantryCD Provider

gantrycd_state_outputs (Data Source)

Reads another stack’s outputs through the GantryCD API in the provider’s organization. Requires read_data on the producer; sensitive values are returned in sensitive_outputs.

Example Usage

# Read another stack's outputs through the GantryCD API, with no state-backend
# credentials. The caller needs (stack, read_data) on the producer stack.
data "gantrycd_state_outputs" "networking" {
  stack_id = "stk_01HNETWORKINGXXXXXXXXXXXXX"
}

# Non-sensitive outputs read exactly like terraform_remote_state outputs.
output "vpc_id" {
  value = data.gantrycd_state_outputs.networking.outputs.vpc_id
}

# Outputs the producer declared sensitive arrive separately, marked sensitive.
output "db_password" {
  value     = data.gantrycd_state_outputs.networking.sensitive_outputs.db_password
  sensitive = true
}

Schema

Required

  • stack_id (String) Producer stack whose outputs to read (in the provider’s organization).

Read-Only

  • identity_org_id (String) Provider organization used for output identity.
  • identity_realm (String) Identity realm inherited from the configured provider.
  • outputs (Dynamic) The producer’s ordinary current-state outputs, keyed by name and preserving each value’s Terraform type. Reference as .outputs..
  • sensitive_outputs (Dynamic, Sensitive) The producer’s current-state outputs it declared sensitive, keyed by name. Terraform masks references to .sensitive_outputs. in normal CLI output, but still stores the values in state.