NetworkPeering

Manages a network peering within GCE. For more information see the official documentation and API.

Both network must create a peering with each other for the peering to be functional.

Subnets IP ranges across peered VPC networks cannot overlap.

Create a NetworkPeering Resource

def NetworkPeering(resource_name, opts=None, export_custom_routes=None, export_subnet_routes_with_public_ip=None, import_custom_routes=None, import_subnet_routes_with_public_ip=None, name=None, network=None, peer_network=None, __props__=None);
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.
opts ResourceOptions
A bag of options that control this 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.

NetworkPeering Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The NetworkPeering resource accepts the following input properties:

Network string

The primary network of the peering.

PeerNetwork string

The peer network in the peering. The peer network may belong to a different project.

ExportCustomRoutes bool

Whether to export the custom routes to the peer network. Defaults to false.

ExportSubnetRoutesWithPublicIp bool

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.

ImportCustomRoutes bool

Whether to export the custom routes from the peer network. Defaults to false.

ImportSubnetRoutesWithPublicIp bool

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.

PeerNetwork string

The peer network in the peering. The peer network may belong to a different project.

ExportCustomRoutes bool

Whether to export the custom routes to the peer network. Defaults to false.

ExportSubnetRoutesWithPublicIp bool

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.

ImportCustomRoutes bool

Whether to export the custom routes from the peer network. Defaults to false.

ImportSubnetRoutesWithPublicIp bool

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.

peerNetwork string

The peer network in the peering. The peer network may belong to a different project.

exportCustomRoutes boolean

Whether to export the custom routes to the peer network. Defaults to false.

exportSubnetRoutesWithPublicIp boolean

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.

importCustomRoutes boolean

Whether to export the custom routes from the peer network. Defaults to false.

importSubnetRoutesWithPublicIp boolean

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 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_routes bool

Whether to export the custom routes to the peer network. Defaults to false.

export_subnet_routes_with_public_ip bool

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_routes bool

Whether to export the custom routes from the peer network. Defaults to false.

import_subnet_routes_with_public_ip bool

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.

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 or INACTIVE. The peering is ACTIVE when there’s a matching configuration in the peer network.

StateDetails 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 or INACTIVE. The peering is ACTIVE when there’s a matching configuration in the peer network.

StateDetails 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 or INACTIVE. The peering is ACTIVE when there’s a matching configuration in the peer network.

stateDetails 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 or INACTIVE. The peering is ACTIVE when there’s a matching configuration in the peer network.

state_details str

Details about the current state of the peering.

Look up an 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
static get(resource_name, id, opts=None, export_custom_routes=None, export_subnet_routes_with_public_ip=None, import_custom_routes=None, import_subnet_routes_with_public_ip=None, name=None, network=None, peer_network=None, state=None, state_details=None, __props__=None);
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)
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.

The following state arguments are supported:

ExportCustomRoutes bool

Whether to export the custom routes to the peer network. Defaults to false.

ExportSubnetRoutesWithPublicIp bool

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.

ImportCustomRoutes bool

Whether to export the custom routes from the peer network. Defaults to false.

ImportSubnetRoutesWithPublicIp bool

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.

PeerNetwork string

The peer network in the peering. The peer network may belong to a different project.

State string

State for the peering, either ACTIVE or INACTIVE. The peering is ACTIVE when there’s a matching configuration in the peer network.

StateDetails string

Details about the current state of the peering.

ExportCustomRoutes bool

Whether to export the custom routes to the peer network. Defaults to false.

ExportSubnetRoutesWithPublicIp bool

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.

ImportCustomRoutes bool

Whether to export the custom routes from the peer network. Defaults to false.

ImportSubnetRoutesWithPublicIp bool

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.

PeerNetwork string

The peer network in the peering. The peer network may belong to a different project.

State string

State for the peering, either ACTIVE or INACTIVE. The peering is ACTIVE when there’s a matching configuration in the peer network.

StateDetails string

Details about the current state of the peering.

exportCustomRoutes boolean

Whether to export the custom routes to the peer network. Defaults to false.

exportSubnetRoutesWithPublicIp boolean

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.

importCustomRoutes boolean

Whether to export the custom routes from the peer network. Defaults to false.

importSubnetRoutesWithPublicIp boolean

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.

peerNetwork string

The peer network in the peering. The peer network may belong to a different project.

state string

State for the peering, either ACTIVE or INACTIVE. The peering is ACTIVE when there’s a matching configuration in the peer network.

stateDetails string

Details about the current state of the peering.

export_custom_routes bool

Whether to export the custom routes to the peer network. Defaults to false.

export_subnet_routes_with_public_ip bool

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_routes bool

Whether to export the custom routes from the peer network. Defaults to false.

import_subnet_routes_with_public_ip bool

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.

state str

State for the peering, either ACTIVE or INACTIVE. The peering is ACTIVE when there’s a matching configuration in the peer network.

state_details str

Details about the current state of the peering.

Package Details

Repository
https://github.com/pulumi/pulumi-gcp
License
Apache-2.0
Notes
This Pulumi package is based on the google-beta Terraform Provider.