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"
}Paid module — needs a purchase (or a subscription that covers it) plus a registry token from /account/tokens. Full setup: registry docs.
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 Free module. This one is Basic, so its contract unlocks when you buy it.
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.
Status: static-validated, live-test pending. Ships under live-test quarantine — validated with
tofu fmt,tofu validate, andtflint. Real apply → read → destroy against an AWS account is pending a cloud sandbox. Live tests will setrecovery_window_in_days = 0for a clean (immediate, irrecoverable) destroy; production keeps the default 30-day recovery window. A standing secret costs ~$0.40/secret/month.
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 unlock after purchase
The complete copy-paste usage, the full input/output reference, and operational notes ship with your licence - shown here and bundled in the download.
- Usage
- Inputs
- Outputs
Related modules
ACM Certificate (DNS-validated)
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.
KMS Key with Policy Patterns
Customer-managed KMS keys with sane key policies, aliases, rotation, and multi-region replicas.
SSM Parameter Store (map-driven)
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.
Azure Key Vault
RBAC-mode Key Vault with private endpoint, diagnostics, and managed keys/secrets/certificates scaffolding.
Cloud KMS Keyring & Keys
Keyrings and rotation-enabled crypto keys with per-key IAM for CMEK across GCS, BigQuery, Cloud SQL and disks.
Secret Manager Secrets
Secrets with versions, replication policy, rotation schedules, expiry and accessor IAM.