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

# POST /v1/{+parent}/deployments

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

Creates a new Deployment in a given project and location.

## Path parameters

- `parent` string, required

## Query parameters

- `deploymentId` string
- `requestId` string

## Request body

- Deployment — The Deployment object represents user intent for deploying a specific type of workload.
  - `description` string — Description of the deployment.
  - `serviceAccount` string — User-specified Service Account (SA) credentials to be used for Cloud Build. Format: `projects/{projectID}/serviceAccounts/{serviceAccount}` The default Cloud Build SA will be used initially if this field is not set during deployment creation.
  - `state` 'STATE_UNSPECIFIED' | 'CREATING' | 'ACTIVE' | 'UPDATING' | 'DELETING' | 'FAILED' — Output only. Current state of the deployment.
  - `sapSystemS4Config` SapSystemS4Config — Message for SAP system workload.
    - `vmPrefix` string — VM prefix.
    - `database` DatabaseDetails — Message for SAP instance details.
      - `secondaryDbVm` string — Optional. Secondary DB VM name.
      - `diskType` string — Required. Disk type.
      - `secretManagerSecret` string — Required. Secret Manager secret.
      - `image` string — Required. Image for the database server.
      - `databaseServiceAccount` string — Database service account. Let customers bring their own SA for the database.
      - `sid` string — Required. The SID is a three-digit server-specific unique identification code.
      - `instanceId` string — Optional. Instance ID.
      - `machineType` string — Required. Machine type.
      - `primaryDbVm` string — Optional. Primary DB VM name.
    - `mediaBucketName` string — Required. Media bucket name.
    - `deploymentModel` 'DEPLOYMENT_MODEL_UNSPECIFIED' | 'DISTRIBUTED' | 'DISTRIBUTED_HA' — Required. Supports non-HA and HA models.
    - `ansibleRunnerServiceAccount` string — Ansible runner service account. Let customers bring their own service account for the Ansible runner.
    - `scalingMethod` 'SCALE_METHOD_UNSPECIFIED' | 'SCALE_UP' | 'SCALE_OUT' — Required. Supports scale up and scale out.
    - `sapBootDiskImage` string — Optional. SAP boot disk image.
    - `app` AppDetails — Message for SAP instance details.
      - `ascsVm` string — Optional. ASCS VM name.
      - `sid` string — Required. The SAP SID is a three-digit server-specific unique identification code.
      - `secretManagerSecret` string — Required. Secret Manager secret.
      - `ascsServiceAccount` string — ASCS service account. Let customers bring their own service account for ASCS.
      - `ersVm` string — Optional. ERS VM name.
      - `vmsMultiplier` integer — Required. VMs multiplier.
      - `machineType` string — Required. Machine type.
      - `appInstanceId` string — Optional. Instance ID for app.
      - `appVmNames` string[] — Optional. Customized VM names.
      - `image` string — Required. Image for the app server and ASCS server.
      - `ascsImage` string — Required. Image for the ASCS server.
      - `appServiceAccount` string — Application service account. Let customers bring their own service account for the application.
      - `ersInstanceId` string — Optional. Instance ID for ERS.
      - `sharedStorage` string — Optional. Storage location.
      - `ascsMachineType` string — Required. ASCS machine type.
      - `ascsInstanceId` string — Optional. Instance ID for ASCS.
    - `allowStoppingForUpdate` boolean
    - `version` 'VERSION_UNSPECIFIED' | 'S4_HANA_2021' | 'S4_HANA_2022' | 'S4_HANA_2023' — Required. SAP HANA version.
    - `environmentType` 'ENVIRONMENT_TYPE_UNSPECIFIED' | 'NON_PRODUCTION' | 'PRODUCTION' — Required. Deployment environment.
    - `location` LocationDetails — Message for SAP instance details.
      - `zone1Name` string — Required. Zone 1 name.
      - `createCommsFirewall` boolean — Optional. Create firewall. If true, creates a firewall for the deployment. This field provides an option to not always create a firewall for the deployment.
      - `customTags` string[] — Optional. Network tags.
      - `zone2Name` string — Optional. Zone 2 name.
      - `subnetName` string — Required. Subnet name.
      - `dnsZone` string — Optional. DNS zone name.
      - `dnsZoneNameSuffix` string — Optional. DNS zone name suffix.
      - `internetAccess` 'INTERNETACCESS_UNSPECIFIED' | 'ALLOW_EXTERNAL_IP' | 'CONFIGURE_NAT'
      - `networkProject` string — Optional. Network project.
      - `vpcName` string — Required. VPC name.
      - `deploymentDnsEnabled` boolean — Optional. When the user skips DNS configuration in the UI, `deployment_dns_enabled` is false; otherwise `deployment_dns_enabled` is true.
      - `regionName` string — Required. Region name.
    - `gcpProjectId` string — The project that infrastructure is deployed in. Currently only supports the same project where the deployment resource exists.
  - `workerPool` string — Optional. 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.
  - `updateTime` string, google-datetime — Output only. Update time stamp.
  - `name` string — The name of the deployment resource. The format is 'projects/{project_id}/locations/{location_id}/deployments/{deployment_id}'.
  - `workloadType` 'WORKLOAD_TYPE_UNSPECIFIED' | 'SAP_S4' | 'SQL_SERVER' | 'ORACLE' — Optional. Workload type of the deployment.
  - `terraformVariables` object — Optional. terraform_variables represents all the Terraform variables for the deployment workload. The key is the name of the Terraform variable, and the value is the TerraformVariable. For example: { "project_id": { "input_value": { "string_value": "my-project-id" } }, "zone": { "input_value": { "string_value": "us-central1-a" } } }
  - `createTime` string, google-datetime — Output only. Create time stamp.
  - `sqlServerWorkload` SqlServerWorkload — Message for MS SQL workload.
    - `database` Database — Database details.
      - `soleTenantNode` string — Optional. The name of a primary sole-tenant node/node group.
      - `secondarySoleTenantNode` string — Optional. The name of a secondary-sole-tenant node/node group.
      - `tempdbOnSsd` boolean — Required. Whether to have TempDB on local SSD.
      - `machineType` string — Required. Machine type.
      - `secondarySoleTenantNodeType` string — Optional. The type of a secondary-sole-tenant node/node group. E.g., compute.googleapis.com/node-name.
      - `smt` boolean — Required. Whether simultaneous multithreading is enabled or not.
      - `diskType` string — Required. Disk type.
      - `floatingIpAddress` string — Optional. Only useful for Linux High Availability setup.
      - `soleTenantNodeType` string — Optional. The type of a primary sole-tenant node/node group. E.g., compute.googleapis.com/node-name.
      - `secretManagerSecret` string — Required. Secret Manager secret.
      - `tenancyModel` 'TENANCY_MODEL_UNSPECIFIED' | 'SHARED' | 'SOLE_TENANT' — Required. SHARED or SOLE_TENANT.
    - `computeEngineServiceAccount` string — Compute Engine service account. Let customers bring their own service account for Compute Engine.
    - `vmPrefix` string — Required. Should be unique in the project.
    - `osImage` string — Required. The image of the operating system.
    - `fciType` 'FCI_TYPE_UNSPECIFIED' | 'SHARED_DISK' | 'S2D' — Optional. SHARED_DISK or S2D.
    - `deploymentModel` 'DEPLOYMENT_MODEL_UNSPECIFIED' | 'HIGH_AVAILABILITY' | 'SINGLE_INSTANCE' — Required. HIGH_AVAILABILITY or SINGLE_INSTANCE.
    - `operatingSystemType` 'OPERATING_SYSTEM_TYPE_UNSPECIFIED' | 'WINDOWS' | 'UBUNTU' | 'RED_HAT_ENTERPRISE_LINUX' | 'SUSE' — Required. The type of the operating system the SQL server is going to run on top of.
    - `mediaBucket` string — Required. Name of the media storing SQL server installation files.
    - `activeDirectory` ActiveDirectory — Active Directory details.
      - `dnsAddress` string — Optional. DNS IP address.
      - `secretManagerSecret` string — Required. Secret Manager secret.
      - `domain` string — Optional. Human readable form of a domain such as “google.com”.
      - `type` 'ACTIVE_DIRECTORY_TYPE_UNSPECIFIED' | 'GCP_MANAGED' | 'SELF_MANAGED' — Required. Active Directory type.
      - `domainUsername` string — Optional. Domain username.
    - `isSqlPayg` boolean — Required. SQL licensing type.
    - `pacemaker` Pacemaker — Pacemaker configuration.
      - `sqlPacemakerUsername` string — Required. SQL Pacemaker username.
      - `bucketNameNodeCertificates` string — Required. Bucket location for node certificates.
      - `pacemakerClusterSecret` string — Required. Pacemaker cluster secret name.
      - `pacemakerClusterUsername` string — Required. Pacemaker cluster username.
      - `sqlPacemakerSecret` string — Required. SQL Pacemaker secret name.
      - `pacemakerCluster` string — Required. Pacemaker cluster name.
    - `osImageType` 'OS_IMAGE_TYPE_UNSPECIFIED' | 'PUBLIC_IMAGE' | 'CUSTOM_IMAGE' — Optional. OS image type. It's used to create boot disks for VM instances. When either Windows licensing type or SQL licensing type is BYOL, this option is disabled and defaults to a custom image.
    - `sqlServerEdition` 'SQL_SERVER_EDITION_TYPE_UNSPECIFIED' | 'SQL_SERVER_EDITION_TYPE_DEVELOPER' | 'SQL_SERVER_EDITION_TYPE_ENTERPRISE' | 'SQL_SERVER_EDITION_TYPE_STANDARD' | 'SQL_SERVER_EDITION_TYPE_WEB' — Optional. SQL Server Edition type, only applicable when the operating system is Linux.
    - `location` SqlLocationDetails — Location and networking details for configuring SQL server workload.
      - `region` string — Required. Region name.
      - `primaryZone` string — Required. Primary zone.
      - `network` string — Required. Network name.
      - `gcpProjectId` string — Required. The project that infrastructure is deployed in. Currently only supports the same project where the deployment resource exists.
      - `secondaryZone` string — Optional. Secondary zone cannot be the same as primary_zone and is only for High Availability deployment mode.
      - `tertiaryZone` string — Optional. Tertiary zone cannot be the same as primary_zone and secondary_zone, and it is only for High Availability deployment mode.
      - `subnetwork` string — Required. Subnetwork name.
      - `internetAccess` 'INTERNET_ACCESS_UNSPECIFIED' | 'ALLOW_EXTERNAL_IP' | 'CONFIGURE_NAT' — Required. Internet Access.
      - `dnsZone` string — Optional. Create a new DNS zone when the field is empty. Only shown for `Using an existing DNS`. List of existing DNS zones. Terraform variable name: existing_dns_zone_name.
    - `environmentType` 'ENVIRONMENT_TYPE_UNSPECIFIED' | 'NON_PRODUCTION' | 'PRODUCTION' — Required. Deployment environment.
    - `haType` 'HA_TYPE_UNSPECIFIED' | 'AOAG' | 'FCI' — Optional. AOAG or FCI. It is only needed for the High Availability deployment mode.
    - `sqlServerVersion` 'SQL_SERVER_VERSION_TYPE_UNSPECIFIED' | 'SQL_SERVER_VERSION_TYPE_2017' | 'SQL_SERVER_VERSION_TYPE_2019' | 'SQL_SERVER_VERSION_TYPE_2022' — Optional. 2017, 2019, or 2022.

## Response `200`

Successful response

---

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