gantrycd_service_account (Resource)
A standalone, org-level GantryCD service account (as opposed to a stack’s implicit default service account). Grant it roles via gantrycd_service_account_role_assignment and mint credentials for it via gantrycd_service_account_token.
Example Usage
# A standalone, org-level service account for external automation. Grant it
# roles with gantrycd_service_account_role_assignment and mint credentials with
# gantrycd_service_account_token.
resource "gantrycd_service_account" "ci" {
name = "ci-bot"
authz_labels = ["platform"]
}
Schema
Required
name(String) Service account name. The API has no rename endpoint, so changing this requires replacement.
Optional
authz_labels(Set of String) Protected authorization labels, matched exactly by role grants. Owns the full set; omit or set [] to clear. Adding or removing a label requires service_account:assign_label for that label, in addition to permission to create or update the resource. Separate from ordinary metadata labels.is_disabled(Boolean) Whether the service account is disabled. Defaults to false.
Read-Only
id(String) Server-assigned service account UUID. Used as the Terraform import id.identity_realm(String) Identity realm inherited from the configured provider.
Import
Import is supported using the following syntax:
The terraform import command can be used, for example:
# Import by service account id.
terraform import gantrycd_service_account.ci sa_01HXXXXXXXXXXXXXXXXXXXXXXX