Interview Prep/Terraform/Security, Secrets and Access

What is the real threat model of a Terraform pipeline?

AdvancedProductionSecurity, Secrets and Access
Answer

Anyone who can change code that gets planned can execute code: data "external", local-exec provisioners, a malicious module, even provider configuration can run commands on the runner with its credentials. So: plan jobs run with read-only creds, PRs from forks do not get secrets, CODEOWNERS covers module sources and .tf that include executables, runners are ephemeral and network-restricted, and apply happens only from protected branches.

All Terraform questions Roadmap: Terraform in production

More on Security, Secrets and Access