Interview Prep/Terraform/Security, Secrets and Access

How do you defend against supply-chain risk in providers and modules?

AdvancedProductionSecurity, Secrets and Access
Answer

Commit .terraform.lock.hcl so provider hashes are verified, install only from official registries or an internal mirror, pin module versions or commit SHAs, review diffs of upgrades, enable signature verification (providers are signed with GPG) and scan modules with Checkov before adoption. Restrict egress from CI to approved registries.

All Terraform questions Roadmap: Terraform in production

More on Security, Secrets and Access