gcp.compute.GlobalNetworkEndpoint
Explore with Pulumi AI
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
- How-to Guides
Example Usage
Global Network Endpoint
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 pulumi
import pulumi_gcp as gcp
neg = gcp.compute.GlobalNetworkEndpointGroup("neg",
name="my-lb-neg",
default_port=90,
network_endpoint_type="INTERNET_FQDN_PORT")
default_endpoint = gcp.compute.GlobalNetworkEndpoint("default-endpoint",
global_network_endpoint_group=neg.name,
fqdn="www.example.com",
port=90)
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
neg, err := compute.NewGlobalNetworkEndpointGroup(ctx, "neg", &compute.GlobalNetworkEndpointGroupArgs{
Name: pulumi.String("my-lb-neg"),
DefaultPort: pulumi.Int(90),
NetworkEndpointType: pulumi.String("INTERNET_FQDN_PORT"),
})
if err != nil {
return err
}
_, err = compute.NewGlobalNetworkEndpoint(ctx, "default-endpoint", &compute.GlobalNetworkEndpointArgs{
GlobalNetworkEndpointGroup: neg.Name,
Fqdn: pulumi.String("www.example.com"),
Port: pulumi.Int(90),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var neg = new Gcp.Compute.GlobalNetworkEndpointGroup("neg", new()
{
Name = "my-lb-neg",
DefaultPort = 90,
NetworkEndpointType = "INTERNET_FQDN_PORT",
});
var default_endpoint = new Gcp.Compute.GlobalNetworkEndpoint("default-endpoint", new()
{
GlobalNetworkEndpointGroup = neg.Name,
Fqdn = "www.example.com",
Port = 90,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.GlobalNetworkEndpointGroup;
import com.pulumi.gcp.compute.GlobalNetworkEndpointGroupArgs;
import com.pulumi.gcp.compute.GlobalNetworkEndpoint;
import com.pulumi.gcp.compute.GlobalNetworkEndpointArgs;
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 neg = new GlobalNetworkEndpointGroup("neg", GlobalNetworkEndpointGroupArgs.builder()
.name("my-lb-neg")
.defaultPort("90")
.networkEndpointType("INTERNET_FQDN_PORT")
.build());
var default_endpoint = new GlobalNetworkEndpoint("default-endpoint", GlobalNetworkEndpointArgs.builder()
.globalNetworkEndpointGroup(neg.name())
.fqdn("www.example.com")
.port(90)
.build());
}
}
resources:
default-endpoint:
type: gcp:compute:GlobalNetworkEndpoint
properties:
globalNetworkEndpointGroup: ${neg.name}
fqdn: www.example.com
port: 90
neg:
type: gcp:compute:GlobalNetworkEndpointGroup
properties:
name: my-lb-neg
defaultPort: '90'
networkEndpointType: INTERNET_FQDN_PORT
Create GlobalNetworkEndpoint Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new GlobalNetworkEndpoint(name: string, args: GlobalNetworkEndpointArgs, opts?: CustomResourceOptions);
@overload
def GlobalNetworkEndpoint(resource_name: str,
args: GlobalNetworkEndpointArgs,
opts: Optional[ResourceOptions] = None)
@overload
def GlobalNetworkEndpoint(resource_name: str,
opts: Optional[ResourceOptions] = None,
global_network_endpoint_group: Optional[str] = None,
port: Optional[int] = None,
fqdn: Optional[str] = None,
ip_address: Optional[str] = None,
project: Optional[str] = None)
func NewGlobalNetworkEndpoint(ctx *Context, name string, args GlobalNetworkEndpointArgs, opts ...ResourceOption) (*GlobalNetworkEndpoint, error)
public GlobalNetworkEndpoint(string name, GlobalNetworkEndpointArgs args, CustomResourceOptions? opts = null)
public GlobalNetworkEndpoint(String name, GlobalNetworkEndpointArgs args)
public GlobalNetworkEndpoint(String name, GlobalNetworkEndpointArgs args, CustomResourceOptions options)
type: gcp:compute:GlobalNetworkEndpoint
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args GlobalNetworkEndpointArgs
- 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 GlobalNetworkEndpointArgs
- 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 GlobalNetworkEndpointArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args GlobalNetworkEndpointArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args GlobalNetworkEndpointArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var globalNetworkEndpointResource = new Gcp.Compute.GlobalNetworkEndpoint("globalNetworkEndpointResource", new()
{
GlobalNetworkEndpointGroup = "string",
Port = 0,
Fqdn = "string",
IpAddress = "string",
Project = "string",
});
example, err := compute.NewGlobalNetworkEndpoint(ctx, "globalNetworkEndpointResource", &compute.GlobalNetworkEndpointArgs{
GlobalNetworkEndpointGroup: pulumi.String("string"),
Port: pulumi.Int(0),
Fqdn: pulumi.String("string"),
IpAddress: pulumi.String("string"),
Project: pulumi.String("string"),
})
var globalNetworkEndpointResource = new GlobalNetworkEndpoint("globalNetworkEndpointResource", GlobalNetworkEndpointArgs.builder()
.globalNetworkEndpointGroup("string")
.port(0)
.fqdn("string")
.ipAddress("string")
.project("string")
.build());
global_network_endpoint_resource = gcp.compute.GlobalNetworkEndpoint("globalNetworkEndpointResource",
global_network_endpoint_group="string",
port=0,
fqdn="string",
ip_address="string",
project="string")
const globalNetworkEndpointResource = new gcp.compute.GlobalNetworkEndpoint("globalNetworkEndpointResource", {
globalNetworkEndpointGroup: "string",
port: 0,
fqdn: "string",
ipAddress: "string",
project: "string",
});
type: gcp:compute:GlobalNetworkEndpoint
properties:
fqdn: string
globalNetworkEndpointGroup: string
ipAddress: string
port: 0
project: string
GlobalNetworkEndpoint Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The GlobalNetworkEndpoint resource accepts the following input properties:
- Global
Network stringEndpoint Group - The global network endpoint group this endpoint is part of.
- Port int
- Port number of the external endpoint.
- Fqdn string
- Fully qualified domain name of network endpoint. This can only be specified when network_endpoint_type of the NEG is INTERNET_FQDN_PORT.
- Ip
Address string - IPv4 address external endpoint.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Global
Network stringEndpoint Group - The global network endpoint group this endpoint is part of.
- Port int
- Port number of the external endpoint.
- Fqdn string
- Fully qualified domain name of network endpoint. This can only be specified when network_endpoint_type of the NEG is INTERNET_FQDN_PORT.
- Ip
Address string - IPv4 address external endpoint.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- global
Network StringEndpoint Group - The global network endpoint group this endpoint is part of.
- port Integer
- Port number of the external endpoint.
- fqdn String
- Fully qualified domain name of network endpoint. This can only be specified when network_endpoint_type of the NEG is INTERNET_FQDN_PORT.
- ip
Address String - IPv4 address external endpoint.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- global
Network stringEndpoint Group - The global network endpoint group this endpoint is part of.
- port number
- Port number of the external endpoint.
- fqdn string
- Fully qualified domain name of network endpoint. This can only be specified when network_endpoint_type of the NEG is INTERNET_FQDN_PORT.
- ip
Address string - IPv4 address external endpoint.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- global_
network_ strendpoint_ group - The global network endpoint group this endpoint is part of.
- port int
- Port number of the external endpoint.
- fqdn str
- Fully qualified domain name of network endpoint. This can only be specified when network_endpoint_type of the NEG is INTERNET_FQDN_PORT.
- ip_
address str - IPv4 address external endpoint.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- global
Network StringEndpoint Group - The global network endpoint group this endpoint is part of.
- port Number
- Port number of the external endpoint.
- fqdn String
- Fully qualified domain name of network endpoint. This can only be specified when network_endpoint_type of the NEG is INTERNET_FQDN_PORT.
- ip
Address String - IPv4 address external endpoint.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Outputs
All input properties are implicitly available as output properties. Additionally, the GlobalNetworkEndpoint resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing GlobalNetworkEndpoint Resource
Get an existing GlobalNetworkEndpoint 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?: GlobalNetworkEndpointState, opts?: CustomResourceOptions): GlobalNetworkEndpoint
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
fqdn: Optional[str] = None,
global_network_endpoint_group: Optional[str] = None,
ip_address: Optional[str] = None,
port: Optional[int] = None,
project: Optional[str] = None) -> GlobalNetworkEndpoint
func GetGlobalNetworkEndpoint(ctx *Context, name string, id IDInput, state *GlobalNetworkEndpointState, opts ...ResourceOption) (*GlobalNetworkEndpoint, error)
public static GlobalNetworkEndpoint Get(string name, Input<string> id, GlobalNetworkEndpointState? state, CustomResourceOptions? opts = null)
public static GlobalNetworkEndpoint get(String name, Output<String> id, GlobalNetworkEndpointState 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.
- Fqdn string
- Fully qualified domain name of network endpoint. This can only be specified when network_endpoint_type of the NEG is INTERNET_FQDN_PORT.
- Global
Network stringEndpoint Group - The global network endpoint group this endpoint is part of.
- Ip
Address string - IPv4 address external endpoint.
- Port int
- Port number of the external endpoint.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Fqdn string
- Fully qualified domain name of network endpoint. This can only be specified when network_endpoint_type of the NEG is INTERNET_FQDN_PORT.
- Global
Network stringEndpoint Group - The global network endpoint group this endpoint is part of.
- Ip
Address string - IPv4 address external endpoint.
- Port int
- Port number of the external endpoint.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- fqdn String
- Fully qualified domain name of network endpoint. This can only be specified when network_endpoint_type of the NEG is INTERNET_FQDN_PORT.
- global
Network StringEndpoint Group - The global network endpoint group this endpoint is part of.
- ip
Address String - IPv4 address external endpoint.
- port Integer
- Port number of the external endpoint.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- fqdn string
- Fully qualified domain name of network endpoint. This can only be specified when network_endpoint_type of the NEG is INTERNET_FQDN_PORT.
- global
Network stringEndpoint Group - The global network endpoint group this endpoint is part of.
- ip
Address string - IPv4 address external endpoint.
- port number
- Port number of the external endpoint.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- fqdn str
- Fully qualified domain name of network endpoint. This can only be specified when network_endpoint_type of the NEG is INTERNET_FQDN_PORT.
- global_
network_ strendpoint_ group - The global network endpoint group this endpoint is part of.
- ip_
address str - IPv4 address external endpoint.
- port int
- Port number of the external endpoint.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- fqdn String
- Fully qualified domain name of network endpoint. This can only be specified when network_endpoint_type of the NEG is INTERNET_FQDN_PORT.
- global
Network StringEndpoint Group - The global network endpoint group this endpoint is part of.
- ip
Address String - IPv4 address external endpoint.
- port Number
- Port number of the external endpoint.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
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:
$ pulumi import gcp:compute/globalNetworkEndpoint:GlobalNetworkEndpoint default projects/{{project}}/global/networkEndpointGroups/{{global_network_endpoint_group}}/{{ip_address}}/{{fqdn}}/{{port}}
$ pulumi import gcp:compute/globalNetworkEndpoint:GlobalNetworkEndpoint default {{project}}/{{global_network_endpoint_group}}/{{ip_address}}/{{fqdn}}/{{port}}
$ pulumi import gcp:compute/globalNetworkEndpoint:GlobalNetworkEndpoint default {{global_network_endpoint_group}}/{{ip_address}}/{{fqdn}}/{{port}}
To learn more about importing existing cloud resources, see Importing resources.
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.