GCP.DeploymentManager reference
Deployment
Section titled “Deployment”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.
Deployment: Creating a Deployment
Section titled “Deployment: Creating a Deployment”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.jinjaresources:- name: topic type: topic.jinja`, }, imports: [ { name: "topic.jinja", content: `resources:- name: topic type: pubsub.v1.topic properties: topic: {{ env["deployment"] }}`, }, ], },});Deployment: Updating a Deployment
Section titled “Deployment: Updating a 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,});