UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

357 lines (356 loc) • 15.1 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * A Cloud Deploy `CustomTargetType` defines a type of custom target that can be referenced in a * Cloud Deploy `Target` in order to facilitate deploying to other systems besides the supported runtimes. * * To get more information about CustomTargetType, see: * * * [API documentation](https://cloud.google.com/deploy/docs/api/reference/rest/v1/projects.locations.customTargetTypes) * * How-to Guides * * [Define and use a custom target type](https://cloud.google.com/deploy/docs/deploy-app-custom-target) * * ## Example Usage * * ### Clouddeploy Custom Target Type Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const custom_target_type = new gcp.clouddeploy.CustomTargetType("custom-target-type", { * location: "us-central1", * name: "my-custom-target-type", * description: "My custom target type", * 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", * }, * customActions: { * renderAction: "renderAction", * deployAction: "deployAction", * }, * }); * ``` * ### Clouddeploy Custom Target Type Git Skaffold Modules * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const custom_target_type = new gcp.clouddeploy.CustomTargetType("custom-target-type", { * location: "us-central1", * name: "my-custom-target-type", * description: "My custom target type", * customActions: { * renderAction: "renderAction", * deployAction: "deployAction", * includeSkaffoldModules: [{ * configs: ["my-config"], * git: { * repo: "http://github.com/example/example-repo.git", * path: "configs/skaffold.yaml", * ref: "main", * }, * }], * }, * }); * ``` * ### Clouddeploy Custom Target Type Gcs Skaffold Modules * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const custom_target_type = new gcp.clouddeploy.CustomTargetType("custom-target-type", { * location: "us-central1", * name: "my-custom-target-type", * description: "My custom target type", * customActions: { * renderAction: "renderAction", * deployAction: "deployAction", * includeSkaffoldModules: [{ * configs: ["my-config"], * googleCloudStorage: { * source: "gs://example-bucket/dir/configs/*", * path: "skaffold.yaml", * }, * }], * }, * }); * ``` * ### Clouddeploy Custom Target Type Gcb Repo Skaffold Modules * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const custom_target_type = new gcp.clouddeploy.CustomTargetType("custom-target-type", { * location: "us-central1", * name: "my-custom-target-type", * description: "My custom target type", * customActions: { * renderAction: "renderAction", * deployAction: "deployAction", * includeSkaffoldModules: [{ * configs: ["my-config"], * googleCloudBuildRepo: { * repository: "projects/example/locations/us-central1/connections/git/repositories/example-repo", * path: "configs/skaffold.yaml", * ref: "main", * }, * }], * }, * }); * ``` * * ## Import * * CustomTargetType can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/customTargetTypes/{{name}}` * * * `{{project}}/{{location}}/{{name}}` * * * `{{location}}/{{name}}` * * When using the `pulumi import` command, CustomTargetType can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:clouddeploy/customTargetType:CustomTargetType default projects/{{project}}/locations/{{location}}/customTargetTypes/{{name}} * ``` * * ```sh * $ pulumi import gcp:clouddeploy/customTargetType:CustomTargetType default {{project}}/{{location}}/{{name}} * ``` * * ```sh * $ pulumi import gcp:clouddeploy/customTargetType:CustomTargetType default {{location}}/{{name}} * ``` */ export declare class CustomTargetType extends pulumi.CustomResource { /** * Get an existing CustomTargetType 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<pulumi.ID>, state?: CustomTargetTypeState, opts?: pulumi.CustomResourceOptions): CustomTargetType; /** * Returns true if the given object is an instance of CustomTargetType. 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 CustomTargetType; /** * User annotations. These attributes can only be set and used by the user, and not by 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>; /** * Time at which the `CustomTargetType` was created. */ readonly createTime: pulumi.Output<string>; /** * Configures render and deploy for the `CustomTargetType` using Skaffold custom actions. * Structure is documented below. */ readonly customActions: pulumi.Output<outputs.clouddeploy.CustomTargetTypeCustomActions | undefined>; /** * Resource id of the `CustomTargetType`. */ readonly customTargetTypeId: pulumi.Output<string>; /** * Description of the `CustomTargetType`. Max length is 255 characters. */ readonly description: pulumi.Output<string | undefined>; 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; }>; /** * The weak etag of the `CustomTargetType` resource. 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<string>; /** * Labels are attributes that can be set and used by both the user and by 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 of the source. */ readonly location: pulumi.Output<string>; /** * Name of the `CustomTargetType`. */ readonly name: pulumi.Output<string>; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ readonly project: pulumi.Output<string>; /** * The combination of labels configured directly on the resource * and default labels configured on the provider. */ readonly pulumiLabels: pulumi.Output<{ [key: string]: string; }>; /** * Unique identifier of the `CustomTargetType`. */ readonly uid: pulumi.Output<string>; /** * Time at which the `CustomTargetType` was updated. */ readonly updateTime: pulumi.Output<string>; /** * Create a CustomTargetType 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: CustomTargetTypeArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering CustomTargetType resources. */ export interface CustomTargetTypeState { /** * User annotations. These attributes can only be set and used by the user, and not by 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<string>; }>; /** * Time at which the `CustomTargetType` was created. */ createTime?: pulumi.Input<string>; /** * Configures render and deploy for the `CustomTargetType` using Skaffold custom actions. * Structure is documented below. */ customActions?: pulumi.Input<inputs.clouddeploy.CustomTargetTypeCustomActions>; /** * Resource id of the `CustomTargetType`. */ customTargetTypeId?: pulumi.Input<string>; /** * Description of the `CustomTargetType`. Max length is 255 characters. */ description?: pulumi.Input<string>; effectiveAnnotations?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * 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<string>; }>; /** * The weak etag of the `CustomTargetType` resource. 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<string>; /** * Labels are attributes that can be set and used by both the user and by 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<string>; }>; /** * The location of the source. */ location?: pulumi.Input<string>; /** * Name of the `CustomTargetType`. */ name?: pulumi.Input<string>; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input<string>; /** * The combination of labels configured directly on the resource * and default labels configured on the provider. */ pulumiLabels?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * Unique identifier of the `CustomTargetType`. */ uid?: pulumi.Input<string>; /** * Time at which the `CustomTargetType` was updated. */ updateTime?: pulumi.Input<string>; } /** * The set of arguments for constructing a CustomTargetType resource. */ export interface CustomTargetTypeArgs { /** * User annotations. These attributes can only be set and used by the user, and not by 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<string>; }>; /** * Configures render and deploy for the `CustomTargetType` using Skaffold custom actions. * Structure is documented below. */ customActions?: pulumi.Input<inputs.clouddeploy.CustomTargetTypeCustomActions>; /** * Description of the `CustomTargetType`. Max length is 255 characters. */ description?: pulumi.Input<string>; /** * Labels are attributes that can be set and used by both the user and by 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<string>; }>; /** * The location of the source. */ location: pulumi.Input<string>; /** * Name of the `CustomTargetType`. */ name?: pulumi.Input<string>; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input<string>; }