gcp.compute.NetworkPeering
Explore with Pulumi AI
Manages a network peering within GCE. For more information see the official documentation and API.
Both networks must create a peering with each other for the peering to be functional.
Subnets IP ranges across peered VPC networks cannot overlap.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const _default = new gcp.compute.Network("default", {
name: "foobar",
autoCreateSubnetworks: false,
});
const other = new gcp.compute.Network("other", {
name: "other",
autoCreateSubnetworks: false,
});
const peering1 = new gcp.compute.NetworkPeering("peering1", {
name: "peering1",
network: _default.selfLink,
peerNetwork: other.selfLink,
});
const peering2 = new gcp.compute.NetworkPeering("peering2", {
name: "peering2",
network: other.selfLink,
peerNetwork: _default.selfLink,
});
import pulumi
import pulumi_gcp as gcp
default = gcp.compute.Network("default",
name="foobar",
auto_create_subnetworks=False)
other = gcp.compute.Network("other",
name="other",
auto_create_subnetworks=False)
peering1 = gcp.compute.NetworkPeering("peering1",
name="peering1",
network=default.self_link,
peer_network=other.self_link)
peering2 = gcp.compute.NetworkPeering("peering2",
name="peering2",
network=other.self_link,
peer_network=default.self_link)
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 {
_, err := compute.NewNetwork(ctx, "default", &compute.NetworkArgs{
Name: pulumi.String("foobar"),
AutoCreateSubnetworks: pulumi.Bool(false),
})
if err != nil {
return err
}
other, err := compute.NewNetwork(ctx, "other", &compute.NetworkArgs{
Name: pulumi.String("other"),
AutoCreateSubnetworks: pulumi.Bool(false),
})
if err != nil {
return err
}
_, err = compute.NewNetworkPeering(ctx, "peering1", &compute.NetworkPeeringArgs{
Name: pulumi.String("peering1"),
Network: _default.SelfLink,
PeerNetwork: other.SelfLink,
})
if err != nil {
return err
}
_, err = compute.NewNetworkPeering(ctx, "peering2", &compute.NetworkPeeringArgs{
Name: pulumi.String("peering2"),
Network: other.SelfLink,
PeerNetwork: _default.SelfLink,
})
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 @default = new Gcp.Compute.Network("default", new()
{
Name = "foobar",
AutoCreateSubnetworks = false,
});
var other = new Gcp.Compute.Network("other", new()
{
Name = "other",
AutoCreateSubnetworks = false,
});
var peering1 = new Gcp.Compute.NetworkPeering("peering1", new()
{
Name = "peering1",
Network = @default.SelfLink,
PeerNetwork = other.SelfLink,
});
var peering2 = new Gcp.Compute.NetworkPeering("peering2", new()
{
Name = "peering2",
Network = other.SelfLink,
PeerNetwork = @default.SelfLink,
});
});
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.NetworkPeering;
import com.pulumi.gcp.compute.NetworkPeeringArgs;
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 default_ = new Network("default", NetworkArgs.builder()
.name("foobar")
.autoCreateSubnetworks("false")
.build());
var other = new Network("other", NetworkArgs.builder()
.name("other")
.autoCreateSubnetworks("false")
.build());
var peering1 = new NetworkPeering("peering1", NetworkPeeringArgs.builder()
.name("peering1")
.network(default_.selfLink())
.peerNetwork(other.selfLink())
.build());
var peering2 = new NetworkPeering("peering2", NetworkPeeringArgs.builder()
.name("peering2")
.network(other.selfLink())
.peerNetwork(default_.selfLink())
.build());
}
}
resources:
peering1:
type: gcp:compute:NetworkPeering
properties:
name: peering1
network: ${default.selfLink}
peerNetwork: ${other.selfLink}
peering2:
type: gcp:compute:NetworkPeering
properties:
name: peering2
network: ${other.selfLink}
peerNetwork: ${default.selfLink}
default:
type: gcp:compute:Network
properties:
name: foobar
autoCreateSubnetworks: 'false'
other:
type: gcp:compute:Network
properties:
name: other
autoCreateSubnetworks: 'false'
Create NetworkPeering Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new NetworkPeering(name: string, args: NetworkPeeringArgs, opts?: CustomResourceOptions);
@overload
def NetworkPeering(resource_name: str,
args: NetworkPeeringArgs,
opts: Optional[ResourceOptions] = None)
@overload
def NetworkPeering(resource_name: str,
opts: Optional[ResourceOptions] = None,
network: Optional[str] = None,
peer_network: Optional[str] = None,
export_custom_routes: Optional[bool] = None,
export_subnet_routes_with_public_ip: Optional[bool] = None,
import_custom_routes: Optional[bool] = None,
import_subnet_routes_with_public_ip: Optional[bool] = None,
name: Optional[str] = None,
stack_type: Optional[str] = None)
func NewNetworkPeering(ctx *Context, name string, args NetworkPeeringArgs, opts ...ResourceOption) (*NetworkPeering, error)
public NetworkPeering(string name, NetworkPeeringArgs args, CustomResourceOptions? opts = null)
public NetworkPeering(String name, NetworkPeeringArgs args)
public NetworkPeering(String name, NetworkPeeringArgs args, CustomResourceOptions options)
type: gcp:compute:NetworkPeering
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 NetworkPeeringArgs
- 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 NetworkPeeringArgs
- 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 NetworkPeeringArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NetworkPeeringArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NetworkPeeringArgs
- 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 networkPeeringResource = new Gcp.Compute.NetworkPeering("networkPeeringResource", new()
{
Network = "string",
PeerNetwork = "string",
ExportCustomRoutes = false,
ExportSubnetRoutesWithPublicIp = false,
ImportCustomRoutes = false,
ImportSubnetRoutesWithPublicIp = false,
Name = "string",
StackType = "string",
});
example, err := compute.NewNetworkPeering(ctx, "networkPeeringResource", &compute.NetworkPeeringArgs{
Network: pulumi.String("string"),
PeerNetwork: pulumi.String("string"),
ExportCustomRoutes: pulumi.Bool(false),
ExportSubnetRoutesWithPublicIp: pulumi.Bool(false),
ImportCustomRoutes: pulumi.Bool(false),
ImportSubnetRoutesWithPublicIp: pulumi.Bool(false),
Name: pulumi.String("string"),
StackType: pulumi.String("string"),
})
var networkPeeringResource = new NetworkPeering("networkPeeringResource", NetworkPeeringArgs.builder()
.network("string")
.peerNetwork("string")
.exportCustomRoutes(false)
.exportSubnetRoutesWithPublicIp(false)
.importCustomRoutes(false)
.importSubnetRoutesWithPublicIp(false)
.name("string")
.stackType("string")
.build());
network_peering_resource = gcp.compute.NetworkPeering("networkPeeringResource",
network="string",
peer_network="string",
export_custom_routes=False,
export_subnet_routes_with_public_ip=False,
import_custom_routes=False,
import_subnet_routes_with_public_ip=False,
name="string",
stack_type="string")
const networkPeeringResource = new gcp.compute.NetworkPeering("networkPeeringResource", {
network: "string",
peerNetwork: "string",
exportCustomRoutes: false,
exportSubnetRoutesWithPublicIp: false,
importCustomRoutes: false,
importSubnetRoutesWithPublicIp: false,
name: "string",
stackType: "string",
});
type: gcp:compute:NetworkPeering
properties:
exportCustomRoutes: false
exportSubnetRoutesWithPublicIp: false
importCustomRoutes: false
importSubnetRoutesWithPublicIp: false
name: string
network: string
peerNetwork: string
stackType: string
NetworkPeering 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 NetworkPeering resource accepts the following input properties:
- Network string
- The primary network of the peering.
- Peer
Network string - The peer network in the peering. The peer network may belong to a different project.
- Export
Custom boolRoutes - Whether to export the custom routes to the peer network. Defaults to
false
. - Export
Subnet boolRoutes With Public Ip - Whether subnet routes with public IP range are exported. The default value is true, all subnet routes are exported. The IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always exported to peers and are not controlled by this field.
- Import
Custom boolRoutes - Whether to import the custom routes from the peer network. Defaults to
false
. - Import
Subnet boolRoutes With Public Ip - Whether subnet routes with public IP range are imported. The default value is false. The IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always imported from peers and are not controlled by this field.
- Name string
- Name of the peering.
- Stack
Type string - Which IP version(s) of traffic and routes are allowed to be imported or exported between peer networks. The default value is IPV4_ONLY. Possible values: ["IPV4_ONLY", "IPV4_IPV6"].
- Network string
- The primary network of the peering.
- Peer
Network string - The peer network in the peering. The peer network may belong to a different project.
- Export
Custom boolRoutes - Whether to export the custom routes to the peer network. Defaults to
false
. - Export
Subnet boolRoutes With Public Ip - Whether subnet routes with public IP range are exported. The default value is true, all subnet routes are exported. The IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always exported to peers and are not controlled by this field.
- Import
Custom boolRoutes - Whether to import the custom routes from the peer network. Defaults to
false
. - Import
Subnet boolRoutes With Public Ip - Whether subnet routes with public IP range are imported. The default value is false. The IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always imported from peers and are not controlled by this field.
- Name string
- Name of the peering.
- Stack
Type string - Which IP version(s) of traffic and routes are allowed to be imported or exported between peer networks. The default value is IPV4_ONLY. Possible values: ["IPV4_ONLY", "IPV4_IPV6"].
- network String
- The primary network of the peering.
- peer
Network String - The peer network in the peering. The peer network may belong to a different project.
- export
Custom BooleanRoutes - Whether to export the custom routes to the peer network. Defaults to
false
. - export
Subnet BooleanRoutes With Public Ip - Whether subnet routes with public IP range are exported. The default value is true, all subnet routes are exported. The IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always exported to peers and are not controlled by this field.
- import
Custom BooleanRoutes - Whether to import the custom routes from the peer network. Defaults to
false
. - import
Subnet BooleanRoutes With Public Ip - Whether subnet routes with public IP range are imported. The default value is false. The IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always imported from peers and are not controlled by this field.
- name String
- Name of the peering.
- stack
Type String - Which IP version(s) of traffic and routes are allowed to be imported or exported between peer networks. The default value is IPV4_ONLY. Possible values: ["IPV4_ONLY", "IPV4_IPV6"].
- network string
- The primary network of the peering.
- peer
Network string - The peer network in the peering. The peer network may belong to a different project.
- export
Custom booleanRoutes - Whether to export the custom routes to the peer network. Defaults to
false
. - export
Subnet booleanRoutes With Public Ip - Whether subnet routes with public IP range are exported. The default value is true, all subnet routes are exported. The IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always exported to peers and are not controlled by this field.
- import
Custom booleanRoutes - Whether to import the custom routes from the peer network. Defaults to
false
. - import
Subnet booleanRoutes With Public Ip - Whether subnet routes with public IP range are imported. The default value is false. The IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always imported from peers and are not controlled by this field.
- name string
- Name of the peering.
- stack
Type string - Which IP version(s) of traffic and routes are allowed to be imported or exported between peer networks. The default value is IPV4_ONLY. Possible values: ["IPV4_ONLY", "IPV4_IPV6"].
- network str
- The primary network of the peering.
- peer_
network str - The peer network in the peering. The peer network may belong to a different project.
- export_
custom_ boolroutes - Whether to export the custom routes to the peer network. Defaults to
false
. - export_
subnet_ boolroutes_ with_ public_ ip - Whether subnet routes with public IP range are exported. The default value is true, all subnet routes are exported. The IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always exported to peers and are not controlled by this field.
- import_
custom_ boolroutes - Whether to import the custom routes from the peer network. Defaults to
false
. - import_
subnet_ boolroutes_ with_ public_ ip - Whether subnet routes with public IP range are imported. The default value is false. The IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always imported from peers and are not controlled by this field.
- name str
- Name of the peering.
- stack_
type str - Which IP version(s) of traffic and routes are allowed to be imported or exported between peer networks. The default value is IPV4_ONLY. Possible values: ["IPV4_ONLY", "IPV4_IPV6"].
- network String
- The primary network of the peering.
- peer
Network String - The peer network in the peering. The peer network may belong to a different project.
- export
Custom BooleanRoutes - Whether to export the custom routes to the peer network. Defaults to
false
. - export
Subnet BooleanRoutes With Public Ip - Whether subnet routes with public IP range are exported. The default value is true, all subnet routes are exported. The IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always exported to peers and are not controlled by this field.
- import
Custom BooleanRoutes - Whether to import the custom routes from the peer network. Defaults to
false
. - import
Subnet BooleanRoutes With Public Ip - Whether subnet routes with public IP range are imported. The default value is false. The IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always imported from peers and are not controlled by this field.
- name String
- Name of the peering.
- stack
Type String - Which IP version(s) of traffic and routes are allowed to be imported or exported between peer networks. The default value is IPV4_ONLY. Possible values: ["IPV4_ONLY", "IPV4_IPV6"].
Outputs
All input properties are implicitly available as output properties. Additionally, the NetworkPeering resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- State string
- State for the peering, either
ACTIVE
orINACTIVE
. The peering isACTIVE
when there's a matching configuration in the peer network. - State
Details string - Details about the current state of the peering.
- Id string
- The provider-assigned unique ID for this managed resource.
- State string
- State for the peering, either
ACTIVE
orINACTIVE
. The peering isACTIVE
when there's a matching configuration in the peer network. - State
Details string - Details about the current state of the peering.
- id String
- The provider-assigned unique ID for this managed resource.
- state String
- State for the peering, either
ACTIVE
orINACTIVE
. The peering isACTIVE
when there's a matching configuration in the peer network. - state
Details String - Details about the current state of the peering.
- id string
- The provider-assigned unique ID for this managed resource.
- state string
- State for the peering, either
ACTIVE
orINACTIVE
. The peering isACTIVE
when there's a matching configuration in the peer network. - state
Details string - Details about the current state of the peering.
- id str
- The provider-assigned unique ID for this managed resource.
- state str
- State for the peering, either
ACTIVE
orINACTIVE
. The peering isACTIVE
when there's a matching configuration in the peer network. - state_
details str - Details about the current state of the peering.
- id String
- The provider-assigned unique ID for this managed resource.
- state String
- State for the peering, either
ACTIVE
orINACTIVE
. The peering isACTIVE
when there's a matching configuration in the peer network. - state
Details String - Details about the current state of the peering.
Look up Existing NetworkPeering Resource
Get an existing NetworkPeering 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?: NetworkPeeringState, opts?: CustomResourceOptions): NetworkPeering
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
export_custom_routes: Optional[bool] = None,
export_subnet_routes_with_public_ip: Optional[bool] = None,
import_custom_routes: Optional[bool] = None,
import_subnet_routes_with_public_ip: Optional[bool] = None,
name: Optional[str] = None,
network: Optional[str] = None,
peer_network: Optional[str] = None,
stack_type: Optional[str] = None,
state: Optional[str] = None,
state_details: Optional[str] = None) -> NetworkPeering
func GetNetworkPeering(ctx *Context, name string, id IDInput, state *NetworkPeeringState, opts ...ResourceOption) (*NetworkPeering, error)
public static NetworkPeering Get(string name, Input<string> id, NetworkPeeringState? state, CustomResourceOptions? opts = null)
public static NetworkPeering get(String name, Output<String> id, NetworkPeeringState 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.
- Export
Custom boolRoutes - Whether to export the custom routes to the peer network. Defaults to
false
. - Export
Subnet boolRoutes With Public Ip - Whether subnet routes with public IP range are exported. The default value is true, all subnet routes are exported. The IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always exported to peers and are not controlled by this field.
- Import
Custom boolRoutes - Whether to import the custom routes from the peer network. Defaults to
false
. - Import
Subnet boolRoutes With Public Ip - Whether subnet routes with public IP range are imported. The default value is false. The IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always imported from peers and are not controlled by this field.
- Name string
- Name of the peering.
- Network string
- The primary network of the peering.
- Peer
Network string - The peer network in the peering. The peer network may belong to a different project.
- Stack
Type string - Which IP version(s) of traffic and routes are allowed to be imported or exported between peer networks. The default value is IPV4_ONLY. Possible values: ["IPV4_ONLY", "IPV4_IPV6"].
- State string
- State for the peering, either
ACTIVE
orINACTIVE
. The peering isACTIVE
when there's a matching configuration in the peer network. - State
Details string - Details about the current state of the peering.
- Export
Custom boolRoutes - Whether to export the custom routes to the peer network. Defaults to
false
. - Export
Subnet boolRoutes With Public Ip - Whether subnet routes with public IP range are exported. The default value is true, all subnet routes are exported. The IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always exported to peers and are not controlled by this field.
- Import
Custom boolRoutes - Whether to import the custom routes from the peer network. Defaults to
false
. - Import
Subnet boolRoutes With Public Ip - Whether subnet routes with public IP range are imported. The default value is false. The IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always imported from peers and are not controlled by this field.
- Name string
- Name of the peering.
- Network string
- The primary network of the peering.
- Peer
Network string - The peer network in the peering. The peer network may belong to a different project.
- Stack
Type string - Which IP version(s) of traffic and routes are allowed to be imported or exported between peer networks. The default value is IPV4_ONLY. Possible values: ["IPV4_ONLY", "IPV4_IPV6"].
- State string
- State for the peering, either
ACTIVE
orINACTIVE
. The peering isACTIVE
when there's a matching configuration in the peer network. - State
Details string - Details about the current state of the peering.
- export
Custom BooleanRoutes - Whether to export the custom routes to the peer network. Defaults to
false
. - export
Subnet BooleanRoutes With Public Ip - Whether subnet routes with public IP range are exported. The default value is true, all subnet routes are exported. The IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always exported to peers and are not controlled by this field.
- import
Custom BooleanRoutes - Whether to import the custom routes from the peer network. Defaults to
false
. - import
Subnet BooleanRoutes With Public Ip - Whether subnet routes with public IP range are imported. The default value is false. The IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always imported from peers and are not controlled by this field.
- name String
- Name of the peering.
- network String
- The primary network of the peering.
- peer
Network String - The peer network in the peering. The peer network may belong to a different project.
- stack
Type String - Which IP version(s) of traffic and routes are allowed to be imported or exported between peer networks. The default value is IPV4_ONLY. Possible values: ["IPV4_ONLY", "IPV4_IPV6"].
- state String
- State for the peering, either
ACTIVE
orINACTIVE
. The peering isACTIVE
when there's a matching configuration in the peer network. - state
Details String - Details about the current state of the peering.
- export
Custom booleanRoutes - Whether to export the custom routes to the peer network. Defaults to
false
. - export
Subnet booleanRoutes With Public Ip - Whether subnet routes with public IP range are exported. The default value is true, all subnet routes are exported. The IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always exported to peers and are not controlled by this field.
- import
Custom booleanRoutes - Whether to import the custom routes from the peer network. Defaults to
false
. - import
Subnet booleanRoutes With Public Ip - Whether subnet routes with public IP range are imported. The default value is false. The IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always imported from peers and are not controlled by this field.
- name string
- Name of the peering.
- network string
- The primary network of the peering.
- peer
Network string - The peer network in the peering. The peer network may belong to a different project.
- stack
Type string - Which IP version(s) of traffic and routes are allowed to be imported or exported between peer networks. The default value is IPV4_ONLY. Possible values: ["IPV4_ONLY", "IPV4_IPV6"].
- state string
- State for the peering, either
ACTIVE
orINACTIVE
. The peering isACTIVE
when there's a matching configuration in the peer network. - state
Details string - Details about the current state of the peering.
- export_
custom_ boolroutes - Whether to export the custom routes to the peer network. Defaults to
false
. - export_
subnet_ boolroutes_ with_ public_ ip - Whether subnet routes with public IP range are exported. The default value is true, all subnet routes are exported. The IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always exported to peers and are not controlled by this field.
- import_
custom_ boolroutes - Whether to import the custom routes from the peer network. Defaults to
false
. - import_
subnet_ boolroutes_ with_ public_ ip - Whether subnet routes with public IP range are imported. The default value is false. The IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always imported from peers and are not controlled by this field.
- name str
- Name of the peering.
- network str
- The primary network of the peering.
- peer_
network str - The peer network in the peering. The peer network may belong to a different project.
- stack_
type str - Which IP version(s) of traffic and routes are allowed to be imported or exported between peer networks. The default value is IPV4_ONLY. Possible values: ["IPV4_ONLY", "IPV4_IPV6"].
- state str
- State for the peering, either
ACTIVE
orINACTIVE
. The peering isACTIVE
when there's a matching configuration in the peer network. - state_
details str - Details about the current state of the peering.
- export
Custom BooleanRoutes - Whether to export the custom routes to the peer network. Defaults to
false
. - export
Subnet BooleanRoutes With Public Ip - Whether subnet routes with public IP range are exported. The default value is true, all subnet routes are exported. The IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always exported to peers and are not controlled by this field.
- import
Custom BooleanRoutes - Whether to import the custom routes from the peer network. Defaults to
false
. - import
Subnet BooleanRoutes With Public Ip - Whether subnet routes with public IP range are imported. The default value is false. The IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always imported from peers and are not controlled by this field.
- name String
- Name of the peering.
- network String
- The primary network of the peering.
- peer
Network String - The peer network in the peering. The peer network may belong to a different project.
- stack
Type String - Which IP version(s) of traffic and routes are allowed to be imported or exported between peer networks. The default value is IPV4_ONLY. Possible values: ["IPV4_ONLY", "IPV4_IPV6"].
- state String
- State for the peering, either
ACTIVE
orINACTIVE
. The peering isACTIVE
when there's a matching configuration in the peer network. - state
Details String - Details about the current state of the peering.
Import
VPC network peerings can be imported using the name and project of the primary network the peering exists in and the name of the network peering
{{project_id}}/{{network_id}}/{{peering_id}}
When using the pulumi import
command, VPC network peerings can be imported using one of the formats above. For example:
$ pulumi import gcp:compute/networkPeering:NetworkPeering default {{project_id}}/{{network_id}}/{{peering_id}}
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.