Agent Governance: Deploy, Verify, Operate#
This guide covers the governed SecOps multi-agent stack under terraform/,
governed_agents/, and scripts/governance/. It deploys five Vertex AI
Reasoning Engines (soc_orchestrator, cti_researcher, threat_hunter,
detection_engineer, tier2_responder) behind a single egress Agent Gateway
and enforces per-agent, per-tool, and per-content policy on every outbound
call.
What this adds#
Every outbound LLM, MCP, REST, and A2A call from the five agents passes through
one Google-managed Agent Gateway (terraform/30-gateway.tf). The gateway
refuses any hostname that is not in Agent Registry, asks IAP to evaluate IAM v3
access policies against the calling agent’s SPIFFE workload identity, screens
request and response bodies with Model Armor, and asks a Semantic Governance
policy engine whether a containment action against a Tier-0 asset is allowed.
No agent holds a static credential: the GTI API key lives in Agent Platform Auth
Manager and is retrievable only by cti_researcher. See
Gemini Decision 1 for Governed SOC Agents for the
gemini-decision-1 pre-flight routing, rubric triage, and Auth Manager
integration across all five engines.
Layer |
What enforces it |
Terraform file(s) |
|---|---|---|
Zero-tool orchestrator, narrow specialists |
|
|
Per-agent workload identity, no static keys |
|
|
Auth Manager for the GTI API key |
|
|
Agent Registry inventory |
|
|
Default-deny egress Agent Gateway |
|
|
Per-tool CEL allowlists (3 IAM v3 access policies) |
IAP |
|
Inline Model Armor |
Cyber-tuned request and response templates behind a |
|
Semantic Governance crown-jewel policy |
Policy engine reached over Private Service Connect and private DNS; built-in Tier-0 Crown Jewel Change-Control policy attached to |
|
Cloud Monitoring dashboard and log-based metrics |
|
|
flowchart LR
GE["Gemini Enterprise (optional)"] --> ORCH[soc_orchestrator]
ORCH -->|A2A| CTI[cti_researcher]
ORCH -->|A2A| TH[threat_hunter]
ORCH -->|A2A| DE[detection_engineer]
ORCH -->|A2A| T2[tier2_responder]
CTI --> GW["Egress Agent Gateway"]
TH --> GW
DE --> GW
T2 --> GW
GW -->|"IAP IAM v3 CEL"| AUTHZ[Allow or 403]
GW -->|"Model Armor"| MA[Content verdict]
GW -->|"Semantic Governance"| SGP[Crown-jewel verdict]
GW --> GTI["GTI REST (cti_researcher only)"]
GW --> MCP["Chronicle OneMCP (per-tool allowlist)"]
GW --> VAI["Vertex AI models"]
Figure 1. Agent Platform > Gateways details for agw-secops-egress in Agent-to-Anywhere (egress) mode, showing the bound regional Agent Registry, the three Service Extensions (agw-secops-ma-content-authz, agw-secops-iap-authz, and agw-secops-sgp-content-authz), and the Semantic Governance PSC network attachment.#
Figure 2. Agent Platform > Topology graph showing live discovered MCP traffic edges from agw-secops-threat-hunter and agw-secops-detection-engineer to MCP for chronicle.googleapis.com.#
Cloud Console routes#
Surface |
Cloud Console URL ( |
|---|---|
Reasoning Engine runtimes and SPIFFE identities |
|
Live agent-to-resource topology |
|
Agent Registry (agents, MCP servers, endpoints) |
|
Egress Agent Gateway and Service Extensions |
|
IAM v3 Unified Access Policies |
|
Semantic Governance Business Policies |
|
Model Armor templates |
|
SecOps Governance dashboard |
|
Prerequisites#
APIs and service identities#
terraform/00-apis.tf enables the following services and adopts any that are
already on (disable_on_destroy = false):
aiplatform.googleapis.com,agentregistry.googleapis.com,agentidentity.googleapis.com,discoveryengine.googleapis.com,chronicle.googleapis.comnetworkservices.googleapis.com,networksecurity.googleapis.com,iap.googleapis.com,modelarmor.googleapis.comcompute.googleapis.com,dns.googleapis.comcloudresourcemanager.googleapis.com,serviceusage.googleapis.com,iamcredentials.googleapis.com,storage.googleapis.com,logging.googleapis.com,monitoring.googleapis.com,cloudtrace.googleapis.com,telemetry.googleapis.com,secretmanager.googleapis.com,orgpolicy.googleapis.comapphub.googleapis.com,apptopology.googleapis.com,cloudapiregistry.googleapis.com,iam.googleapis.com,observability.googleapis.com,securitycenter.googleapis.com
The same file eagerly creates the Google-managed service agents for
aiplatform.googleapis.com and discoveryengine.googleapis.com
(google_project_service_identity.service_agents) so later IAM bindings have a
principal to bind to.
Org policy#
Binding an IAM v3 access policy is blocked by the managed constraint
iam.managed.disableAccessPolicyBinding, which new organizations enforce by
default. terraform/52-policies-access.tf disables it for this project only
(google_org_policy_policy.allow_access_policy_binding with enforce = "FALSE")
and then waits 120 seconds (time_sleep.access_policy_binding_override) before
creating the first binding. Managing that override requires
roles/orgpolicy.policyAdmin on the organization. If another team owns org
policy, have them disable the constraint on the project and set
manage_org_policy_override = false.
Tools#
Tool |
Version or note |
|---|---|
|
|
|
Used by every shim under |
|
|
|
Recipe runner for the commands below |
|
|
Credentials#
The provider and every shim use Application Default Credentials. Set them with the sanctioned form:
ACCOUNT="<ACCOUNT>"
PROJECT_ID="<PROJECT_ID>"
gcloud auth login "$ACCOUNT" --update-adc
gcloud config set project "$PROJECT_ID"
Export the GTI (VirusTotal v3) API key in the shell. Never put it in a file:
export TF_VAR_gti_api_key="<GTI_API_KEY>"
terraform_data.gti_auth_provider has a precondition that fails the plan when
var.gti_api_key is empty, and scripts/governance/enforce.sh refuses to run
without it. The shim sends the key to curl on stdin and redacts it from error
output; never run it under bash -x.
An existing Gemini Enterprise app ID (ge_engine_id) is only needed if you opt
into bind_ge_app or create_ge_agent. Both default to false.
Configure#
Copy the example and fill in the placeholders. *.tfvars is gitignored;
*.tfvars.example is not.
cp terraform/terraform.tfvars.example terraform/terraform.tfvars
Multi-environment tfvars and GCS remote state#
When managing separate development and demo tenants from the same repository (or
across multiple Git worktrees), create named variable files under
terraform/environments/<name>.tfvars (*.tfvars is gitignored) and configure
an optional GCS state backend (terraform/backend.tf is gitignored and blocked
by the public-repo hygiene gate; terraform/backend.tf.example is tracked):
cp terraform/environments/example.tfvars.example terraform/environments/demo.tfvars
TFSTATE_BUCKET="<YOUR_TFSTATE_BUCKET>"
just governance-init bucket="$TFSTATE_BUCKET" prefix="agentic-soc-governance/demo"
just governance-plan env=demo
terraform -chdir=terraform apply -var-file="environments/demo.tfvars"
To migrate an existing local terraform/terraform.tfstate into GCS without
recreating resources, pass migrate=true (which runs
terraform -chdir=terraform init -migrate-state):
TFSTATE_BUCKET="<YOUR_TFSTATE_BUCKET>"
just governance-init bucket="$TFSTATE_BUCKET" prefix="agentic-soc-governance/default" migrate=true
If two environments coexist inside a single GCP project, give each environment
its own resource_prefix (for example "agw-secops-dev" and
"agw-secops-demo") and a distinct sgp_dns_zone_suffix, plus a separate GCS
state prefix.
Every variable in terraform/variables.tf:
Variable |
Type |
Default |
Meaning |
|---|---|---|---|
|
string |
(required) |
Project hosting the gateway, registry, and five Reasoning Engines |
|
string |
|
Optional numeric override; |
|
string |
(required) |
Numeric org ID used to build the SPIFFE trust domain |
|
string |
(required) |
Google SecOps Chronicle tenant customer UUID |
|
string |
|
Chronicle API and MCP region prefix |
|
bool |
|
Whether Terraform manages the |
|
string |
|
Region for gateway, registry, engines, and Model Armor templates |
|
string |
|
Lowercase prefix on every governed resource |
|
string (sensitive) |
|
GTI API key; pass only via |
|
number |
|
Monotonic counter; bump to rotate the key in Auth Manager |
|
list(string) |
|
Optional create-time workload IDs on the AuthProvider; leave empty |
|
string |
|
Existing Gemini Enterprise app ID for opt-in binding or publication |
|
string |
|
Gemini Enterprise app location |
|
string |
|
Collection segment of the app resource name |
|
bool |
|
PATCH the Gemini Enterprise app to route agent egress through this gateway |
|
bool |
|
Enable prompt and response logging on the app when bound |
|
bool |
|
Publish |
|
string |
|
Assistant under which |
|
string |
|
Display name in the agent picker |
|
string |
|
Optional repo-relative PNG or SVG icon |
|
string |
|
|
|
string |
|
Model for |
|
string |
|
Model for |
|
string |
|
Model for |
|
string |
|
Vertex AI model endpoint location ( |
|
string |
|
Python runtime for the Reasoning Engines |
|
bool |
|
Set |
|
number |
|
Minimum warm container instances per Reasoning Engine ( |
|
number |
|
Maximum container instances per Reasoning Engine ( |
|
list(string) |
|
Additional Google API hosts to register and permit for all agents |
|
bool |
|
Enforce per-specialist Chronicle MCP tool allowlists in IAP |
|
bool |
|
Look up auto-registered specialists and bind A2A and Semantic Governance policies |
|
map(string) |
|
Per-agent filter overrides for |
|
string |
|
|
|
bool |
|
Explicit |
|
bool |
|
|
|
bool |
|
Diagnostic Data Access logs on |
|
bool |
|
Create the five log-based metrics and the dashboard |
|
bool |
|
Create templates and attach the |
|
string |
|
|
|
string |
|
Filter threshold; |
|
bool |
|
Off so analysts can submit suspected phishing and C2 URLs |
|
bool |
|
Explicit |
|
string |
|
Per-message callout timeout |
|
bool |
|
Provision VPC, private DNS, policy engine, callout, and crown-jewel policy |
|
string |
|
Private DNS suffix for the PSC forwarding rule |
|
string |
|
CIDR for the Semantic Governance subnet |
|
string |
|
|
|
string |
|
Semantic Governance callout timeout (up to |
|
list(object) |
|
Extra Semantic Governance policies beyond the built-in Tier-0 one |
|
string |
(built-in text) |
Natural-language constraint on |
|
string |
(built-in text) |
Denial message returned when the constraint blocks an action |
|
string |
|
Override for the Service Extensions data-plane service account email |
Deploy#
Deploy in stages that follow the file numbering. One untargeted apply would
touch several preview APIs, two propagation delays, and multiple local-exec
shims at once; when it fails you will not know which one did it. Terraform
prints Warning: Resource targeting is in effect on each targeted step; the
final bare apply clears it. Terraform also pulls in any dependency of a target
automatically, so some stages create more than the named resources.
just governance-validate and just governance-plan run governance-package
and governance-cards first, so archives in terraform/dist/ and cards in
terraform/agentcards/ are fresh before Terraform reads them. Repackage after
every edit under governed_agents/; 40-package.tf compares the SHA-256 of the
source tree against terraform/dist/<name>.sha256 and fails the plan when they
differ.
On a workstation with client certificates configured, set
GOOGLE_API_USE_CLIENT_CERTIFICATE=false in the shell so the provider and the
shims use plain TLS. The Reasoning Engines already set it in their environment.
export GOOGLE_API_USE_CLIENT_CERTIFICATE=false
just governance-init
# Or with a GCS remote state backend:
# TFSTATE_BUCKET="<YOUR_TFSTATE_BUCKET>"
# just governance-init bucket="$TFSTATE_BUCKET" prefix="agentic-soc-governance/default"
just governance-validate
1. APIs and service identities#
terraform -chdir=terraform apply \
-target='google_project_service.apis' \
-target='google_project_service_identity.service_agents'
Expected: 27 services added or adopted, and two service identities. Wait about a minute before the next stage so the service agents exist.
2. Registry#
terraform -chdir=terraform apply \
-target='google_agent_registry_service.google_apis' \
-target='google_agent_registry_service.gti_api' \
-target='google_agent_registry_service.chronicle_mcp'
Expected: one endpoint per Google API host (18 by default, plus
extra_google_api_hosts), the www.virustotal.com endpoint, and the Chronicle
OneMCP server registered with protocol_binding = "JSONRPC".
Figure 3. Agent Platform > Agent Registry > Agents filtered to Name : _agent, listing the five governed A2A agents (detection_engineer_agent, cti_researcher_agent, tier2_responder_agent, soc_orchestrator_agent, and threat_hunter_agent) alongside their Reasoning Engine IDs and SPIFFE identities.#
Figure 4. Agent Platform > Agent Registry > Endpoints showing www.virustotal.com (agw-secops-virustotal, granted only to cti_researcher) alongside the 18 Google API infrastructure hosts.#
3. Auth Manager#
terraform -chdir=terraform apply \
-target='terraform_data.gti_auth_provider'
Expected: auth_provider.sh reports the AuthProvider created, updated, or
already up to date. It tags the resource description with a non-secret
[v<version> sha256:<12hex>] marker so unchanged re-runs skip PATCH, and
never prints the key value. The roles/agentidentity.user grant to
cti_researcher (terraform_data.gti_auth_provider_grant) is created in
stage 6 because it needs the agent’s SPIFFE identity.
5. Package and agents#
just governance-package
just governance-cards
terraform -chdir=terraform apply \
-target='terraform_data.package' \
-target='google_vertex_ai_reasoning_engine.cti_researcher' \
-target='google_vertex_ai_reasoning_engine.threat_hunter' \
-target='google_vertex_ai_reasoning_engine.detection_engineer' \
-target='google_vertex_ai_reasoning_engine.tier2_responder' \
-target='google_vertex_ai_reasoning_engine.soc_orchestrator' \
-target='terraform_data.reasoning_engine_min_instances'
terraform -chdir=terraform output agent_identities
Expected: this is the slow stage (ten to twenty minutes). Because each engine
depends on google_iam_project_access_policy.google_apis and its binding,
Terraform also creates the org policy override, the 120 second wait, and the
Google APIs access policy here, then runs reasoning_engine_scaling.sh ensure
for each engine so min_instances = 0 is explicitly persisted on the Vertex AI
REST API (working around hashicorp/google-beta omitting integer 0 as an
empty SDKv2 value). Afterwards agent_identities shows five SPIFFE
identities under agents.global.org-<ORG_ID>.system.id.goog.
Figure 5. Agent Platform > Deployments showing all five agw-secops-* Reasoning Engines running under dedicated SPIFFE workload identities with telemetry enabled, contrasted directly above a legacy service-account runtime.#
6. Policies#
terraform -chdir=terraform apply \
-target='google_iam_project_access_policy.agent_tool_edges' \
-target='google_iam_projects_policy_binding.agent_tool_edges' \
-target='google_iam_project_access_policy.agent_a2a_edges' \
-target='google_iam_projects_policy_binding.agent_a2a_edges' \
-target='google_vertex_ai_reasoning_engine_iam_member.orch_to_specialist' \
-target='google_project_iam_member.agent_workload_registry_viewer' \
-target='google_project_iam_member.agent_workload_identity_viewer' \
-target='google_project_iam_member.specialist_chronicle_access' \
-target='terraform_data.gti_auth_provider_grant'
terraform -chdir=terraform output chronicle_tool_policies
terraform -chdir=terraform output a2a_edges
Expected: the second and third IAM v3 access policies with their bindings, the
roles/aiplatform.viewer grant from soc_orchestrator to each specialist, the
per-specialist Chronicle and MCP IAM roles, and the Auth Manager grant.
chronicle_tool_policies lists the compiled CEL per specialist; a2a_edges
lists the four permitted soc_orchestrator -> <specialist> hops.
Figure 6. Agent Platform > Policies > Access policies grouping IAM v3 rules by calling agent: four A2A Allow rules on soc_orchestrator_agent, Endpoint: www.virustotal.com on cti_researcher_agent, and two chunked Chronicle OneMCP rules per specialist.#
7. Model Armor and Semantic Governance#
terraform -chdir=terraform apply \
-target='google_network_security_authz_policy.content_authz' \
-target='google_network_security_authz_policy.sgp_content_authz' \
-target='google_vertex_ai_semantic_governance_policy.sgp' \
-target='terraform_data.sgp_policies'
terraform -chdir=terraform output content_governance
Expected: two Model Armor templates and their CONTENT_AUTHZ extension and
policy; the Semantic Governance policy engine, private DNS zone and record,
PSC attachment via sgp_gateway_config.sh attach, the second CONTENT_AUTHZ
policy, and the Tier-0 Crown Jewel policy on tier2_responder.
content_governance.policy_count is 3 when both features are enabled.
Figure 7. Security > Model Armor > Templates showing the regional agw-secops-request and agw-secops-response screening templates in us-central1.#
Figure 8. Agent Platform > Policies > Business Policies detail drawer for agw-secops-tier2-crown-jewel-change-control on tier2_responder_agent, showing the natural-language constraint requiring an approved CHG-* emergency change ticket before Tier-0 containment.#
8. Observability and the full apply#
terraform -chdir=terraform apply \
-target='google_monitoring_dashboard.secops_governance'
terraform -chdir=terraform apply
terraform -chdir=terraform output observability
Expected: five log-based metrics and the SecOps Governance dashboard, then a
bare apply that reports no changes except the deployment_spec diff described
under Operate. The observability output includes the dashboard URL.
Figure 9. Monitoring > Dashboards > SecOps Governance (Gateway section) showing outbound denied counts, allowed versus denied verdicts over time, destination hosts, and inline 200 and 403 gateway request log entries.#
Figure 10. Monitoring > Dashboards > SecOps Governance (Chronicle MCP Tools section) showing allowed list_rules and allowed validate_rule calls alongside the denied list_feeds call and the IAP AuthorizeUser audit log.#
Verify#
Smoke test#
just governance-smoke-test sends six prompts to the deployed
soc_orchestrator over A2A HTTP+JSON, resolving the URL from
terraform output agent_engines. Pass case=<selector> to run matching cases
by short token (4a, 3b), case_id prefix (case_4a, case_4), or full
case_id. Each case has a pass predicate in scripts/governance/smoke_test.py.
Case ID |
Scenario |
Expected verdict and evidence |
|---|---|---|
|
All four specialists: |
PASS when the response has no |
|
|
PASS when the response carries the |
|
Prompt-injection and dangerous-payload text |
PASS when the response or exception contains |
|
Capability-enumeration prompt ( |
PASS when the request template’s |
|
Isolate |
PASS when the response cites Semantic Governance, Crown Jewel, |
|
Isolate |
PASS when the response mentions |
just governance-smoke-test
just governance-smoke-test case=case_2
just governance-smoke-test case=3b
The script prints Summary: N/6 scenarios passed and exits non-zero on any
failure. Pass --json-out <path> through the Python entrypoint to save results.
By default min_instances = 1 keeps one warm container per specialist; if you
scale min_instances down to 0 for $0/hr idle compute, the first turn after
an idle period incurs a 10 to 25 second cold start per specialist unless you run
just governance-smoke-test or set minInstances = 1 beforehand.
Logs#
just governance-logs action=<action> freshness=<window> wraps
scripts/governance/verify_logs.sh. The default window is 1h; the script also
accepts --limit N, --project <PROJECT_ID>, and --raw.
Action |
What it reads |
What it proves |
|---|---|---|
|
IAP Data Access entries with |
The gateway is refusing specific tools and hosts for specific SPIFFE principals; the |
|
Every IAP |
Per-tool verdicts are recorded with |
|
Every Model Armor |
Request and response screening is active across |
|
Model Armor |
Inline prompt-injection and capability-enumeration turns ( |
|
Distinct |
Each agent calls out under its own workload identity, not a shared service account |
|
Gateway entries with |
The gateway parses JSON-RPC bodies and sees tool names, which is what the CEL allowlists key on |
|
Observed SNI hosts minus hosts in Agent Registry (from Terraform state) |
Default deny holds; the output names any host to add to |
The audit and denied tables include a column derived from
protoPayload.metadata.dryRun. It prints DRY_RUN when the decision was
evaluated but not enforced, and - when it was enforced. After
authz_enforcement_mode = "ENFORCED" every row should show -.
just governance-logs action=denied
just governance-logs action=who freshness=24h
Figure 11. Logs Explorer querying cloudaudit.googleapis.com/data_access for GatekeeperAuthorizer.AuthorizeUser with granted=false, showing Permission Denied entries on us-central1:agw-secops-egress and the expanded AuditLog protoPayload.#
Figure 12. Logs Explorer combining modelarmor.googleapis.com/SanitizeOperation (MODEL_ARMOR_SANITIZATION_VERDICT_BLOCK) and semantic-governance-policy (verdict="DENY") entries attributed to the calling agent SPIFFE agentIdentity.#
Operate#
Enforcement mode#
just governance-enforce mode=enforced and just governance-enforce mode=dry-run
run scripts/governance/enforce.sh, which applies
-var authz_enforcement_mode=<MODE> and reminds you to allow about 60 seconds
for the gateway to pick up the new extension metadata. The script also accepts
--plan to preview the diff. It requires TF_VAR_gti_api_key in the shell.
The just recipe defaults mode to status, which prints
terraform output authz_enforcement:
just governance-enforce mode=status
Rotating the GTI API key#
Export the new key, bump the version, and apply. gti_api_key_version is in
triggers_replace on terraform_data.gti_auth_provider, so the change re-runs
auth_provider.sh upsert with the new secret.
export TF_VAR_gti_api_key="<NEW_GTI_API_KEY>"
terraform -chdir=terraform apply -var gti_api_key_version=2
Persist the new version in terraform/terraform.tfvars so later applies do not
roll it back.
Stuck deletes#
IAM v3 bindings and Semantic Governance policies delete asynchronously, and a
recreate can race the delete. The destroy provisioners in
52-policies-access.tf and 65-semantic-governance.tf call
scripts/governance/delete_until_gone.sh, which issues the DELETE and polls GET
until each URL returns 404. You can run it by hand against any REST resource:
PROJECT_ID="<PROJECT_ID>"
bash scripts/governance/delete_until_gone.sh "$PROJECT_ID" "<RESOURCE_URL>"
DG_POLL_SECONDS (default 5) and DG_WAIT_SECONDS (default 300) tune the loop.
The deployment_spec perpetual diff and min_instances = 0 shim#
Every plan shows an in-place update on each Reasoning Engine’s
spec.deployment_spec. This is deliberate: 41-agents.tf keeps
GOOGLE_CLOUD_AGENT_ENGINE_ENABLE_TELEMETRY declared unconditionally because
the provider omits it when flattening state, and a dirty deployment_spec
ensures the update mask includes it. Do not add ignore_changes for
deployment_spec; a spec-only update that omits it prunes deploymentSpec on
the service and clears agent_gateway_config, which detaches the agent from
the gateway.
In addition, hashicorp/google-beta treats integer 0 as empty in SDKv2
(tpgresource.IsEmptyValue), so min_instances = 0 is omitted from both
Create and Update JSON bodies and any in-place spec update clears a
previously set 0 back to the regional service default (1 warm instance in
us-central1). terraform_data.reasoning_engine_min_instances in
41-agents.tf runs scripts/governance/reasoning_engine_scaling.sh ensure
after each engine create or update (triggers_replace on name and
min_instances, plus lifecycle.replace_triggered_by across the five
google_vertex_ai_reasoning_engine resources), issuing an idempotent
field-masked PATCH ?updateMask=spec.deploymentSpec.minInstances and verifying
that both minInstances and agentGateway remain persisted.
Publish to Gemini Enterprise#
Publication is opt-in and touches an existing Gemini Enterprise app, so it is the one part of this stack that can affect agents you did not deploy.
Warning
Binding routes all agent traffic for the app through this gateway. Any
agent already in the app whose tool hosts are not in the Agent Registry is
denied at the gateway until you register those hosts (10-registry-endpoints.tf)
or unbind. Check the app’s existing agents before you bind.
Prerequisites: the app exists; its location pairs with the gateway region
(global and us require us-central1, eu requires europe-west1;
55-ge-binding.tf enforces this); the Discovery Engine service agent has the
custom gateway role (created by 55-ge-binding.tf on every apply, even when
binding is off).
Configure in terraform/terraform.tfvars:
ge_engine_id = "<GE_ENGINE_ID>"
ge_location = "global"
bind_ge_app = true
create_ge_agent = true
Bind first, on its own:
terraform -chdir=terraform apply -target=terraform_data.ge_binding
# ... bind_ge_app.sh: ok: all agent traffic for <GE_ENGINE_ID> now egresses through .../agentGateways/<PREFIX>-egress
# Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
Then publish the orchestrator with a full terraform apply. Note that
terraform_data.ge_agent depends on google_vertex_ai_reasoning_engine.soc_orchestrator,
so even a -target on it pulls in any pending in-place change to the
Reasoning Engines. If the plan shows a spec.agent_card diff on engines you
have not changed, that is provider read-back noise and is safe to apply, but
review it before you do; a plan that destroys or replaces an engine is not.
To publish without touching the engines, load the GE_* exports from Terraform
outputs via scripts/governance/ge_env.sh and run the shim directly:
eval "$(bash scripts/governance/ge_env.sh)"
export GE_ASSISTANT_ID="default_assistant"
export GE_AGENT_DISPLAY_NAME="Governed SecOps Orchestrator"
export GE_AGENT_SHARING_SCOPE="ALL_USERS"
bash scripts/governance/ge_agent.sh create
# ge_agent.sh: ok: <AGENT_ID> is ENABLED, shared ALL_USERS
ge_env.sh reads terraform -chdir=terraform output -json (project_id,
ge_binding, and agent_engines) and respects any GE_* variables already set
in your shell unless --force is passed. ge_agent.sh create adopts an
existing registration that points at the same Reasoning Engine instead of
creating a duplicate, so a later terraform apply with create_ge_agent = true
converges without a second entry.
Verify:
just governance-ge-status # bound to .../agentGateways/<PREFIX>-egress; agent ENABLED
just governance-smoke-test # the A2A path still passes all six cases
just governance-logs action=audit freshness=1h
Then open the app in the Gemini Enterprise console, pick the governed
orchestrator from the agent picker, and run the smoke-test prompts. Rows for
soc_orchestrator and the specialists appear in governance-logs action=audit
within a minute. The assistants:streamAssist REST surface does not route to a
selected ADK agent, so use the console for this check.
Rollback:
just governance-ge-rollback # evaluates ge_env.sh, then ge_agent.sh delete + bind_ge_app.sh unbind
Both just governance-ge-status and just governance-ge-rollback evaluate
scripts/governance/ge_env.sh automatically, while honoring explicit GE_*
environment overrides. You can also set bind_ge_app = false and
create_ge_agent = false and run terraform apply; the destroy provisioners
run the same two commands.
Cost#
Approximate list prices in USD; confirm against the pricing pages for your region.
Item |
Where it comes from |
Approximate cost |
|---|---|---|
Reasoning Engine idle memory |
Five |
About $24 per month per engine at the |
Egress Agent Gateway |
|
$0 idle; about $5.67 per million proxied requests |
Semantic Governance PSC endpoint |
Forwarding rule created by |
About $7.30 per month |
Semantic Governance private DNS zone |
|
About $0.20 per month |
Set enable_semantic_governance = false to avoid the last two rows.
Tests#
just governance-test runs scripts/governance/tests/run_all.sh: ten offline
harnesses that stub gcloud, terraform, and curl on PATH. No network, no
credentials. It prints ALL GREEN: <n> harnesses, <m> checks or
FAILED: <k> of <n> harnesses.
Harness |
What it proves |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
Archives put |
|
|
|
|
|
|
just governance-lint runs shellcheck --severity=warning over
scripts/governance/*.sh and scripts/governance/tests/*.sh, then
terraform -chdir=terraform fmt -check -recursive.
The Python unit tests cover the five agents’ tools, the orchestrator’s policy banners, and agent card generation:
.venv/bin/python -m pytest -o addopts="" tests/test_governed_agents.py
.github/workflows/governance-ci.yml runs all three on pull requests and pushes
to main that touch governed_agents/, scripts/governance/, terraform/, or
tests/test_governed_agents.py: a shell job (shellcheck plus run_all.sh), a
pytest job, and a Terraform job that packages the agents, generates cards, and
runs fmt -check and validate.