Show / Hide Table of Contents

Class Network

Manages a VPC network or legacy network resource on GCP.

To get more information about Network, see:

  • API documentation
  • How-to Guides
  • Official Documentation

Example Usage - Network Basic

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var vpcNetwork = new Gcp.Compute.Network("vpcNetwork", new Gcp.Compute.NetworkArgs
    {
    });
}

}
Inheritance
System.Object
Resource
CustomResource
Network
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 Network : CustomResource

Constructors

View Source

Network(String, NetworkArgs, CustomResourceOptions)

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

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

The unique name of the resource

NetworkArgs 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

AutoCreateSubnetworks

When set to true, the network is created in "auto subnet mode" and it will create a subnet for each region automatically across the 10.128.0.0/9 address range. When set to false, the network is created in "custom subnet mode" so the user can explicitly connect subnetwork resources.

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

DeleteDefaultRoutesOnCreate

If set to true, default routes (0.0.0.0/0) will be deleted immediately after network creation. Defaults to false.

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

Description

An optional description of this resource. The resource must be recreated to modify this field.

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

GatewayIpv4

The gateway address for default routing out of the network. This value is selected by GCP.

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

Name

Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

Declaration
public Output<string> Name { 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>
View Source

RoutingMode

The network-wide routing mode to use. If set to REGIONAL, this network's cloud routers will only advertise routes with subnetworks of this network in the same region as the router. If set to GLOBAL, this network's cloud routers will advertise routes with all subnetworks of this network, across regions.

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

SelfLink

The URI of the created resource.

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

Methods

View Source

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

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

Declaration
public static Network Get(string name, Input<string> id, NetworkState 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.

NetworkState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

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