UNPKG

@pulumi/gcp

Version:

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

158 lines (157 loc) 5.98 kB
import * as pulumi from "@pulumi/pulumi"; /** * A Global Network endpoint represents a IP address and port combination that exists outside of GCP. * **NOTE**: Global network endpoints cannot be created outside of a * global network endpoint group. * * To get more information about GlobalNetworkEndpoint, see: * * * [API documentation](https://cloud.google.com/compute/docs/reference/rest/beta/networkEndpointGroups) * * How-to Guides * * [Official Documentation](https://cloud.google.com/load-balancing/docs/negs/) * * ## Example Usage * * ### Global Network Endpoint * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const neg = new gcp.compute.GlobalNetworkEndpointGroup("neg", { * name: "my-lb-neg", * defaultPort: 90, * networkEndpointType: "INTERNET_FQDN_PORT", * }); * const default_endpoint = new gcp.compute.GlobalNetworkEndpoint("default-endpoint", { * globalNetworkEndpointGroup: neg.name, * fqdn: "www.example.com", * port: 90, * }); * ``` * * ## Import * * GlobalNetworkEndpoint can be imported using any of these accepted formats: * * * `projects/{{project}}/global/networkEndpointGroups/{{global_network_endpoint_group}}/{{ip_address}}/{{fqdn}}/{{port}}` * * * `{{project}}/{{global_network_endpoint_group}}/{{ip_address}}/{{fqdn}}/{{port}}` * * * `{{global_network_endpoint_group}}/{{ip_address}}/{{fqdn}}/{{port}}` * * When using the `pulumi import` command, GlobalNetworkEndpoint can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:compute/globalNetworkEndpoint:GlobalNetworkEndpoint default projects/{{project}}/global/networkEndpointGroups/{{global_network_endpoint_group}}/{{ip_address}}/{{fqdn}}/{{port}} * ``` * * ```sh * $ pulumi import gcp:compute/globalNetworkEndpoint:GlobalNetworkEndpoint default {{project}}/{{global_network_endpoint_group}}/{{ip_address}}/{{fqdn}}/{{port}} * ``` * * ```sh * $ pulumi import gcp:compute/globalNetworkEndpoint:GlobalNetworkEndpoint default {{global_network_endpoint_group}}/{{ip_address}}/{{fqdn}}/{{port}} * ``` */ export declare class GlobalNetworkEndpoint extends pulumi.CustomResource { /** * Get an existing GlobalNetworkEndpoint 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?: GlobalNetworkEndpointState, opts?: pulumi.CustomResourceOptions): GlobalNetworkEndpoint; /** * Returns true if the given object is an instance of GlobalNetworkEndpoint. 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 GlobalNetworkEndpoint; /** * Fully qualified domain name of network endpoint. * This can only be specified when networkEndpointType of the NEG is INTERNET_FQDN_PORT. */ readonly fqdn: pulumi.Output<string | undefined>; /** * The global network endpoint group this endpoint is part of. */ readonly globalNetworkEndpointGroup: pulumi.Output<string>; /** * IPv4 address external endpoint. */ readonly ipAddress: pulumi.Output<string | undefined>; /** * Port number of the external endpoint. */ readonly port: pulumi.Output<number>; /** * 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>; /** * Create a GlobalNetworkEndpoint 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: GlobalNetworkEndpointArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering GlobalNetworkEndpoint resources. */ export interface GlobalNetworkEndpointState { /** * Fully qualified domain name of network endpoint. * This can only be specified when networkEndpointType of the NEG is INTERNET_FQDN_PORT. */ fqdn?: pulumi.Input<string>; /** * The global network endpoint group this endpoint is part of. */ globalNetworkEndpointGroup?: pulumi.Input<string>; /** * IPv4 address external endpoint. */ ipAddress?: pulumi.Input<string>; /** * Port number of the external endpoint. */ port?: pulumi.Input<number>; /** * 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 set of arguments for constructing a GlobalNetworkEndpoint resource. */ export interface GlobalNetworkEndpointArgs { /** * Fully qualified domain name of network endpoint. * This can only be specified when networkEndpointType of the NEG is INTERNET_FQDN_PORT. */ fqdn?: pulumi.Input<string>; /** * The global network endpoint group this endpoint is part of. */ globalNetworkEndpointGroup: pulumi.Input<string>; /** * IPv4 address external endpoint. */ ipAddress?: pulumi.Input<string>; /** * Port number of the external endpoint. */ port: pulumi.Input<number>; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input<string>; }