Secrets Manager
Terraform module to create AWS Secrets Manager resources
Inputs
28
block_public_policyoptionalboolMakes an optional API call to Zelkova to validate the Resource Policy to prevent broad access to your secret
nullcreateoptionalboolDetermines whether resources will be created (affects all resources)
truecreate_policyoptionalboolDetermines whether a policy will be created
falsecreate_random_passwordoptionalboolDetermines whether an ephemeral random password will be generated for `secret_string_wo`
falsedescriptionoptionalstringA description of the secret
nullenable_rotationoptionalboolDetermines whether secret rotation is enabled
falseforce_overwrite_replica_secretoptionalboolAccepts boolean value to specify whether to overwrite a secret with the same name in the destination Region
nullignore_secret_changesoptionalboolDetermines whether or not Terraform will ignore changes made externally to `secret_string` or `secret_binary`. Changing this value after creation is a destructive operation
falsekms_key_idoptionalstringARN or Id of the AWS KMS key to be used to encrypt the secret values in the versions stored in this secret. If you need to reference a CMK in a different account, you can use only the key ARN. If you don't specify this value, then Secrets Manager defaults to using the AWS account's default KMS key (…
nullnameoptionalstringFriendly name of the new secret. The secret name can consist of uppercase letters, lowercase letters, digits, and any of the following characters: `/_+=.@-`
nullname_prefixoptionalstringCreates a unique name beginning with the specified prefix
nulloverride_policy_documentsoptionallist(string)List of IAM policy documents that are merged together into the exported document. In merging, statements with non-blank `sid`s will override statements with the same `sid`
[]policy_statementsoptionalmap(object({ sid = optional(string) actions = optional(list(string)) not_actions…A map of IAM policy [statements](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document#statement) for custom permission usage
nullrandom_password_lengthoptionalnumberThe length of the generated random password
32random_password_override_specialoptionalstringSupply your own list of special characters to use for string generation. This overrides the default character list in the special argument
!@#$%&*()-_=+[]{}<>:?recovery_window_in_daysoptionalnumberNumber of days that AWS Secrets Manager waits before it can delete the secret. This value can be `0` to force deletion without recovery or range from `7` to `30` days. The default value is `30`
nullregionoptionalstringRegion where the resource(s) will be managed. Defaults to the Region set in the provider configuration
nullreplicaoptionalmap(object({ kms_key_id = optional(string) region = optional(string) # will defa…Configuration block to support secret replication
nullrotate_immediatelyoptionalboolSpecifies whether to rotate the secret immediately or wait until the next scheduled rotation window. The rotation schedule is defined in `rotation_rules`
nullrotation_lambda_arnoptionalstringSpecifies the ARN of the Lambda function that can rotate the secret
""rotation_rulesoptionalobject({ automatically_after_days = optional(number) duration = optional(string)…A structure that defines the rotation configuration for this secret
nullsecret_binaryoptionalstringSpecifies binary data that you want to encrypt and store in this version of the secret. This is required if `secret_string` or `secret_string_wo` is not set. Needs to be encoded to base64
nullsecret_stringoptionalstringSpecifies text data that you want to encrypt and store in this version of the secret. This is required if `secret_binary` or `secret_string_wo` is not set
nullsecret_string_wooptionalstringSpecifies text data that you want to encrypt and store in this version of the secret. This is required if `secret_binary` or `secret_string` is not set
nullsecret_string_wo_versionoptionalstringUsed together with `secret_string_wo` to trigger an update. Increment this value when an update to `secret_string_wo` is required
nullsource_policy_documentsoptionallist(string)List of IAM policy documents that are merged together into the exported document. Statements must have unique `sid`s
[]tagsoptionalmap(string)A map of tags to add to all resources
{}version_stagesoptionallist(string)Specifies a list of staging labels that are attached to this version of the secret. A staging label must be unique to a single version of the secret
nullAll 28 are optional — the module deploys with none of them set.
Outputs
7
secret_arnThe ARN of the secret
secret_binaryThe secret binary
secret_idThe ID of the secret
secret_nameThe name of the secret
secret_replicaAttributes of the replica created
secret_stringThe secret string
secret_version_idThe unique identifier of the version of the secret
What the agent wires into the next module. An edge on the architecture diagram is one of these consumed by something else.