1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. compute
  5. NetworkPeering
Google Cloud Classic v8.10.0 published on Wednesday, Nov 20, 2024 by Pulumi

gcp.compute.NetworkPeering

Explore with Pulumi AI

gcp logo
Google Cloud Classic v8.10.0 published on Wednesday, Nov 20, 2024 by Pulumi

    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.
    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 import 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.
    StackType 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.
    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 import 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.
    StackType 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.
    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 import 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.
    stackType 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.
    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 import 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.
    stackType 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_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 import 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.
    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.
    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 import 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.
    stackType 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 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 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.
    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.

    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.
    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 import 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.
    StackType 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 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 import 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.
    StackType 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 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 import 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.
    stackType 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 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 import 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.
    stackType 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 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 import 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.
    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 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.
    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 import 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.
    stackType 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 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.

    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.
    gcp logo
    Google Cloud Classic v8.10.0 published on Wednesday, Nov 20, 2024 by Pulumi