How do you secure the Terraform delivery pipeline itself?
IntermediateProductionCloud Security Posture
Answer
- Remote state in an encrypted, versioned bucket with access limited to the pipeline roles; state can hold secrets.
- Separate roles: a read-only role for
planon PRs, a write role forapplythat only the main-branch pipeline in a protected environment can assume (OIDC conditions). - Policy checks on the plan (Checkov, Trivy, OPA/conftest) before apply.
- Manual approval for production applies; no humans applying from laptops.
- Pin provider and module versions with the lock file; use a private module registry.
- Scheduled
terraform planto detect drift.
More on Cloud Security Posture
Sketch how AWS security services fit together in a multi-account organisation.BeginnerWhich security services do you enable in every AWS account by default?BeginnerNative tools (Security Hub, Prowler) or a commercial CNAPP: how do you choose?IntermediateHow do you design network security for production workloads in a VPC?IntermediateHow do you structure KMS keys for production?IntermediateWhat is your S3 security baseline?Beginner