Skip to content
GantryCD

Stack outputs

Use gantrycd_state_outputs to read another stack’s outputs through GantryCD. The consumer does not need access to the producer’s state backend.

data "gantrycd_state_outputs" "network" {
  stack_id = "network"
}

locals {
  vpc_id = data.gantrycd_state_outputs.network.outputs.vpc_id
}

The consumer’s stack service account needs read_data access to the producer. Keep that grant limited to the stacks it must read.

Outputs marked as sensitive are separate:

data.gantrycd_state_outputs.network.sensitive_outputs.private_value

Avoid putting secrets in state outputs. Prefer an ID or name that the consumer can resolve from a secret store.

The producer must use a GantryCD-managed backend. Reading an output does not declare a dependency. Add a dependency declaration when a producer change should affect the consumer.