IaC Bazaar
Google CloudLive-tested

GCP Project Factory

Opinionated project creation: API enablement, billing budget, default-SA lockdown, audit log sinks and baseline IAM.

terraformGoogle Cloud#gcp
gcp-project-factoryterraform v1.7

Verification

Live-tested

Really deployed to a cloud sandbox, verified against its outputs and assertions, then destroyed - with the teardown confirmed.

Conformance

  • Static validation (fmt · validate · tflint)
  • Security scan clean (Checkov)
  • Plan tests (mocked: validation rules · outputs)

Provenance

Functional

  • Live-tested - applied, verified, destroyed

Last verified 2026-08-03 · how we verify

Verify this download

cosign · sha-256

Don't take our word for it. Every release is signed with cosign - check the bytes against our pinned public key before you trust them.

# 1. Our pinned public key - fetch once, trust out-of-band
curl -O https://www.iac-bazaar.com/cosign.pub

# 2. This module's Sigstore bundle
curl -o gcp-project-factory-1.0.0.sigstore.json \
  https://www.iac-bazaar.com/api/artifacts/gcp-project-factory/signature

# 3. Verify the tarball you downloaded
cosign verify-blob \
  --key cosign.pub \
  --bundle gcp-project-factory-1.0.0.sigstore.json \
  gcp-project-factory-1.0.0.tar.gz
# → Verified OK

# 4. (optional) confirm the checksum too
echo "d9c1af29ae3dde0448278a2ef410fddc9c8d420c30d83aeb7badd539235b348e  gcp-project-factory-1.0.0.tar.gz" | sha256sum -c

Use it from the registry

terraform · opentofu
module "project_factory" {
  source  = "www.iac-bazaar.com/iac-bazaar/gcp-project-factory/gcp"
  version = "1.0.0"
}

Paid module — needs a purchase (or a subscription that covers it) plus a registry token from /account/tokens. Full setup: registry docs.

Inputs & outputs

Create a free account to read this module's contract

The declared contract — every input name, type, default and description, plus every output — is shown to signed-in accounts, not to anonymous visitors.

A free account sees the contract of every Free module. This one is Architecture, so its contract unlocks when you buy it.

Documentation

gcp-project-factory

An opinionated GCP project factory: creates a project with a deny-by-default network posture, explicit API enablement, default service-account lockdown, additive baseline IAM, an optional billing budget with threshold alerts, and an optional audit log sink. One module call gives you a project that is not shipped with the legacy default VPC and whose over-privileged default compute SA has had Editor stripped. Works with Terraform and OpenTofu (>= 1.6), Google provider >= 7.0, < 8.0.

Status: static-validated, live-test pending. Validated with tofu validate + tflint + checkov against the hashicorp/google provider. It cannot be live-tested without an Organization/Folder plus roles/resourcemanager.projectCreator and roles/billing.user (a standalone personal project is insufficient), so it ships under live-test quarantine.

Design & secure defaults

  • No legacy default network (auto_create_network = false) — bring your own VPC for a deny-by-default footprint.
  • Default-SA lockdown: the default compute / App Engine service accounts are over-privileged (Editor) out of the box. default_service_accounts_action = "DEPRIVILEGE" strips that role at create time; DISABLE / DELETE go further; NONE opts out.
  • Explicit API enablement only — serviceusage and cloudresourcemanager are always added; nothing else is on unless you list it. disable_dependent_services stays off so a destroy never cascades unless you opt in.
  • Additive baseline IAM (google_project_iam_member), non-authoritative and safe to compose with bindings managed elsewhere.
  • deletion_policy = "PREVENT" so the project cannot be destroyed by accident.
  • Optional budget with multi-threshold alerts and audit log sink with a unique writer identity.

Cross-field invariants are enforced with preconditions: exactly one of org_id / folder_id, and a budget requires billing_account.

Requirements

RequirementVersion
Terraform / OpenTofu>= 1.6
hashicorp/google>= 7.0, < 8.0

Caller IAM: roles/resourcemanager.projectCreator on the org/folder and roles/billing.user on the billing account.

License

Commercial — LicenseRef-IaCBazaar-Commercial. See the IaC Bazaar terms.

Usage code & full reference unlock after purchase

The complete copy-paste usage, the full input/output reference, and operational notes ship with your licence - shown here and bundled in the download.

  • Usage
  • Inputs
  • Outputs