Least privilege in Terraform is not optional. It’s the line between secure, predictable infrastructure and a breach you read about in the news. Most teams skip it because it feels slow. They grant AdministratorAccess during development “just for now” and never roll it back. That’s how risk creeps in and stays.
Every Terraform provider uses credentials. Every plan and apply touches resources with specific permissions. If you give Terraform more than it needs, you open up everything those credentials can reach. An attacker doesn’t care what you meant to allow; they care about what you actually allowed.
Implementing least privilege in Terraform starts with mapping the exact actions your plan performs. Use service-specific IAM policies instead of blanket roles. Split environments and scopes. Give your CI pipeline only the ability to manage the resources it owns. If your pipeline never needs to delete databases, remove rds:DeleteDBInstance. If your state bucket only needs read and write from Terraform, block list and delete for everyone else.