gcp logo
Google Cloud Classic v6.49.0, Feb 1 23

gcp.clouddeploy.Target

The Cloud Deploy Target resource

Example Usage

Run_target

using System.Collections.Generic;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var primary = new Gcp.CloudDeploy.Target("primary", new()
    {
        Location = "us-west1",
        Annotations = 
        {
            { "my_first_annotation", "example-annotation-1" },
            { "my_second_annotation", "example-annotation-2" },
        },
        Description = "basic description",
        ExecutionConfigs = new[]
        {
            new Gcp.CloudDeploy.Inputs.TargetExecutionConfigArgs
            {
                Usages = new[]
                {
                    "RENDER",
                    "DEPLOY",
                },
                ExecutionTimeout = "3600s",
            },
        },
        Labels = 
        {
            { "my_first_label", "example-label-1" },
            { "my_second_label", "example-label-2" },
        },
        Project = "my-project-name",
        RequireApproval = false,
        Run = new Gcp.CloudDeploy.Inputs.TargetRunArgs
        {
            Location = "projects/my-project-name/locations/us-west1",
        },
    }, new CustomResourceOptions
    {
        Provider = google_beta,
    });

});
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/clouddeploy"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := clouddeploy.NewTarget(ctx, "primary", &clouddeploy.TargetArgs{
			Location: pulumi.String("us-west1"),
			Annotations: pulumi.StringMap{
				"my_first_annotation":  pulumi.String("example-annotation-1"),
				"my_second_annotation": pulumi.String("example-annotation-2"),
			},
			Description: pulumi.String("basic description"),
			ExecutionConfigs: clouddeploy.TargetExecutionConfigArray{
				&clouddeploy.TargetExecutionConfigArgs{
					Usages: pulumi.StringArray{
						pulumi.String("RENDER"),
						pulumi.String("DEPLOY"),
					},
					ExecutionTimeout: pulumi.String("3600s"),
				},
			},
			Labels: pulumi.StringMap{
				"my_first_label":  pulumi.String("example-label-1"),
				"my_second_label": pulumi.String("example-label-2"),
			},
			Project:         pulumi.String("my-project-name"),
			RequireApproval: pulumi.Bool(false),
			Run: &clouddeploy.TargetRunArgs{
				Location: pulumi.String("projects/my-project-name/locations/us-west1"),
			},
		}, pulumi.Provider(google_beta))
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.clouddeploy.Target;
import com.pulumi.gcp.clouddeploy.TargetArgs;
import com.pulumi.gcp.clouddeploy.inputs.TargetExecutionConfigArgs;
import com.pulumi.gcp.clouddeploy.inputs.TargetRunArgs;
import com.pulumi.resources.CustomResourceOptions;
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 primary = new Target("primary", TargetArgs.builder()        
            .location("us-west1")
            .annotations(Map.ofEntries(
                Map.entry("my_first_annotation", "example-annotation-1"),
                Map.entry("my_second_annotation", "example-annotation-2")
            ))
            .description("basic description")
            .executionConfigs(TargetExecutionConfigArgs.builder()
                .usages(                
                    "RENDER",
                    "DEPLOY")
                .executionTimeout("3600s")
                .build())
            .labels(Map.ofEntries(
                Map.entry("my_first_label", "example-label-1"),
                Map.entry("my_second_label", "example-label-2")
            ))
            .project("my-project-name")
            .requireApproval(false)
            .run(TargetRunArgs.builder()
                .location("projects/my-project-name/locations/us-west1")
                .build())
            .build(), CustomResourceOptions.builder()
                .provider(google_beta)
                .build());

    }
}
import pulumi
import pulumi_gcp as gcp

primary = gcp.clouddeploy.Target("primary",
    location="us-west1",
    annotations={
        "my_first_annotation": "example-annotation-1",
        "my_second_annotation": "example-annotation-2",
    },
    description="basic description",
    execution_configs=[gcp.clouddeploy.TargetExecutionConfigArgs(
        usages=[
            "RENDER",
            "DEPLOY",
        ],
        execution_timeout="3600s",
    )],
    labels={
        "my_first_label": "example-label-1",
        "my_second_label": "example-label-2",
    },
    project="my-project-name",
    require_approval=False,
    run=gcp.clouddeploy.TargetRunArgs(
        location="projects/my-project-name/locations/us-west1",
    ),
    opts=pulumi.ResourceOptions(provider=google_beta))
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const primary = new gcp.clouddeploy.Target("primary", {
    location: "us-west1",
    annotations: {
        my_first_annotation: "example-annotation-1",
        my_second_annotation: "example-annotation-2",
    },
    description: "basic description",
    executionConfigs: [{
        usages: [
            "RENDER",
            "DEPLOY",
        ],
        executionTimeout: "3600s",
    }],
    labels: {
        my_first_label: "example-label-1",
        my_second_label: "example-label-2",
    },
    project: "my-project-name",
    requireApproval: false,
    run: {
        location: "projects/my-project-name/locations/us-west1",
    },
}, {
    provider: google_beta,
});
resources:
  primary:
    type: gcp:clouddeploy:Target
    properties:
      location: us-west1
      annotations:
        my_first_annotation: example-annotation-1
        my_second_annotation: example-annotation-2
      description: basic description
      executionConfigs:
        - usages:
            - RENDER
            - DEPLOY
          executionTimeout: 3600s
      labels:
        my_first_label: example-label-1
        my_second_label: example-label-2
      project: my-project-name
      requireApproval: false
      run:
        location: projects/my-project-name/locations/us-west1
    options:
      provider: ${["google-beta"]}

Target

using System.Collections.Generic;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var primary = new Gcp.CloudDeploy.Target("primary", new()
    {
        Annotations = 
        {
            { "my_first_annotation", "example-annotation-1" },
            { "my_second_annotation", "example-annotation-2" },
        },
        Description = "basic description",
        Gke = new Gcp.CloudDeploy.Inputs.TargetGkeArgs
        {
            Cluster = "projects/my-project-name/locations/us-west1/clusters/example-cluster-name",
        },
        Labels = 
        {
            { "my_first_label", "example-label-1" },
            { "my_second_label", "example-label-2" },
        },
        Location = "us-west1",
        Project = "my-project-name",
        RequireApproval = false,
    });

});
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/clouddeploy"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := clouddeploy.NewTarget(ctx, "primary", &clouddeploy.TargetArgs{
			Annotations: pulumi.StringMap{
				"my_first_annotation":  pulumi.String("example-annotation-1"),
				"my_second_annotation": pulumi.String("example-annotation-2"),
			},
			Description: pulumi.String("basic description"),
			Gke: &clouddeploy.TargetGkeArgs{
				Cluster: pulumi.String("projects/my-project-name/locations/us-west1/clusters/example-cluster-name"),
			},
			Labels: pulumi.StringMap{
				"my_first_label":  pulumi.String("example-label-1"),
				"my_second_label": pulumi.String("example-label-2"),
			},
			Location:        pulumi.String("us-west1"),
			Project:         pulumi.String("my-project-name"),
			RequireApproval: pulumi.Bool(false),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.clouddeploy.Target;
import com.pulumi.gcp.clouddeploy.TargetArgs;
import com.pulumi.gcp.clouddeploy.inputs.TargetGkeArgs;
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 primary = new Target("primary", TargetArgs.builder()        
            .annotations(Map.ofEntries(
                Map.entry("my_first_annotation", "example-annotation-1"),
                Map.entry("my_second_annotation", "example-annotation-2")
            ))
            .description("basic description")
            .gke(TargetGkeArgs.builder()
                .cluster("projects/my-project-name/locations/us-west1/clusters/example-cluster-name")
                .build())
            .labels(Map.ofEntries(
                Map.entry("my_first_label", "example-label-1"),
                Map.entry("my_second_label", "example-label-2")
            ))
            .location("us-west1")
            .project("my-project-name")
            .requireApproval(false)
            .build());

    }
}
import pulumi
import pulumi_gcp as gcp

primary = gcp.clouddeploy.Target("primary",
    annotations={
        "my_first_annotation": "example-annotation-1",
        "my_second_annotation": "example-annotation-2",
    },
    description="basic description",
    gke=gcp.clouddeploy.TargetGkeArgs(
        cluster="projects/my-project-name/locations/us-west1/clusters/example-cluster-name",
    ),
    labels={
        "my_first_label": "example-label-1",
        "my_second_label": "example-label-2",
    },
    location="us-west1",
    project="my-project-name",
    require_approval=False)
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const primary = new gcp.clouddeploy.Target("primary", {
    annotations: {
        my_first_annotation: "example-annotation-1",
        my_second_annotation: "example-annotation-2",
    },
    description: "basic description",
    gke: {
        cluster: "projects/my-project-name/locations/us-west1/clusters/example-cluster-name",
    },
    labels: {
        my_first_label: "example-label-1",
        my_second_label: "example-label-2",
    },
    location: "us-west1",
    project: "my-project-name",
    requireApproval: false,
});
resources:
  primary:
    type: gcp:clouddeploy:Target
    properties:
      annotations:
        my_first_annotation: example-annotation-1
        my_second_annotation: example-annotation-2
      description: basic description
      gke:
        cluster: projects/my-project-name/locations/us-west1/clusters/example-cluster-name
      labels:
        my_first_label: example-label-1
        my_second_label: example-label-2
      location: us-west1
      project: my-project-name
      requireApproval: false

Create Target Resource

new Target(name: string, args: TargetArgs, opts?: CustomResourceOptions);
@overload
def Target(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           annotations: Optional[Mapping[str, str]] = None,
           anthos_cluster: Optional[TargetAnthosClusterArgs] = None,
           description: Optional[str] = None,
           execution_configs: Optional[Sequence[TargetExecutionConfigArgs]] = None,
           gke: Optional[TargetGkeArgs] = None,
           labels: Optional[Mapping[str, str]] = None,
           location: Optional[str] = None,
           name: Optional[str] = None,
           project: Optional[str] = None,
           require_approval: Optional[bool] = None,
           run: Optional[TargetRunArgs] = None)
@overload
def Target(resource_name: str,
           args: TargetArgs,
           opts: Optional[ResourceOptions] = None)
func NewTarget(ctx *Context, name string, args TargetArgs, opts ...ResourceOption) (*Target, error)
public Target(string name, TargetArgs args, CustomResourceOptions? opts = null)
public Target(String name, TargetArgs args)
public Target(String name, TargetArgs args, CustomResourceOptions options)
type: gcp:clouddeploy:Target
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args TargetArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args TargetArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args TargetArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args TargetArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args TargetArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Target Resource Properties

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

Inputs

The Target resource accepts the following input properties:

Location string

The location for the resource

Annotations Dictionary<string, string>

Optional. User annotations. These attributes can only be set and used by the user, and not by Google Cloud Deploy. See https://google.aip.dev/128#annotations for more details such as format and size limitations.

AnthosCluster TargetAnthosClusterArgs

Information specifying an Anthos Cluster.

Description string

Optional. Description of the Target. Max length is 255 characters.

ExecutionConfigs List<TargetExecutionConfigArgs>

Configurations for all execution that relates to this Target. Each ExecutionEnvironmentUsage value may only be used in a single configuration; using the same value multiple times is an error. When one or more configurations are specified, they must include the RENDER and DEPLOY ExecutionEnvironmentUsage values. When no configurations are specified, execution will use the default specified in DefaultPool.

Gke TargetGkeArgs

Information specifying a GKE Cluster.

Labels Dictionary<string, string>

Optional. Labels are attributes that can be set and used by both the user and by Google Cloud Deploy. Labels must meet the following constraints: * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. * All characters must use UTF-8 encoding, and international characters are allowed. * Keys must start with a lowercase letter or international character. * Each resource is limited to a maximum of 64 labels. Both keys and values are additionally constrained to be <= 128 bytes.

Name string

Name of the Target. Format is [a-z][a-z0-9-]{0,62}.

Project string

The project for the resource

RequireApproval bool

Optional. Whether or not the Target requires approval.

Run TargetRunArgs

(Beta only) Information specifying a Cloud Run deployment target.

Location string

The location for the resource

Annotations map[string]string

Optional. User annotations. These attributes can only be set and used by the user, and not by Google Cloud Deploy. See https://google.aip.dev/128#annotations for more details such as format and size limitations.

AnthosCluster TargetAnthosClusterArgs

Information specifying an Anthos Cluster.

Description string

Optional. Description of the Target. Max length is 255 characters.

ExecutionConfigs []TargetExecutionConfigArgs

Configurations for all execution that relates to this Target. Each ExecutionEnvironmentUsage value may only be used in a single configuration; using the same value multiple times is an error. When one or more configurations are specified, they must include the RENDER and DEPLOY ExecutionEnvironmentUsage values. When no configurations are specified, execution will use the default specified in DefaultPool.

Gke TargetGkeArgs

Information specifying a GKE Cluster.

Labels map[string]string

Optional. Labels are attributes that can be set and used by both the user and by Google Cloud Deploy. Labels must meet the following constraints: * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. * All characters must use UTF-8 encoding, and international characters are allowed. * Keys must start with a lowercase letter or international character. * Each resource is limited to a maximum of 64 labels. Both keys and values are additionally constrained to be <= 128 bytes.

Name string

Name of the Target. Format is [a-z][a-z0-9-]{0,62}.

Project string

The project for the resource

RequireApproval bool

Optional. Whether or not the Target requires approval.

Run TargetRunArgs

(Beta only) Information specifying a Cloud Run deployment target.

location String

The location for the resource

annotations Map<String,String>

Optional. User annotations. These attributes can only be set and used by the user, and not by Google Cloud Deploy. See https://google.aip.dev/128#annotations for more details such as format and size limitations.

anthosCluster TargetAnthosClusterArgs

Information specifying an Anthos Cluster.

description String

Optional. Description of the Target. Max length is 255 characters.

executionConfigs List<TargetExecutionConfigArgs>

Configurations for all execution that relates to this Target. Each ExecutionEnvironmentUsage value may only be used in a single configuration; using the same value multiple times is an error. When one or more configurations are specified, they must include the RENDER and DEPLOY ExecutionEnvironmentUsage values. When no configurations are specified, execution will use the default specified in DefaultPool.

gke TargetGkeArgs

Information specifying a GKE Cluster.

labels Map<String,String>

Optional. Labels are attributes that can be set and used by both the user and by Google Cloud Deploy. Labels must meet the following constraints: * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. * All characters must use UTF-8 encoding, and international characters are allowed. * Keys must start with a lowercase letter or international character. * Each resource is limited to a maximum of 64 labels. Both keys and values are additionally constrained to be <= 128 bytes.

name String

Name of the Target. Format is [a-z][a-z0-9-]{0,62}.

project String

The project for the resource

requireApproval Boolean

Optional. Whether or not the Target requires approval.

run TargetRunArgs

(Beta only) Information specifying a Cloud Run deployment target.

location string

The location for the resource

annotations {[key: string]: string}

Optional. User annotations. These attributes can only be set and used by the user, and not by Google Cloud Deploy. See https://google.aip.dev/128#annotations for more details such as format and size limitations.

anthosCluster TargetAnthosClusterArgs

Information specifying an Anthos Cluster.

description string

Optional. Description of the Target. Max length is 255 characters.

executionConfigs TargetExecutionConfigArgs[]

Configurations for all execution that relates to this Target. Each ExecutionEnvironmentUsage value may only be used in a single configuration; using the same value multiple times is an error. When one or more configurations are specified, they must include the RENDER and DEPLOY ExecutionEnvironmentUsage values. When no configurations are specified, execution will use the default specified in DefaultPool.

gke TargetGkeArgs

Information specifying a GKE Cluster.

labels {[key: string]: string}

Optional. Labels are attributes that can be set and used by both the user and by Google Cloud Deploy. Labels must meet the following constraints: * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. * All characters must use UTF-8 encoding, and international characters are allowed. * Keys must start with a lowercase letter or international character. * Each resource is limited to a maximum of 64 labels. Both keys and values are additionally constrained to be <= 128 bytes.

name string

Name of the Target. Format is [a-z][a-z0-9-]{0,62}.

project string

The project for the resource

requireApproval boolean

Optional. Whether or not the Target requires approval.

run TargetRunArgs

(Beta only) Information specifying a Cloud Run deployment target.

location str

The location for the resource

annotations Mapping[str, str]

Optional. User annotations. These attributes can only be set and used by the user, and not by Google Cloud Deploy. See https://google.aip.dev/128#annotations for more details such as format and size limitations.

anthos_cluster TargetAnthosClusterArgs

Information specifying an Anthos Cluster.

description str

Optional. Description of the Target. Max length is 255 characters.

execution_configs Sequence[TargetExecutionConfigArgs]

Configurations for all execution that relates to this Target. Each ExecutionEnvironmentUsage value may only be used in a single configuration; using the same value multiple times is an error. When one or more configurations are specified, they must include the RENDER and DEPLOY ExecutionEnvironmentUsage values. When no configurations are specified, execution will use the default specified in DefaultPool.

gke TargetGkeArgs

Information specifying a GKE Cluster.

labels Mapping[str, str]

Optional. Labels are attributes that can be set and used by both the user and by Google Cloud Deploy. Labels must meet the following constraints: * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. * All characters must use UTF-8 encoding, and international characters are allowed. * Keys must start with a lowercase letter or international character. * Each resource is limited to a maximum of 64 labels. Both keys and values are additionally constrained to be <= 128 bytes.

name str

Name of the Target. Format is [a-z][a-z0-9-]{0,62}.

project str

The project for the resource

require_approval bool

Optional. Whether or not the Target requires approval.

run TargetRunArgs

(Beta only) Information specifying a Cloud Run deployment target.

location String

The location for the resource

annotations Map<String>

Optional. User annotations. These attributes can only be set and used by the user, and not by Google Cloud Deploy. See https://google.aip.dev/128#annotations for more details such as format and size limitations.

anthosCluster Property Map

Information specifying an Anthos Cluster.

description String

Optional. Description of the Target. Max length is 255 characters.

executionConfigs List<Property Map>

Configurations for all execution that relates to this Target. Each ExecutionEnvironmentUsage value may only be used in a single configuration; using the same value multiple times is an error. When one or more configurations are specified, they must include the RENDER and DEPLOY ExecutionEnvironmentUsage values. When no configurations are specified, execution will use the default specified in DefaultPool.

gke Property Map

Information specifying a GKE Cluster.

labels Map<String>

Optional. Labels are attributes that can be set and used by both the user and by Google Cloud Deploy. Labels must meet the following constraints: * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. * All characters must use UTF-8 encoding, and international characters are allowed. * Keys must start with a lowercase letter or international character. * Each resource is limited to a maximum of 64 labels. Both keys and values are additionally constrained to be <= 128 bytes.

name String

Name of the Target. Format is [a-z][a-z0-9-]{0,62}.

project String

The project for the resource

requireApproval Boolean

Optional. Whether or not the Target requires approval.

run Property Map

(Beta only) Information specifying a Cloud Run deployment target.

Outputs

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

CreateTime string

Output only. Time at which the Target was created.

Etag string

Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.

Id string

The provider-assigned unique ID for this managed resource.

TargetId string

Output only. Resource id of the Target.

Uid string

Output only. Unique identifier of the Target.

UpdateTime string

Output only. Most recent time at which the Target was updated.

CreateTime string

Output only. Time at which the Target was created.

Etag string

Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.

Id string

The provider-assigned unique ID for this managed resource.

TargetId string

Output only. Resource id of the Target.

Uid string

Output only. Unique identifier of the Target.

UpdateTime string

Output only. Most recent time at which the Target was updated.

createTime String

Output only. Time at which the Target was created.

etag String

Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.

id String

The provider-assigned unique ID for this managed resource.

targetId String

Output only. Resource id of the Target.

uid String

Output only. Unique identifier of the Target.

updateTime String

Output only. Most recent time at which the Target was updated.

createTime string

Output only. Time at which the Target was created.

etag string

Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.

id string

The provider-assigned unique ID for this managed resource.

targetId string

Output only. Resource id of the Target.

uid string

Output only. Unique identifier of the Target.

updateTime string

Output only. Most recent time at which the Target was updated.

create_time str

Output only. Time at which the Target was created.

etag str

Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.

id str

The provider-assigned unique ID for this managed resource.

target_id str

Output only. Resource id of the Target.

uid str

Output only. Unique identifier of the Target.

update_time str

Output only. Most recent time at which the Target was updated.

createTime String

Output only. Time at which the Target was created.

etag String

Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.

id String

The provider-assigned unique ID for this managed resource.

targetId String

Output only. Resource id of the Target.

uid String

Output only. Unique identifier of the Target.

updateTime String

Output only. Most recent time at which the Target was updated.

Look up Existing Target Resource

Get an existing Target 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?: TargetState, opts?: CustomResourceOptions): Target
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        annotations: Optional[Mapping[str, str]] = None,
        anthos_cluster: Optional[TargetAnthosClusterArgs] = None,
        create_time: Optional[str] = None,
        description: Optional[str] = None,
        etag: Optional[str] = None,
        execution_configs: Optional[Sequence[TargetExecutionConfigArgs]] = None,
        gke: Optional[TargetGkeArgs] = None,
        labels: Optional[Mapping[str, str]] = None,
        location: Optional[str] = None,
        name: Optional[str] = None,
        project: Optional[str] = None,
        require_approval: Optional[bool] = None,
        run: Optional[TargetRunArgs] = None,
        target_id: Optional[str] = None,
        uid: Optional[str] = None,
        update_time: Optional[str] = None) -> Target
func GetTarget(ctx *Context, name string, id IDInput, state *TargetState, opts ...ResourceOption) (*Target, error)
public static Target Get(string name, Input<string> id, TargetState? state, CustomResourceOptions? opts = null)
public static Target get(String name, Output<String> id, TargetState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
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.
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:
Annotations Dictionary<string, string>

Optional. User annotations. These attributes can only be set and used by the user, and not by Google Cloud Deploy. See https://google.aip.dev/128#annotations for more details such as format and size limitations.

AnthosCluster TargetAnthosClusterArgs

Information specifying an Anthos Cluster.

CreateTime string

Output only. Time at which the Target was created.

Description string

Optional. Description of the Target. Max length is 255 characters.

Etag string

Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.

ExecutionConfigs List<TargetExecutionConfigArgs>

Configurations for all execution that relates to this Target. Each ExecutionEnvironmentUsage value may only be used in a single configuration; using the same value multiple times is an error. When one or more configurations are specified, they must include the RENDER and DEPLOY ExecutionEnvironmentUsage values. When no configurations are specified, execution will use the default specified in DefaultPool.

Gke TargetGkeArgs

Information specifying a GKE Cluster.

Labels Dictionary<string, string>

Optional. Labels are attributes that can be set and used by both the user and by Google Cloud Deploy. Labels must meet the following constraints: * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. * All characters must use UTF-8 encoding, and international characters are allowed. * Keys must start with a lowercase letter or international character. * Each resource is limited to a maximum of 64 labels. Both keys and values are additionally constrained to be <= 128 bytes.

Location string

The location for the resource

Name string

Name of the Target. Format is [a-z][a-z0-9-]{0,62}.

Project string

The project for the resource

RequireApproval bool

Optional. Whether or not the Target requires approval.

Run TargetRunArgs

(Beta only) Information specifying a Cloud Run deployment target.

TargetId string

Output only. Resource id of the Target.

Uid string

Output only. Unique identifier of the Target.

UpdateTime string

Output only. Most recent time at which the Target was updated.

Annotations map[string]string

Optional. User annotations. These attributes can only be set and used by the user, and not by Google Cloud Deploy. See https://google.aip.dev/128#annotations for more details such as format and size limitations.

AnthosCluster TargetAnthosClusterArgs

Information specifying an Anthos Cluster.

CreateTime string

Output only. Time at which the Target was created.

Description string

Optional. Description of the Target. Max length is 255 characters.

Etag string

Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.

ExecutionConfigs []TargetExecutionConfigArgs

Configurations for all execution that relates to this Target. Each ExecutionEnvironmentUsage value may only be used in a single configuration; using the same value multiple times is an error. When one or more configurations are specified, they must include the RENDER and DEPLOY ExecutionEnvironmentUsage values. When no configurations are specified, execution will use the default specified in DefaultPool.

Gke TargetGkeArgs

Information specifying a GKE Cluster.

Labels map[string]string

Optional. Labels are attributes that can be set and used by both the user and by Google Cloud Deploy. Labels must meet the following constraints: * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. * All characters must use UTF-8 encoding, and international characters are allowed. * Keys must start with a lowercase letter or international character. * Each resource is limited to a maximum of 64 labels. Both keys and values are additionally constrained to be <= 128 bytes.

Location string

The location for the resource

Name string

Name of the Target. Format is [a-z][a-z0-9-]{0,62}.

Project string

The project for the resource

RequireApproval bool

Optional. Whether or not the Target requires approval.

Run TargetRunArgs

(Beta only) Information specifying a Cloud Run deployment target.

TargetId string

Output only. Resource id of the Target.

Uid string

Output only. Unique identifier of the Target.

UpdateTime string

Output only. Most recent time at which the Target was updated.

annotations Map<String,String>

Optional. User annotations. These attributes can only be set and used by the user, and not by Google Cloud Deploy. See https://google.aip.dev/128#annotations for more details such as format and size limitations.

anthosCluster TargetAnthosClusterArgs

Information specifying an Anthos Cluster.

createTime String

Output only. Time at which the Target was created.

description String

Optional. Description of the Target. Max length is 255 characters.

etag String

Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.

executionConfigs List<TargetExecutionConfigArgs>

Configurations for all execution that relates to this Target. Each ExecutionEnvironmentUsage value may only be used in a single configuration; using the same value multiple times is an error. When one or more configurations are specified, they must include the RENDER and DEPLOY ExecutionEnvironmentUsage values. When no configurations are specified, execution will use the default specified in DefaultPool.

gke TargetGkeArgs

Information specifying a GKE Cluster.

labels Map<String,String>

Optional. Labels are attributes that can be set and used by both the user and by Google Cloud Deploy. Labels must meet the following constraints: * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. * All characters must use UTF-8 encoding, and international characters are allowed. * Keys must start with a lowercase letter or international character. * Each resource is limited to a maximum of 64 labels. Both keys and values are additionally constrained to be <= 128 bytes.

location String

The location for the resource

name String

Name of the Target. Format is [a-z][a-z0-9-]{0,62}.

project String

The project for the resource

requireApproval Boolean

Optional. Whether or not the Target requires approval.

run TargetRunArgs

(Beta only) Information specifying a Cloud Run deployment target.

targetId String

Output only. Resource id of the Target.

uid String

Output only. Unique identifier of the Target.

updateTime String

Output only. Most recent time at which the Target was updated.

annotations {[key: string]: string}

Optional. User annotations. These attributes can only be set and used by the user, and not by Google Cloud Deploy. See https://google.aip.dev/128#annotations for more details such as format and size limitations.

anthosCluster TargetAnthosClusterArgs

Information specifying an Anthos Cluster.

createTime string

Output only. Time at which the Target was created.

description string

Optional. Description of the Target. Max length is 255 characters.

etag string

Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.

executionConfigs TargetExecutionConfigArgs[]

Configurations for all execution that relates to this Target. Each ExecutionEnvironmentUsage value may only be used in a single configuration; using the same value multiple times is an error. When one or more configurations are specified, they must include the RENDER and DEPLOY ExecutionEnvironmentUsage values. When no configurations are specified, execution will use the default specified in DefaultPool.

gke TargetGkeArgs

Information specifying a GKE Cluster.

labels {[key: string]: string}

Optional. Labels are attributes that can be set and used by both the user and by Google Cloud Deploy. Labels must meet the following constraints: * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. * All characters must use UTF-8 encoding, and international characters are allowed. * Keys must start with a lowercase letter or international character. * Each resource is limited to a maximum of 64 labels. Both keys and values are additionally constrained to be <= 128 bytes.

location string

The location for the resource

name string

Name of the Target. Format is [a-z][a-z0-9-]{0,62}.

project string

The project for the resource

requireApproval boolean

Optional. Whether or not the Target requires approval.

run TargetRunArgs

(Beta only) Information specifying a Cloud Run deployment target.

targetId string

Output only. Resource id of the Target.

uid string

Output only. Unique identifier of the Target.

updateTime string

Output only. Most recent time at which the Target was updated.

annotations Mapping[str, str]

Optional. User annotations. These attributes can only be set and used by the user, and not by Google Cloud Deploy. See https://google.aip.dev/128#annotations for more details such as format and size limitations.

anthos_cluster TargetAnthosClusterArgs

Information specifying an Anthos Cluster.

create_time str

Output only. Time at which the Target was created.

description str

Optional. Description of the Target. Max length is 255 characters.

etag str

Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.

execution_configs Sequence[TargetExecutionConfigArgs]

Configurations for all execution that relates to this Target. Each ExecutionEnvironmentUsage value may only be used in a single configuration; using the same value multiple times is an error. When one or more configurations are specified, they must include the RENDER and DEPLOY ExecutionEnvironmentUsage values. When no configurations are specified, execution will use the default specified in DefaultPool.

gke TargetGkeArgs

Information specifying a GKE Cluster.

labels Mapping[str, str]

Optional. Labels are attributes that can be set and used by both the user and by Google Cloud Deploy. Labels must meet the following constraints: * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. * All characters must use UTF-8 encoding, and international characters are allowed. * Keys must start with a lowercase letter or international character. * Each resource is limited to a maximum of 64 labels. Both keys and values are additionally constrained to be <= 128 bytes.

location str

The location for the resource

name str

Name of the Target. Format is [a-z][a-z0-9-]{0,62}.

project str

The project for the resource

require_approval bool

Optional. Whether or not the Target requires approval.

run TargetRunArgs

(Beta only) Information specifying a Cloud Run deployment target.

target_id str

Output only. Resource id of the Target.

uid str

Output only. Unique identifier of the Target.

update_time str

Output only. Most recent time at which the Target was updated.

annotations Map<String>

Optional. User annotations. These attributes can only be set and used by the user, and not by Google Cloud Deploy. See https://google.aip.dev/128#annotations for more details such as format and size limitations.

anthosCluster Property Map

Information specifying an Anthos Cluster.

createTime String

Output only. Time at which the Target was created.

description String

Optional. Description of the Target. Max length is 255 characters.

etag String

Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.

executionConfigs List<Property Map>

Configurations for all execution that relates to this Target. Each ExecutionEnvironmentUsage value may only be used in a single configuration; using the same value multiple times is an error. When one or more configurations are specified, they must include the RENDER and DEPLOY ExecutionEnvironmentUsage values. When no configurations are specified, execution will use the default specified in DefaultPool.

gke Property Map

Information specifying a GKE Cluster.

labels Map<String>

Optional. Labels are attributes that can be set and used by both the user and by Google Cloud Deploy. Labels must meet the following constraints: * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. * All characters must use UTF-8 encoding, and international characters are allowed. * Keys must start with a lowercase letter or international character. * Each resource is limited to a maximum of 64 labels. Both keys and values are additionally constrained to be <= 128 bytes.

location String

The location for the resource

name String

Name of the Target. Format is [a-z][a-z0-9-]{0,62}.

project String

The project for the resource

requireApproval Boolean

Optional. Whether or not the Target requires approval.

run Property Map

(Beta only) Information specifying a Cloud Run deployment target.

targetId String

Output only. Resource id of the Target.

uid String

Output only. Unique identifier of the Target.

updateTime String

Output only. Most recent time at which the Target was updated.

Supporting Types

TargetAnthosCluster

Membership string

Membership of the GKE Hub-registered cluster to which to apply the Skaffold configuration. Format is projects/{project}/locations/{location}/memberships/{membership_name}.

Membership string

Membership of the GKE Hub-registered cluster to which to apply the Skaffold configuration. Format is projects/{project}/locations/{location}/memberships/{membership_name}.

membership String

Membership of the GKE Hub-registered cluster to which to apply the Skaffold configuration. Format is projects/{project}/locations/{location}/memberships/{membership_name}.

membership string

Membership of the GKE Hub-registered cluster to which to apply the Skaffold configuration. Format is projects/{project}/locations/{location}/memberships/{membership_name}.

membership str

Membership of the GKE Hub-registered cluster to which to apply the Skaffold configuration. Format is projects/{project}/locations/{location}/memberships/{membership_name}.

membership String

Membership of the GKE Hub-registered cluster to which to apply the Skaffold configuration. Format is projects/{project}/locations/{location}/memberships/{membership_name}.

TargetExecutionConfig

Usages List<string>

Required. Usages when this configuration should be applied.

ArtifactStorage string

Optional. Cloud Storage location in which to store execution outputs. This can either be a bucket ("gs://my-bucket") or a path within a bucket ("gs://my-bucket/my-dir"). If unspecified, a default bucket located in the same region will be used.

ExecutionTimeout string

Optional. Execution timeout for a Cloud Build Execution. This must be between 10m and 24h in seconds format. If unspecified, a default timeout of 1h is used.

ServiceAccount string

Optional. Google service account to use for execution. If unspecified, the project execution service account (-compute@developer.gserviceaccount.com) is used.

WorkerPool string

Optional. The resource name of the WorkerPool, with the format projects/{project}/locations/{location}/workerPools/{worker_pool}. If this optional field is unspecified, the default Cloud Build pool will be used.

Usages []string

Required. Usages when this configuration should be applied.

ArtifactStorage string

Optional. Cloud Storage location in which to store execution outputs. This can either be a bucket ("gs://my-bucket") or a path within a bucket ("gs://my-bucket/my-dir"). If unspecified, a default bucket located in the same region will be used.

ExecutionTimeout string

Optional. Execution timeout for a Cloud Build Execution. This must be between 10m and 24h in seconds format. If unspecified, a default timeout of 1h is used.

ServiceAccount string

Optional. Google service account to use for execution. If unspecified, the project execution service account (-compute@developer.gserviceaccount.com) is used.

WorkerPool string

Optional. The resource name of the WorkerPool, with the format projects/{project}/locations/{location}/workerPools/{worker_pool}. If this optional field is unspecified, the default Cloud Build pool will be used.

usages List<String>

Required. Usages when this configuration should be applied.

artifactStorage String

Optional. Cloud Storage location in which to store execution outputs. This can either be a bucket ("gs://my-bucket") or a path within a bucket ("gs://my-bucket/my-dir"). If unspecified, a default bucket located in the same region will be used.

executionTimeout String

Optional. Execution timeout for a Cloud Build Execution. This must be between 10m and 24h in seconds format. If unspecified, a default timeout of 1h is used.

serviceAccount String

Optional. Google service account to use for execution. If unspecified, the project execution service account (-compute@developer.gserviceaccount.com) is used.

workerPool String

Optional. The resource name of the WorkerPool, with the format projects/{project}/locations/{location}/workerPools/{worker_pool}. If this optional field is unspecified, the default Cloud Build pool will be used.

usages string[]

Required. Usages when this configuration should be applied.

artifactStorage string

Optional. Cloud Storage location in which to store execution outputs. This can either be a bucket ("gs://my-bucket") or a path within a bucket ("gs://my-bucket/my-dir"). If unspecified, a default bucket located in the same region will be used.

executionTimeout string

Optional. Execution timeout for a Cloud Build Execution. This must be between 10m and 24h in seconds format. If unspecified, a default timeout of 1h is used.

serviceAccount string

Optional. Google service account to use for execution. If unspecified, the project execution service account (-compute@developer.gserviceaccount.com) is used.

workerPool string

Optional. The resource name of the WorkerPool, with the format projects/{project}/locations/{location}/workerPools/{worker_pool}. If this optional field is unspecified, the default Cloud Build pool will be used.

usages Sequence[str]

Required. Usages when this configuration should be applied.

artifact_storage str

Optional. Cloud Storage location in which to store execution outputs. This can either be a bucket ("gs://my-bucket") or a path within a bucket ("gs://my-bucket/my-dir"). If unspecified, a default bucket located in the same region will be used.

execution_timeout str

Optional. Execution timeout for a Cloud Build Execution. This must be between 10m and 24h in seconds format. If unspecified, a default timeout of 1h is used.

service_account str

Optional. Google service account to use for execution. If unspecified, the project execution service account (-compute@developer.gserviceaccount.com) is used.

worker_pool str

Optional. The resource name of the WorkerPool, with the format projects/{project}/locations/{location}/workerPools/{worker_pool}. If this optional field is unspecified, the default Cloud Build pool will be used.

usages List<String>

Required. Usages when this configuration should be applied.

artifactStorage String

Optional. Cloud Storage location in which to store execution outputs. This can either be a bucket ("gs://my-bucket") or a path within a bucket ("gs://my-bucket/my-dir"). If unspecified, a default bucket located in the same region will be used.

executionTimeout String

Optional. Execution timeout for a Cloud Build Execution. This must be between 10m and 24h in seconds format. If unspecified, a default timeout of 1h is used.

serviceAccount String

Optional. Google service account to use for execution. If unspecified, the project execution service account (-compute@developer.gserviceaccount.com) is used.

workerPool String

Optional. The resource name of the WorkerPool, with the format projects/{project}/locations/{location}/workerPools/{worker_pool}. If this optional field is unspecified, the default Cloud Build pool will be used.

TargetGke

Cluster string

Information specifying a GKE Cluster. Format is `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}.

InternalIp bool

Optional. If true, cluster is accessed using the private IP address of the control plane endpoint. Otherwise, the default IP address of the control plane endpoint is used. The default IP address is the private IP address for clusters with private control-plane endpoints and the public IP address otherwise. Only specify this option when cluster is a private GKE cluster.

Cluster string

Information specifying a GKE Cluster. Format is `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}.

InternalIp bool

Optional. If true, cluster is accessed using the private IP address of the control plane endpoint. Otherwise, the default IP address of the control plane endpoint is used. The default IP address is the private IP address for clusters with private control-plane endpoints and the public IP address otherwise. Only specify this option when cluster is a private GKE cluster.

cluster String

Information specifying a GKE Cluster. Format is `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}.

internalIp Boolean

Optional. If true, cluster is accessed using the private IP address of the control plane endpoint. Otherwise, the default IP address of the control plane endpoint is used. The default IP address is the private IP address for clusters with private control-plane endpoints and the public IP address otherwise. Only specify this option when cluster is a private GKE cluster.

cluster string

Information specifying a GKE Cluster. Format is `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}.

internalIp boolean

Optional. If true, cluster is accessed using the private IP address of the control plane endpoint. Otherwise, the default IP address of the control plane endpoint is used. The default IP address is the private IP address for clusters with private control-plane endpoints and the public IP address otherwise. Only specify this option when cluster is a private GKE cluster.

cluster str

Information specifying a GKE Cluster. Format is `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}.

internal_ip bool

Optional. If true, cluster is accessed using the private IP address of the control plane endpoint. Otherwise, the default IP address of the control plane endpoint is used. The default IP address is the private IP address for clusters with private control-plane endpoints and the public IP address otherwise. Only specify this option when cluster is a private GKE cluster.

cluster String

Information specifying a GKE Cluster. Format is `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}.

internalIp Boolean

Optional. If true, cluster is accessed using the private IP address of the control plane endpoint. Otherwise, the default IP address of the control plane endpoint is used. The default IP address is the private IP address for clusters with private control-plane endpoints and the public IP address otherwise. Only specify this option when cluster is a private GKE cluster.

TargetRun

Location string

Required. The location where the Cloud Run Service should be located. Format is projects/{project}/locations/{location}.

Location string

Required. The location where the Cloud Run Service should be located. Format is projects/{project}/locations/{location}.

location String

Required. The location where the Cloud Run Service should be located. Format is projects/{project}/locations/{location}.

location string

Required. The location where the Cloud Run Service should be located. Format is projects/{project}/locations/{location}.

location str

Required. The location where the Cloud Run Service should be located. Format is projects/{project}/locations/{location}.

location String

Required. The location where the Cloud Run Service should be located. Format is projects/{project}/locations/{location}.

Import

Target can be imported using any of these accepted formats

 $ pulumi import gcp:clouddeploy/target:Target default projects/{{project}}/locations/{{location}}/targets/{{name}}
 $ pulumi import gcp:clouddeploy/target:Target default {{project}}/{{location}}/{{name}}
 $ pulumi import gcp:clouddeploy/target:Target default {{location}}/{{name}}

Package Details

Repository
Google Cloud (GCP) Classic pulumi/pulumi-gcp
License
Apache-2.0
Notes

This Pulumi package is based on the google-beta Terraform Provider.