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_aws_iam_user_secret Resource - terraform-provider | Secret Rotations | Create and manage AWS IAM User Secret Secret Rotations |
kms_secret_rotation_aws_iam_user_secret (Resource)
Create and manage AWS IAM User 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_aws_iam_user_secret" "aws-iam-user-secret" {
name = "aws-iam-user-secret-rotation-example"
project_id = "<project-id>"
environment = "<environment-slug>"
secret_path = "<secret-path>" # Root folder is /
connection_id = "<app-connection-id>"
parameters = {
user_name = "<aws-iam-user-name>"
region = "<aws-region>" # e.g. us-east-1
}
secrets_mapping = {
access_key_id = "AWS_ACCESS_KEY_ID"
secret_access_key = "AWS_SECRET_ACCESS_KEY"
}
}
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:
region(String) The AWS region the client is present in.user_name(String) The name of the client to rotate credentials for.
Nested Schema for secrets_mapping
Required:
access_key_id(String) The name of the secret that the access key ID will be mapped to.secret_access_key(String) The name of the secret that the rotated secret access key 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).