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
new Deployment(name: string, args: DeploymentArgs, opts?: CustomResourceOptions);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
Deployment
Target Args Parameters that define your deployment, including the deployment configuration and relevant templates. Structure is documented below.
- Create
Policy string Set the policy to use for creating new resources. Only used on create and update. Valid values are
CREATE_OR_ACQUIRE(default) orACQUIRE. If set toACQUIREand 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 string Set the policy to use for deleting new resources on update/delete. Valid values are
DELETE(default) orABANDON. IfDELETE, resource is deleted after removal from Deployment Manager. IfABANDON, 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<Deployment
Label Args> 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
Deployment
Target Parameters that define your deployment, including the deployment configuration and relevant templates. Structure is documented below.
- Create
Policy string Set the policy to use for creating new resources. Only used on create and update. Valid values are
CREATE_OR_ACQUIRE(default) orACQUIRE. If set toACQUIREand 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 string Set the policy to use for deleting new resources on update/delete. Valid values are
DELETE(default) orABANDON. IfDELETE, resource is deleted after removal from Deployment Manager. IfABANDON, 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
[]Deployment
Label 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
Deployment
Target Parameters that define your deployment, including the deployment configuration and relevant templates. Structure is documented below.
- create
Policy string Set the policy to use for creating new resources. Only used on create and update. Valid values are
CREATE_OR_ACQUIRE(default) orACQUIRE. If set toACQUIREand 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 string Set the policy to use for deleting new resources on update/delete. Valid values are
DELETE(default) orABANDON. IfDELETE, resource is deleted after removal from Deployment Manager. IfABANDON, 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
Deployment
Label[] 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[Deployment
Target] 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) orACQUIRE. If set toACQUIREand 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) orABANDON. IfDELETE, resource is deleted after removal from Deployment Manager. IfABANDON, 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[Deployment
Label] 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:
- Deployment
Id 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.
- Self
Link string Output only. Server defined URL for the resource.
- Deployment
Id 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.
- Self
Link string Output only. Server defined URL for the resource.
- deployment
Id 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.
- self
Link string 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): Deploymentstatic 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:
- Create
Policy string Set the policy to use for creating new resources. Only used on create and update. Valid values are
CREATE_OR_ACQUIRE(default) orACQUIRE. If set toACQUIREand 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 string Set the policy to use for deleting new resources on update/delete. Valid values are
DELETE(default) orABANDON. IfDELETE, resource is deleted after removal from Deployment Manager. IfABANDON, 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 string Unique identifier for deployment. Output only.
- Description string
Optional user-provided description of deployment.
- Labels
List<Deployment
Label Args> 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.
- Self
Link string Output only. Server defined URL for the resource.
- Target
Deployment
Target Args Parameters that define your deployment, including the deployment configuration and relevant templates. Structure is documented below.
- Create
Policy string Set the policy to use for creating new resources. Only used on create and update. Valid values are
CREATE_OR_ACQUIRE(default) orACQUIRE. If set toACQUIREand 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 string Set the policy to use for deleting new resources on update/delete. Valid values are
DELETE(default) orABANDON. IfDELETE, resource is deleted after removal from Deployment Manager. IfABANDON, 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 string Unique identifier for deployment. Output only.
- Description string
Optional user-provided description of deployment.
- Labels
[]Deployment
Label 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.
- Self
Link string Output only. Server defined URL for the resource.
- Target
Deployment
Target Parameters that define your deployment, including the deployment configuration and relevant templates. Structure is documented below.
- create
Policy string Set the policy to use for creating new resources. Only used on create and update. Valid values are
CREATE_OR_ACQUIRE(default) orACQUIRE. If set toACQUIREand 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 string Set the policy to use for deleting new resources on update/delete. Valid values are
DELETE(default) orABANDON. IfDELETE, resource is deleted after removal from Deployment Manager. IfABANDON, 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 string Unique identifier for deployment. Output only.
- description string
Optional user-provided description of deployment.
- labels
Deployment
Label[] 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.
- self
Link string Output only. Server defined URL for the resource.
- target
Deployment
Target 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) orACQUIRE. If set toACQUIREand 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) orABANDON. IfDELETE, resource is deleted after removal from Deployment Manager. IfABANDON, 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[Deployment
Label] 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[Deployment
Target] Parameters that define your deployment, including the deployment configuration and relevant templates. Structure is documented below.
Supporting Types
DeploymentLabel
DeploymentTarget
- Config
Deployment
Target Config Args The root configuration file to use for this deployment. Structure is documented below.
- Imports
List<Deployment
Target Import Args> 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
Deployment
Target Config The root configuration file to use for this deployment. Structure is documented below.
- Imports
[]Deployment
Target Import 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
Deployment
Target Config The root configuration file to use for this deployment. Structure is documented below.
- imports
Deployment
Target Import[] 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[Deployment
Target Config] The root configuration file to use for this deployment. Structure is documented below.
- imports
List[Deployment
Target Import] 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
DeploymentTargetImport
Package Details
- Repository
- https://github.com/pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-betaTerraform Provider.