Skip to main content
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 auditing aws/main.tf and gcp/main.tf, reviewers verify four non-negotiable guarantees:
  1. Zero wildcard admin grants: Neither starter includes AdministratorAccess, iam:*, *:*, or broad s3:* / storage.* permissions.
  2. Write-only WORM audit storage:
    • AWS (aws/main.tf): aws_s3_bucket.audit_worm enables object_lock_enabled = true (GOVERNANCE default retention) with public access fully blocked and KMS SSE. aws_iam_role.agent_runtime receives strictly s3:PutObject (AuditWormPutOnly) — no s3:DeleteObject or retention override permissions.
    • GCP (gcp/main.tf): google_storage_bucket.audit_worm sets uniform_bucket_level_access = true and a retention_policy. google_service_account.agent_runtime receives strictly roles/storage.objectCreator.
  3. 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).
  4. Private network isolation: aws_security_group.private_gateway permits 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 minimal contents: read permissions and frozen pnpm-lock.yaml.
  • Customer CI/CD pipelines can layer container digest pinning (image@sha256:...) and CycloneDX SBOM generation before promotion.