mirror of
https://github.com/hanzokms/terraform-provider.git
synced 2026-10-30 20:29:45 +00:00
3.4 KiB
3.4 KiB
page_title, subcategory, description
| page_title | subcategory | description |
|---|---|---|
| kms_secret_rotation_azure_client_secret Resource - terraform-provider | Secret Rotations | Create and manage Azure Client Secret Secret Rotations |
kms_secret_rotation_azure_client_secret (Resource)
Create and manage Azure Client Secret Secret Rotations
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_secret_rotation_azure_client_secret" "azure-client-secret" {
name = "azure-client-secret-secret-rotation-example"
project_id = "<project-id>"
environment = "<environment-slug>"
secret_path = "<secret-path>" # Root folder is /
connection_id = "<app-connection-id>"
parameters = {
object_id = "<azure-app-id>"
client_id = "<azure-app-client-id>"
}
secrets_mapping = {
client_id = "AZURE_CLIENT_ID"
client_secret = "AZURE_CLIENT_SECRET"
}
}
Schema
Required
connection_id(String) The ID of the connection to use for the secret rotation.environment(String) The slug of the project environment to rotate secrets from.name(String) The name of the secret rotation.parameters(Attributes) Parameters to modify how secrets are rotated. (see below for nested schema)project_id(String) The ID of the Hanzo KMS project to create the secret rotation in.secret_path(String) The folder path to rotate secrets from.secrets_mapping(Attributes) Secret mappings to modify how secrets are rotated. (see below for nested schema)
Optional
auto_rotation_enabled(Boolean) Whether secrets should be automatically rotated.description(String) The description of the secret rotation.rotate_at_utc(Attributes) At which UTC time the rotation should occur. (see below for nested schema)rotation_interval(Number) How many days to wait between each rotation.temporary_parameters(Attributes) Temporary parameters to modify how secrets are rotated. (see below for nested schema)
Read-Only
id(String) The ID of the secret rotation.
Nested Schema for parameters
Required:
client_id(String) The client ID of the Azure Application to rotate the client secret for.object_id(String) The ID of the Azure Application to rotate the client secret for.
Nested Schema for secrets_mapping
Required:
client_id(String) The name of the secret that the client ID will be mapped to.client_secret(String) The name of the secret that the rotated client secret will be mapped to.
Nested Schema for rotate_at_utc
Optional:
hours(Number) The hour at which the rotation should occur (UTC).minutes(Number) The minute at which the rotation should occur (UTC).