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
new NetworkPeering(name: string, args: NetworkPeeringArgs, opts?: CustomResourceOptions);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);func NewNetworkPeering(ctx *Context, name string, args NetworkPeeringArgs, opts ...ResourceOption) (*NetworkPeering, error)public NetworkPeering(string name, NetworkPeeringArgs args, CustomResourceOptions? opts = null)- 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.
- 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 export 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.
- 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 export 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.
- 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 export 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 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 export 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.
Outputs
All input properties are implicitly available as output properties. Additionally, the NetworkPeering resource produces the following output properties:
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): NetworkPeeringstatic 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:
- 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 export 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.
- State string
State for the peering, either
ACTIVEorINACTIVE. The peering isACTIVEwhen 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 export 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.
- State string
State for the peering, either
ACTIVEorINACTIVE. The peering isACTIVEwhen 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 export 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.
- state string
State for the peering, either
ACTIVEorINACTIVE. The peering isACTIVEwhen 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 export 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.
- state str
State for the peering, either
ACTIVEorINACTIVE. The peering isACTIVEwhen 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-betaTerraform Provider.