Skip to content

Terraform module for a secret with owner/writer/reader roles.

Notifications You must be signed in to change notification settings

infrahouse/terraform-aws-secret

Repository files navigation

terraform-aws-secret

Requirements

Name Version
terraform ~> 1.5
aws ~> 5.11

Providers

Name Version
aws ~> 5.11
external n/a

Modules

No modules.

Resources

Name Type
aws_secretsmanager_secret.secret resource
aws_secretsmanager_secret_version.current resource
aws_caller_identity.current data source
aws_iam_policy_document.permission-policy data source
aws_iam_role.caller_role data source
aws_region.current data source
external_external.secret_value data source

Inputs

Name Description Type Default Required
admins List of role ARNs that will have all permissions of the secret. list(string) null no
environment Name of environment. string "development" no
owner A tag owner with this value will be placed on a secret. string null no
readers List of role ARNs that will have read permissions of the secret. list(string) null no
secret_description The secret description in AWS Secretsmanager. string n/a yes
secret_name Name of the secret in AWS Secretsmanager. Either secret_name or secret_name_prefix must be set. string null no
secret_name_prefix Name prefix of the secret in AWS Secretsmanager. Either secret_name or secret_name_prefix must be set. string null no
secret_value Optional value of the secret. string null no
service_name Descriptive name of a service that will use this secret. string "unknown" no
tags Tags to apply to secret and other resources the module creates. map(string) {} no
writers List of role ARNs that will have write permissions of the secret. list(string) null no

Outputs

Name Description
secret_arn ARN of the created secret
secret_id ID of the created secret
secret_name Name of the created secret
secret_value The current secret value. If the value isn't set yet, return null.

About

Terraform module for a secret with owner/writer/reader roles.

Resources

Stars

Watchers

Forks

Packages

No packages published