Skip to content
GantryCD Provider

gantrycd_gcp_cloud_integration (Resource)

A GantryCD stack’s GCP access: the service account the runner impersonates for it. A stack has at most one, so this is keyed by stack_id; rebinding to a different stack requires replacement.

Example Usage

resource "gantrycd_stack" "payments" {
  name              = "payments-production"
  repository_url    = "https://github.com/example/infrastructure"
  working_directory = "/payments"
  branch            = "main"
  opentofu_version  = "1.11.0"
}

# A stack impersonates at most one GCP service account: the google provider
# reads a single ambient token, so there is nothing to select between.
resource "gantrycd_gcp_cloud_integration" "payments" {
  stack_id              = gantrycd_stack.payments.id
  service_account_email = "gantrycd-stack-payments@example-project.iam.gserviceaccount.com"
}

Schema

Required

  • service_account_email (String) GCP service account email the backend impersonates to mint the run’s access token. It must grant GantryCD’s own identity roles/iam.serviceAccountTokenCreator.
  • stack_id (String) Stack the integration is bound to.

Read-Only

  • created_at (String) Pre-formatted creation timestamp.
  • id (String) Server-assigned integration UUID.
  • identity_realm (String) Identity realm inherited from the configured provider.
  • updated_at (String) Pre-formatted last-update timestamp.

Import

Import is supported using the following syntax:

The terraform import command can be used, for example:

# Import by stack id.
terraform import gantrycd_gcp_cloud_integration.payments stk_01HXXXXXXXXXXXXXXXXXXXXXXX