BERRY9 IT SERVICES

Terraform & Infrastructure-as-Code (IaC) Security Checklist

Manual and automated Terraform security review checklist: state-file secrets, overly permissive IAM modules, public ingress, and unencrypted storage.

DevSecOps · By Thimmagurudu Bathini, CTO · Published · 5 min read

Terraform & Infrastructure-as-Code (IaC) Security Checklist architecture and testing overview

Catching Cloud Misconfigurations Before Apply

Reviewing Terraform, CloudFormation, and Helm charts catches cloud security flaws before infrastructure ever launches. While linters like tfsec or Checkov flag obvious syntax issues, manual DevSecOps reviews inspect cross-module IAM trusts, remote state encryption, and CI/CD apply permissions.

terraform {
  backend "s3" {
    bucket         = "org-prod-tfstate"
    key            = "network/terraform.tfstate"
    region         = "ap-south-1"
    encrypt        = true
    dynamodb_table = "tfstate-locks"
  }
}

Four Terraform Areas We Audit Manually

Terraform & IaC security review focus areas
IaC AreaCommon RiskHardening Standard
Remote State (.tfstate)Plaintext DB passwords and keys stored in unencrypted S3/BlobEnable KMS encryption, versioning, and strict IAM state-bucket ACLs
IAM & Trust PoliciesWildcard Resource: '*' or overly broad AssumeRole modulesScope actions and resources explicitly; use permission boundaries
Network & Security GroupsSSH (22), RDP (3389), or DB ports open to 0.0.0.0/0Restrict management ports to VPN/bastion CIDRs or SSM
CI/CD Apply PipelinePR forks can trigger terraform plan/apply with prod secretsRequire manual approval + OIDC short-lived roles on protected branches

Checking State Files, Modules & Apply Roles

  • Audit remote state backend configs for encryption at rest, access logging, and state locking.
  • Review third-party Terraform modules pinned by mutable branch tags instead of immutable commit SHAs.
  • Verify RDS, S3, EBS, and KMS resources enforce encryption and block public access.
  • Inspect GitHub Actions / GitLab CI workflows running terraform apply for OIDC vs. long-lived static keys.

Enforcing OIDC & Pinned Modules in CI

Pin third-party modules to verified commit hashes, enforce terraform plan checks on PRs, and restrict apply jobs to protected main branches using OIDC federation.

Review your Terraform, Helm, and CI/CD stack from ₹36,000 + 18% GST. Request a scoped proposal →

Terraform Security Review Questions

Can DevSecOps review cover both Terraform and Kubernetes YAML?

Yes—our DevSecOps engagements review Terraform/IaC, Dockerfiles, Kubernetes manifests, and CI/CD pipelines together.

What does a DevSecOps review cost?

Starting from ₹36,000 + 18% GST (₹42,480 total) depending on repository and pipeline count.