Skip to content
GantryCD Provider

gantrycd_stack_service_account (Data Source)

Looks up a stack’s implicit default service account — the principal a stack’s deployments and lifecycle hook scripts (e.g. pre_apply) authenticate as. Useful for referencing or auditing that identity elsewhere, such as granting it a role or surfacing it in an output.

Example Usage

data "gantrycd_stack_service_account" "payments" {
  stack_id = "stk_01HXXXXXXXXXXXXXXXXXXXXXXX"
}

output "payments_runtime_identity" {
  value = {
    id          = data.gantrycd_stack_service_account.payments.id
    name        = data.gantrycd_stack_service_account.payments.name
    is_disabled = data.gantrycd_stack_service_account.payments.is_disabled
  }
}

Schema

Required

  • stack_id (String) Stack whose default service account to look up.

Read-Only

  • id (String) Server-assigned service account UUID.
  • identity_realm (String) Identity realm inherited from the configured provider.
  • is_disabled (Boolean) Whether the service account is currently disabled.
  • name (String) Service account name.