Validate on Google Cloud
Self-Hosted Only
Validating NetBlueprint Forge on Google Cloud
Copyright (c) 1998-2026 DigitalPrez, LLC. All rights reserved.
A first deployment of NetBlueprint Forge in a Google Cloud project of your own, step by step: the cluster route (G1 to G20), then the serverless route (CR1 to CR14; the guide’s open items are written “item R2” here, to keep the two apart). These are “your cloud’s steps” of ../VALIDATE.md, and the guide they prove is README.md. Written 2026-11-22.
Status and How to Use It
Every command comes from reading the modules, the chart and Google’s documentation (Sources, at the end). A step whose command is wrong is itself a finding: note it and go on.
- Do Part 1 of
../VALIDATE.md(the images, I1 to I6) inside G2. Do Part 2 (the application, A1 to A19) from G8 on the cluster route and from CR6 on the serverless one; the commands for each “as your cloud’s steps say” are there. Its optional S1 to S7 have a section of their own, “The sign-in registrations”. - Validate one route at a time. Both make a network, a registry and an instance under the same names, so take the first down (G20) before the second, or use a second project.
- Record every result in Results; put a failed I or A step in the row of the step that sent you to it. “Closes item R4” means a pass closes row R4 of the guide’s “Open items and risks”; CR1 to CR14 are the serverless steps here.
- When a check fails, record what you saw. The fix belongs in the files of this repository, not in a change made by hand.
What You Need
| What | Detail |
|---|---|
| A project | Billing on, and Owner on it (guide, P1). Two DNS names whose zone you can add records to: D and OPS |
| A shell with the tools | bash with the gcloud CLI, Docker with buildx, OpenTofu 1.10 or later, kubectl, Helm 3.19 or later, jq and curl: Cloud Shell, or a machine of your own. Every command here runs there, in deploy/gcp/kubernetes or deploy/gcp/serverless, unless it says otherwise |
| A clipboard, for three commands | The first operator’s password (A5), the database password (“The database login”) and, on Cloud Run, the invitation link (A6) are copied, never shown. Cloud Shell has no clipboard command, so run those three on the machine whose browser you use, with the gcloud CLI installed and signed in to the project. CLIP is clip.exe on Windows (Git Bash), pbcopy on macOS, wl-copy or xclip -selection clipboard on Linux |
| The state | No backend is configured, so terraform.tfstate is written in the route’s folder. It holds every generated password (guide, P4): keep that folder to yourself, and delete it after the take-down |
Set once, in every shell you use. The commands assume the modules’ name is forge, as the guide’s do.
I=acme; D=acme.example.com; OPS=ops.acme.example.com # as in ../VALIDATE.md, with your own namesPROJECT=$(gcloud config get-value project); REGION=us-central1 # the region of my.tfvarsB="$PROJECT-forge-$I-keys" # the instance's bucket (tofu output keys_buckets)TAG=0.1.0; CLIP=clip.exe # CLIP matters only where the browser isGetting the Source to Where Docker Runs
The repository has no remote and the engine archive is git-ignored, so both are carried by hand. Two ways:
- A machine of your own with Docker (not checked here): copy the working folder, with
.local/netblueprint-forge-0.20.0.zipin it, the archiveworker/engine.lock.jsonnames. From 0.14.0 on that archive is not published; it comes from the skill repository’s owndistfolder, as the lock’ssourcesays. - Cloud Shell (checked against Google’s pages; not run). On the development machine, in the repository:
git archive --format=tar.gz -o ../forge-src.tar.gz HEAD, which takes only what is committed. Upload that file and the engine archive with Cloud Shell’s More > Upload; both land in your home directory. Then, in Cloud Shell:
mkdir -p ~/forge/.local && tar -xzf ~/forge-src.tar.gz -C ~/forgemv ~/netblueprint-forge-*.zip ~/forge/.local/ && cd ~/forgedocker buildx version; tofu version; helm version --short; kubectl version --client; jq --versionYour source then sits in your own Cloud Shell home directory, on Google’s disk under your Google account, until you delete it (rm -rf ~/forge ~/forge-src.tar.gz) or leave Cloud Shell unused for 120 days.
What Google’s pages say of Cloud Shell: Docker and Helm are installed; the home directory holds 5 GB and is all that outlasts a session; an upload goes to the home directory, with no size limit named; a session ends after 40 minutes to an hour idle and at 12 hours, with 50 hours a week. So Docker’s images go with the session, and the pages do not say where they are kept or how much room they have: do I1 to I6 and the push in one session, and if a build runs out of room, record it and use a machine of your own. The pages do not list kubectl, jq, buildx or OpenTofu: the last line above shows what is there. For OpenTofu use opentofu.org’s standalone installer, again in each new session unless you install it under your home directory; or Cloud Shell’s own terraform, if it is 1.10 or later, written wherever these steps say tofu.
The Cluster Route (GKE Autopilot)
In deploy/gcp/kubernetes. The commands are in the blocks under the table, by step.
| # | Step | Pass When | Proves |
|---|---|---|---|
| G1 | Copy example.tfvars to my.tfvars, set project_id and region, and leave the rest. Then the first real plan, and the apply, with no instances |
The plan ends Plan: 25 to add (15 services, 7 for the network, the registry, 2 for the key ring: a count of the files) and plans no cluster. The apply ends Apply complete. If either fails, record the whole error, the resource it names, whether it was the plan or the apply, and tofu version. A service “not enabled” or “not used before” in a new project: apply again, and record that it was needed |
The modules plan and apply in a real project |
| G2 | From the repository root: Part 1 of ../VALIDATE.md, I1 to I6. Then the guide’s push, and write the two references printed last into my.tfvars as api_image and worker_image |
I1 to I6 as Part 1 says. Both pushes end without error, and each reference ends in @sha256: and 64 characters. The field named in the last command is not confirmed in documentation; docker buildx prints the digest too |
The images build where Docker runs, and Artifact Registry takes them |
| G3 | In my.tfvars give the instance your D (and console_host, if OPS is not ops. before D); cache_token_stored stays false. Plan, apply, then read the cache and the database back |
Apply complete; the cluster, Cloud SQL and the cache take the longest. The cache reads ACTIVE VALKEY_9_1 TOKEN_AUTH SERVER_AUTHENTICATION and the database POSTGRES_18 ENTERPRISE PRIVATE ENCRYPTED_ONLY GOOGLE_MANAGED_INTERNAL_CA. If the apply refuses VALKEY_9_1, the name Google accepts goes in modules/instance/cache.tf |
An instance’s own resources, made as the module says, and the engine version’s name. Closes item R15 (the name) |
| G4 | The cache’s token: the guide’s command, then cache_token_stored = true and the second apply |
The first command says it made version 1. The second prints a number above 1: the token’s length, never the token. After the apply the third prints four settings, each with a length above 0. A length of 1 means value(token) printed nothing (the field’s name is not confirmed in documentation): the same list with --format=json | jq '.[0] | keys' shows the field names without their values |
Token authentication gave the default user a token, the guide’s command copies it unseen, and the settings now hold Cache__Redis. Closes item R15 (the token) |
| G5 | Connect, as the guide’s step 2, and read the cluster back | kubectl get nodes answers without an error. The last command prints True ADVANCED_DATAPATH REGULAR and a version |
kubectl reaches the control plane with a Google sign-in; the cluster is Autopilot with Dataplane V2 on the Regular channel |
| G6 | The guide’s step 3 exactly as written: the namespace, the secret, the two certificate authorities, the values file and the chart. Then the checks | The rollout ends within 15 minutes, with one forge-api pod and two forge-worker pods Running; the secret has four keys; the count of certificates is 2 or more. If the rollout does not end, kubectl -n "forge-$I" get events and the API’s log say why: record both |
Autopilot accepts the chart as it is; the API reached Cloud SQL and ran the database releases; no secret was shown on the way |
| G7 | DNS. Add the CNAME records the first command prints, one for D and one for OPS, and an A record for each of the two names to the address the second prints. Wait, then the rest |
The Gateway reads PROGRAMMED True with that same address. Each certificate reads ACTIVE AUTHORIZED, after minutes or up to an hour. Still PROVISIONING then: check the CNAME. FAILED is never retried by Google: replace that certificate with tofu apply -replace |
Both DNS authorizations, both certificates, and the certificate map on the Gateway’s reserved address |
| G8 | Part 2 of ../VALIDATE.md, A1 to A16. First switch on Cloud KMS’s Data Read audit logs (G10 says how), so that the key’s first use is kept. The commands for each “as your cloud’s steps say” are under this table |
A1 to A16 as Part 2 says. In A2 the cookie is GCLB |
The application on this route. A6 closes item R2 here |
| G9 | The bucket through Cloud Storage FUSE. The API’s image has no shell, so look through the chart’s keys reader, which mounts the same volume as the same user | The API’s pod has a container beside api: the driver’s own. The reader prints 1654; /keys is drwx------ and every file in it -rw-------, all owned by 1654 1654. Names only: never cat a file there |
The bucket is the folder of keys, written by the API as user 1654 and closed to others, with no Google service account. The reader has no fsGroup and the API has: if these modes are not what you see, the API pod’s driver container logs the options it mounted with |
| G10 | Cloud KMS, used by the API as its Kubernetes service account. Data Read audit logs for Cloud KMS must be on: in the console, IAM & Admin, Audit Logs, “Cloud Key Management Service (KMS) API”, tick Data Read, Save. They are off by default and their volume is billed. Then do A8; if A8 came first, restart the API (kubectl -n "forge-$I" rollout restart deployment/forge-api) and sign in with a code again |
An entry with methodName Encrypt or Decrypt, the resourceName of tofu output kms_keys, and an authenticationInfo that names forge-<I> and forge-api, not a Google service account. How Google writes that principal is not confirmed in documentation |
The API reaches Cloud KMS through Workload Identity Federation, with its role on that one key, and wraps the organization’s data key with it |
| G11 | The cache over TLS, after A10 passed with two replicas | No line with RedisConnectionException, RemoteCertificate or UntrustedRoot; Connected to Redis is the good sign (ASP.NET’s and the Redis client’s wording, not confirmed in documentation). RemoteCertificateChainErrors or UntrustedRoot: .NET did not read /etc/forge/ca. RemoteCertificateNameMismatch: the certificate does not name the address in Cache__Redis; sslHost= in modules/instance/secrets.tf is where to give the name it does carry |
.NET trusts Memorystore’s authority from the second folder of SSL_CERT_DIR, and the certificate names the address the API uses. Closes item R4 |
| G12 | TLS to Cloud SQL with VerifyCA |
The first command prints the connection string’s parts without the password, SSL Mode=VerifyCA and Root Certificate=/etc/forge/db/db-ca.pem among them; G3 read ENCRYPTED_ONLY; A1 said the database is ok. The second prints the instance’s DNS names, for the record |
The API’s connections are encrypted and checked against the instance’s own authority. VerifyFull is item R7: see Coverage |
| G13 | The backend policy, as Google made it | The policy’s condition Attached is True. The backend service reads timeoutSec: 3600, sessionAffinity: GENERATED_COOKIE, affinityCookieTtlSec: 86400 and drainingTimeoutSec: 60. If BS is empty, the name is not what the filter assumes (not confirmed in documentation): list them all |
The chart’s GCPBackendPolicy reached the load balancer: with A11 and A16, streams and the live channel last, and a browser stays on one replica (need 4) |
| G14 | The health check policy | Attached is True; the health check reads requestPath: /api/health and port: 8080; every endpoint is HEALTHY |
The chart’s HealthCheckPolicy reached the load balancer (need 8) |
| G15 | NetworkPolicy, and the worker’s isolation (A17): the worker, then the same image in a namespace with no policy | The worker prints BLOCKED and the control REACHED. Both BLOCKED: nothing leaves the cluster at all, which is not the policy’s doing: record it |
Dataplane V2 enforces the chart’s NetworkPolicy: the worker has no way out where the same image elsewhere has (need 6; the guide’s V3) |
| G16 | The database login’s attributes: “The database login”, below | As that section says | Closes item R3 |
| G17 | The API’s commands with kubectl exec: check-engine, then operator reset |
check-engine ends exit 0, with A9’s revision to check. operator reset operator ends exit 0 and prints no password; the file is in the bucket again: copy it, sign in (the console asks again for a password of your own and an authenticator app) and delete it, as in A5 |
The API’s commands run beside the running API with its settings and reach the worker; the way back in works |
| G18 | The live test of the Cloud KMS adapter (docs/architecture/key-management.md, section 7), on a machine with the .NET SDK, the source and the gcloud CLI |
CloudKeyManagementTests passes, with the Google Cloud test not skipped. PERMISSION_DENIED: give your own account roles/cloudkms.cryptoKeyEncrypterDecrypter on that key for the test, and take it away after |
The API’s adapter wraps and unwraps with a real Cloud KMS key |
| G19 | The restore (A18): a backup, a wait, then point-in-time recovery to a new instance. Compare the count of “The database login”, step 4, on both | The clone is made, and both instances count 1 organization. “Too recent”: gcloud sql instances get-latest-recovery-time "forge-$I" says what can be asked for. Then delete the clone, which inherits deletion protection |
A backup and its logs restore to a new server with the organization in it |
| G20 | Take everything down (A19). For a validation instance only: the bucket’s keys open every sealed value | Destroy complete; the listings at the end show nothing of forge; the key’s version reads DESTROY_SCHEDULED. Where the destroy may stop, and what stays billed, are under the block |
The modules can remove what they made |
For G1 to G7:
# G1cp example.tfvars my.tfvars # edit it, then:tofu init && tofu plan -var-file=my.tfvars -var 'instances={}'tofu apply -var-file=my.tfvars -var 'instances={}'# G2, from the repository root (cd ../../..), after I1 to I6REGISTRY=$(tofu -chdir=deploy/gcp/kubernetes output -raw registry); gcloud auth configure-docker "${REGISTRY%%/*}"docker buildx build --platform linux/amd64 -f deploy/compose/Dockerfile.api -t "$REGISTRY/api:$TAG" --push .docker buildx build --platform linux/amd64 -f deploy/compose/Dockerfile.worker -t "$REGISTRY/worker:$TAG" --push .for n in api worker; do gcloud artifacts docker images describe "$REGISTRY/$n:$TAG" --format='value(image_summary.fully_qualified_digest)'; done# G3, in deploy/gcp/kubernetes againtofu plan -var-file=my.tfvars && tofu apply -var-file=my.tfvarsgcloud memorystore instances describe "forge-$I" --location="$REGION" --format='value(state,engineVersion,authorizationMode,transitEncryptionMode)'gcloud sql instances describe "forge-$I" --format='value(databaseVersion,settings.edition,ipAddresses[0].type,settings.ipConfiguration.sslMode,settings.ipConfiguration.serverCaMode)'# G4gcloud memorystore instances token-auth-users auth-tokens list --instance="forge-$I" --location="$REGION" \ --token-auth-user=default --limit=1 --format='value(token)' \ | gcloud secrets versions add "forge-$I-cache-token" --data-file=-gcloud secrets versions access latest --secret="forge-$I-cache-token" | wc -c# cache_token_stored = true in my.tfvars, tofu apply -var-file=my.tfvars, then:gcloud secrets versions access latest --secret="forge-$I-settings" | jq 'map_values(length)'# G5gcloud container clusters get-credentials "$(tofu output -raw cluster_name)" --region "$(tofu output -raw region)" && kubectl get nodesgcloud container clusters describe "$(tofu output -raw cluster_name)" --location "$REGION" \ --format='value(autopilot.enabled,networkConfig.datapathProvider,releaseChannel.channel,currentMasterVersion)'# G6, after the guide's step 3. HELM is that step's install command, kept for G8 and G9.HELM="helm upgrade --install forge ../../helm/netblueprint-forge -n forge-$I -f ../../helm/netblueprint-forge/values-gcp.yaml -f $I.values.yaml"kubectl -n "forge-$I" rollout status deployment/forge-api --timeout=15m; kubectl -n "forge-$I" get podskubectl -n "forge-$I" get secret forge-settings -o json | jq '.data | keys'kubectl -n "forge-$I" get configmap forge-db-ca forge-cache-ca -o json | jq -r '.items[].data[]' | grep -c 'BEGIN CERTIFICATE'# G7tofu output -json certificate_dns_records | jq -r --arg i "$I" '.[$i][] | "\(.name) \(.type) \(.data)"'gcloud compute addresses describe "forge-$I-gateway" --global --format='value(address)'kubectl -n "forge-$I" get gateway forgefor c in cert console-cert; do gcloud certificate-manager certificates describe "forge-$I-$c" \ --format='value(managed.state,managed.authorizationAttemptInfo[0].state)'; doneFor G8, what Part 2 leaves to this route. A8’s log, A17, A18 and A19 are G10, G15, G19 and G20.
# A5, on the machine with the browser: the password's line alone, to the clipboard. Paste it into the console's sign-in.gcloud storage cat "gs://$B/first-operator-password.txt" | sed -n 's/^First password: //p' | tr -d '\r\n' | $CLIP# A5, afterwards: every version of the file, then a listing (names only) that no longer has it.gcloud storage rm --all-versions "gs://$B/first-operator-password.txt"; gcloud storage ls --all-versions "gs://$B/"# A6kubectl -n "forge-$I" exec deploy/forge-api -c api -- dotnet NetBlueprint.Registry.Api.dll set-up \ --organization "Validation" --administrator you@example.com --address "https://$D"; echo "exit $?"# A10: two replicas. A13 and A14: back to one with $HELM alone; then two again for A15 and A16.$HELM --set api.replicas=2 && kubectl -n "forge-$I" rollout status deployment/forge-api# A12: stop onekubectl -n "forge-$I" delete "$(kubectl -n "forge-$I" get pod -l app.kubernetes.io/component=api -o name | head -1)"- A5. The file is a few lines of text, so the command takes the password’s line alone. The bucket keeps versions, hence
--all-versions; soft delete still holds a restorable copy for seven days, of a password that no longer works. A403: give your accountroles/storage.objectUseron the bucket. - A6. The link comes to your terminal and to no log. It is the one secret these steps let onto a screen, because A6 asks for it: open it at once (A7); it works once.
For G9 to G19:
# G9 (add --set api.replicas=2 to both helm lines while the API runs two)$HELM --set keysReader.enabled=truekubectl -n "forge-$I" get pod -l app.kubernetes.io/component=api -o jsonpath='{.items[0].spec.initContainers[*].name} {.items[0].spec.containers[*].name}{"\n"}'kubectl -n "forge-$I" wait --for=condition=Ready pod/forge-keys-reader --timeout=5mkubectl -n "forge-$I" exec forge-keys-reader -c reader -- sh -c 'id -u; ls -lnd /keys; ls -ln /keys'$HELM# G10gcloud logging read 'protoPayload.serviceName="cloudkms.googleapis.com" AND protoPayload.methodName=("Encrypt" OR "Decrypt")' \ --freshness=2h --limit=5 --format='yaml(timestamp,protoPayload.methodName,protoPayload.resourceName,protoPayload.authenticationInfo)'# G11kubectl -n "forge-$I" logs -l app.kubernetes.io/component=api -c api --tail=-1 | grep -iE 'redis|certificate' | tail -20# G12gcloud secrets versions access latest --secret="forge-$I-settings" | jq -r '.ConnectionStrings__Registry' | tr ';' '\n' | grep -v '^Password='gcloud sql instances describe "forge-$I" --format='yaml(dnsNames)'# G13kubectl -n "forge-$I" describe gcpbackendpolicy forge-api | grep -A8 ConditionsBS=$(gcloud compute backend-services list --global --filter="name~forge-$I-forge-api" --format='value(name)'); echo "$BS"gcloud compute backend-services describe "$BS" --global --format='yaml(timeoutSec,sessionAffinity,affinityCookieTtlSec,connectionDraining,healthChecks)'# G14kubectl -n "forge-$I" describe healthcheckpolicy forge-api | grep -A8 Conditionsgcloud compute health-checks list --global --filter="name~forge-$I-forge-api" --format='yaml(name,type,httpHealthCheck)'gcloud compute backend-services get-health "$BS" --global# G15F="fetch('https://example.com').then(()=>console.log('REACHED'),()=>console.log('BLOCKED'))"kubectl -n "forge-$I" exec deploy/forge-worker -- node -e "$F"WIMG=$(kubectl -n "forge-$I" get deployment forge-worker -o jsonpath='{.spec.template.spec.containers[0].image}')kubectl run egress-control --rm -i --restart=Never --pod-running-timeout=5m --image="$WIMG" --command -- node -e "$F"# G17kubectl -n "forge-$I" exec deploy/forge-api -c api -- dotnet NetBlueprint.Registry.Api.dll check-engine; echo "exit $?"kubectl -n "forge-$I" exec deploy/forge-api -c api -- dotnet NetBlueprint.Registry.Api.dll operator reset operator; echo "exit $?"# G18, in api/, after gcloud auth application-default loginFORGE_LIVE_GCP_KMS_KEY_NAME="<the key's name, from tofu output kms_keys>" dotnet test --filter CloudKeyManagementTests# G19gcloud sql backups create --instance="forge-$I" && T=$(date -u +%Y-%m-%dT%H:%M:%SZ) && sleep 600gcloud sql instances clone "forge-$I" "forge-$I-restore" --point-in-time "$T"gcloud sql instances patch "forge-$I-restore" --no-deletion-protection && gcloud sql instances delete "forge-$I-restore" # after comparingFor G20:
KEY=$(tofu output -json kms_keys | jq -r --arg i "$I" '.[$i]'); echo "$KEY" # note it: the outputs go with the destroyhelm uninstall forge -n "forge-$I" && kubectl delete namespace "forge-$I" # GKE takes the load balancer awaygcloud compute addresses describe "forge-$I-gateway" --global --format='value(status)' # repeat until RESERVEDgcloud storage rm --all-versions "gs://$B/**" # every version of every key filetofu apply -var-file=my.tfvars -var deletion_protection=false # takes the protections off: the cluster, the databasetofu state rm "module.instance[\"$I\"].google_kms_crypto_key.kek[0]" # the key has prevent_destroytofu destroy -var-file=my.tfvars -var deletion_protection=falseRING=$(echo "$KEY" | cut -d/ -f6); K=$(echo "$KEY" | cut -d/ -f8) # the key stays: stop its rotation, destroy its versionsgcloud kms keys update "$K" --keyring="$RING" --location="$REGION" --remove-rotation-schedulegcloud kms keys versions destroy 1 --key="$K" --keyring="$RING" --location="$REGION"gcloud kms keys versions list --key="$K" --keyring="$RING" --location="$REGION"gcloud sql instances list; gcloud memorystore instances list --location="$REGION"; gcloud container clusters listgcloud compute forwarding-rules list; gcloud compute addresses list; gcloud compute routers list; gcloud storage ls; gcloud secrets listWhere the destroy may stop. Record where, then:
- At
google_sql_user.forge_adminorgoogle_sql_database.forge: it should not. Cloud SQL does not delete a user that was granted a role (the provider’s page), and release 0004 grants this oneforge_app, so the modules only drop both from the state (deletion_policy = "ABANDON") and the server’s deletion takes them. If it stops here all the same, record it. - At
google_service_networking_connection: it should not. Cloud SQL holds its addresses for a time after a server is deleted (the provider’s page), so the modules take the peering off the network (deletion_policy = "REMOVE_PEERING"). If it stops here all the same, destroy again later and record it. - At the network: something GKE made is still there.
gcloud compute network-endpoint-groups listandgcloud compute firewall-rules listshow what.
What stays billed. The key’s versions: Cloud KMS bills a version while it is enabled, disabled or scheduled for destruction, and destruction waits 30 days by default, so one version for about a month more. The key ring and the key stay for good and cost nothing. The bucket’s deleted objects are soft-deleted, and billed, for seven days. Logs stay 30 days. Then remove the four DNS records, untick Data Read for Cloud KMS if you ticked it, and delete the folder that holds the state.
The Serverless Route (Cloud Run)
In deploy/gcp/serverless. Where a step says “as G3”, the commands are G3’s.
| # | Step | Pass When | Proves |
|---|---|---|---|
| CR1 | As G1, in this folder | Plan: 26 to add: G1’s 25 and the rule that denies the worker’s egress. Apply complete. Record a failure as in G1 |
The serverless root plans and applies in a real project |
| CR2 | The images: as G2, with REGISTRY from this folder. Part 1 need not be done twice |
Two references in my.tfvars, each ending in @sha256: and 64 characters |
This route’s registry takes the images |
| CR3 | The instance: as G3 and G4, with api_min_instances and api_max_instances at 1. Then list the secrets and what the API reads |
G3’s and G4’s passes. If an apply stops because the API’s revision is not ready, the API’s log says why (CR10’s command, without its text filter): record it. The list has forge-<I>-connection-string, -signing-key, -worker-key and, after the second apply, -cache-redis, beside -settings, -db-ca, -cache-ca and -cache-token. The last command prints each secret setting with the secret and the pinned version it comes from, and no value |
Each secret setting is a secret of its own, read by Cloud Run at a fixed version. Closes item R15 on this route |
| CR4 | The two services, as made | Worker: ingress: internal, invoker-iam-disabled: 'true', a network interface with the tag forge-worker, vpc-access-egress: all-traffic. API: ingress: internal-and-cloud-load-balancing, invoker-iam-disabled: 'true', sessionAffinity: 'true', timeoutSeconds: 3600, containerConcurrency: 1000, and a keys volume on the bucket with uid=1654, gid=1654, file-mode=600, dir-mode=700. Both curl lines print 404: nothing answers at a run.app address from outside. An apply that failed on the invoker check: the organization policy run.managed.requireInvokerIam forbids switching it off |
The worker takes requests from inside the VPC only and the API from the load balancer only, neither asking for a Google identity token; the bucket is mounted as the API’s user |
| CR5 | DNS, as G7: the CNAME records of certificate_dns_records, and an A record for D and for OPS to the address of tofu output load_balancer_addresses |
Both certificates read ACTIVE AUTHORIZED, and curl -sI "http://$D/" answers 301 with an https:// location |
Both certificates, the certificate map on the HTTPS proxy, and the redirect from HTTP |
| CR6 | Part 2 of ../VALIDATE.md, A1 to A16, with Data Read audit logs for Cloud KMS on first (G10). The commands for each “as your cloud’s steps say” are under this table |
A1 to A16 as Part 2 says. In A2 the cookie is Cloud Run’s own, not the load balancer’s (GAESA: the name is not confirmed in documentation). A1’s engine version shows the API reaching the worker’s internal address through the VPC |
The application on this route. A6 closes item R2 here |
| CR7 | The Host header: Part 2’s A4 |
404 on D and 401 on OPS. 404 on both: the API does not see the console’s host name |
The load balancer and Cloud Run hand the browser’s Host to the API unchanged. Closes item R16 (the host name) |
| CR8 | X-Forwarded-For: Part 2’s A2, A13 and A14, with one API instance |
A2 has strict-transport-security; A13 prints ten 401 and then 429; A14 prints 401: Cloud Run adds no entry of its own. If A14 prints 429 (A2 then often lacks strict-transport-security as well): add "Logging__LogLevel__Microsoft.AspNetCore.HttpOverrides" = "Debug" to api_env in serverless/run.tf, apply, repeat A13, and read the log (CR10’s command). A line Unknown proxy: names an address the API does not trust: its network goes in Proxy__KnownNetworks__2. No such line: the headers are believed but hold one entry more than expected, and Proxy__ForwardLimit becomes "3". Take the debug setting out again (its name is not confirmed in documentation) |
The API tells callers apart behind the load balancer and Cloud Run (need 7). Closes item R6 |
| CR9 | The worker’s egress rule (A17). Cloud Run has no shell, so a one-off job on the worker’s image, account, network, subnet and tag tries four addresses; then the control, the same job without the tag | The rule reads EGRESS, priority 0, denied all, 0.0.0.0/0, target tag forge-worker. With the tag: BLOCKED for example.com, 1.1.1.1 and storage.googleapis.com. Without it: REACHED for those three, which shows the test can tell. A REACHED with the tag is a way out: record it and stop. The metadata server, 169.254.169.254: BLOCKED means the rule covers it. REACHED means Cloud Run answers it inside the instance, where no rule of the VPC applies (Google’s pages do not say which). The worker could then get a token for its own account, which may read only the worker’s key, and with the other three blocked it has nowhere to use or send it. Record which; if REACHED, the guide’s “the metadata server included” needs other words |
The deny rule on the tag leaves the worker no way out. Closes item R5 |
| CR10 | The cache over direct VPC egress: A10 with two instances, then the API’s log | A10 passed: the change crossed from one instance to the other. The log has no line with RedisConnectionException or RemoteCertificate; Connected to Redis is the good sign. Remedies as G11 |
Memorystore’s endpoint answers a Cloud Run service through direct VPC egress, over TLS with the authority SSL_CERT_DIR adds. Closes item R8, and item R4 on this route |
| CR11 | The command job: check-engine after A9, then operator reset |
Each execution succeeds. check-engine’s output, read with the invitation’s line left out, says every revision is sound; a failure that names the worker means the job does not reach the worker’s internal address. operator reset prints no password, and the file is in the bucket again: copy it, sign in and delete it, as in A5 |
The job runs the API’s commands with the API’s settings, bucket and network, and reaches the worker through the VPC. Closes item R16 (the job) and, with A6, item R2 |
| CR12 | Cloud KMS, used by the API service’s account: G10’s command, after A8. Each new revision unwraps the data key again, so A10’s apply makes a fresh entry | An entry whose authenticationInfo.principalEmail is forge-<I>-api@<project>.iam.gserviceaccount.com |
The API service’s account uses the key, with its role on that one key |
| CR13 | The database login and the restore: Cloud SQL’s own, made by the same module on both routes, so once is enough. If the cluster route was not validated, do “The database login” and G19 here | As there | Closes item R3, if G16 did not |
| CR14 | Take everything down (A19): G20’s block without its helm and address lines. Its -var deletion_protection=false apply also takes the protection off the two Cloud Run services and the command job, which this provider protects by default. Delete CR9’s job first if it is still there |
As G20. Stopped at the subnet: Cloud Run frees its addresses an hour or two after its services go (Google’s page); destroy again then | The serverless root can remove what it made |
For CR3, CR4 and CR6. In Part 2, A8’s log, A17, A18 and A19 are CR12, CR9, G19 and CR14.
# CR3gcloud secrets list --filter="name~forge-$I-" --format='value(name)'gcloud run services describe "forge-$I-api" --region="$REGION" --format=json \ | jq -r '.spec.template.spec.containers[0].env[] | select(.valueFrom) | "\(.name) <- \(.valueFrom.secretKeyRef.name):\(.valueFrom.secretKeyRef.key)"'# CR4for s in worker api; do gcloud run services describe "forge-$I-$s" --region="$REGION" \ --format='yaml(metadata.annotations,spec.template.metadata.annotations,spec.template.spec.timeoutSeconds,spec.template.spec.containerConcurrency,spec.template.spec.volumes)'; donefor s in worker api; do curl -s -o /dev/null -w "$s %{http_code}\n" \ "$(gcloud run services describe "forge-$I-$s" --region="$REGION" --format='value(status.url)')/healthz"; done# CR6. A5: the cluster route's two commands. A6: the job's output, the invitation link in it, goes to Cloud Logging.JOB=$(tofu output -json api_command_jobs | jq -r --arg i "$I" '.[$i]')gcloud run jobs execute "$JOB" --region="$REGION" --wait \ --args=set-up,--organization,Validation,--administrator,you@example.com,--address,"https://$D"# A6, on the machine with the browser: the link from the log to the clipboard, never shown. Open it at once (A7).gcloud logging read "resource.type=cloud_run_job AND resource.labels.job_name=forge-$I-api-command AND textPayload:\"/invite#\"" \ --freshness=30m --limit=1 --format='value(textPayload)' | tr -d '\r\n' | $CLIP# A10: api_min_instances = 2 and api_max_instances = 2 in my.tfvars, then tofu apply -var-file=my.tfvars# A12, then A13 and A14: both back to 1, and apply. Two again for A15 and A16.- A6: the invitation link then sits in a log. It works once, so after A7 what the log holds is spent; unspent, it works for seven days. Cloud Logging cannot delete one entry: the
_Defaultbucket keeps it for 30 days, andgcloud logging logs deleteremoves a whole log, here the output of every Cloud Run service and job in the project. - A12. Cloud Run has no command that stops one instance. The apply back to one instance makes a new revision, which replaces every instance: each open page must reconnect, a harder test than A12 asks.
For CR9 to CR11:
# CR9gcloud compute firewall-rules describe forge-worker-deny-egress --format='yaml(direction,priority,denied,destinationRanges,targetTags)'WIMG=$(gcloud run services describe "forge-$I-worker" --region="$REGION" --format='value(spec.template.spec.containers[0].image)')S='(async()=>{for(const u of process.argv.slice(1)){try{const r=await fetch(u);console.log("REACHED "+u+" "+r.status)}catch(e){console.log("BLOCKED "+u)}}})()'gcloud run jobs create "forge-$I-egress-check" --region="$REGION" --image="$WIMG" \ --service-account="forge-$I-worker@$PROJECT.iam.gserviceaccount.com" \ --network=forge --subnet="forge-$REGION" --network-tags=forge-worker --vpc-egress=all-traffic --max-retries=0 --task-timeout=300 \ --command=node --args="-e,$S,https://example.com/,https://1.1.1.1/,https://storage.googleapis.com/,http://169.254.169.254/" \ --execute-now --waitREAD="resource.type=cloud_run_job AND resource.labels.job_name=forge-$I-egress-check"gcloud logging read "$READ" --freshness=10m --format='value(timestamp,textPayload)' # with the taggcloud run jobs update "forge-$I-egress-check" --region="$REGION" --clear-network-tagsgcloud run jobs execute "forge-$I-egress-check" --region="$REGION" --waitgcloud logging read "$READ" --freshness=5m --limit=4 --format='value(timestamp,textPayload)' # the controlgcloud run jobs delete "forge-$I-egress-check" --region="$REGION" --quiet# CR10 (and CR8's "Unknown proxy")gcloud logging read "resource.type=cloud_run_revision AND resource.labels.service_name=forge-$I-api AND textPayload:(\"Redis\" OR \"certificate\" OR \"Unknown proxy\")" \ --freshness=2h --limit=20 --format='value(timestamp,textPayload)'# CR11gcloud run jobs execute "$JOB" --region="$REGION" --wait # check-enginegcloud run jobs execute "$JOB" --region="$REGION" --wait --args=operator,reset,operatorgcloud logging read "resource.type=cloud_run_job AND resource.labels.job_name=$JOB AND NOT textPayload:\"/invite#\"" \ --freshness=30m --format='value(timestamp,textPayload)'The Sign-In Registrations: S1 to S7
Optional: only if you registered the instance with Microsoft, Google or Apple, or set the operators’ single sign-on or breach check (the guide’s K2). ../VALIDATE.md has the steps; do them after A16 and before the restore and the teardown. This is how each “as your cloud’s steps say” is done on Google Cloud.
| Step | Cluster Route | Cloud Run |
|---|---|---|
| S1 | Plan with both files, below, and read what it would touch: a new version of the secret forge-$I-settings and nothing else that exists in Google Cloud, with helm_values among the changed outputs. Apply, then the guide’s “After a change, on the cluster route”. The two listings below then name the new settings |
The plan makes one secret for each secret you set, each with a version and the API’s right to read it, replaces the version of forge-$I-settings, and changes the API service and the command job. Apply; the new revision rolls out by itself. CR3’s two lines then list the new secrets and the settings read from them |
| S2 to S6 | As written | As written. S2 with Apple registered is the first sight of open item R17: apple is listed only if the key reached the API, and S4 with an Apple ID proves it arrived whole |
| S7 | The first log line below prints 0 |
The second prints nothing |
A database, cache, key, bucket or network in S1’s plan is a finding. None of these commands prints a secret: the listings are of names.
tofu plan -var-file=my.tfvars -var-file=secrets.tfvars# S1, cluster route: the keys of the cluster's secret, and the settings the pods are given.kubectl -n "forge-$I" get secret forge-settings -o json | jq -r '.data | keys[]'kubectl -n "forge-$I" get deploy forge-api -o json | jq -r '.spec.template.spec.containers[] | select(.name=="api") | .env[].name' | grep -E '^(SignIn|Platform__(BreachCheck|SingleSignOn))'# S1, Cloud Run: CR3's two lines, and the settings that are not secret.gcloud run services describe "forge-$I-api" --region="$REGION" --format=json \ | jq -r '.spec.template.spec.containers[0].env[] | select(.value) | .name' | grep -E '^(SignIn|Platform__(BreachCheck|SingleSignOn))'# S7kubectl -n "forge-$I" logs -l app.kubernetes.io/component=api -c api --since=10m --tail=-1 | grep -c 'Pwned Passwords'gcloud logging read "resource.type=cloud_run_revision AND resource.labels.service_name=forge-$I-api AND textPayload:\"Pwned Passwords\"" \ --freshness=10m --format='value(timestamp,textPayload)'The Database Login
One route is enough: the login is Cloud SQL’s, and both routes make it with the same module. The most direct way that changes nothing is Cloud SQL Studio, in the console. It runs statements through the Cloud SQL Admin API (executeSql), not over the network, so the instance’s private address needs no opening. Google’s Studio page takes built-in users and names no network requirement, and its Data API page says executeSql works with instances on private services access; neither says “Studio with a private address” in so many words, so that part is not confirmed in documentation and this step proves it.
- On the machine with the browser, copy the login’s password. It is never shown:
gcloud secrets versions access latest --secret="forge-$I-settings" | sed -n 's/.*Password=\([^;]*\);.*/\1/p' | tr -d '\r\n' | $CLIP- In the console: SQL, the instance
forge-<I>, Cloud SQL Studio. Databaseforge, built-in database authentication, userforge_admin, paste the password, Authenticate. Then empty the clipboard:printf '' | $CLIP. - Run both statements in one go:
select rolname, rolsuper, rolbypassrls, rolcreaterole from pg_roles where rolname in ('forge_admin', 'forge_app');select count(*) from organizations;Pass when forge_admin reads f, f, t, forge_app reads f, f, f, and the count is 0 although A6 made an organization: row-level security holds this login until it names one. Proves need 1: the login can create a role, is no superuser and does not bypass row-level security. Closes item R3. If Studio refuses to run a statement, it may want the instance’s Data API access: gcloud sql instances patch "forge-$I" --data-api-access=ALLOW_DATA_API, and DISALLOW_DATA_API afterwards; record it.
- For G19, the count that sees every organization, run in one go on each instance, since Studio starts a new session for every run:
select set_config('app.scope', 'platform', false); select count(*) from organizations;
Coverage
Every row of the guide with status Verify, and every # Verify: line of the modules, with the step that proves it.
| Guide | Modules | Proved By |
|---|---|---|
Item R2: set-up in a container |
G8 (A6); CR6 (A6) and CR11 | |
Item R3: BYPASSRLS; need 1’s rolcreaterole |
modules/instance/database.tf |
“The database login” (G16, CR13) |
Item R4: SSL_CERT_DIR, and the name in the cache’s certificate |
serverless/run.tf (SSL_CERT_DIR) |
G11 for the chart’s same setting; CR10 |
| Item R5: the deny-all egress rule | serverless/main.tf |
CR9 |
Item R6: Cloud Run and X-Forwarded-For |
serverless/run.tf (Proxy__ForwardLimit) |
CR8 |
Item R7: VerifyFull |
modules/instance/secrets.tf (VerifyCA) |
Not by a step. G12 proves VerifyCA and records the instance’s DNS names. Google’s page answers the question: with an authority per instance, checking the authority proves the server, and checking the DNS name is offered only with Private Service Connect; with the shared authority it is offered on private services access too, under the instance’s sql-psa.goog name. A trial is a second deployment: server_ca_mode = "GOOGLE_MANAGED_CAS_CA" in database.tf, and that name with VerifyFull in secrets.tf |
| Item R8: Memorystore through direct VPC egress | serverless/run.tf (the API’s egress) |
CR10 |
| Item R9: Assured Workloads | No step: a question for Google’s page, not for a deployment. Read 2026-11-22, the first part of a long page: for FedRAMP High, GKE is listed, and the load balancers listed are regional; the global external one both routes use is not among them | |
Item R15: the token, its command, VALKEY_9_1 |
modules/instance/cache.tf; modules/instance/secrets.tf (the token) |
G3 and G4; CR3 |
Item R16: the Host header; the job and the worker |
serverless/load_balancer.tf; serverless/run.tf (the job) |
CR7; CR11 |
| Item R17: Cloud Run gives a secret’s value with its line breaks (Apple’s key) | serverless/run.tf (the secret settings) |
S2 and S4 on Cloud Run, with Apple registered. Without an Apple registration: by no step |
The guide’s checks V1 to V7 are A1, A2, G15 (CR9 on Cloud Run), A10, A16, A12, and A13 with A14.
Results
| Step | Date | Result | What Was Seen |
|---|---|---|---|
| G1 | |||
| G2 | |||
| G3 | |||
| G4 | |||
| G5 | |||
| G6 | |||
| G7 | |||
| G8 | |||
| G9 | |||
| G10 | |||
| G11 | |||
| G12 | |||
| G13 | |||
| G14 | |||
| G15 | |||
| G16 | |||
| G17 | |||
| G18 | |||
| G19 | |||
| G20 | |||
| CR1 | |||
| CR2 | |||
| CR3 | |||
| CR4 | |||
| CR5 | |||
| CR6 | |||
| CR7 | |||
| CR8 | |||
| CR9 | |||
| CR10 | |||
| CR11 | |||
| CR12 | |||
| CR13 | |||
| CR14 | |||
| S1 | |||
| S2 | |||
| S3 | |||
| S4 | |||
| S5 | |||
| S6 | |||
| S7 |
Sources
Read on 2026-11-22. “Fetched”: the page was fetched by a tool that answers questions about it and quotes it; none was read whole by eye. “Search”: seen only in search results. Under docs.cloud.google.com unless named. What a page did not confirm is marked “not confirmed in documentation” at its step.
| Source | What It Gave | How |
|---|---|---|
| /shell/docs/how-cloud-shell-works, uploading-and-downloading-files, quotas-limits | Docker and Helm installed; 5 GB of home; More > Upload into the home directory; session limits and the 120 days. Nothing on kubectl, jq, buildx, OpenTofu or the room Docker’s images have | Fetched |
gcloud reference: memorystore instances token-auth-users auth-tokens list, memorystore instances describe; /memorystore/docs/valkey/manage-basic-auth, supported-environments; the Instance resource |
The token command and its flags; the default user gets a token by itself; field names. Not the list’s token field, nor any list of engine version names; Cloud Run is still listed with a connector |
Fetched |
gcloud reference: secrets versions add and access, storage cat, rm and ls, artifacts docker images describe, logging read, logging logs delete, topic escaping, container clusters get-credentials and describe, compute addresses describe, compute backend-services describe and get-health, compute health-checks list; the backendServices resource |
The flags as used, and the backend service’s field names. Not the image_summary field |
Fetched |
| /kubernetes-engine/docs/how-to: configure-gateway-resources, deploying-gateways, cloud-storage-fuse-csi-driver-setup, dataplane-v2, network-policy; concepts/workload-identity | The policies’ fields and the Attached condition; Programmed; the principal and role on the bucket; Dataplane V2 always on in Autopilot. Not the backend service’s name nor the driver container’s |
Fetched |
| /certificate-manager/docs/deploy-google-managed-dns-auth, troubleshooting | The describe commands, the states, the waits, and that FAILED is not retried |
Fetched |
/kms/docs/audit-logging, destroy-restore, key-states; /logging/docs/audit/configure-data-access; gcloud reference: kms keys update, kms keys versions list and destroy; cloud.google.com/kms/pricing |
Encrypt and Decrypt are Data Read; how to switch the logs on; 30 days scheduled for destruction (the destroy page still says 24 hours); a version is billed while enabled, disabled or scheduled for destruction. Not how a Kubernetes service account is written in an entry |
Fetched; the pricing page: search |
/sql/docs/postgres: manage-data-using-studio, executesql-instance, users, configure-ssl-instance, backup-recovery/pitr and restoring, deletion-protection, delete-instance; gcloud reference: sql instances clone and execute-sql, sql backups create and restore |
Studio: built-in users, executeSql, a new session each run, no network requirement named; the Data API on private services access; DNS-name checks by authority mode; a clone at a point in time, which inherits deletion protection; an instance’s name can be used again at once |
Fetched |
/run/docs: securing/ingress, private-networking and managing-access, configuring/vpc-direct-vpc, session-affinity and services/cloud-storage-volume-mounts, container-contract, logging, troubleshooting; gcloud reference: run jobs create, execute and update |
Ingress values and the 404; the invoker check’s annotation; direct VPC egress, its tags and the one to two hours before a subnet is free; the job flags; log resource types. Not jobs as callers of an internal service, the affinity cookie’s name, the network annotations’ names, nor what reaches the metadata server |
Fetched |
| /load-balancing/docs/https (its first 100,000 characters) | Two entries appended to X-Forwarded-For; the Host header preserved |
Fetched |
| /logging/docs/buckets; /storage/docs/soft-delete, access-control/iam-roles; /assured-workloads/docs/supported-products (its first part) | 30 days in _Default; seven days of soft delete, billed; project owners’ roles on a new bucket; the FedRAMP High rows named under Coverage |
Fetched |
Outside Google: the google provider’s pages for google_sql_user, google_sql_database and google_service_networking_connection (GitHub); opentofu.org/docs/intro/install/standalone; learn.microsoft.com, “Configure ASP.NET Core to work with proxy servers and load balancers” |
deletion_policy, and why a destroy can stop at each; the installer; the Unknown proxy debug line |
Fetched |
This repository: the modules, both outputs.tf, the chart, api/, db/releases/0004 |
Every resource name, output, file text and the policy on organizations |
Read in full |