Deployment

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

Warning: This resource is intended only to manage a Deployment resource, and attempts to manage the Deployment’s resources in the provider as well will likely result in errors or unexpected behavior as the two tools fight over ownership. We strongly discourage doing so unless you are an experienced user of both tools.

In addition, due to limitations of the API, the provider 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).

Create a Deployment Resource

def Deployment(resource_name, opts=None, create_policy=None, delete_policy=None, description=None, labels=None, name=None, preview=None, project=None, target=None, __props__=None);
func NewDeployment(ctx *Context, name string, args DeploymentArgs, opts ...ResourceOption) (*Deployment, error)
public Deployment(string name, DeploymentArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args DeploymentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args DeploymentArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DeploymentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Deployment Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Deployment resource accepts the following input properties:

Target DeploymentTargetArgs

Parameters that define your deployment, including the deployment configuration and relevant templates. Structure is documented below.

CreatePolicy string

Set the policy to use for creating new resources. Only used on create and update. Valid values are CREATE_OR_ACQUIRE (default) or ACQUIRE. If set to ACQUIRE and resources do not already exist, the deployment will fail. Note that updating this field does not actually affect the deployment, just how it is updated.

DeletePolicy string

Set the policy to use for deleting new resources on update/delete. Valid values are DELETE (default) or ABANDON. If DELETE, resource is deleted after removal from Deployment Manager. If ABANDON, the resource is only removed from Deployment Manager and is not actually deleted. Note that updating this field does not actually change the deployment, just how it is updated.

Description string

Optional user-provided description of deployment.

Labels List<DeploymentLabelArgs>

Key-value pairs to apply to this labels. Structure is documented below.

Name string

The name of the template to import, as declared in the YAML configuration.

Preview bool

If set to true, a deployment is created with “shell” resources that are not actually instantiated. This allows you to preview a deployment. It can be updated to false to actually deploy with real resources. ~>NOTE: Deployment Manager does not allow update of a deployment in preview (unless updating to preview=false). Thus, the provider will force-recreate deployments if either preview is updated to true or if other fields are updated while preview is true.

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Target DeploymentTarget

Parameters that define your deployment, including the deployment configuration and relevant templates. Structure is documented below.

CreatePolicy string

Set the policy to use for creating new resources. Only used on create and update. Valid values are CREATE_OR_ACQUIRE (default) or ACQUIRE. If set to ACQUIRE and resources do not already exist, the deployment will fail. Note that updating this field does not actually affect the deployment, just how it is updated.

DeletePolicy string

Set the policy to use for deleting new resources on update/delete. Valid values are DELETE (default) or ABANDON. If DELETE, resource is deleted after removal from Deployment Manager. If ABANDON, the resource is only removed from Deployment Manager and is not actually deleted. Note that updating this field does not actually change the deployment, just how it is updated.

Description string

Optional user-provided description of deployment.

Labels []DeploymentLabel

Key-value pairs to apply to this labels. Structure is documented below.

Name string

The name of the template to import, as declared in the YAML configuration.

Preview bool

If set to true, a deployment is created with “shell” resources that are not actually instantiated. This allows you to preview a deployment. It can be updated to false to actually deploy with real resources. ~>NOTE: Deployment Manager does not allow update of a deployment in preview (unless updating to preview=false). Thus, the provider will force-recreate deployments if either preview is updated to true or if other fields are updated while preview is true.

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

target DeploymentTarget

Parameters that define your deployment, including the deployment configuration and relevant templates. Structure is documented below.

createPolicy string

Set the policy to use for creating new resources. Only used on create and update. Valid values are CREATE_OR_ACQUIRE (default) or ACQUIRE. If set to ACQUIRE and resources do not already exist, the deployment will fail. Note that updating this field does not actually affect the deployment, just how it is updated.

deletePolicy string

Set the policy to use for deleting new resources on update/delete. Valid values are DELETE (default) or ABANDON. If DELETE, resource is deleted after removal from Deployment Manager. If ABANDON, the resource is only removed from Deployment Manager and is not actually deleted. Note that updating this field does not actually change the deployment, just how it is updated.

description string

Optional user-provided description of deployment.

labels DeploymentLabel[]

Key-value pairs to apply to this labels. Structure is documented below.

name string

The name of the template to import, as declared in the YAML configuration.

preview boolean

If set to true, a deployment is created with “shell” resources that are not actually instantiated. This allows you to preview a deployment. It can be updated to false to actually deploy with real resources. ~>NOTE: Deployment Manager does not allow update of a deployment in preview (unless updating to preview=false). Thus, the provider will force-recreate deployments if either preview is updated to true or if other fields are updated while preview is true.

project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

target Dict[DeploymentTarget]

Parameters that define your deployment, including the deployment configuration and relevant templates. Structure is documented below.

create_policy str

Set the policy to use for creating new resources. Only used on create and update. Valid values are CREATE_OR_ACQUIRE (default) or ACQUIRE. If set to ACQUIRE and resources do not already exist, the deployment will fail. Note that updating this field does not actually affect the deployment, just how it is updated.

delete_policy str

Set the policy to use for deleting new resources on update/delete. Valid values are DELETE (default) or ABANDON. If DELETE, resource is deleted after removal from Deployment Manager. If ABANDON, the resource is only removed from Deployment Manager and is not actually deleted. Note that updating this field does not actually change the deployment, just how it is updated.

description str

Optional user-provided description of deployment.

labels List[DeploymentLabel]

Key-value pairs to apply to this labels. Structure is documented below.

name str

The name of the template to import, as declared in the YAML configuration.

preview bool

If set to true, a deployment is created with “shell” resources that are not actually instantiated. This allows you to preview a deployment. It can be updated to false to actually deploy with real resources. ~>NOTE: Deployment Manager does not allow update of a deployment in preview (unless updating to preview=false). Thus, the provider will force-recreate deployments if either preview is updated to true or if other fields are updated while preview is true.

project str

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Outputs

All input properties are implicitly available as output properties. Additionally, the Deployment resource produces the following output properties:

DeploymentId string

Unique identifier for deployment. Output only.

Id string
The provider-assigned unique ID for this managed resource.
Manifest string

Output only. URL of the manifest representing the last manifest that was successfully deployed.

SelfLink string

Output only. Server defined URL for the resource.

DeploymentId string

Unique identifier for deployment. Output only.

Id string
The provider-assigned unique ID for this managed resource.
Manifest string

Output only. URL of the manifest representing the last manifest that was successfully deployed.

SelfLink string

Output only. Server defined URL for the resource.

deploymentId string

Unique identifier for deployment. Output only.

id string
The provider-assigned unique ID for this managed resource.
manifest string

Output only. URL of the manifest representing the last manifest that was successfully deployed.

selfLink string

Output only. Server defined URL for the resource.

deployment_id str

Unique identifier for deployment. Output only.

id str
The provider-assigned unique ID for this managed resource.
manifest str

Output only. URL of the manifest representing the last manifest that was successfully deployed.

self_link str

Output only. Server defined URL for the resource.

Look up an Existing Deployment Resource

Get an existing Deployment resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: DeploymentState, opts?: CustomResourceOptions): Deployment
static get(resource_name, id, opts=None, create_policy=None, delete_policy=None, deployment_id=None, description=None, labels=None, manifest=None, name=None, preview=None, project=None, self_link=None, target=None, __props__=None);
func GetDeployment(ctx *Context, name string, id IDInput, state *DeploymentState, opts ...ResourceOption) (*Deployment, error)
public static Deployment Get(string name, Input<string> id, DeploymentState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

CreatePolicy string

Set the policy to use for creating new resources. Only used on create and update. Valid values are CREATE_OR_ACQUIRE (default) or ACQUIRE. If set to ACQUIRE and resources do not already exist, the deployment will fail. Note that updating this field does not actually affect the deployment, just how it is updated.

DeletePolicy string

Set the policy to use for deleting new resources on update/delete. Valid values are DELETE (default) or ABANDON. If DELETE, resource is deleted after removal from Deployment Manager. If ABANDON, the resource is only removed from Deployment Manager and is not actually deleted. Note that updating this field does not actually change the deployment, just how it is updated.

DeploymentId string

Unique identifier for deployment. Output only.

Description string

Optional user-provided description of deployment.

Labels List<DeploymentLabelArgs>

Key-value pairs to apply to this labels. Structure is documented below.

Manifest string

Output only. URL of the manifest representing the last manifest that was successfully deployed.

Name string

The name of the template to import, as declared in the YAML configuration.

Preview bool

If set to true, a deployment is created with “shell” resources that are not actually instantiated. This allows you to preview a deployment. It can be updated to false to actually deploy with real resources. ~>NOTE: Deployment Manager does not allow update of a deployment in preview (unless updating to preview=false). Thus, the provider will force-recreate deployments if either preview is updated to true or if other fields are updated while preview is true.

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

SelfLink string

Output only. Server defined URL for the resource.

Target DeploymentTargetArgs

Parameters that define your deployment, including the deployment configuration and relevant templates. Structure is documented below.

CreatePolicy string

Set the policy to use for creating new resources. Only used on create and update. Valid values are CREATE_OR_ACQUIRE (default) or ACQUIRE. If set to ACQUIRE and resources do not already exist, the deployment will fail. Note that updating this field does not actually affect the deployment, just how it is updated.

DeletePolicy string

Set the policy to use for deleting new resources on update/delete. Valid values are DELETE (default) or ABANDON. If DELETE, resource is deleted after removal from Deployment Manager. If ABANDON, the resource is only removed from Deployment Manager and is not actually deleted. Note that updating this field does not actually change the deployment, just how it is updated.

DeploymentId string

Unique identifier for deployment. Output only.

Description string

Optional user-provided description of deployment.

Labels []DeploymentLabel

Key-value pairs to apply to this labels. Structure is documented below.

Manifest string

Output only. URL of the manifest representing the last manifest that was successfully deployed.

Name string

The name of the template to import, as declared in the YAML configuration.

Preview bool

If set to true, a deployment is created with “shell” resources that are not actually instantiated. This allows you to preview a deployment. It can be updated to false to actually deploy with real resources. ~>NOTE: Deployment Manager does not allow update of a deployment in preview (unless updating to preview=false). Thus, the provider will force-recreate deployments if either preview is updated to true or if other fields are updated while preview is true.

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

SelfLink string

Output only. Server defined URL for the resource.

Target DeploymentTarget

Parameters that define your deployment, including the deployment configuration and relevant templates. Structure is documented below.

createPolicy string

Set the policy to use for creating new resources. Only used on create and update. Valid values are CREATE_OR_ACQUIRE (default) or ACQUIRE. If set to ACQUIRE and resources do not already exist, the deployment will fail. Note that updating this field does not actually affect the deployment, just how it is updated.

deletePolicy string

Set the policy to use for deleting new resources on update/delete. Valid values are DELETE (default) or ABANDON. If DELETE, resource is deleted after removal from Deployment Manager. If ABANDON, the resource is only removed from Deployment Manager and is not actually deleted. Note that updating this field does not actually change the deployment, just how it is updated.

deploymentId string

Unique identifier for deployment. Output only.

description string

Optional user-provided description of deployment.

labels DeploymentLabel[]

Key-value pairs to apply to this labels. Structure is documented below.

manifest string

Output only. URL of the manifest representing the last manifest that was successfully deployed.

name string

The name of the template to import, as declared in the YAML configuration.

preview boolean

If set to true, a deployment is created with “shell” resources that are not actually instantiated. This allows you to preview a deployment. It can be updated to false to actually deploy with real resources. ~>NOTE: Deployment Manager does not allow update of a deployment in preview (unless updating to preview=false). Thus, the provider will force-recreate deployments if either preview is updated to true or if other fields are updated while preview is true.

project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

selfLink string

Output only. Server defined URL for the resource.

target DeploymentTarget

Parameters that define your deployment, including the deployment configuration and relevant templates. Structure is documented below.

create_policy str

Set the policy to use for creating new resources. Only used on create and update. Valid values are CREATE_OR_ACQUIRE (default) or ACQUIRE. If set to ACQUIRE and resources do not already exist, the deployment will fail. Note that updating this field does not actually affect the deployment, just how it is updated.

delete_policy str

Set the policy to use for deleting new resources on update/delete. Valid values are DELETE (default) or ABANDON. If DELETE, resource is deleted after removal from Deployment Manager. If ABANDON, the resource is only removed from Deployment Manager and is not actually deleted. Note that updating this field does not actually change the deployment, just how it is updated.

deployment_id str

Unique identifier for deployment. Output only.

description str

Optional user-provided description of deployment.

labels List[DeploymentLabel]

Key-value pairs to apply to this labels. Structure is documented below.

manifest str

Output only. URL of the manifest representing the last manifest that was successfully deployed.

name str

The name of the template to import, as declared in the YAML configuration.

preview bool

If set to true, a deployment is created with “shell” resources that are not actually instantiated. This allows you to preview a deployment. It can be updated to false to actually deploy with real resources. ~>NOTE: Deployment Manager does not allow update of a deployment in preview (unless updating to preview=false). Thus, the provider will force-recreate deployments if either preview is updated to true or if other fields are updated while preview is true.

project str

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

self_link str

Output only. Server defined URL for the resource.

target Dict[DeploymentTarget]

Parameters that define your deployment, including the deployment configuration and relevant templates. Structure is documented below.

Supporting Types

DeploymentLabel

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Key string

Key for label.

Value string

Value of label.

Key string

Key for label.

Value string

Value of label.

key string

Key for label.

value string

Value of label.

key str

Key for label.

value str

Value of label.

DeploymentTarget

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Config DeploymentTargetConfigArgs

The root configuration file to use for this deployment. Structure is documented below.

Imports List<DeploymentTargetImportArgs>

Specifies import files for this configuration. This can be used to import templates or other files. For example, you might import a text file in order to use the file in a template. Structure is documented below.

Config DeploymentTargetConfig

The root configuration file to use for this deployment. Structure is documented below.

Imports []DeploymentTargetImport

Specifies import files for this configuration. This can be used to import templates or other files. For example, you might import a text file in order to use the file in a template. Structure is documented below.

config DeploymentTargetConfig

The root configuration file to use for this deployment. Structure is documented below.

imports DeploymentTargetImport[]

Specifies import files for this configuration. This can be used to import templates or other files. For example, you might import a text file in order to use the file in a template. Structure is documented below.

config Dict[DeploymentTargetConfig]

The root configuration file to use for this deployment. Structure is documented below.

imports List[DeploymentTargetImport]

Specifies import files for this configuration. This can be used to import templates or other files. For example, you might import a text file in order to use the file in a template. Structure is documented below.

DeploymentTargetConfig

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Content string

The full contents of the template that you want to import.

Content string

The full contents of the template that you want to import.

content string

The full contents of the template that you want to import.

content str

The full contents of the template that you want to import.

DeploymentTargetImport

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Content string

The full contents of the template that you want to import.

Name string

The name of the template to import, as declared in the YAML configuration.

Content string

The full contents of the template that you want to import.

Name string

The name of the template to import, as declared in the YAML configuration.

content string

The full contents of the template that you want to import.

name string

The name of the template to import, as declared in the YAML configuration.

content str

The full contents of the template that you want to import.

name str

The name of the template to import, as declared in the YAML configuration.

Package Details

Repository
https://github.com/pulumi/pulumi-gcp
License
Apache-2.0
Notes
This Pulumi package is based on the google-beta Terraform Provider.