UNPKG

@pulumi/gcp

Version:

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

342 lines • 16.2 kB
import * as pulumi from "@pulumi/pulumi"; /** * Regional Private Service Connect (PSC) endpoint resource. * * To get more information about RegionalEndpoint, see: * * * [API documentation](https://cloud.google.com/network-connectivity/docs/reference/networkconnectivity/rest/v1/projects.locations.regionalEndpoints) * * How-to Guides * * [Access regional Google APIs through endpoints](https://cloud.google.com/vpc/docs/access-regional-google-apis-endpoints) * * ## Example Usage * * ### Network Connectivity Regional Endpoint Regional Access * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const myNetwork = new gcp.compute.Network("my_network", { * name: "my-network", * autoCreateSubnetworks: false, * }); * const mySubnetwork = new gcp.compute.Subnetwork("my_subnetwork", { * name: "my-subnetwork", * ipCidrRange: "192.168.0.0/24", * region: "us-central1", * network: myNetwork.id, * }); * const _default = new gcp.networkconnectivity.RegionalEndpoint("default", { * name: "my-rep", * location: "us-central1", * targetGoogleApi: "storage.us-central1.rep.googleapis.com", * accessType: "REGIONAL", * address: "192.168.0.5", * network: myNetwork.id, * subnetwork: mySubnetwork.id, * description: "My RegionalEndpoint targeting Google API storage.us-central1.rep.googleapis.com", * labels: { * env: "default", * }, * }); * ``` * ### Network Connectivity Regional Endpoint Global Access * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const myNetwork = new gcp.compute.Network("my_network", { * name: "my-network", * autoCreateSubnetworks: false, * }); * const mySubnetwork = new gcp.compute.Subnetwork("my_subnetwork", { * name: "my-subnetwork", * ipCidrRange: "192.168.0.0/24", * region: "us-central1", * network: myNetwork.id, * }); * const _default = new gcp.networkconnectivity.RegionalEndpoint("default", { * name: "my-rep", * location: "us-central1", * targetGoogleApi: "storage.us-central1.rep.googleapis.com", * accessType: "GLOBAL", * address: "192.168.0.4", * network: myNetwork.id, * subnetwork: mySubnetwork.id, * }); * ``` * * ## Import * * RegionalEndpoint can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/regionalEndpoints/{{name}}` * * `{{project}}/{{location}}/{{name}}` * * `{{location}}/{{name}}` * * When using the `pulumi import` command, RegionalEndpoint can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:networkconnectivity/regionalEndpoint:RegionalEndpoint default projects/{{project}}/locations/{{location}}/regionalEndpoints/{{name}} * $ pulumi import gcp:networkconnectivity/regionalEndpoint:RegionalEndpoint default {{project}}/{{location}}/{{name}} * $ pulumi import gcp:networkconnectivity/regionalEndpoint:RegionalEndpoint default {{location}}/{{name}} * ``` */ export declare class RegionalEndpoint extends pulumi.CustomResource { /** * Get an existing RegionalEndpoint 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?: RegionalEndpointState, opts?: pulumi.CustomResourceOptions): RegionalEndpoint; /** * Returns true if the given object is an instance of RegionalEndpoint. 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 RegionalEndpoint; /** * The access type of this regional endpoint. This field is reflected in the PSC Forwarding Rule configuration to enable global access. * Possible values are: `GLOBAL`, `REGIONAL`. */ readonly accessType: pulumi.Output<string>; /** * The IP Address of the Regional Endpoint. When no address is provided, an IP from the subnetwork is allocated. Use one of the following formats: * IPv4 address as in `10.0.0.1` * Address resource URI as in `projects/{project}/regions/{region}/addresses/{address_name}` * > **Note:** This field accepts both a reference to a Compute Address resource, which is the resource name of which format is given in the description, and IP literal value. If the user chooses to input a reserved address value; they need to make sure that the reserved address is in IPv4 version, its purpose is GCE_ENDPOINT, its type is INTERNAL and its status is RESERVED. If the user chooses to input an IP literal, they need to make sure that it's a valid IPv4 address (x.x.x.x) within the subnetwork. */ readonly address: pulumi.Output<string>; /** * Time when the RegionalEndpoint was created. */ readonly createTime: pulumi.Output<string>; /** * Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. * When a 'terraform destroy' or 'pulumi up' would delete the resource, * the command will fail if this field is set to "PREVENT" in Terraform state. * When set to "ABANDON", the command will remove the resource from Terraform * management without updating or deleting the resource in the API. * When set to "DELETE", deleting the resource is allowed. */ readonly deletionPolicy: pulumi.Output<string>; /** * A description of this resource. */ readonly description: pulumi.Output<string | undefined>; /** * 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; }>; /** * User-defined labels. * * **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 RegionalEndpoint. */ readonly location: pulumi.Output<string>; /** * The name of the RegionalEndpoint. */ readonly name: pulumi.Output<string>; /** * The name of the VPC network for this private regional endpoint. Format: `projects/{project}/global/networks/{network}` */ readonly network: 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 resource reference of the PSC Forwarding Rule created on behalf of the customer. Format: `//compute.googleapis.com/projects/{project}/regions/{region}/forwardingRules/{forwarding_rule_name}` */ readonly pscForwardingRule: 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; }>; /** * The name of the subnetwork from which the IP address will be allocated. Format: `projects/{project}/regions/{region}/subnetworks/{subnetwork}` */ readonly subnetwork: pulumi.Output<string>; /** * The service endpoint this private regional endpoint connects to. Format: `{apiname}.{region}.rep.googleapis.com` Example: \"cloudkms.us-central1.rep.googleapis.com\". */ readonly targetGoogleApi: pulumi.Output<string>; /** * Time when the RegionalEndpoint was updated. */ readonly updateTime: pulumi.Output<string>; /** * Create a RegionalEndpoint 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: RegionalEndpointArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering RegionalEndpoint resources. */ export interface RegionalEndpointState { /** * The access type of this regional endpoint. This field is reflected in the PSC Forwarding Rule configuration to enable global access. * Possible values are: `GLOBAL`, `REGIONAL`. */ accessType?: pulumi.Input<string | undefined>; /** * The IP Address of the Regional Endpoint. When no address is provided, an IP from the subnetwork is allocated. Use one of the following formats: * IPv4 address as in `10.0.0.1` * Address resource URI as in `projects/{project}/regions/{region}/addresses/{address_name}` * > **Note:** This field accepts both a reference to a Compute Address resource, which is the resource name of which format is given in the description, and IP literal value. If the user chooses to input a reserved address value; they need to make sure that the reserved address is in IPv4 version, its purpose is GCE_ENDPOINT, its type is INTERNAL and its status is RESERVED. If the user chooses to input an IP literal, they need to make sure that it's a valid IPv4 address (x.x.x.x) within the subnetwork. */ address?: pulumi.Input<string | undefined>; /** * Time when the RegionalEndpoint was created. */ createTime?: pulumi.Input<string | undefined>; /** * Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. * When a 'terraform destroy' or 'pulumi up' would delete the resource, * the command will fail if this field is set to "PREVENT" in Terraform state. * When set to "ABANDON", the command will remove the resource from Terraform * management without updating or deleting the resource in the API. * When set to "DELETE", deleting the resource is allowed. */ deletionPolicy?: pulumi.Input<string | undefined>; /** * A description of this resource. */ description?: pulumi.Input<string | undefined>; /** * 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>; } | undefined>; /** * User-defined labels. * * **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>; } | undefined>; /** * The location of the RegionalEndpoint. */ location?: pulumi.Input<string | undefined>; /** * The name of the RegionalEndpoint. */ name?: pulumi.Input<string | undefined>; /** * The name of the VPC network for this private regional endpoint. Format: `projects/{project}/global/networks/{network}` */ network?: pulumi.Input<string | undefined>; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input<string | undefined>; /** * The resource reference of the PSC Forwarding Rule created on behalf of the customer. Format: `//compute.googleapis.com/projects/{project}/regions/{region}/forwardingRules/{forwarding_rule_name}` */ pscForwardingRule?: pulumi.Input<string | undefined>; /** * The combination of labels configured directly on the resource * and default labels configured on the provider. */ pulumiLabels?: pulumi.Input<{ [key: string]: pulumi.Input<string>; } | undefined>; /** * The name of the subnetwork from which the IP address will be allocated. Format: `projects/{project}/regions/{region}/subnetworks/{subnetwork}` */ subnetwork?: pulumi.Input<string | undefined>; /** * The service endpoint this private regional endpoint connects to. Format: `{apiname}.{region}.rep.googleapis.com` Example: \"cloudkms.us-central1.rep.googleapis.com\". */ targetGoogleApi?: pulumi.Input<string | undefined>; /** * Time when the RegionalEndpoint was updated. */ updateTime?: pulumi.Input<string | undefined>; } /** * The set of arguments for constructing a RegionalEndpoint resource. */ export interface RegionalEndpointArgs { /** * The access type of this regional endpoint. This field is reflected in the PSC Forwarding Rule configuration to enable global access. * Possible values are: `GLOBAL`, `REGIONAL`. */ accessType: pulumi.Input<string>; /** * The IP Address of the Regional Endpoint. When no address is provided, an IP from the subnetwork is allocated. Use one of the following formats: * IPv4 address as in `10.0.0.1` * Address resource URI as in `projects/{project}/regions/{region}/addresses/{address_name}` * > **Note:** This field accepts both a reference to a Compute Address resource, which is the resource name of which format is given in the description, and IP literal value. If the user chooses to input a reserved address value; they need to make sure that the reserved address is in IPv4 version, its purpose is GCE_ENDPOINT, its type is INTERNAL and its status is RESERVED. If the user chooses to input an IP literal, they need to make sure that it's a valid IPv4 address (x.x.x.x) within the subnetwork. */ address?: pulumi.Input<string | undefined>; /** * Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. * When a 'terraform destroy' or 'pulumi up' would delete the resource, * the command will fail if this field is set to "PREVENT" in Terraform state. * When set to "ABANDON", the command will remove the resource from Terraform * management without updating or deleting the resource in the API. * When set to "DELETE", deleting the resource is allowed. */ deletionPolicy?: pulumi.Input<string | undefined>; /** * A description of this resource. */ description?: pulumi.Input<string | undefined>; /** * User-defined labels. * * **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>; } | undefined>; /** * The location of the RegionalEndpoint. */ location: pulumi.Input<string>; /** * The name of the RegionalEndpoint. */ name?: pulumi.Input<string | undefined>; /** * The name of the VPC network for this private regional endpoint. Format: `projects/{project}/global/networks/{network}` */ network?: pulumi.Input<string | undefined>; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input<string | undefined>; /** * The name of the subnetwork from which the IP address will be allocated. Format: `projects/{project}/regions/{region}/subnetworks/{subnetwork}` */ subnetwork?: pulumi.Input<string | undefined>; /** * The service endpoint this private regional endpoint connects to. Format: `{apiname}.{region}.rep.googleapis.com` Example: \"cloudkms.us-central1.rep.googleapis.com\". */ targetGoogleApi: pulumi.Input<string>; } //# sourceMappingURL=regionalEndpoint.d.ts.map