RegionalEndpoint

class RegionalEndpoint : KotlinCustomResource

Regional Private Service Connect (PSC) endpoint resource. To get more information about RegionalEndpoint, see:

Example Usage

Network Connectivity Regional Endpoint Regional Access

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",
},
});
import pulumi
import pulumi_gcp as gcp
my_network = gcp.compute.Network("my_network",
name="my-network",
auto_create_subnetworks=False)
my_subnetwork = gcp.compute.Subnetwork("my_subnetwork",
name="my-subnetwork",
ip_cidr_range="192.168.0.0/24",
region="us-central1",
network=my_network.id)
default = gcp.networkconnectivity.RegionalEndpoint("default",
name="my-rep",
location="us-central1",
target_google_api="storage.us-central1.rep.googleapis.com",
access_type="REGIONAL",
address="192.168.0.5",
network=my_network.id,
subnetwork=my_subnetwork.id,
description="My RegionalEndpoint targeting Google API storage.us-central1.rep.googleapis.com",
labels={
"env": "default",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var myNetwork = new Gcp.Compute.Network("my_network", new()
{
Name = "my-network",
AutoCreateSubnetworks = false,
});
var mySubnetwork = new Gcp.Compute.Subnetwork("my_subnetwork", new()
{
Name = "my-subnetwork",
IpCidrRange = "192.168.0.0/24",
Region = "us-central1",
Network = myNetwork.Id,
});
var @default = new Gcp.NetworkConnectivity.RegionalEndpoint("default", new()
{
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" },
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/networkconnectivity"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
myNetwork, err := compute.NewNetwork(ctx, "my_network", &compute.NetworkArgs{
Name: pulumi.String("my-network"),
AutoCreateSubnetworks: pulumi.Bool(false),
})
if err != nil {
return err
}
mySubnetwork, err := compute.NewSubnetwork(ctx, "my_subnetwork", &compute.SubnetworkArgs{
Name: pulumi.String("my-subnetwork"),
IpCidrRange: pulumi.String("192.168.0.0/24"),
Region: pulumi.String("us-central1"),
Network: myNetwork.ID(),
})
if err != nil {
return err
}
_, err = networkconnectivity.NewRegionalEndpoint(ctx, "default", &networkconnectivity.RegionalEndpointArgs{
Name: pulumi.String("my-rep"),
Location: pulumi.String("us-central1"),
TargetGoogleApi: pulumi.String("storage.us-central1.rep.googleapis.com"),
AccessType: pulumi.String("REGIONAL"),
Address: pulumi.String("192.168.0.5"),
Network: myNetwork.ID(),
Subnetwork: mySubnetwork.ID(),
Description: pulumi.String("My RegionalEndpoint targeting Google API storage.us-central1.rep.googleapis.com"),
Labels: pulumi.StringMap{
"env": pulumi.String("default"),
},
})
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.Network;
import com.pulumi.gcp.compute.NetworkArgs;
import com.pulumi.gcp.compute.Subnetwork;
import com.pulumi.gcp.compute.SubnetworkArgs;
import com.pulumi.gcp.networkconnectivity.RegionalEndpoint;
import com.pulumi.gcp.networkconnectivity.RegionalEndpointArgs;
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 myNetwork = new Network("myNetwork", NetworkArgs.builder()
.name("my-network")
.autoCreateSubnetworks(false)
.build());
var mySubnetwork = new Subnetwork("mySubnetwork", SubnetworkArgs.builder()
.name("my-subnetwork")
.ipCidrRange("192.168.0.0/24")
.region("us-central1")
.network(myNetwork.id())
.build());
var default_ = new RegionalEndpoint("default", RegionalEndpointArgs.builder()
.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(Map.of("env", "default"))
.build());
}
}
resources:
myNetwork:
type: gcp:compute:Network
name: my_network
properties:
name: my-network
autoCreateSubnetworks: false
mySubnetwork:
type: gcp:compute:Subnetwork
name: my_subnetwork
properties:
name: my-subnetwork
ipCidrRange: 192.168.0.0/24
region: us-central1
network: ${myNetwork.id}
default:
type: gcp:networkconnectivity:RegionalEndpoint
properties:
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

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 pulumi
import pulumi_gcp as gcp
my_network = gcp.compute.Network("my_network",
name="my-network",
auto_create_subnetworks=False)
my_subnetwork = gcp.compute.Subnetwork("my_subnetwork",
name="my-subnetwork",
ip_cidr_range="192.168.0.0/24",
region="us-central1",
network=my_network.id)
default = gcp.networkconnectivity.RegionalEndpoint("default",
name="my-rep",
location="us-central1",
target_google_api="storage.us-central1.rep.googleapis.com",
access_type="GLOBAL",
address="192.168.0.4",
network=my_network.id,
subnetwork=my_subnetwork.id)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var myNetwork = new Gcp.Compute.Network("my_network", new()
{
Name = "my-network",
AutoCreateSubnetworks = false,
});
var mySubnetwork = new Gcp.Compute.Subnetwork("my_subnetwork", new()
{
Name = "my-subnetwork",
IpCidrRange = "192.168.0.0/24",
Region = "us-central1",
Network = myNetwork.Id,
});
var @default = new Gcp.NetworkConnectivity.RegionalEndpoint("default", new()
{
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,
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/networkconnectivity"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
myNetwork, err := compute.NewNetwork(ctx, "my_network", &compute.NetworkArgs{
Name: pulumi.String("my-network"),
AutoCreateSubnetworks: pulumi.Bool(false),
})
if err != nil {
return err
}
mySubnetwork, err := compute.NewSubnetwork(ctx, "my_subnetwork", &compute.SubnetworkArgs{
Name: pulumi.String("my-subnetwork"),
IpCidrRange: pulumi.String("192.168.0.0/24"),
Region: pulumi.String("us-central1"),
Network: myNetwork.ID(),
})
if err != nil {
return err
}
_, err = networkconnectivity.NewRegionalEndpoint(ctx, "default", &networkconnectivity.RegionalEndpointArgs{
Name: pulumi.String("my-rep"),
Location: pulumi.String("us-central1"),
TargetGoogleApi: pulumi.String("storage.us-central1.rep.googleapis.com"),
AccessType: pulumi.String("GLOBAL"),
Address: pulumi.String("192.168.0.4"),
Network: myNetwork.ID(),
Subnetwork: mySubnetwork.ID(),
})
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.Network;
import com.pulumi.gcp.compute.NetworkArgs;
import com.pulumi.gcp.compute.Subnetwork;
import com.pulumi.gcp.compute.SubnetworkArgs;
import com.pulumi.gcp.networkconnectivity.RegionalEndpoint;
import com.pulumi.gcp.networkconnectivity.RegionalEndpointArgs;
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 myNetwork = new Network("myNetwork", NetworkArgs.builder()
.name("my-network")
.autoCreateSubnetworks(false)
.build());
var mySubnetwork = new Subnetwork("mySubnetwork", SubnetworkArgs.builder()
.name("my-subnetwork")
.ipCidrRange("192.168.0.0/24")
.region("us-central1")
.network(myNetwork.id())
.build());
var default_ = new RegionalEndpoint("default", RegionalEndpointArgs.builder()
.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())
.build());
}
}
resources:
myNetwork:
type: gcp:compute:Network
name: my_network
properties:
name: my-network
autoCreateSubnetworks: false
mySubnetwork:
type: gcp:compute:Subnetwork
name: my_subnetwork
properties:
name: my-subnetwork
ipCidrRange: 192.168.0.0/24
region: us-central1
network: ${myNetwork.id}
default:
type: gcp:networkconnectivity:RegionalEndpoint
properties:
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:

$ 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}}

Properties

Link copied to clipboard
val accessType: Output<String>

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.

Link copied to clipboard
val address: 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}

Link copied to clipboard
val createTime: Output<String>

Time when the RegionalEndpoint was created.

Link copied to clipboard
val description: Output<String>?

A description of this resource.

Link copied to clipboard

All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val labels: Output<Map<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 effective_labels for all of the labels present on the resource.

Link copied to clipboard
val location: Output<String>

The location of the RegionalEndpoint.

Link copied to clipboard
val name: Output<String>

The name of the RegionalEndpoint.

Link copied to clipboard
val network: Output<String>

The name of the VPC network for this private regional endpoint. Format: projects/{project}/global/networks/{network}

Link copied to clipboard
val project: Output<String>

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Link copied to clipboard

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}

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
val pulumiLabels: Output<Map<String, String>>

The combination of labels configured directly on the resource and default labels configured on the provider.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val subnetwork: Output<String>

The name of the subnetwork from which the IP address will be allocated. Format: projects/{project}/regions/{region}/subnetworks/{subnetwork}

Link copied to clipboard
val targetGoogleApi: Output<String>

The service endpoint this private regional endpoint connects to. Format: {apiname}.{region}.rep.googleapis.com Example: \"cloudkms.us-central1.rep.googleapis.com\".

Link copied to clipboard
val updateTime: Output<String>

Time when the RegionalEndpoint was updated.

Link copied to clipboard
val urn: Output<String>