deploy/terraform/aws/ and deploy/terraform/gcp/ provide transparent starting modules designed for CloudSec and IAM architecture review.
Review and adapt CIDR blocks, VPC IDs, retention periods, and organization policies with your internal CloudSec team before running
terraform apply.CloudSec IAM Least-Privilege Checklist
When auditingaws/main.tf and gcp/main.tf, reviewers verify four non-negotiable guarantees:
- Zero wildcard admin grants: Neither starter includes
AdministratorAccess,iam:*,*:*, or broads3:*/storage.*permissions. - Write-only WORM audit storage:
- AWS (
aws/main.tf):aws_s3_bucket.audit_wormenablesobject_lock_enabled = true(GOVERNANCEdefault retention) with public access fully blocked and KMS SSE.aws_iam_role.agent_runtimereceives strictlys3:PutObject(AuditWormPutOnly) — nos3:DeleteObjector retention override permissions. - GCP (
gcp/main.tf):google_storage_bucket.audit_wormsetsuniform_bucket_level_access = trueand aretention_policy.google_service_account.agent_runtimereceives strictlyroles/storage.objectCreator.
- AWS (
- Scoped KMS & secret access: AWS ECS execution role (
ecs-tasks.amazonaws.com) and GCP service account access only the single project KMS key (90-day / annual auto-rotation) and specific gateway secret resource (aws_secretsmanager_secret.gateway_env/google_secret_manager_secret.gateway_env). - Private network isolation:
aws_security_group.private_gatewaypermits outbound HTTPS (443) to VPC endpoints and approved gateways with zero inbound rules declared.
AWS vs. GCP Terraform Resource Mapping
Supply Chain & CI Hygiene
- Public Governance Kit GitHub Actions pin exact commit SHAs (
ci.yml) with minimalcontents: readpermissions and frozenpnpm-lock.yaml. - Customer CI/CD pipelines can layer container digest pinning (
image@sha256:...) and CycloneDX SBOM generation before promotion.