Class 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).
Example Usage - Deployment Manager Deployment Basic
using System.IO;
using Pulumi;
using Gcp = Pulumi.Gcp;
class MyStack : Stack
{
public MyStack()
{
var deployment = new Gcp.DeploymentManager.Deployment("deployment", new Gcp.DeploymentManager.DeploymentArgs
{
Target = new Gcp.DeploymentManager.Inputs.DeploymentTargetArgs
{
Config = new Gcp.DeploymentManager.Inputs.DeploymentTargetConfigArgs
{
Content = File.ReadAllText("path/to/config.yml"),
},
},
Labels =
{
new Gcp.DeploymentManager.Inputs.DeploymentLabelArgs
{
Key = "foo",
Value = "bar",
},
},
});
}
}
Inherited Members
Namespace: Pulumi.Gcp.DeploymentManager
Assembly: Pulumi.Gcp.dll
Syntax
public class Deployment : CustomResource
Constructors
View SourceDeployment(String, DeploymentArgs, CustomResourceOptions)
Create a Deployment resource with the given unique name, arguments, and options.
Declaration
public Deployment(string name, DeploymentArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| DeploymentArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceCreatePolicy
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.
Declaration
public Output<string> CreatePolicy { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DeletePolicy
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.
Declaration
public Output<string> DeletePolicy { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DeploymentId
Unique identifier for deployment. Output only.
Declaration
public Output<string> DeploymentId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Description
Optional user-provided description of deployment.
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Labels
Key-value pairs to apply to this labels. Structure is documented below.
Declaration
public Output<ImmutableArray<DeploymentLabel>> Labels { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<DeploymentLabel>> |
Manifest
Output only. URL of the manifest representing the last manifest that was successfully deployed.
Declaration
public Output<string> Manifest { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Name
The name of the template to import, as declared in the YAML configuration.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Preview
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.
Declaration
public Output<bool?> Preview { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
Project
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Declaration
public Output<string> Project { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
SelfLink
Output only. Server defined URL for the resource.
Declaration
public Output<string> SelfLink { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Target
Parameters that define your deployment, including the deployment configuration and relevant templates. Structure is documented below.
Declaration
public Output<DeploymentTarget> Target { get; }
Property Value
| Type | Description |
|---|---|
| Output<DeploymentTarget> |
Methods
View SourceGet(String, Input<String>, DeploymentState, CustomResourceOptions)
Get an existing Deployment resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Deployment Get(string name, Input<string> id, DeploymentState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| DeploymentState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Deployment |