import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * The Cloud Deploy `Target` resource * * ## Example Usage * * ### Multi_target * tests creating and updating a multi-target * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const primary = new gcp.clouddeploy.Target("primary", { * location: "us-west1", * name: "target", * deployParameters: {}, * description: "multi-target description", * executionConfigs: [{ * usages: [ * "RENDER", * "DEPLOY", * ], * executionTimeout: "3600s", * }], * multiTarget: { * targetIds: [ * "1", * "2", * ], * }, * project: "my-project-name", * requireApproval: false, * annotations: { * my_first_annotation: "example-annotation-1", * my_second_annotation: "example-annotation-2", * }, * labels: { * my_first_label: "example-label-1", * my_second_label: "example-label-2", * }, * }); * ``` * ### Run_target * tests creating and updating a cloud run target * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const primary = new gcp.clouddeploy.Target("primary", { * location: "us-west1", * name: "target", * deployParameters: {}, * description: "basic description", * executionConfigs: [{ * usages: [ * "RENDER", * "DEPLOY", * ], * executionTimeout: "3600s", * }], * project: "my-project-name", * requireApproval: false, * run: { * location: "projects/my-project-name/locations/us-west1", * }, * annotations: { * my_first_annotation: "example-annotation-1", * my_second_annotation: "example-annotation-2", * }, * labels: { * my_first_label: "example-label-1", * my_second_label: "example-label-2", * }, * }); * ``` * ### Target * Creates a basic Cloud Deploy target * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const primary = new gcp.clouddeploy.Target("primary", { * location: "us-west1", * name: "target", * deployParameters: { * deployParameterKey: "deployParameterValue", * }, * description: "basic description", * gke: { * cluster: "projects/my-project-name/locations/us-west1/clusters/example-cluster-name", * }, * project: "my-project-name", * requireApproval: false, * annotations: { * my_first_annotation: "example-annotation-1", * my_second_annotation: "example-annotation-2", * }, * labels: { * my_first_label: "example-label-1", * my_second_label: "example-label-2", * }, * }); * ``` * * ## Import * * Target can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/targets/{{name}}` * * * `{{project}}/{{location}}/{{name}}` * * * `{{location}}/{{name}}` * * When using the `pulumi import` command, Target can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:clouddeploy/target:Target default projects/{{project}}/locations/{{location}}/targets/{{name}} * ``` * * ```sh * $ pulumi import gcp:clouddeploy/target:Target default {{project}}/{{location}}/{{name}} * ``` * * ```sh * $ pulumi import gcp:clouddeploy/target:Target default {{location}}/{{name}} * ``` */ export declare class Target extends pulumi.CustomResource { /** * Get an existing Target resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: TargetState, opts?: pulumi.CustomResourceOptions): Target; /** * Returns true if the given object is an instance of Target. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Target; /** * 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. * * **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. * Please refer to the field `effectiveAnnotations` for all of the annotations present on the resource. */ readonly annotations: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Information specifying an Anthos Cluster. */ readonly anthosCluster: pulumi.Output; /** * Optional. Map of entity IDs to their associated entities. Associated entities allows specifying places other than the deployment target for specific features. For example, the Gateway API canary can be configured to deploy the HTTPRoute to a different cluster(s) than the deployment cluster using associated entities. An entity ID must consist of lower-case letters, numbers, and hyphens, start with a letter and end with a letter or a number, and have a max length of 63 characters. In other words, it must match the following regex: `^a-z?$`. */ readonly associatedEntities: pulumi.Output; /** * Output only. Time at which the `Target` was created. */ readonly createTime: pulumi.Output; /** * Optional. Information specifying a Custom Target. */ readonly customTarget: pulumi.Output; /** * Optional. The deploy parameters to use for this target. */ readonly deployParameters: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Optional. Description of the `Target`. Max length is 255 characters. */ readonly description: pulumi.Output; readonly effectiveAnnotations: pulumi.Output<{ [key: string]: string; }>; /** * All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services. */ readonly effectiveLabels: pulumi.Output<{ [key: string]: 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. */ readonly etag: pulumi.Output; /** * 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`. */ readonly executionConfigs: pulumi.Output; /** * Information specifying a GKE Cluster. */ readonly gke: pulumi.Output; /** * 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. * * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. * Please refer to the field `effectiveLabels` for all of the labels present on the resource. */ readonly labels: pulumi.Output<{ [key: string]: string; } | undefined>; /** * The location for the resource */ readonly location: pulumi.Output; /** * Information specifying a multiTarget. */ readonly multiTarget: pulumi.Output; /** * Name of the `Target`. Format is `a-z?`. * * * * - - - */ readonly name: pulumi.Output; /** * The project for the resource */ readonly project: pulumi.Output; /** * The combination of labels configured directly on the resource and default labels configured on the provider. */ readonly pulumiLabels: pulumi.Output<{ [key: string]: string; }>; /** * Optional. Whether or not the `Target` requires approval. */ readonly requireApproval: pulumi.Output; /** * Information specifying a Cloud Run deployment target. */ readonly run: pulumi.Output; /** * Output only. Resource id of the `Target`. */ readonly targetId: pulumi.Output; /** * Output only. Unique identifier of the `Target`. */ readonly uid: pulumi.Output; /** * Output only. Most recent time at which the `Target` was updated. */ readonly updateTime: pulumi.Output; /** * Create a Target resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: TargetArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Target resources. */ export interface TargetState { /** * 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. * * **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. * Please refer to the field `effectiveAnnotations` for all of the annotations present on the resource. */ annotations?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Information specifying an Anthos Cluster. */ anthosCluster?: pulumi.Input; /** * Optional. Map of entity IDs to their associated entities. Associated entities allows specifying places other than the deployment target for specific features. For example, the Gateway API canary can be configured to deploy the HTTPRoute to a different cluster(s) than the deployment cluster using associated entities. An entity ID must consist of lower-case letters, numbers, and hyphens, start with a letter and end with a letter or a number, and have a max length of 63 characters. In other words, it must match the following regex: `^a-z?$`. */ associatedEntities?: pulumi.Input[]>; /** * Output only. Time at which the `Target` was created. */ createTime?: pulumi.Input; /** * Optional. Information specifying a Custom Target. */ customTarget?: pulumi.Input; /** * Optional. The deploy parameters to use for this target. */ deployParameters?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Optional. Description of the `Target`. Max length is 255 characters. */ description?: pulumi.Input; effectiveAnnotations?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services. */ effectiveLabels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * 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. */ etag?: pulumi.Input; /** * 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`. */ executionConfigs?: pulumi.Input[]>; /** * Information specifying a GKE Cluster. */ gke?: pulumi.Input; /** * 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. * * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. * Please refer to the field `effectiveLabels` for all of the labels present on the resource. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The location for the resource */ location?: pulumi.Input; /** * Information specifying a multiTarget. */ multiTarget?: pulumi.Input; /** * Name of the `Target`. Format is `a-z?`. * * * * - - - */ name?: pulumi.Input; /** * The project for the resource */ project?: pulumi.Input; /** * The combination of labels configured directly on the resource and default labels configured on the provider. */ pulumiLabels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Optional. Whether or not the `Target` requires approval. */ requireApproval?: pulumi.Input; /** * Information specifying a Cloud Run deployment target. */ run?: pulumi.Input; /** * Output only. Resource id of the `Target`. */ targetId?: pulumi.Input; /** * Output only. Unique identifier of the `Target`. */ uid?: pulumi.Input; /** * Output only. Most recent time at which the `Target` was updated. */ updateTime?: pulumi.Input; } /** * The set of arguments for constructing a Target resource. */ export interface TargetArgs { /** * 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. * * **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. * Please refer to the field `effectiveAnnotations` for all of the annotations present on the resource. */ annotations?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Information specifying an Anthos Cluster. */ anthosCluster?: pulumi.Input; /** * Optional. Map of entity IDs to their associated entities. Associated entities allows specifying places other than the deployment target for specific features. For example, the Gateway API canary can be configured to deploy the HTTPRoute to a different cluster(s) than the deployment cluster using associated entities. An entity ID must consist of lower-case letters, numbers, and hyphens, start with a letter and end with a letter or a number, and have a max length of 63 characters. In other words, it must match the following regex: `^a-z?$`. */ associatedEntities?: pulumi.Input[]>; /** * Optional. Information specifying a Custom Target. */ customTarget?: pulumi.Input; /** * Optional. The deploy parameters to use for this target. */ deployParameters?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Optional. Description of the `Target`. Max length is 255 characters. */ description?: pulumi.Input; /** * 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`. */ executionConfigs?: pulumi.Input[]>; /** * Information specifying a GKE Cluster. */ gke?: pulumi.Input; /** * 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. * * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. * Please refer to the field `effectiveLabels` for all of the labels present on the resource. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The location for the resource */ location: pulumi.Input; /** * Information specifying a multiTarget. */ multiTarget?: pulumi.Input; /** * Name of the `Target`. Format is `a-z?`. * * * * - - - */ name?: pulumi.Input; /** * The project for the resource */ project?: pulumi.Input; /** * Optional. Whether or not the `Target` requires approval. */ requireApproval?: pulumi.Input; /** * Information specifying a Cloud Run deployment target. */ run?: pulumi.Input; }