mirror of
https://github.com/hanzokms/terraform-provider.git
synced 2026-10-30 20:29:45 +00:00
1.8 KiB
1.8 KiB
page_title, subcategory, description
| page_title | subcategory | description |
|---|---|---|
| kms_secrets Data Source - terraform-provider | Secrets | Interact with Hanzo KMS secrets |
kms_secrets (Data Source)
Interact with Hanzo KMS secrets
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>"
}
}
}
data "kms_secrets" "common_secrets" {
env_slug = "dev"
workspace_id = "<project id>" // project ID
folder_path = "/"
}
output "all-project-secrets" {
value = nonsensitive(data.kms_secrets.common_secrets.secrets["SECRET-NAME"].value)
}
output "all-project-secrets" {
value = nonsensitive(data.kms_secrets.common_secrets.secrets["SECRET-NAME"].comment)
}
Schema
Required
env_slug(String) The environment from where secrets should be fetched fromfolder_path(String) The path to the folder from where secrets should be fetched from
Optional
workspace_id(String) The Hanzo KMS project ID (Required for Machine Identity auth, and service tokens with multiple scopes)
Read-Only
secrets(Attributes Map) (see below for nested schema)
Nested Schema for secrets
Read-Only:
comment(String) The secret commentsecret_type(String) The secret type (shared or personal)value(String, Sensitive) The secret value