01IAM permissionsLeast-privilege roles blocked required operations
ProblemTerraform and CI refresh operations exposed permissions that were genuinely required, including read access for infrastructure such as the Application Load Balancer.
FixExpanded permissions only where evidence showed they were needed rather than falling back to broad administrator access.
02Security controlsScanner findings required infrastructure changes
ProblemSecurity scanning identified gaps around encryption, logging, public-access protection, state resources and permissions.
FixChanged the Terraform configuration to address the findings rather than suppressing the controls.
03Immutable stateImage Builder produced Terraform drift
ProblemAWS Image Builder normalised parts of the image configuration, creating Terraform differences that could look like unexpected drift.
FixInvestigated the AWS-side normalisation and treated the resulting state deliberately rather than automatically overwriting it.
Outcome.
The completed platform demonstrates versioned Terraform modules, separated environment state, immutable AMI-based compute, ALB and Auto Scaling, private PostgreSQL RDS, OIDC-based GitHub Actions deployment identities, security guardrails, reviewed-plan deployment and automated drift detection. Development contains the full workload implementation, while staging and production establish the networking and protected deployment pattern for later expansion.