Mint — Vending Google Projects with Secure Standards and Guardrails
Follow this step-by-step runbook to deploy the Mint Scale-to-Zero Serverless Control Plane
(/controlplane) and the optional Data Plane telemetry module (/dataplane)
into your Google Cloud Organization behind an HTTPS Application Load Balancer + Cloud IAP,
with zero direct public resource exposure and a verified compliance-regime-to-folder
registry that decides where every vended project is created.
Note: This is not an officially supported Google product.
What You Are Deploying and How the Pieces Fit Together
If you are deploying Mint for the first time, it helps to understand what the service builds in your Google Cloud Organization, why it asks for two separate project IDs, and how it decides which folder a vended project lands in. The solution has three core layers:
The "Mint Vending Machine and Web Portal"
What it is: A GCP project (created in Step 1 inside a standard
Mint-Folder) that acts as the central headquarters for Mint.
What lives inside it:
The "Independent Encryption Key Vault"
What it is: A second, dedicated GCP project (also created in Step 1) that holds your Customer-Managed Encryption Key (Cloud KMS) and nothing else.
Why can't keys live in the Control Plane project?
Where Vended Projects Are Created
What it is: A registry declared in Step 2
(controlplane/terraform/mint.auto.tfvars) that maps each compliance regime to a folder:
deploy.sh Step 4
applies dataplane/terraform, which provisions three CMEK-encrypted
Pub/Sub topics and durable subscriptions, an Organization Cloud Asset feed, and an Organization audit log sink.
The scheduled 15-minute gcp-account-vendor-ttl-enforcer Cloud Run Job (ttl_worker.py) and optional Cloud Function workers
(asset_tracker, cost_tracker, permission_enforcer) process these telemetry streams.
Complete Parameter Reference: What Exists vs. What You Choose
New users often ask: "Do I need to create the Control Plane Host Project or Service Account before I fill out the form below?" No. Only the Look Up parameters are existing IDs you read from your Google Cloud / Google Workspace account. The You Choose parameters are names and settings you pick now; Steps 1 through 6 create them for you. The Registry parameters point at folders that already exist (or that you create in Step 2).
Look Up (Pre-Existing) = Already exists in your GCP Organization or Google Workspace before you start.
You Choose (Created by Guide) = You invent the ID or pick the setting now; Steps 1 to 6 create it for you.
Registry / Policy = Decides where vended projects go and who may vend them.
Run in Terminal = Every command block includes a Run in Terminal button so you can review, edit, and execute each step from this page when launched with
./deploy.sh --guide.
| Parameter Name | Status | Plain-English Purpose | Where to Find It / How to Choose It |
|---|---|---|---|
| 1. GCP Organization ID | Pre-Existing | The root numeric ID of your entire Google Cloud company/agency hierarchy. | Run gcloud organizations list (look at the ID column). |
| 2. Control Plane Host Project ID | Created in Step 1 | The unique ID for the project that runs the Mint web UI, API, Firestore, and Load Balancer. | Invent a globally unique lowercase ID (6-30 chars), e.g. example-mint-cp. |
| 3. Separated KMS Project ID (CMEK) | Created in Step 1 | The unique ID for the separate encryption key vault project (Separation of Duties). | Invent a second globally unique lowercase ID, e.g. example-mint-kms-vault. |
| 4. Billing Account ID | Pre-Existing | Your active Cloud Billing Account that pays for the host projects and vended projects. | Run gcloud billing accounts list (format: XXXXXX-XXXXXX-XXXXXX). |
| 5. US Sovereign Region | Architectural Choice | The US region where the KMS key, Artifact Registry, and Cloud Run service live. | Pick us-central1 (Iowa), us-east4 (N. Virginia), or us-west1 (Oregon). |
| 6. Default Compliance Regime | Registry / Policy | The regime pre-selected in the portal's vend form. It must have a destination folder in the registry. | Pick commercial, fedramp-moderate, fedramp-high, dod-il4, or dod-il5. |
| 7. HTTPS Load Balancer Domain (FQDN) | Configured in Step 7 | The web URL your admins type into their browser to open the Mint portal. | Choose a subdomain on a domain you control (e.g. mint.example.com). |
| 8. Cloud DNS Host Project ID | Pre-Existing | The project that hosts the Cloud DNS managed zone for your portal domain. | Run gcloud dns managed-zones list --project=<project> to confirm the zone. |
| 9. Google Workspace Domain | Pre-Existing | Your organization's primary Google Workspace email domain used for employee sign-in. | The domain after the @ in your work email (e.g. example.com). |
| 10. Google Workspace Customer ID | Pre-Existing | Your immutable Google Workspace Directory ID (starts with C0...) used for the Domain Restricted Sharing lock. |
Run gcloud organizations list (DIRECTORY_CUSTOMER_ID column) or check admin.google.com. |
| 11. IAP Accessor Group Email | Bound in Step 6 | The Google Group whose members may pass the Cloud IAP sign-in screen (roles/iap.httpsResourceAccessor). |
Create the group first (Step 4). Avoid domain:-wide access; use a group. |
| 12. Orchestrator Service Account Mode | Architectural Choice | Whether the deployment script creates the orchestrator Service Account or uses one you already made. | Select create (recommended for first-time setup) or existing. |
| 13. Service Account Name / Email | Created in Step 6 | The identity the Control Plane uses to create vended projects and apply guardrails. | Keep account-vendor-orchestrator if Mode is create, or paste a full SA email if existing. |
| 14. Commercial Destination Folder | Registry | Standard folder for commercial projects. |
Leave blank to use the Mint-Folder created in Step 1, or enter a folder number. |
| 15. Regulated Destination Folders | Registry | Assured Workloads consumer folders for fedramp-moderate, fedramp-high, dod-il4, dod-il5. |
Click Discover Assured Workloads Folders in the customizer, or run gcloud assured workloads list. Leave a regime blank to disable it. |
| 16. Authorization Mode | Policy | log records who would be denied vend/decommission rights; enforce returns HTTP 403 to non-administrators. |
Start with log, review authz_would_deny log lines (Test 8.4), then switch to enforce. |
| 17. Mint Administrators | Policy | Who may vend and decommission projects: a Google Group (checked via Cloud Identity) and/or a list of emails. | Enter a bare group email (no group: prefix) and/or comma-separated emails. |
| 18. Demo Mode | Policy | Enables the synthetic circuit-breaker and security-event simulation endpoints in the portal. | Keep false for production and compliance deployments. |
Deep-Dive Lookup Instructions and Examples (Click Any Group to Expand)
Tip: All expandable sections below use native HTML <details> elements so you can also press
Ctrl+F / Cmd+F to search inside them at any time.
How to Look Up Your Pre-Existing GCP and Google Workspace IDs (Parameters 1, 4, 9, 10) Run Before Filling Out Form
Click Run in Terminal (or run these read-only gcloud commands yourself) to
print your GCP Organization ID, Google Workspace Customer ID, and
Billing Account ID:
# 1. Print your Organization Domain, Organization ID, and Workspace Customer ID (DIRECTORY_CUSTOMER_ID):
gcloud organizations list
# Example output:
# DISPLAY_NAME ID DIRECTORY_CUSTOMER_ID
# example.com 123456789012 C00000000
# ^-- Workspace Domain ^-- Org ID ^-- Workspace Customer ID
# 2. Print your active Cloud Billing Account ID (must show OPEN = True):
gcloud billing accounts list
# Example output:
# ACCOUNT_ID NAME OPEN MASTER_ACCOUNT_ID
# 000000-000000-000000 Enterprise Cloud Billing True
How the Vend Destination Registry Works (Parameters 6, 14, 15: Compliance Regime to Folder) Replaces the old "Use Assured Workloads" toggle
How to Choose Your Two New Project IDs (Parameters 2 and 3: Control Plane vs. KMS Vault) Created Automatically in Step 1
How to Choose Your Portal Domain and IAP Accessor Group (Parameters 7, 8, 11) Zero-Trust Cloud IAP Ingress
How Authorization Mode and Mint Administrators Work (Parameters 16, 17, 18) Application-Layer Authorization
How Orchestrator Service Account Mode Works (Parameters 12 and 13) Least-Privilege Automation Identity
How Tagging Options, Resource Manager TagValue Inheritance, and Custom VPC Networking Are Configured at Deployment Tagging & Network Governance
Customize Your Environment Values (Updates All Commands Below)
Fill in each parameter below using the guidance on every card. Every gcloud,
terraform, and ./deploy.sh command in Steps 1 to 9 updates with your
exact values as you type (and is saved in your browser), ready to run via Run in Terminal.
Minimum Permissions Required to Deploy the Solution Fully
Before executing Step 1, ensure the Google Cloud user identity running the deployment
(your active gcloud auth login user) holds the following minimum IAM roles across
your Google Cloud Organization and Billing Account.
roles/resourcemanager.organizationAdmin) and
Billing Account Administrator (roles/billing.admin), you can grant yourself any
missing roles below with the Run in Terminal button at the bottom of this section. When your
user creates the two host projects in Step 1, GCP automatically grants your user
roles/owner on both projects so Steps 3, 5, 6, and 7 can provision KMS, Cloud Run, Firestore,
Pub/Sub, Cloud Armor, the Load Balancer, and Cloud IAP. Remove or downgrade that roles/owner
binding after the deployment is verified.
| Role Title | Predefined GCP Role ID | Target Scope | Used In | Why This Role Is Required |
|---|---|---|---|---|
| Organization Administrator | roles/resourcemanager.organizationAdmin |
Organization | Step 6 |
Grants resourcemanager.organizations.setIamPolicy to bind the Orchestrator Service
Account's Organization-level roles (and allows self-granting any missing roles below).
|
| Folder Admin | roles/resourcemanager.folderAdmin |
Organization | Steps 1, 2, 6 |
Creates or reuses Mint-Folder, reads destination folders, and lets Terraform bind the
folder-scoped vend roles on every registered destination folder.
|
| Project Creator | roles/resourcemanager.projectCreator |
Organization | Step 1 |
Provisions the Control Plane Host Project and Separated KMS Project (automatically granting you
roles/owner on both new projects).
|
| Assured Workloads Reader | roles/assuredworkloads.reader |
Organization | Step 2 |
Lists Assured Workloads so the registry can be discovered and verified (read-only).
roles/assuredworkloads.admin is only needed if you create a new workload in Step 2.
|
| Organization Policy Administrator | roles/orgpolicy.policyAdmin |
Organization | Step 6 |
Sets constraints/run.allowedIngress and constraints/iam.allowedPolicyMemberDomains
on the host project.
|
| Logs Configuration Writer | roles/logging.configWriter |
Organization | Step 6 |
Creates the Organization audit sink (gcp-account-vendor-permission-lock-sink) used by the
optional Data Plane module. (Logs Viewer is read-only and not sufficient.)
|
| Cloud Asset Owner & Viewer | roles/cloudasset.owner / roles/cloudasset.viewer |
Organization | Step 6 |
Creates the Organization Cloud Asset Inventory feed (gcp-account-vendor-asset-tracker)
and grants roles/cloudasset.viewer to the Orchestrator Service Account for the Untagged
Resource Compliance Monitor.
|
| Tag Administrator & Tag User | roles/resourcemanager.tagAdmin / roles/resourcemanager.tagUser |
Organization / Folder | Step 6 & Vending |
Allows administrators to list/create Organization TagKeys and TagValues
(gcloud resource-manager tags keys list) and lets Step 6 bind
roles/resourcemanager.tagUser on destination folders (and optionally at the Organization)
so Mint can attach tagValues/NUMERIC_ID bindings at project launch.
|
| Billing Account User (or Billing Admin) | roles/billing.user / roles/billing.admin |
Billing Account | Steps 1 and 6 |
Links the Control Plane and KMS projects to billing in Step 1; roles/billing.admin is
required to grant roles/billing.user to the Orchestrator Service Account in Step 6.
|
-
Logs Viewervs.Logs Configuration Writer: Many admins haveroles/logging.viewerby default, which is read-only. You needroles/logging.configWriterat the Organization level so Step 6 can create the audit log sink. -
Organization Administratordoes not include resource creation:roles/resourcemanager.organizationAdminallows setting IAM policies, but you must explicitly holdfolderAdmin,projectCreator,assuredworkloads.reader, andlogging.configWriterbefore running the deployment. -
Quota project for Assured Workloads discovery:
gcloud assured workloads listneeds a quota project withassuredworkloads.googleapis.comenabled. Step 2 enables the API on the Control Plane Host Project and passes it with--project; do not accept gcloud prompts to enable the API on an unrelated default project. -
External / central-Org Billing Accounts: If your Billing Account is parented under a
different Organization, IAM roles granted on your Organization do not inherit onto it. Grant
roles/billing.userdirectly on the Billing Account with the identity that owns it. Pre-Flight and Step 1 detect this and try any other locally authenticated gcloud account.
One-Click Pre-Flight IAM Verification and Self-Grant Command
If your user already has roles/resourcemanager.organizationAdmin, click
Run in Terminal below to bind the minimum Organization and Billing roles to your active
gcloud account before starting Step 1. This command grants roles to your own identity; run it only
if you are the Organization Administrator responsible for this deployment.
Create the Control Plane Folder and Separated Host Projects
Creates (or reuses) a standard Google Cloud folder named Mint-Folder directly under your
Organization, then creates the Control Plane Host Project and the
Separated KMS Project inside it and links both to your Billing Account. The compliance
boundary for vended projects is applied through the destination registry in Step 2, so the Control
Plane itself does not need an Assured Workloads folder.
gcloud (>= 460.0.0),
terraform (>= 1.5.0), and python3 installed, and authenticate with
gcloud auth login. To execute commands directly from this page, launch the guide via
./deploy.sh --guide (or python3 run_guide.py) and click
Run in Terminal on any step below. Every command is shown for review and can be edited before it runs.
Register and Verify the Vend Destinations (Compliance Regime to Folder)
This step turns Section C of the customizer into the server-side registry the control plane enforces. It
discovers the Assured Workloads consumer folders in your Organization (read-only), verifies that every
regulated folder you entered belongs to a workload with the matching regime, resolves the commercial folder,
and writes controlplane/terraform/mint.auto.tfvars. Terraform loads *.auto.tfvars
automatically, so both ./deploy.sh (Step 6) and a direct terraform apply pick it up.
Optional: Create a New Assured Workloads Folder for a Regime You Do Not Have Yet
Only needed when a regulated regime has no workload in your Organization. Creating a workload is an
Organization-level decision (billing, location, control package); review the command, adjust
REGIME and LOCATION, then paste the resulting consumer folder number into Section C
and re-run Step 2. Requires roles/assuredworkloads.admin. Some regimes require additional
flags (for example key management settings); consult the Assured Workloads documentation for your regime.
Provision the Separation-of-Duties Cloud KMS Key (CMEK)
Create a regional Cloud KMS KeyRing and CryptoKey with a 90-day rotation schedule inside your dedicated KMS project, then authorize the Control Plane project's service agents (Firestore, Pub/Sub, Cloud Run, and Artifact Registry) to encrypt and decrypt with that key.
Prepare the Google Workspace Groups for Cloud IAP and Mint Administration
Users reach the Control Plane through Cloud Identity-Aware Proxy (IAP) with their Google Workspace account.
This step confirms your Workspace Customer ID, verifies that the IAP accessor group
(Parameter 11) exists so deploy.sh binds a group instead of falling back to
domain:-wide access, and checks the optional Mint Administrator group
(Parameter 17a) used for vend and decommission authorization.
deploy.sh binds roles/iap.httpsResourceAccessor to
domain:<workspace domain>, so every account in the domain can reach the sign-in page. This
step exits with an error until the group exists (or until you enter your own account for a first test).
Build and Push the Control Plane Container Image
Create a CMEK-encrypted Artifact Registry repository in your Control Plane project and build the Control
Plane container with Cloud Build. The image bundles the React portal and the FastAPI orchestrator
(multi-stage build on node:24-slim and python:3.12-slim, non-root user,
hash-pinned Python dependencies). The optional Data Plane module in this baseline has no worker images to
build. The script prints the image digest so you can pin control_plane_container_image by
digest in mint.auto.tfvars after the first deployment.
Execute the First-Use Deployment (./deploy.sh)
./deploy.sh enables the required APIs, creates (or verifies) the Orchestrator Service Account
and its roles, applies controlplane/terraform (Load Balancer, Cloud Armor, IAP, Cloud Run,
Firestore, folder-scoped SA bindings, and the MINT_* environment including the registry from
Step 2), and then applies dataplane/terraform (Pub/Sub topics, asset feed, audit sink). Always run
with --dry-run first to inspect every command before mutating cloud resources.
--compliance-regime is the default regime pre-selected in the
portal. --use-assured-workloads="false" is a legacy flag kept for compatibility: the destination
registry in mint.auto.tfvars is the source of truth, and false keeps the orchestrator at
read-only roles/assuredworkloads.reader instead of roles/assuredworkloads.admin.
Authorization mode, administrator settings, and demo mode are read from mint.auto.tfvars.
Option A: Dry-Run and Scriptable CLI Deployment
Option B: Update an Existing Deployment with Terraform Only
After the first deployment, changes to the registry, authorization mode, or image digest only need a Terraform plan and apply. Expect only the resources you changed; the image is pinned by digest.
Option C: Preview the Portal UI Locally (UI development only)
Starts the Vite development server for the React portal on http://localhost:5173. There is no
local backend, so API calls fail; use this only to iterate on the UI.
# UI-only preview on http://localhost:5173 (no backend; for UI development)
./deploy.sh --launch-ui
Configure the DNS A-Record for the HTTPS Application Load Balancer
After Terraform completes, this step retrieves the Global External Application Load Balancer IP address,
creates (or updates) the DNS A record in your Cloud DNS Host Project
(Parameter 8), and shows the Google-managed SSL certificate status. Once DNS propagates, the certificate
transitions from PROVISIONING to ACTIVE.
Mint Control Plane Portal Access and Live Deployment Outputs
Once Step 6 (Terraform bootstrap) and Step 7 (DNS cutover) complete, the
Mint Control Plane Portal is reachable at the HTTPS Load Balancer domain from Parameter 7.
Direct public *.run.app URLs are disabled (default_uri_disabled = true), so all portal
traffic enters through the Global HTTPS Application Load Balancer, Cloud Armor, and Cloud IAP.
gcp-vendor-admins@example.com) when prompted by Cloud IAP.
| Output / Endpoint | Value (Live / Configured) | How to Use |
|---|---|---|
Mint Control Plane Portal URLcontrol_plane_iap_load_balancer_url |
https://mint.example.com |
Open in a browser to vend projects, inspect the fleet, and decommission projects. |
Load Balancer Global Anycast IPload_balancer_external_ip |
Pending Step 6 (Click Refresh Live Outputs) |
Step 7 creates or updates the DNS A record for mint.example.com in Cloud DNS project dns-host-example. |
Google-Managed SSL Certificatemanaged_ssl_certificate_name |
Awaiting Step 6 and DNS Cutover | Transitions from PROVISIONING to ACTIVE once your DNS A record resolves to the Load Balancer IP. |
Authorized IAP Accessorauthorized_workspace_iap_group |
group:gcp-vendor-admins@example.com |
Principal granted roles/iap.httpsResourceAccessor on the Control Plane backend service. A domain: value means the group did not exist at deploy time. |
Control Plane Cloud Run Servicecloud_run_service_name |
gcp-account-vendor-controlplane (mint-cp-example) |
Internal-only Serverless Gen 2 container (default_uri_disabled=true, INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER). |
Deployed Container Imagespec.template.spec.containers[0].image |
Pending Step 6 (Click Refresh Live Outputs) |
Pin this digest as control_plane_container_image in mint.auto.tfvars. |
Vend Destination RegistryMINT_VEND_DESTINATIONS |
Pending Step 6 (Click Refresh Live Outputs) |
Regime-to-folder map actually running on Cloud Run; verified against Assured Workloads at runtime. |
Authorization and Demo SettingsMINT_AUTHZ_MODE, MINT_ADMIN_GROUP, MINT_DEMO_MODE |
Pending Step 6 (Click Refresh Live Outputs) |
Confirm enforce and MINT_DEMO_MODE=false before production use. |
Orchestrator Service Accountorchestrator_service_account_email |
account-vendor-orchestrator@mint-cp-example.iam.gserviceaccount.com |
Least-privilege automation identity with folder-scoped vend roles on each registered destination folder. |
Firestore State Databasefirestore_state_database |
account-vendor-state (CMEK optional: enable_firestore_cmek) |
Stores vended project records and the decommissioned_projects archive. |
End-to-End Testing and Security Verification Playbook
Run the following verification tests to confirm that zero direct public access, Google Workspace IAP authentication, the verified destination registry, the project Org Policies applied at vend time, the authorization audit trail, and soft-delete decommissioning behave as designed. Each test only checks controls that are actually deployed; the optional Data Plane status is reported separately in Test 8.6.
Test 8.1 - Verify Zero Direct Public Access and Cloud IAP Enforcement
Confirm that the Cloud Run service has no public *.run.app URL, that only the IAP service agent
may invoke it, and that unauthenticated requests to the Load Balancer are intercepted by Cloud IAP
(HTTP 302 redirect to Google sign-in or 401).
Test 8.2 - Vend a Project in the Portal and Verify Its Destination Folder
Vending is performed through the portal (Cloud IAP requires a human Google Workspace sign-in; the API has no
service-account access path). Open the portal, choose a compliance regime, review the resolved destination
panel, set the Owner principal to your own account (so Tests 8.3 and 8.5 can act on the project),
and submit Vend New GCP Project. Then run the command below: it finds the most recently created
Mint-managed project (label vended-by=mint-control-plane) and verifies its parent folder is the
registered destination for its regime, its labels, and its billing link. Set PROJECT_ID in the
editor to check a specific project instead.
Test 8.3 - Verify the Project Org Policies Applied at Vend Time (Negative Test)
Shows the effective storage.publicAccessPrevention, compute.vmExternalIpAccess, and
run.allowedIngress policies on the vended project, then attempts to grant allUsers
access on a temporary bucket. The grant must be refused by Public Access Prevention. The temporary bucket is
removed at the end.
Test 8.4 - Verify the Deployed Configuration and the Authorization Audit Trail
Reads the live Cloud Run revision (image digest, ingress, MINT_VEND_DESTINATIONS,
MINT_AUTHZ_MODE, MINT_ADMIN_*, MINT_DEMO_MODE), confirms the only invoker is
the IAP service agent, and lists recent authz_would_deny / authz_denied and
destination verification log lines. Use the would-deny lines to populate the administrator group before
switching to enforce.
Test 8.5 - Decommission Through the Portal and Verify the Soft-Delete Archive
In the portal, select the test project and click Delete. Mint detaches billing, requests deletion
(30-day recovery window), and archives the record to decommissioned_projects. The command below
lists the latest archive entries from Firestore and confirms the project is in DELETE_REQUESTED.
Requires roles/datastore.viewer (or owner) on the Control Plane project.
Test 8.6 - Optional Data Plane Telemetry Status
Lists the Pub/Sub topics, the Organization asset feed, the Organization audit sink, and any subscriptions
or Eventarc triggers. In this baseline no worker subscribes to the topics, so the budget circuit breaker
and permission enforcer are reported as NOT_CONFIGURED by the control plane.
Full Environment Teardown and Reset (./teardown.sh)
Need to tear down a test deployment and reset your Organization before re-running? ./teardown.sh
idempotently destroys the Data Plane topics, Organization audit sink and asset feed, the Control Plane HTTPS
Load Balancer components, Cloud Armor policy, Firestore state database, Artifact Registry repository, the
Orchestrator Service Account bindings, and (optionally) the host projects and the empty
Mint-Folder. It never deletes vended projects or your Assured Workloads folders.