google_deployment_manager_deployment

A collection of resources that are deployed and managed together using a configuration file

In addition, due to limitations of the API, Terraform will treat deployments in preview as recreate-only for any update operation other than actually deploying an in-preview deployment (i.e. preview=true to preview=false).

Example Usage - Deployment Manager Deployment Basic

resource "google_deployment_manager_deployment" "deployment" {
  name = "my-deployment"

  target {
    config {
      content = file("path/to/config.yml")
    }
  }

  labels {
    key = "foo"
    value = "bar"
  }
}

Example Usage - Deployment Manager Deployment Imports

resource "google_deployment_manager_deployment" "deployment" {
  name = "my-deployment"
  target {
    config {
      content = <<EOF
imports:
- path: service_account.jinja
- path: vm.jinja

resources:
- name: &SA_NAME my-vm-account
  type: service_account.jinja
- name: my-vm
  type: vm.jinja
  properties:
    serviceAccountId: *SA_NAME
EOF

    imports {
      name = "vm.jinja"
      content = file("path/to/vm.jinja")
    }

    imports {
      name = "service_account.jinja"
      content = file("path/to/service_account.jinja")
    }
  }
}

Argument Reference

The following arguments are supported:

The target block supports:

The config block supports:

The imports block supports:


The labels block supports:

Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

Timeouts

This resource provides the following Timeouts configuration options:

Import

Deployment can be imported using any of these accepted formats:

In Terraform v1.5.0 and later, use an import block to import Deployment using one of the formats above. For example:

import {
  id = "projects/{{project}}/deployments/{{name}}"
  to = google_deployment_manager_deployment.default
}

When using the terraform import command, Deployment can be imported using one of the formats above. For example:

$ terraform import google_deployment_manager_deployment.default projects/{{project}}/deployments/{{name}}
$ terraform import google_deployment_manager_deployment.default {{project}}/{{name}}
$ terraform import google_deployment_manager_deployment.default {{name}}

User Project Overrides

This resource supports User Project Overrides.