Secrets Manager Secret
Secrets with versioning, resource policies, replication, and optional Lambda rotation scaffolding.
Compare Secrets & Key Management across clouds →
Part of: AWS Production Landing Zone, AWS Container Platform (EKS)
Verification
Live-testedReally deployed to a cloud sandbox, verified against its outputs and assertions, then destroyed - with the teardown confirmed.
Conformance
- Static validation (fmt · validate · tflint)
- Security scan clean (Checkov)
- Plan test superseded by live test
Provenance
- SHA-256 checksum
- Cosign signature
Functional
- Live-tested - applied, verified, destroyed
Last verified 2026-06-11 · how we verify
Verify this download
cosign · sha-256Don't take our word for it. Every release is signed with cosign - check the bytes against our pinned public key before you trust them.
# 1. Our pinned public key - fetch once, trust out-of-band
curl -O https://www.iac-bazaar.com/cosign.pub
# 2. This module's Sigstore bundle
curl -o aws-secrets-manager-1.0.0.sigstore.json \
https://www.iac-bazaar.com/api/artifacts/aws-secrets-manager/signature
# 3. Verify the tarball you downloaded
cosign verify-blob \
--key cosign.pub \
--bundle aws-secrets-manager-1.0.0.sigstore.json \
aws-secrets-manager-1.0.0.tar.gz
# → Verified OK
# 4. (optional) confirm the checksum too
echo "8e9c73162cde1e2bf65264fbc240872d46df80d685310a2d4ce4483e0e972ea4 aws-secrets-manager-1.0.0.tar.gz" | sha256sum -cUse it from the registry
terraform · opentofumodule "secrets_manager" {
source = "www.iac-bazaar.com/iac-bazaar/aws-secrets-manager/aws"
version = "1.0.0"
}Needs a registry token from /account/tokens. The module itself is free; the account is what identifies you. Full setup: registry docs.
Cite it in your README
badge · attributionPaste this beside the module in the repository that uses it. The badge is rendered from this artifact's verification record, so it reads live-tested because the record says so, and the link lands on this page.
[](https://www.iac-bazaar.com/catalog/aws-secrets-manager?utm_source=syndication&utm_medium=readme&utm_campaign=artifact)
Terraform module 1.0.0, live-tested on IaC Bazaar: [Secrets Manager Secret](https://www.iac-bazaar.com/catalog/aws-secrets-manager?utm_source=syndication&utm_medium=readme&utm_campaign=artifact)
```hcl
module "secrets_manager" {
source = "www.iac-bazaar.com/iac-bazaar/aws-secrets-manager/aws"
version = "1.0.0"
}
```Preview:
Inputs & outputs
Create a free account to read this module's contract
The declared contract - every input name, type, default and description, plus every output - is shown to signed-in accounts, not to anonymous visitors.
A free account sees the contract of every module in the catalogue. There is no subscription and nothing to buy - the modules are free to download, and they run under Vizier.
Documentation
aws-secrets-manager
Secrets Manager secret with CMK-capable encryption, a TLS-only resource
policy, optional cross-region replication, an optional initial version, and
Lambda rotation scaffolding. Works with Terraform and OpenTofu
(>= 1.6), AWS provider >= 6.0, < 7.0. The default posture creates no
initial version — the value is managed out of band — and when you do seed a
value the write-only path (secret_string_wo, Terraform 1.11+) keeps it
out of state entirely.
Recovery window: the default is 30 days, during which a deleted secret is recoverable and still billed at about $0.40/secret/month. Set
recovery_window_in_days = 0for an immediate, irrecoverable destroy.
What you get:
aws_secretsmanager_secret— CMK or AWS-managed encryption, recovery window, cross-region replicas.aws_secretsmanager_secret_version— optional initial version, with a state-stored (secret_string) or write-only (secret_string_wo) value.aws_secretsmanager_secret_policy— a generated TLS-only resource policy withblock_public_policyon (override with a fullpolicyJSON string).aws_secretsmanager_secret_rotation— opt-in Lambda rotation on a days or cron/rate schedule.
Secure defaults
- Always encrypted: AWS-managed
aws/secretsmanagerkey by default; pass a CMK viakms_key_id(recommended for cross-account or replica access). - Values kept out of state by default: no initial version is created
(
create_initial_versiononly seeds when you supply a value). When seeding, prefersecret_string_wo(Terraform 1.11+) so the plaintext never enters state;secret_stringis the state-stored fallback and is markedsensitive. - TLS-only resource policy denying any
secretsmanager:*call over a non-TLS connection, withblock_public_policy = trueso a misconfigured policy can never make the secret world-readable. Cross-account read is off unless you namereader_principal_arns. - 30-day recovery window by default — a deleted secret is recoverable;
recovery_window_in_days = 0(immediate, irrecoverable) is reserved for disposable test secrets.
Provider pin
aws = {
source = "hashicorp/aws"
version = ">= 6.0, < 7.0"
}
License
Commercial — LicenseRef-IaCBazaar-Commercial. © IaC Bazaar. Original work
(not derived from a third-party module).
Usage code & full reference need an account
The complete copy-paste usage, the full input/output reference, and operational notes are free with an account - shown here and bundled in the download. Sign in and this section fills in.
- Usage
- Inputs
- Outputs
Related modules
aws-cloudhsm
Cluster and HSMs, with the parts nobody mentions: AWS holds no copy of your keys, Terraform cannot initialise the cluster, and an uninitialised cluster bills per HSM per hour while being unable to store anything.
aws-acm
Requests a public, DNS-validated ACM TLS certificate that ACM auto-renews forever, outputting the validation records to publish - CT logging on, wildcards and SANs supported.
aws-private-ca
A root or subordinate CA with revocation configured, its certificate installed in the same apply, and ACM permitted to issue from it. Documents the two traps: a CA bills through its deletion window, and one without CRL or OCSP can issue certificates it can never revoke.
aws-kms
Customer-managed KMS keys with sane key policies, aliases, rotation, and multi-region replicas.
aws-ssm-parameter-store
Map-driven SSM Parameter Store parameters - String, StringList, and SecureString - created from a single map, with SecureString always KMS-encrypted and the free Standard tier by default.
ansible-chamber
chamber on EL 10 from the GitHub release; get_url refuses it unless its SHA-256 is in the vendor's checksums file, and the live test re-checks it, then runs list with no credentials and the metadata service off, expecting 'no EC2 IMDS role found', and exercises the null backend (a list answered, a read refused). Pinned. Original role, live-tested on Rocky Linux 10.