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.
More on Security, Secrets and Access
How do you avoid hardcoded credentials in Terraform?BeginnerIs reading a secret with a data source safe?IntermediateHow do ephemeral resources and write-only arguments keep secrets out of state?AdvancedWhat is the better pattern for RDS master passwords?BeginnerHow do you scope IAM for the Terraform deploy role?IntermediateWhat are dynamic provider credentials in HCP Terraform?Intermediate