1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. compute
  5. NetworkPeering
Google Cloud Classic v7.2.1 published on Wednesday, Nov 22, 2023 by Pulumi

gcp.compute.NetworkPeering

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.2.1 published on Wednesday, Nov 22, 2023 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

    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()
        {
            AutoCreateSubnetworks = false,
        });
    
        var other = new Gcp.Compute.Network("other", new()
        {
            AutoCreateSubnetworks = false,
        });
    
        var peering1 = new Gcp.Compute.NetworkPeering("peering1", new()
        {
            Network = @default.SelfLink,
            PeerNetwork = other.SelfLink,
        });
    
        var peering2 = new Gcp.Compute.NetworkPeering("peering2", new()
        {
            Network = other.SelfLink,
            PeerNetwork = @default.SelfLink,
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/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{
    			AutoCreateSubnetworks: pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		other, err := compute.NewNetwork(ctx, "other", &compute.NetworkArgs{
    			AutoCreateSubnetworks: pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = compute.NewNetworkPeering(ctx, "peering1", &compute.NetworkPeeringArgs{
    			Network:     _default.SelfLink,
    			PeerNetwork: other.SelfLink,
    		})
    		if err != nil {
    			return err
    		}
    		_, err = compute.NewNetworkPeering(ctx, "peering2", &compute.NetworkPeeringArgs{
    			Network:     other.SelfLink,
    			PeerNetwork: _default.SelfLink,
    		})
    		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.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()        
                .autoCreateSubnetworks("false")
                .build());
    
            var other = new Network("other", NetworkArgs.builder()        
                .autoCreateSubnetworks("false")
                .build());
    
            var peering1 = new NetworkPeering("peering1", NetworkPeeringArgs.builder()        
                .network(default_.selfLink())
                .peerNetwork(other.selfLink())
                .build());
    
            var peering2 = new NetworkPeering("peering2", NetworkPeeringArgs.builder()        
                .network(other.selfLink())
                .peerNetwork(default_.selfLink())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_gcp as gcp
    
    default = gcp.compute.Network("default", auto_create_subnetworks=False)
    other = gcp.compute.Network("other", auto_create_subnetworks=False)
    peering1 = gcp.compute.NetworkPeering("peering1",
        network=default.self_link,
        peer_network=other.self_link)
    peering2 = gcp.compute.NetworkPeering("peering2",
        network=other.self_link,
        peer_network=default.self_link)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const _default = new gcp.compute.Network("default", {autoCreateSubnetworks: false});
    const other = new gcp.compute.Network("other", {autoCreateSubnetworks: false});
    const peering1 = new gcp.compute.NetworkPeering("peering1", {
        network: _default.selfLink,
        peerNetwork: other.selfLink,
    });
    const peering2 = new gcp.compute.NetworkPeering("peering2", {
        network: other.selfLink,
        peerNetwork: _default.selfLink,
    });
    
    resources:
      peering1:
        type: gcp:compute:NetworkPeering
        properties:
          network: ${default.selfLink}
          peerNetwork: ${other.selfLink}
      peering2:
        type: gcp:compute:NetworkPeering
        properties:
          network: ${other.selfLink}
          peerNetwork: ${default.selfLink}
      default:
        type: gcp:compute:Network
        properties:
          autoCreateSubnetworks: 'false'
      other:
        type: gcp:compute:Network
        properties:
          autoCreateSubnetworks: 'false'
    

    Create NetworkPeering Resource

    new NetworkPeering(name: string, args: NetworkPeeringArgs, opts?: CustomResourceOptions);
    @overload
    def NetworkPeering(resource_name: 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)
    @overload
    def NetworkPeering(resource_name: str,
                       args: NetworkPeeringArgs,
                       opts: Optional[ResourceOptions] = 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.
    
    
    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.

    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

    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}} In Terraform v1.5.0 and later, use an import block to import VPC network peerings using one of the formats above. For exampletf import {

    id = “{{project_id}}/{{network_id}}/{{peering_id}}”

    to = google_compute_network_peering.default }

     $ pulumi import gcp:compute/networkPeering:NetworkPeering When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), 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}}
    

    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 v7.2.1 published on Wednesday, Nov 22, 2023 by Pulumi