mirror of
https://github.com/hanzokms/terraform-provider.git
synced 2026-10-30 20:29:45 +00:00
2.3 KiB
2.3 KiB
page_title, subcategory, description
| page_title | subcategory | description |
|---|---|---|
| kms_identity_token_auth_token Resource - terraform-provider | Identities | Create and manage identity token auth token in Hanzo KMS. |
kms_identity_token_auth_token (Resource)
Create and manage identity token auth token in Hanzo KMS.
Example Usage
terraform {
required_providers {
kms = {
# version = <latest version>
source = "hanzokms/kms"
}
}
}
provider "kms" {
host = "https://kms.hanzo.ai" # Only required if using self hosted instance of Hanzo KMS, default is https://kms.hanzo.ai
auth = {
universal = {
client_id = "<machine-identity-client-id>"
client_secret = "<machine-identity-client-secret>"
}
}
}
resource "kms_identity" "machine-identity-1" {
name = "machine-identity-1"
role = "admin"
org_id = "<your-org-id>"
}
resource "kms_identity_token_auth" "token-auth" {
identity_id = kms_identity.machine-identity-1.id
}
resource "kms_identity_token_auth_token" "token-auth-token" {
identity_id = kms_identity.machine-identity-1.id
name = "token-auth-token"
depends_on = [kms_identity_token_auth.token-auth]
}
output "token-auth-token" {
sensitive = true
value = kms_identity_token_auth_token.token-auth-token.token
}
Schema
Required
identity_id(String) The ID of the identity to create a token for
Optional
name(String) The name of the token auth token
Read-Only
created_at(String) The UTC timestamp of the created at date.id(String) The ID of the token auth tokenis_revoked(Boolean) A flag indicating token has been revokednumber_of_uses(Number) The number of times that the token is usednumber_of_uses_limit(Number) The maximum number of times that the token can be used; a value of 0 implies infinite number of uses. Default: 0token(String, Sensitive) The token.ttl(Number) The lifetime for the token in seconds. Default: 0 - not expiring
Import
Import is supported using the following syntax:
# This will import the resource by its token ID
# Note: The token value itself cannot be retrieved during import for security reasons
terraform import kms_identity_token_auth_token.example <token-id>