Show / Hide Table of Contents

Class NetworkPeeringRoutesConfig

Manage a network peering's route settings without managing the peering as a whole. This resource is primarily intended for use with GCP-generated peerings that shouldn't otherwise be managed by other tools. Deleting this resource is a no-op and the peering will not be modified.

To get more information about NetworkPeeringRoutesConfig, see:

  • API documentation
  • How-to Guides
  • Official Documentation

Example Usage - Network Peering Routes Config Basic

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var networkPrimary = new Gcp.Compute.Network("networkPrimary", new Gcp.Compute.NetworkArgs
    {
        AutoCreateSubnetworks = "false",
    });
    var networkSecondary = new Gcp.Compute.Network("networkSecondary", new Gcp.Compute.NetworkArgs
    {
        AutoCreateSubnetworks = "false",
    });
    var peeringPrimary = new Gcp.Compute.NetworkPeering("peeringPrimary", new Gcp.Compute.NetworkPeeringArgs
    {
        Network = networkPrimary.Id,
        PeerNetwork = networkSecondary.Id,
        ImportCustomRoutes = true,
        ExportCustomRoutes = true,
    });
    var peeringPrimaryRoutes = new Gcp.Compute.NetworkPeeringRoutesConfig("peeringPrimaryRoutes", new Gcp.Compute.NetworkPeeringRoutesConfigArgs
    {
        Peering = peeringPrimary.Name,
        Network = networkPrimary.Name,
        ImportCustomRoutes = true,
        ExportCustomRoutes = true,
    });
    var peeringSecondary = new Gcp.Compute.NetworkPeering("peeringSecondary", new Gcp.Compute.NetworkPeeringArgs
    {
        Network = networkSecondary.Id,
        PeerNetwork = networkPrimary.Id,
    });
}

}
Inheritance
System.Object
Resource
CustomResource
NetworkPeeringRoutesConfig
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Gcp.Compute
Assembly: Pulumi.Gcp.dll
Syntax
public class NetworkPeeringRoutesConfig : CustomResource

Constructors

View Source

NetworkPeeringRoutesConfig(String, NetworkPeeringRoutesConfigArgs, CustomResourceOptions)

Create a NetworkPeeringRoutesConfig resource with the given unique name, arguments, and options.

Declaration
public NetworkPeeringRoutesConfig(string name, NetworkPeeringRoutesConfigArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

NetworkPeeringRoutesConfigArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

ExportCustomRoutes

Whether to export the custom routes to the peer network.

Declaration
public Output<bool> ExportCustomRoutes { get; }
Property Value
Type Description
Output<System.Boolean>
View Source

ImportCustomRoutes

Whether to import the custom routes to the peer network.

Declaration
public Output<bool> ImportCustomRoutes { get; }
Property Value
Type Description
Output<System.Boolean>
View Source

Network

The name of the primary network for the peering.

Declaration
public Output<string> Network { get; }
Property Value
Type Description
Output<System.String>
View Source

Peering

Name of the peering.

Declaration
public Output<string> Peering { get; }
Property Value
Type Description
Output<System.String>
View Source

Project

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Declaration
public Output<string> Project { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, NetworkPeeringRoutesConfigState, CustomResourceOptions)

Get an existing NetworkPeeringRoutesConfig resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static NetworkPeeringRoutesConfig Get(string name, Input<string> id, NetworkPeeringRoutesConfigState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

NetworkPeeringRoutesConfigState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
NetworkPeeringRoutesConfig
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.