Skip to content

rso_service_account (Resource)

A machine identity for CI, Terraform or docker login. The token is returned once, at creation, and stored in state.

Example Usage

# A machine identity for CI. The token is only available at creation.
resource "rso_service_account" "ci" {
  name       = "tf-example-ci"
  expires_at = "2027-06-30T00:00:00Z"
}

output "ci_token" {
  value     = rso_service_account.ci.token
  sensitive = true
}

Schema

Required

  • expires_at (String) RFC 3339 instant the token expires, at most 365 days ahead. Changing it creates a new account.
  • name (String) Account name (2-50 characters). Changing it creates a new account.

Read-Only

  • id (String) The ID of this resource.
  • status (String) ACTIVE, EXPIRED or INACTIVE.
  • token (String, Sensitive) The account's secret.