GCP.WorkloadManager reference
DeploymentsActuation
Section titled “DeploymentsActuation”Source:
packages/gcp/src/WorkloadManager/DeploymentsActuation.ts
A Workload Manager actuation — a bootstrap run of a Deployment that applies Terraform/Ansible and records infrastructure output.
Actuations have no labels, description, or patch API. Identity is
deployment + location + actuationId; changing any replaces the
actuation. Generated ids are prefixed alch- so list / nuke can
find Alchemy-owned rows.
DeploymentsActuation: Creating an Actuation
Section titled “DeploymentsActuation: Creating an Actuation”Generated name
const actuation = yield* GCP.WorkloadManager.DeploymentsActuation( "Bootstrap", { deployment: existingDeployment.name },);Explicit id
const actuation = yield* GCP.WorkloadManager.DeploymentsActuation( "Bootstrap", { deployment: existingDeployment.name, actuationId: "alch-bootstrap-1", },);DeploymentsActuation: Looking up an existing deployments actuation
Section titled “DeploymentsActuation: Looking up an existing deployments actuation”DeploymentsActuation.lookup references a deployments actuation Alchemy
doesn’t manage (created in the console or by another stack). It is read
during plan/deploy, never created, updated or deleted, and binds like a
declared deployments actuation.
const deploymentsActuation = GCP.WorkloadManager.DeploymentsActuation.lookup({ actuationId: "my-actuation", deployment: "my-deployment",});Evaluation
Section titled “Evaluation”Source:
packages/gcp/src/WorkloadManager/Evaluation.ts
A Workload Manager evaluation — a named set of best-practice rules validated against a scope of Cloud resources (SAP, SQL Server, or custom).
Changing evaluationId, location, or kmsKey replaces the
evaluation. Description, labels, resource filter, rule names,
schedule, custom-rules bucket, BigQuery destination, and
evaluationType update in place.
Evaluation: Creating an Evaluation
Section titled “Evaluation: Creating an Evaluation”Generated name
const evaluation = yield* GCP.WorkloadManager.Evaluation("SapBest", { evaluationType: "SAP", ruleNames: ["sap-hana"], resourceFilter: { scopes: ["projects/my-project"] }, labels: { env: "test" },});Explicit id
const evaluation = yield* GCP.WorkloadManager.Evaluation("SapBest", { evaluationId: "nightly-sap", evaluationType: "SAP", ruleNames: ["sap-hana"], description: "nightly SAP scan",});Evaluation: Updating an Evaluation
Section titled “Evaluation: Updating an Evaluation”// Same logical id, changed props: the engine updates it in place.const evaluation = yield* GCP.WorkloadManager.Evaluation("SapBest", { evaluationType: "SAP", ruleNames: ["sap-hana"], description: "nightly SAP scan v2", labels: { env: "prod", team: "platform" },});Evaluation: Looking up an existing evaluation
Section titled “Evaluation: Looking up an existing evaluation”Evaluation.lookup references an evaluation Alchemy doesn’t manage
(created in the console or by another stack). It is read during
plan/deploy, never created, updated or deleted, and binds like a declared
evaluation.
const evaluation = GCP.WorkloadManager.Evaluation.lookup({ evaluationId: "my-evaluation",});