Skip to content

GCP.WorkloadManager reference

Source: src/GCP/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",
},
);

Source: src/GCP/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.

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",
});
// 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" },
});