---
title: "POST /v1/{+parent}/deployments"
method: POST
path: "/v1/{+parent}/deployments"
tags: ["projects"]
---

# POST /v1/{+parent}/deployments

`POST /v1/{+parent}/deployments`

Creates a Deployment.

## Path parameters

- `parent` string, required

## Query parameters

- `deploymentId` string
- `requestId` string

## Request body

- Deployment — A Deployment is a group of resources and configs managed and provisioned by Infra Manager.
  - `terraformBlueprint` TerraformBlueprint — TerraformBlueprint describes the source of a Terraform root module which describes the resources and configs to be deployed.
    - `gcsSource` string — URI of an object in Google Cloud Storage. Format: `gs://{bucket}/{object}` URI may also specify an object version for zipped objects. Format: `gs://{bucket}/{object}#{version}`
    - `gitSource` GitSource — A set of files in a Git repository.
      - `repo` string — Repository URL. Example: 'https://github.com/kubernetes/examples.git'
      - `directory` string — Subdirectory inside the repository. Example: 'staging/my-package'
      - `ref` string — Git reference (e.g. branch or tag).
    - `inputValues` object — Optional. Input variable values for the Terraform blueprint.
    - `externalValues` object — Optional. Map of input variable names in this blueprint to configurations for importing values from external sources.
  - `name` string — Identifier. Resource name of the deployment. Format: `projects/{project}/locations/{location}/deployments/{deployment}`
  - `createTime` string, google-datetime — Output only. Time when the deployment was created.
  - `updateTime` string, google-datetime — Output only. Time when the deployment was last modified.
  - `labels` object — Optional. User-defined metadata for the deployment.
  - `state` 'STATE_UNSPECIFIED' | 'CREATING' | 'ACTIVE' | 'UPDATING' | 'DELETING' | 'FAILED' | 'SUSPENDED' | 'DELETED' — Output only. Current state of the deployment.
  - `latestRevision` string — Output only. Revision name that was most recently applied. Format: `projects/{project}/locations/{location}/deployments/{deployment}/ revisions/{revision}`
  - `stateDetail` string — Output only. Additional information regarding the current state.
  - `errorCode` 'ERROR_CODE_UNSPECIFIED' | 'REVISION_FAILED' | 'CLOUD_BUILD_PERMISSION_DENIED' | 'DELETE_BUILD_API_FAILED' | 'DELETE_BUILD_RUN_FAILED' | 'BUCKET_CREATION_PERMISSION_DENIED' | 'BUCKET_CREATION_FAILED' | 'EXTERNAL_VALUE_SOURCE_IMPORT_FAILED' — Output only. Error code describing errors that may have occurred.
  - `deleteResults` ApplyResults — Outputs and artifacts from applying a deployment.
    - `content` string — Location of a blueprint copy and other manifests in Google Cloud Storage. Format: `gs://{bucket}/{object}`
    - `artifacts` string — Location of artifacts (e.g. logs) in Google Cloud Storage. Format: `gs://{bucket}/{object}`
    - `outputs` object — Map of output name to output info.
  - `deleteBuild` string — Output only. Cloud Build instance UUID associated with deleting this deployment.
  - `deleteLogs` string — Output only. Location of Cloud Build logs in Google Cloud Storage, populated when deleting this deployment. Format: `gs://{bucket}/{object}`.
  - `tfErrors` TerraformError[] — Output only. Errors encountered when deleting this deployment. Errors are truncated to 10 entries, see `delete_results` and `error_logs` for full details.
    - `resourceAddress` string — Address of the resource associated with the error, e.g. `google_compute_network.vpc_network`.
    - `httpResponseCode` integer — HTTP response code returned from Google Cloud Platform APIs when Terraform fails to provision the resource. If unset or 0, no HTTP response code was returned by Terraform.
    - `errorDescription` string — A human-readable error description.
    - `error` Status — The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).
      - `code` integer — The status code, which should be an enum value of google.rpc.Code.
      - `message` string — A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
      - `details` object[] — A list of messages that carry the error details. There is a common set of message types for APIs to use.
  - `errorLogs` string — Output only. Location of Terraform error logs in Google Cloud Storage. Format: `gs://{bucket}/{object}`.
  - `artifactsGcsBucket` string — User-defined location of Cloud Build logs and artifacts in Google Cloud Storage. Format: `gs://{bucket}/{folder}` A default bucket will be bootstrapped if the field is not set or empty. Default bucket format: `gs://--blueprint-config` Constraints: - The bucket needs to be in the same project as the deployment - The path cannot be within the path of `gcs_source` - The field cannot be updated, including changing its presence
  - `serviceAccount` string — Required. User-specified Service Account (SA) credentials to be used when actuating resources. Format: `projects/{projectID}/serviceAccounts/{serviceAccount}`
  - `importExistingResources` boolean — By default, Infra Manager will return a failure when Terraform encounters a 409 code (resource conflict error) during actuation. If this flag is set to true, Infra Manager will instead attempt to automatically import the resource into the Terraform state (for supported resource types) and continue actuation. Not all resource types are supported, refer to documentation.
  - `workerPool` string — The user-specified Cloud Build worker pool resource in which the Cloud Build job will execute. Format: `projects/{project}/locations/{location}/workerPools/{workerPoolId}`. If this field is unspecified, the default Cloud Build worker pool will be used.
  - `lockState` 'LOCK_STATE_UNSPECIFIED' | 'LOCKED' | 'UNLOCKED' | 'LOCKING' | 'UNLOCKING' | 'LOCK_FAILED' | 'UNLOCK_FAILED' — Output only. Current lock state of the deployment.
  - `tfVersionConstraint` string — The user-specified Terraform version constraint. Example: "=1.3.10".
  - `tfVersion` string — Output only. The current Terraform version set on the deployment. It is in the format of "Major.Minor.Patch", for example, "1.3.10".
  - `quotaValidation` 'QUOTA_VALIDATION_UNSPECIFIED' | 'ENABLED' | 'ENFORCED' — Optional. Input to control quota checks for resources in terraform configuration files. There are limited resources on which quota validation applies.
  - `annotations` object — Optional. Arbitrary key-value metadata storage e.g. to help client tools identify deployments during automation. See https://google.aip.dev/148#annotations for details on format and size limitations.
  - `providerConfig` ProviderConfig — ProviderConfig contains the provider configurations.
    - `sourceType` 'PROVIDER_SOURCE_UNSPECIFIED' | 'SERVICE_MAINTAINED' — Optional. ProviderSource specifies the source type of the provider.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/config.md) · [All operations](https://skmtc.net/google/apis/config/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/config/versions/22109f23b9eb/schema)
