DeploymentArgs

data class DeploymentArgs(val createPolicy: Output<String>? = null, val deletePolicy: Output<String>? = null, val description: Output<String>? = null, val labels: Output<List<DeploymentLabelArgs>>? = null, val name: Output<String>? = null, val preview: Output<Boolean>? = null, val project: Output<String>? = null, val target: Output<DeploymentTargetArgs>? = null) : ConvertibleToJava<DeploymentArgs>

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

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.deploymentmanager.Deployment;
import com.pulumi.gcp.deploymentmanager.DeploymentArgs;
import com.pulumi.gcp.deploymentmanager.inputs.DeploymentTargetArgs;
import com.pulumi.gcp.deploymentmanager.inputs.DeploymentTargetConfigArgs;
import com.pulumi.gcp.deploymentmanager.inputs.DeploymentLabelArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var deployment = new Deployment("deployment", DeploymentArgs.builder()
.target(DeploymentTargetArgs.builder()
.config(DeploymentTargetConfigArgs.builder()
.content(Files.readString(Paths.get("path/to/config.yml")))
.build())
.build())
.labels(DeploymentLabelArgs.builder()
.key("foo")
.value("bar")
.build())
.build());
}
}

Import

Deployment can be imported using any of these accepted formats

$ pulumi import gcp:deploymentmanager/deployment:Deployment default projects/{{project}}/deployments/{{name}}
$ pulumi import gcp:deploymentmanager/deployment:Deployment default {{project}}/{{name}}
$ pulumi import gcp:deploymentmanager/deployment:Deployment default {{name}}

Constructors

Link copied to clipboard
constructor(createPolicy: Output<String>? = null, deletePolicy: Output<String>? = null, description: Output<String>? = null, labels: Output<List<DeploymentLabelArgs>>? = null, name: Output<String>? = null, preview: Output<Boolean>? = null, project: Output<String>? = null, target: Output<DeploymentTargetArgs>? = null)

Properties

Link copied to clipboard
val createPolicy: Output<String>? = null

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. Default value is CREATE_OR_ACQUIRE. Possible values are: ACQUIRE, CREATE_OR_ACQUIRE.

Link copied to clipboard
val deletePolicy: Output<String>? = null

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. Default value is DELETE. Possible values are: ABANDON, DELETE.

Link copied to clipboard
val description: Output<String>? = null

Optional user-provided description of deployment.

Link copied to clipboard
val labels: Output<List<DeploymentLabelArgs>>? = null

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

Link copied to clipboard
val name: Output<String>? = null

Unique name for the deployment

Link copied to clipboard
val preview: Output<Boolean>? = null

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.

Link copied to clipboard
val project: Output<String>? = null

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

Link copied to clipboard
val target: Output<DeploymentTargetArgs>? = null

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

Functions

Link copied to clipboard
open override fun toJava(): DeploymentArgs