Skip to content

GCP.DeploymentManager reference

Source: src/GCP/DeploymentManager/Deployment.ts

A Google Cloud Deployment Manager deployment — a configuration that creates and manages a set of Google Cloud resources together.

Changing deploymentId replaces the deployment. Description, labels, target configuration, and preview update in place. Create, patch, and delete return long-running operations.

Generated name

const deployment = yield* GCP.DeploymentManager.Deployment("App", {
target: {
config: {
content: `resources:
- name: topic
type: pubsub.v1.topic
properties:
topic: my-topic
`,
},
},
});

Explicit name, labels, and imported template

const deployment = yield* GCP.DeploymentManager.Deployment("App", {
deploymentId: "order-events",
description: "pubsub topic for orders",
labels: { env: "prod" },
target: {
config: {
content: `imports:
- path: topic.jinja
resources:
- name: topic
type: topic.jinja
`,
},
imports: [
{
name: "topic.jinja",
content: `resources:
- name: topic
type: pubsub.v1.topic
properties:
topic: {{ env["deployment"] }}
`,
},
],
},
});

Re-declare the same logical id with changed props; the engine keeps the physical resource and updates it in place.

const deployment = yield* GCP.DeploymentManager.Deployment("App", {
description: "pubsub topic for orders (prod)",
labels: { env: "prod", team: "platform" },
target: existingTarget,
});