gcp.compute.NetworkEndpoint
Explore with Pulumi AI
A Network endpoint represents a IP address and port combination that is part of a specific network endpoint group (NEG). NEGs are zonal collections of these endpoints for GCP resources within a single subnet. NOTE: Network endpoints cannot be created outside of a network endpoint group.
To get more information about NetworkEndpoint, see:
- API documentation
- How-to Guides
Example Usage
Network Endpoint
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var myImage = Gcp.Compute.GetImage.Invoke(new()
{
Family = "debian-11",
Project = "debian-cloud",
});
var defaultNetwork = new Gcp.Compute.Network("defaultNetwork", new()
{
AutoCreateSubnetworks = false,
});
var defaultSubnetwork = new Gcp.Compute.Subnetwork("defaultSubnetwork", new()
{
IpCidrRange = "10.0.0.1/16",
Region = "us-central1",
Network = defaultNetwork.Id,
});
var endpoint_instance = new Gcp.Compute.Instance("endpoint-instance", new()
{
MachineType = "e2-medium",
BootDisk = new Gcp.Compute.Inputs.InstanceBootDiskArgs
{
InitializeParams = new Gcp.Compute.Inputs.InstanceBootDiskInitializeParamsArgs
{
Image = myImage.Apply(getImageResult => getImageResult.SelfLink),
},
},
NetworkInterfaces = new[]
{
new Gcp.Compute.Inputs.InstanceNetworkInterfaceArgs
{
Subnetwork = defaultSubnetwork.Id,
AccessConfigs = new[]
{
null,
},
},
},
});
var default_endpoint = new Gcp.Compute.NetworkEndpoint("default-endpoint", new()
{
NetworkEndpointGroup = google_compute_network_endpoint_group.Neg.Name,
Instance = endpoint_instance.Name,
Port = google_compute_network_endpoint_group.Neg.Default_port,
IpAddress = endpoint_instance.NetworkInterfaces.Apply(networkInterfaces => networkInterfaces[0].NetworkIp),
});
var @group = new Gcp.Compute.NetworkEndpointGroup("group", new()
{
Network = defaultNetwork.Id,
Subnetwork = defaultSubnetwork.Id,
DefaultPort = 90,
Zone = "us-central1-a",
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
myImage, err := compute.LookupImage(ctx, &compute.LookupImageArgs{
Family: pulumi.StringRef("debian-11"),
Project: pulumi.StringRef("debian-cloud"),
}, nil)
if err != nil {
return err
}
defaultNetwork, err := compute.NewNetwork(ctx, "defaultNetwork", &compute.NetworkArgs{
AutoCreateSubnetworks: pulumi.Bool(false),
})
if err != nil {
return err
}
defaultSubnetwork, err := compute.NewSubnetwork(ctx, "defaultSubnetwork", &compute.SubnetworkArgs{
IpCidrRange: pulumi.String("10.0.0.1/16"),
Region: pulumi.String("us-central1"),
Network: defaultNetwork.ID(),
})
if err != nil {
return err
}
_, err = compute.NewInstance(ctx, "endpoint-instance", &compute.InstanceArgs{
MachineType: pulumi.String("e2-medium"),
BootDisk: &compute.InstanceBootDiskArgs{
InitializeParams: &compute.InstanceBootDiskInitializeParamsArgs{
Image: *pulumi.String(myImage.SelfLink),
},
},
NetworkInterfaces: compute.InstanceNetworkInterfaceArray{
&compute.InstanceNetworkInterfaceArgs{
Subnetwork: defaultSubnetwork.ID(),
AccessConfigs: compute.InstanceNetworkInterfaceAccessConfigArray{
nil,
},
},
},
})
if err != nil {
return err
}
_, err = compute.NewNetworkEndpoint(ctx, "default-endpoint", &compute.NetworkEndpointArgs{
NetworkEndpointGroup: pulumi.Any(google_compute_network_endpoint_group.Neg.Name),
Instance: endpoint_instance.Name,
Port: pulumi.Any(google_compute_network_endpoint_group.Neg.Default_port),
IpAddress: endpoint_instance.NetworkInterfaces.ApplyT(func(networkInterfaces []compute.InstanceNetworkInterface) (*string, error) {
return &networkInterfaces[0].NetworkIp, nil
}).(pulumi.StringPtrOutput),
})
if err != nil {
return err
}
_, err = compute.NewNetworkEndpointGroup(ctx, "group", &compute.NetworkEndpointGroupArgs{
Network: defaultNetwork.ID(),
Subnetwork: defaultSubnetwork.ID(),
DefaultPort: pulumi.Int(90),
Zone: pulumi.String("us-central1-a"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.ComputeFunctions;
import com.pulumi.gcp.compute.inputs.GetImageArgs;
import com.pulumi.gcp.compute.Network;
import com.pulumi.gcp.compute.NetworkArgs;
import com.pulumi.gcp.compute.Subnetwork;
import com.pulumi.gcp.compute.SubnetworkArgs;
import com.pulumi.gcp.compute.Instance;
import com.pulumi.gcp.compute.InstanceArgs;
import com.pulumi.gcp.compute.inputs.InstanceBootDiskArgs;
import com.pulumi.gcp.compute.inputs.InstanceBootDiskInitializeParamsArgs;
import com.pulumi.gcp.compute.inputs.InstanceNetworkInterfaceArgs;
import com.pulumi.gcp.compute.NetworkEndpoint;
import com.pulumi.gcp.compute.NetworkEndpointArgs;
import com.pulumi.gcp.compute.NetworkEndpointGroup;
import com.pulumi.gcp.compute.NetworkEndpointGroupArgs;
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) {
final var myImage = ComputeFunctions.getImage(GetImageArgs.builder()
.family("debian-11")
.project("debian-cloud")
.build());
var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
.autoCreateSubnetworks(false)
.build());
var defaultSubnetwork = new Subnetwork("defaultSubnetwork", SubnetworkArgs.builder()
.ipCidrRange("10.0.0.1/16")
.region("us-central1")
.network(defaultNetwork.id())
.build());
var endpoint_instance = new Instance("endpoint-instance", InstanceArgs.builder()
.machineType("e2-medium")
.bootDisk(InstanceBootDiskArgs.builder()
.initializeParams(InstanceBootDiskInitializeParamsArgs.builder()
.image(myImage.applyValue(getImageResult -> getImageResult.selfLink()))
.build())
.build())
.networkInterfaces(InstanceNetworkInterfaceArgs.builder()
.subnetwork(defaultSubnetwork.id())
.accessConfigs()
.build())
.build());
var default_endpoint = new NetworkEndpoint("default-endpoint", NetworkEndpointArgs.builder()
.networkEndpointGroup(google_compute_network_endpoint_group.neg().name())
.instance(endpoint_instance.name())
.port(google_compute_network_endpoint_group.neg().default_port())
.ipAddress(endpoint_instance.networkInterfaces().applyValue(networkInterfaces -> networkInterfaces[0].networkIp()))
.build());
var group = new NetworkEndpointGroup("group", NetworkEndpointGroupArgs.builder()
.network(defaultNetwork.id())
.subnetwork(defaultSubnetwork.id())
.defaultPort("90")
.zone("us-central1-a")
.build());
}
}
import pulumi
import pulumi_gcp as gcp
my_image = gcp.compute.get_image(family="debian-11",
project="debian-cloud")
default_network = gcp.compute.Network("defaultNetwork", auto_create_subnetworks=False)
default_subnetwork = gcp.compute.Subnetwork("defaultSubnetwork",
ip_cidr_range="10.0.0.1/16",
region="us-central1",
network=default_network.id)
endpoint_instance = gcp.compute.Instance("endpoint-instance",
machine_type="e2-medium",
boot_disk=gcp.compute.InstanceBootDiskArgs(
initialize_params=gcp.compute.InstanceBootDiskInitializeParamsArgs(
image=my_image.self_link,
),
),
network_interfaces=[gcp.compute.InstanceNetworkInterfaceArgs(
subnetwork=default_subnetwork.id,
access_configs=[gcp.compute.InstanceNetworkInterfaceAccessConfigArgs()],
)])
default_endpoint = gcp.compute.NetworkEndpoint("default-endpoint",
network_endpoint_group=google_compute_network_endpoint_group["neg"]["name"],
instance=endpoint_instance.name,
port=google_compute_network_endpoint_group["neg"]["default_port"],
ip_address=endpoint_instance.network_interfaces[0].network_ip)
group = gcp.compute.NetworkEndpointGroup("group",
network=default_network.id,
subnetwork=default_subnetwork.id,
default_port=90,
zone="us-central1-a")
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const myImage = gcp.compute.getImage({
family: "debian-11",
project: "debian-cloud",
});
const defaultNetwork = new gcp.compute.Network("defaultNetwork", {autoCreateSubnetworks: false});
const defaultSubnetwork = new gcp.compute.Subnetwork("defaultSubnetwork", {
ipCidrRange: "10.0.0.1/16",
region: "us-central1",
network: defaultNetwork.id,
});
const endpoint_instance = new gcp.compute.Instance("endpoint-instance", {
machineType: "e2-medium",
bootDisk: {
initializeParams: {
image: myImage.then(myImage => myImage.selfLink),
},
},
networkInterfaces: [{
subnetwork: defaultSubnetwork.id,
accessConfigs: [{}],
}],
});
const default_endpoint = new gcp.compute.NetworkEndpoint("default-endpoint", {
networkEndpointGroup: google_compute_network_endpoint_group.neg.name,
instance: endpoint_instance.name,
port: google_compute_network_endpoint_group.neg.default_port,
ipAddress: endpoint_instance.networkInterfaces.apply(networkInterfaces => networkInterfaces[0].networkIp),
});
const group = new gcp.compute.NetworkEndpointGroup("group", {
network: defaultNetwork.id,
subnetwork: defaultSubnetwork.id,
defaultPort: 90,
zone: "us-central1-a",
});
resources:
default-endpoint:
type: gcp:compute:NetworkEndpoint
properties:
networkEndpointGroup: ${google_compute_network_endpoint_group.neg.name}
instance: ${["endpoint-instance"].name}
port: ${google_compute_network_endpoint_group.neg.default_port}
ipAddress: ${["endpoint-instance"].networkInterfaces[0].networkIp}
endpoint-instance:
type: gcp:compute:Instance
properties:
machineType: e2-medium
bootDisk:
initializeParams:
image: ${myImage.selfLink}
networkInterfaces:
- subnetwork: ${defaultSubnetwork.id}
accessConfigs:
- {}
group:
type: gcp:compute:NetworkEndpointGroup
properties:
network: ${defaultNetwork.id}
subnetwork: ${defaultSubnetwork.id}
defaultPort: '90'
zone: us-central1-a
defaultNetwork:
type: gcp:compute:Network
properties:
autoCreateSubnetworks: false
defaultSubnetwork:
type: gcp:compute:Subnetwork
properties:
ipCidrRange: 10.0.0.1/16
region: us-central1
network: ${defaultNetwork.id}
variables:
myImage:
fn::invoke:
Function: gcp:compute:getImage
Arguments:
family: debian-11
project: debian-cloud
Create NetworkEndpoint Resource
new NetworkEndpoint(name: string, args: NetworkEndpointArgs, opts?: CustomResourceOptions);
@overload
def NetworkEndpoint(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance: Optional[str] = None,
ip_address: Optional[str] = None,
network_endpoint_group: Optional[str] = None,
port: Optional[int] = None,
project: Optional[str] = None,
zone: Optional[str] = None)
@overload
def NetworkEndpoint(resource_name: str,
args: NetworkEndpointArgs,
opts: Optional[ResourceOptions] = None)
func NewNetworkEndpoint(ctx *Context, name string, args NetworkEndpointArgs, opts ...ResourceOption) (*NetworkEndpoint, error)
public NetworkEndpoint(string name, NetworkEndpointArgs args, CustomResourceOptions? opts = null)
public NetworkEndpoint(String name, NetworkEndpointArgs args)
public NetworkEndpoint(String name, NetworkEndpointArgs args, CustomResourceOptions options)
type: gcp:compute:NetworkEndpoint
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NetworkEndpointArgs
- 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 NetworkEndpointArgs
- 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 NetworkEndpointArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NetworkEndpointArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NetworkEndpointArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
NetworkEndpoint Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The NetworkEndpoint resource accepts the following input properties:
- Ip
Address string IPv4 address of network endpoint. The IP address must belong to a VM in GCE (either the primary IP or as part of an aliased IP range).
- Network
Endpoint stringGroup The network endpoint group this endpoint is part of.
- Instance string
The name for a specific VM instance that the IP address belongs to. This is required for network endpoints of type GCE_VM_IP_PORT. The instance must be in the same zone of network endpoint group.
- Port int
Port number of network endpoint. Note
port
is required unless the Network Endpoint Group is created with the type ofGCE_VM_IP
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Zone string
Zone where the containing network endpoint group is located.
- Ip
Address string IPv4 address of network endpoint. The IP address must belong to a VM in GCE (either the primary IP or as part of an aliased IP range).
- Network
Endpoint stringGroup The network endpoint group this endpoint is part of.
- Instance string
The name for a specific VM instance that the IP address belongs to. This is required for network endpoints of type GCE_VM_IP_PORT. The instance must be in the same zone of network endpoint group.
- Port int
Port number of network endpoint. Note
port
is required unless the Network Endpoint Group is created with the type ofGCE_VM_IP
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Zone string
Zone where the containing network endpoint group is located.
- ip
Address String IPv4 address of network endpoint. The IP address must belong to a VM in GCE (either the primary IP or as part of an aliased IP range).
- network
Endpoint StringGroup The network endpoint group this endpoint is part of.
- instance String
The name for a specific VM instance that the IP address belongs to. This is required for network endpoints of type GCE_VM_IP_PORT. The instance must be in the same zone of network endpoint group.
- port Integer
Port number of network endpoint. Note
port
is required unless the Network Endpoint Group is created with the type ofGCE_VM_IP
- project String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- zone String
Zone where the containing network endpoint group is located.
- ip
Address string IPv4 address of network endpoint. The IP address must belong to a VM in GCE (either the primary IP or as part of an aliased IP range).
- network
Endpoint stringGroup The network endpoint group this endpoint is part of.
- instance string
The name for a specific VM instance that the IP address belongs to. This is required for network endpoints of type GCE_VM_IP_PORT. The instance must be in the same zone of network endpoint group.
- port number
Port number of network endpoint. Note
port
is required unless the Network Endpoint Group is created with the type ofGCE_VM_IP
- project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- zone string
Zone where the containing network endpoint group is located.
- ip_
address str IPv4 address of network endpoint. The IP address must belong to a VM in GCE (either the primary IP or as part of an aliased IP range).
- network_
endpoint_ strgroup The network endpoint group this endpoint is part of.
- instance str
The name for a specific VM instance that the IP address belongs to. This is required for network endpoints of type GCE_VM_IP_PORT. The instance must be in the same zone of network endpoint group.
- port int
Port number of network endpoint. Note
port
is required unless the Network Endpoint Group is created with the type ofGCE_VM_IP
- project str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- zone str
Zone where the containing network endpoint group is located.
- ip
Address String IPv4 address of network endpoint. The IP address must belong to a VM in GCE (either the primary IP or as part of an aliased IP range).
- network
Endpoint StringGroup The network endpoint group this endpoint is part of.
- instance String
The name for a specific VM instance that the IP address belongs to. This is required for network endpoints of type GCE_VM_IP_PORT. The instance must be in the same zone of network endpoint group.
- port Number
Port number of network endpoint. Note
port
is required unless the Network Endpoint Group is created with the type ofGCE_VM_IP
- project String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- zone String
Zone where the containing network endpoint group is located.
Outputs
All input properties are implicitly available as output properties. Additionally, the NetworkEndpoint 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 NetworkEndpoint Resource
Get an existing NetworkEndpoint 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?: NetworkEndpointState, opts?: CustomResourceOptions): NetworkEndpoint
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
instance: Optional[str] = None,
ip_address: Optional[str] = None,
network_endpoint_group: Optional[str] = None,
port: Optional[int] = None,
project: Optional[str] = None,
zone: Optional[str] = None) -> NetworkEndpoint
func GetNetworkEndpoint(ctx *Context, name string, id IDInput, state *NetworkEndpointState, opts ...ResourceOption) (*NetworkEndpoint, error)
public static NetworkEndpoint Get(string name, Input<string> id, NetworkEndpointState? state, CustomResourceOptions? opts = null)
public static NetworkEndpoint get(String name, Output<String> id, NetworkEndpointState 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.
- Instance string
The name for a specific VM instance that the IP address belongs to. This is required for network endpoints of type GCE_VM_IP_PORT. The instance must be in the same zone of network endpoint group.
- Ip
Address string IPv4 address of network endpoint. The IP address must belong to a VM in GCE (either the primary IP or as part of an aliased IP range).
- Network
Endpoint stringGroup The network endpoint group this endpoint is part of.
- Port int
Port number of network endpoint. Note
port
is required unless the Network Endpoint Group is created with the type ofGCE_VM_IP
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Zone string
Zone where the containing network endpoint group is located.
- Instance string
The name for a specific VM instance that the IP address belongs to. This is required for network endpoints of type GCE_VM_IP_PORT. The instance must be in the same zone of network endpoint group.
- Ip
Address string IPv4 address of network endpoint. The IP address must belong to a VM in GCE (either the primary IP or as part of an aliased IP range).
- Network
Endpoint stringGroup The network endpoint group this endpoint is part of.
- Port int
Port number of network endpoint. Note
port
is required unless the Network Endpoint Group is created with the type ofGCE_VM_IP
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Zone string
Zone where the containing network endpoint group is located.
- instance String
The name for a specific VM instance that the IP address belongs to. This is required for network endpoints of type GCE_VM_IP_PORT. The instance must be in the same zone of network endpoint group.
- ip
Address String IPv4 address of network endpoint. The IP address must belong to a VM in GCE (either the primary IP or as part of an aliased IP range).
- network
Endpoint StringGroup The network endpoint group this endpoint is part of.
- port Integer
Port number of network endpoint. Note
port
is required unless the Network Endpoint Group is created with the type ofGCE_VM_IP
- project String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- zone String
Zone where the containing network endpoint group is located.
- instance string
The name for a specific VM instance that the IP address belongs to. This is required for network endpoints of type GCE_VM_IP_PORT. The instance must be in the same zone of network endpoint group.
- ip
Address string IPv4 address of network endpoint. The IP address must belong to a VM in GCE (either the primary IP or as part of an aliased IP range).
- network
Endpoint stringGroup The network endpoint group this endpoint is part of.
- port number
Port number of network endpoint. Note
port
is required unless the Network Endpoint Group is created with the type ofGCE_VM_IP
- project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- zone string
Zone where the containing network endpoint group is located.
- instance str
The name for a specific VM instance that the IP address belongs to. This is required for network endpoints of type GCE_VM_IP_PORT. The instance must be in the same zone of network endpoint group.
- ip_
address str IPv4 address of network endpoint. The IP address must belong to a VM in GCE (either the primary IP or as part of an aliased IP range).
- network_
endpoint_ strgroup The network endpoint group this endpoint is part of.
- port int
Port number of network endpoint. Note
port
is required unless the Network Endpoint Group is created with the type ofGCE_VM_IP
- project str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- zone str
Zone where the containing network endpoint group is located.
- instance String
The name for a specific VM instance that the IP address belongs to. This is required for network endpoints of type GCE_VM_IP_PORT. The instance must be in the same zone of network endpoint group.
- ip
Address String IPv4 address of network endpoint. The IP address must belong to a VM in GCE (either the primary IP or as part of an aliased IP range).
- network
Endpoint StringGroup The network endpoint group this endpoint is part of.
- port Number
Port number of network endpoint. Note
port
is required unless the Network Endpoint Group is created with the type ofGCE_VM_IP
- project String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- zone String
Zone where the containing network endpoint group is located.
Import
NetworkEndpoint can be imported using any of these accepted formats* projects/{{project}}/zones/{{zone}}/networkEndpointGroups/{{network_endpoint_group}}/{{instance}}/{{ip_address}}/{{port}}
* {{project}}/{{zone}}/{{network_endpoint_group}}/{{instance}}/{{ip_address}}/{{port}}
* {{zone}}/{{network_endpoint_group}}/{{instance}}/{{ip_address}}/{{port}}
* {{network_endpoint_group}}/{{instance}}/{{ip_address}}/{{port}}
In Terraform v1.5.0 and later, use an import
block to import NetworkEndpoint using one of the formats above. For exampletf import {
id = “projects/{{project}}/zones/{{zone}}/networkEndpointGroups/{{network_endpoint_group}}/{{instance}}/{{ip_address}}/{{port}}”
to = google_compute_network_endpoint.default }
$ pulumi import gcp:compute/networkEndpoint:NetworkEndpoint When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), NetworkEndpoint can be imported using one of the formats above. For example
$ pulumi import gcp:compute/networkEndpoint:NetworkEndpoint default projects/{{project}}/zones/{{zone}}/networkEndpointGroups/{{network_endpoint_group}}/{{instance}}/{{ip_address}}/{{port}}
$ pulumi import gcp:compute/networkEndpoint:NetworkEndpoint default {{project}}/{{zone}}/{{network_endpoint_group}}/{{instance}}/{{ip_address}}/{{port}}
$ pulumi import gcp:compute/networkEndpoint:NetworkEndpoint default {{zone}}/{{network_endpoint_group}}/{{instance}}/{{ip_address}}/{{port}}
$ pulumi import gcp:compute/networkEndpoint:NetworkEndpoint default {{network_endpoint_group}}/{{instance}}/{{ip_address}}/{{port}}
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.