1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. compute
  5. Network
Google Cloud v8.23.0 published on Monday, Mar 24, 2025 by Pulumi

gcp.compute.Network

Explore with Pulumi AI

Manages a VPC network or legacy network resource on GCP.

To get more information about Network, see:

Example Usage

Network Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const vpcNetwork = new gcp.compute.Network("vpc_network", {name: "vpc-network"});
Copy
import pulumi
import pulumi_gcp as gcp

vpc_network = gcp.compute.Network("vpc_network", name="vpc-network")
Copy
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, "vpc_network", &compute.NetworkArgs{
			Name: pulumi.String("vpc-network"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var vpcNetwork = new Gcp.Compute.Network("vpc_network", new()
    {
        Name = "vpc-network",
    });

});
Copy
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 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 vpcNetwork = new Network("vpcNetwork", NetworkArgs.builder()
            .name("vpc-network")
            .build());

    }
}
Copy
resources:
  vpcNetwork:
    type: gcp:compute:Network
    name: vpc_network
    properties:
      name: vpc-network
Copy

Network Custom Mtu

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const vpcNetwork = new gcp.compute.Network("vpc_network", {
    project: "my-project-name",
    name: "vpc-network",
    autoCreateSubnetworks: true,
    mtu: 1460,
});
Copy
import pulumi
import pulumi_gcp as gcp

vpc_network = gcp.compute.Network("vpc_network",
    project="my-project-name",
    name="vpc-network",
    auto_create_subnetworks=True,
    mtu=1460)
Copy
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, "vpc_network", &compute.NetworkArgs{
			Project:               pulumi.String("my-project-name"),
			Name:                  pulumi.String("vpc-network"),
			AutoCreateSubnetworks: pulumi.Bool(true),
			Mtu:                   pulumi.Int(1460),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var vpcNetwork = new Gcp.Compute.Network("vpc_network", new()
    {
        Project = "my-project-name",
        Name = "vpc-network",
        AutoCreateSubnetworks = true,
        Mtu = 1460,
    });

});
Copy
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 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 vpcNetwork = new Network("vpcNetwork", NetworkArgs.builder()
            .project("my-project-name")
            .name("vpc-network")
            .autoCreateSubnetworks(true)
            .mtu(1460)
            .build());

    }
}
Copy
resources:
  vpcNetwork:
    type: gcp:compute:Network
    name: vpc_network
    properties:
      project: my-project-name
      name: vpc-network
      autoCreateSubnetworks: true
      mtu: 1460
Copy

Network Custom Firewall Enforcement Order

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const vpcNetwork = new gcp.compute.Network("vpc_network", {
    project: "my-project-name",
    name: "vpc-network",
    autoCreateSubnetworks: true,
    networkFirewallPolicyEnforcementOrder: "BEFORE_CLASSIC_FIREWALL",
});
Copy
import pulumi
import pulumi_gcp as gcp

vpc_network = gcp.compute.Network("vpc_network",
    project="my-project-name",
    name="vpc-network",
    auto_create_subnetworks=True,
    network_firewall_policy_enforcement_order="BEFORE_CLASSIC_FIREWALL")
Copy
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, "vpc_network", &compute.NetworkArgs{
			Project:                               pulumi.String("my-project-name"),
			Name:                                  pulumi.String("vpc-network"),
			AutoCreateSubnetworks:                 pulumi.Bool(true),
			NetworkFirewallPolicyEnforcementOrder: pulumi.String("BEFORE_CLASSIC_FIREWALL"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var vpcNetwork = new Gcp.Compute.Network("vpc_network", new()
    {
        Project = "my-project-name",
        Name = "vpc-network",
        AutoCreateSubnetworks = true,
        NetworkFirewallPolicyEnforcementOrder = "BEFORE_CLASSIC_FIREWALL",
    });

});
Copy
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 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 vpcNetwork = new Network("vpcNetwork", NetworkArgs.builder()
            .project("my-project-name")
            .name("vpc-network")
            .autoCreateSubnetworks(true)
            .networkFirewallPolicyEnforcementOrder("BEFORE_CLASSIC_FIREWALL")
            .build());

    }
}
Copy
resources:
  vpcNetwork:
    type: gcp:compute:Network
    name: vpc_network
    properties:
      project: my-project-name
      name: vpc-network
      autoCreateSubnetworks: true
      networkFirewallPolicyEnforcementOrder: BEFORE_CLASSIC_FIREWALL
Copy

Network Bgp Best Path Selection Mode

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const vpcNetwork = new gcp.compute.Network("vpc_network", {
    project: "my-project-name",
    name: "vpc-network",
    routingMode: "GLOBAL",
});
Copy
import pulumi
import pulumi_gcp as gcp

vpc_network = gcp.compute.Network("vpc_network",
    project="my-project-name",
    name="vpc-network",
    routing_mode="GLOBAL")
Copy
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, "vpc_network", &compute.NetworkArgs{
			Project:     pulumi.String("my-project-name"),
			Name:        pulumi.String("vpc-network"),
			RoutingMode: pulumi.String("GLOBAL"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var vpcNetwork = new Gcp.Compute.Network("vpc_network", new()
    {
        Project = "my-project-name",
        Name = "vpc-network",
        RoutingMode = "GLOBAL",
    });

});
Copy
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 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 vpcNetwork = new Network("vpcNetwork", NetworkArgs.builder()
            .project("my-project-name")
            .name("vpc-network")
            .routingMode("GLOBAL")
            .build());

    }
}
Copy
resources:
  vpcNetwork:
    type: gcp:compute:Network
    name: vpc_network
    properties:
      project: my-project-name
      name: vpc-network
      routingMode: GLOBAL
Copy

Network Bgp Best Path Selection Mode Standard

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const vpcNetwork = new gcp.compute.Network("vpc_network", {
    project: "my-project-name",
    name: "vpc-network",
    routingMode: "GLOBAL",
    bgpBestPathSelectionMode: "STANDARD",
});
Copy
import pulumi
import pulumi_gcp as gcp

vpc_network = gcp.compute.Network("vpc_network",
    project="my-project-name",
    name="vpc-network",
    routing_mode="GLOBAL",
    bgp_best_path_selection_mode="STANDARD")
Copy
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, "vpc_network", &compute.NetworkArgs{
			Project:                  pulumi.String("my-project-name"),
			Name:                     pulumi.String("vpc-network"),
			RoutingMode:              pulumi.String("GLOBAL"),
			BgpBestPathSelectionMode: pulumi.String("STANDARD"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var vpcNetwork = new Gcp.Compute.Network("vpc_network", new()
    {
        Project = "my-project-name",
        Name = "vpc-network",
        RoutingMode = "GLOBAL",
        BgpBestPathSelectionMode = "STANDARD",
    });

});
Copy
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 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 vpcNetwork = new Network("vpcNetwork", NetworkArgs.builder()
            .project("my-project-name")
            .name("vpc-network")
            .routingMode("GLOBAL")
            .bgpBestPathSelectionMode("STANDARD")
            .build());

    }
}
Copy
resources:
  vpcNetwork:
    type: gcp:compute:Network
    name: vpc_network
    properties:
      project: my-project-name
      name: vpc-network
      routingMode: GLOBAL
      bgpBestPathSelectionMode: STANDARD
Copy

Network Bgp Best Path Selection Mode Standard Custom Fields

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const vpcNetwork = new gcp.compute.Network("vpc_network", {
    project: "my-project-name",
    name: "vpc-network",
    routingMode: "GLOBAL",
    bgpBestPathSelectionMode: "STANDARD",
    bgpAlwaysCompareMed: true,
    bgpInterRegionCost: "ADD_COST_TO_MED",
});
Copy
import pulumi
import pulumi_gcp as gcp

vpc_network = gcp.compute.Network("vpc_network",
    project="my-project-name",
    name="vpc-network",
    routing_mode="GLOBAL",
    bgp_best_path_selection_mode="STANDARD",
    bgp_always_compare_med=True,
    bgp_inter_region_cost="ADD_COST_TO_MED")
Copy
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, "vpc_network", &compute.NetworkArgs{
			Project:                  pulumi.String("my-project-name"),
			Name:                     pulumi.String("vpc-network"),
			RoutingMode:              pulumi.String("GLOBAL"),
			BgpBestPathSelectionMode: pulumi.String("STANDARD"),
			BgpAlwaysCompareMed:      pulumi.Bool(true),
			BgpInterRegionCost:       pulumi.String("ADD_COST_TO_MED"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var vpcNetwork = new Gcp.Compute.Network("vpc_network", new()
    {
        Project = "my-project-name",
        Name = "vpc-network",
        RoutingMode = "GLOBAL",
        BgpBestPathSelectionMode = "STANDARD",
        BgpAlwaysCompareMed = true,
        BgpInterRegionCost = "ADD_COST_TO_MED",
    });

});
Copy
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 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 vpcNetwork = new Network("vpcNetwork", NetworkArgs.builder()
            .project("my-project-name")
            .name("vpc-network")
            .routingMode("GLOBAL")
            .bgpBestPathSelectionMode("STANDARD")
            .bgpAlwaysCompareMed(true)
            .bgpInterRegionCost("ADD_COST_TO_MED")
            .build());

    }
}
Copy
resources:
  vpcNetwork:
    type: gcp:compute:Network
    name: vpc_network
    properties:
      project: my-project-name
      name: vpc-network
      routingMode: GLOBAL
      bgpBestPathSelectionMode: STANDARD
      bgpAlwaysCompareMed: true
      bgpInterRegionCost: ADD_COST_TO_MED
Copy

Create Network Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Network(name: string, args?: NetworkArgs, opts?: CustomResourceOptions);
@overload
def Network(resource_name: str,
            args: Optional[NetworkArgs] = None,
            opts: Optional[ResourceOptions] = None)

@overload
def Network(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            auto_create_subnetworks: Optional[bool] = None,
            bgp_always_compare_med: Optional[bool] = None,
            bgp_best_path_selection_mode: Optional[str] = None,
            bgp_inter_region_cost: Optional[str] = None,
            delete_default_routes_on_create: Optional[bool] = None,
            description: Optional[str] = None,
            enable_ula_internal_ipv6: Optional[bool] = None,
            internal_ipv6_range: Optional[str] = None,
            mtu: Optional[int] = None,
            name: Optional[str] = None,
            network_firewall_policy_enforcement_order: Optional[str] = None,
            network_profile: Optional[str] = None,
            project: Optional[str] = None,
            routing_mode: Optional[str] = None)
func NewNetwork(ctx *Context, name string, args *NetworkArgs, opts ...ResourceOption) (*Network, error)
public Network(string name, NetworkArgs? args = null, CustomResourceOptions? opts = null)
public Network(String name, NetworkArgs args)
public Network(String name, NetworkArgs args, CustomResourceOptions options)
type: gcp:compute:Network
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args NetworkArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args NetworkArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args NetworkArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args NetworkArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. NetworkArgs
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 networkResource = new Gcp.Compute.Network("networkResource", new()
{
    AutoCreateSubnetworks = false,
    BgpAlwaysCompareMed = false,
    BgpBestPathSelectionMode = "string",
    BgpInterRegionCost = "string",
    DeleteDefaultRoutesOnCreate = false,
    Description = "string",
    EnableUlaInternalIpv6 = false,
    InternalIpv6Range = "string",
    Mtu = 0,
    Name = "string",
    NetworkFirewallPolicyEnforcementOrder = "string",
    NetworkProfile = "string",
    Project = "string",
    RoutingMode = "string",
});
Copy
example, err := compute.NewNetwork(ctx, "networkResource", &compute.NetworkArgs{
	AutoCreateSubnetworks:                 pulumi.Bool(false),
	BgpAlwaysCompareMed:                   pulumi.Bool(false),
	BgpBestPathSelectionMode:              pulumi.String("string"),
	BgpInterRegionCost:                    pulumi.String("string"),
	DeleteDefaultRoutesOnCreate:           pulumi.Bool(false),
	Description:                           pulumi.String("string"),
	EnableUlaInternalIpv6:                 pulumi.Bool(false),
	InternalIpv6Range:                     pulumi.String("string"),
	Mtu:                                   pulumi.Int(0),
	Name:                                  pulumi.String("string"),
	NetworkFirewallPolicyEnforcementOrder: pulumi.String("string"),
	NetworkProfile:                        pulumi.String("string"),
	Project:                               pulumi.String("string"),
	RoutingMode:                           pulumi.String("string"),
})
Copy
var networkResource = new Network("networkResource", NetworkArgs.builder()
    .autoCreateSubnetworks(false)
    .bgpAlwaysCompareMed(false)
    .bgpBestPathSelectionMode("string")
    .bgpInterRegionCost("string")
    .deleteDefaultRoutesOnCreate(false)
    .description("string")
    .enableUlaInternalIpv6(false)
    .internalIpv6Range("string")
    .mtu(0)
    .name("string")
    .networkFirewallPolicyEnforcementOrder("string")
    .networkProfile("string")
    .project("string")
    .routingMode("string")
    .build());
Copy
network_resource = gcp.compute.Network("networkResource",
    auto_create_subnetworks=False,
    bgp_always_compare_med=False,
    bgp_best_path_selection_mode="string",
    bgp_inter_region_cost="string",
    delete_default_routes_on_create=False,
    description="string",
    enable_ula_internal_ipv6=False,
    internal_ipv6_range="string",
    mtu=0,
    name="string",
    network_firewall_policy_enforcement_order="string",
    network_profile="string",
    project="string",
    routing_mode="string")
Copy
const networkResource = new gcp.compute.Network("networkResource", {
    autoCreateSubnetworks: false,
    bgpAlwaysCompareMed: false,
    bgpBestPathSelectionMode: "string",
    bgpInterRegionCost: "string",
    deleteDefaultRoutesOnCreate: false,
    description: "string",
    enableUlaInternalIpv6: false,
    internalIpv6Range: "string",
    mtu: 0,
    name: "string",
    networkFirewallPolicyEnforcementOrder: "string",
    networkProfile: "string",
    project: "string",
    routingMode: "string",
});
Copy
type: gcp:compute:Network
properties:
    autoCreateSubnetworks: false
    bgpAlwaysCompareMed: false
    bgpBestPathSelectionMode: string
    bgpInterRegionCost: string
    deleteDefaultRoutesOnCreate: false
    description: string
    enableUlaInternalIpv6: false
    internalIpv6Range: string
    mtu: 0
    name: string
    networkFirewallPolicyEnforcementOrder: string
    networkProfile: string
    project: string
    routingMode: string
Copy

Network 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 Network resource accepts the following input properties:

AutoCreateSubnetworks Changes to this property will trigger replacement. bool
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.
BgpAlwaysCompareMed bool
Enables/disables the comparison of MED across routes with different Neighbor ASNs. This value can only be set if the --bgp-best-path-selection-mode is STANDARD
BgpBestPathSelectionMode string
The BGP best selection algorithm to be employed. MODE can be LEGACY or STANDARD. Possible values are: LEGACY, STANDARD.
BgpInterRegionCost string
Choice of the behavior of inter-regional cost and MED in the BPS algorithm. Possible values are: DEFAULT, ADD_COST_TO_MED.
DeleteDefaultRoutesOnCreate bool
If set to true, default routes (0.0.0.0/0) will be deleted immediately after network creation. Defaults to false.
Description Changes to this property will trigger replacement. string
An optional description of this resource. The resource must be recreated to modify this field.
EnableUlaInternalIpv6 Changes to this property will trigger replacement. bool
Enable ULA internal ipv6 on this network. Enabling this feature will assign a /48 from google defined ULA prefix fd20::/20.
InternalIpv6Range Changes to this property will trigger replacement. string
When enabling ula internal ipv6, caller optionally can specify the /48 range they want from the google defined ULA prefix fd20::/20. The input must be a valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will fail if the speficied /48 is already in used by another resource. If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field.
Mtu Changes to this property will trigger replacement. int
Maximum Transmission Unit in bytes. The default value is 1460 bytes. The minimum value for this field is 1300 and the maximum value is 8896 bytes (jumbo frames). Note that packets larger than 1500 bytes (standard Ethernet) can be subject to TCP-MSS clamping or dropped with an ICMP Fragmentation-Needed message if the packets are routed to the Internet or other VPCs with varying MTUs.
Name Changes to this property will trigger replacement. string
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.


NetworkFirewallPolicyEnforcementOrder string
Set the order that Firewall Rules and Firewall Policies are evaluated. Default value is AFTER_CLASSIC_FIREWALL. Possible values are: BEFORE_CLASSIC_FIREWALL, AFTER_CLASSIC_FIREWALL.
NetworkProfile Changes to this property will trigger replacement. string
A full or partial URL of the network profile to apply to this network. This field can be set only at resource creation time. For example, the following are valid URLs:

  • https://www.googleapis.com/compute/v1/projects/{projectId}/global/networkProfiles/{network_profile_name}
  • projects/{projectId}/global/networkProfiles/{network_profile_name}
Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
RoutingMode string
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. Possible values are: REGIONAL, GLOBAL.
AutoCreateSubnetworks Changes to this property will trigger replacement. bool
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.
BgpAlwaysCompareMed bool
Enables/disables the comparison of MED across routes with different Neighbor ASNs. This value can only be set if the --bgp-best-path-selection-mode is STANDARD
BgpBestPathSelectionMode string
The BGP best selection algorithm to be employed. MODE can be LEGACY or STANDARD. Possible values are: LEGACY, STANDARD.
BgpInterRegionCost string
Choice of the behavior of inter-regional cost and MED in the BPS algorithm. Possible values are: DEFAULT, ADD_COST_TO_MED.
DeleteDefaultRoutesOnCreate bool
If set to true, default routes (0.0.0.0/0) will be deleted immediately after network creation. Defaults to false.
Description Changes to this property will trigger replacement. string
An optional description of this resource. The resource must be recreated to modify this field.
EnableUlaInternalIpv6 Changes to this property will trigger replacement. bool
Enable ULA internal ipv6 on this network. Enabling this feature will assign a /48 from google defined ULA prefix fd20::/20.
InternalIpv6Range Changes to this property will trigger replacement. string
When enabling ula internal ipv6, caller optionally can specify the /48 range they want from the google defined ULA prefix fd20::/20. The input must be a valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will fail if the speficied /48 is already in used by another resource. If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field.
Mtu Changes to this property will trigger replacement. int
Maximum Transmission Unit in bytes. The default value is 1460 bytes. The minimum value for this field is 1300 and the maximum value is 8896 bytes (jumbo frames). Note that packets larger than 1500 bytes (standard Ethernet) can be subject to TCP-MSS clamping or dropped with an ICMP Fragmentation-Needed message if the packets are routed to the Internet or other VPCs with varying MTUs.
Name Changes to this property will trigger replacement. string
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.


NetworkFirewallPolicyEnforcementOrder string
Set the order that Firewall Rules and Firewall Policies are evaluated. Default value is AFTER_CLASSIC_FIREWALL. Possible values are: BEFORE_CLASSIC_FIREWALL, AFTER_CLASSIC_FIREWALL.
NetworkProfile Changes to this property will trigger replacement. string
A full or partial URL of the network profile to apply to this network. This field can be set only at resource creation time. For example, the following are valid URLs:

  • https://www.googleapis.com/compute/v1/projects/{projectId}/global/networkProfiles/{network_profile_name}
  • projects/{projectId}/global/networkProfiles/{network_profile_name}
Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
RoutingMode string
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. Possible values are: REGIONAL, GLOBAL.
autoCreateSubnetworks Changes to this property will trigger replacement. Boolean
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.
bgpAlwaysCompareMed Boolean
Enables/disables the comparison of MED across routes with different Neighbor ASNs. This value can only be set if the --bgp-best-path-selection-mode is STANDARD
bgpBestPathSelectionMode String
The BGP best selection algorithm to be employed. MODE can be LEGACY or STANDARD. Possible values are: LEGACY, STANDARD.
bgpInterRegionCost String
Choice of the behavior of inter-regional cost and MED in the BPS algorithm. Possible values are: DEFAULT, ADD_COST_TO_MED.
deleteDefaultRoutesOnCreate Boolean
If set to true, default routes (0.0.0.0/0) will be deleted immediately after network creation. Defaults to false.
description Changes to this property will trigger replacement. String
An optional description of this resource. The resource must be recreated to modify this field.
enableUlaInternalIpv6 Changes to this property will trigger replacement. Boolean
Enable ULA internal ipv6 on this network. Enabling this feature will assign a /48 from google defined ULA prefix fd20::/20.
internalIpv6Range Changes to this property will trigger replacement. String
When enabling ula internal ipv6, caller optionally can specify the /48 range they want from the google defined ULA prefix fd20::/20. The input must be a valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will fail if the speficied /48 is already in used by another resource. If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field.
mtu Changes to this property will trigger replacement. Integer
Maximum Transmission Unit in bytes. The default value is 1460 bytes. The minimum value for this field is 1300 and the maximum value is 8896 bytes (jumbo frames). Note that packets larger than 1500 bytes (standard Ethernet) can be subject to TCP-MSS clamping or dropped with an ICMP Fragmentation-Needed message if the packets are routed to the Internet or other VPCs with varying MTUs.
name Changes to this property will trigger replacement. String
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.


networkFirewallPolicyEnforcementOrder String
Set the order that Firewall Rules and Firewall Policies are evaluated. Default value is AFTER_CLASSIC_FIREWALL. Possible values are: BEFORE_CLASSIC_FIREWALL, AFTER_CLASSIC_FIREWALL.
networkProfile Changes to this property will trigger replacement. String
A full or partial URL of the network profile to apply to this network. This field can be set only at resource creation time. For example, the following are valid URLs:

  • https://www.googleapis.com/compute/v1/projects/{projectId}/global/networkProfiles/{network_profile_name}
  • projects/{projectId}/global/networkProfiles/{network_profile_name}
project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
routingMode String
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. Possible values are: REGIONAL, GLOBAL.
autoCreateSubnetworks Changes to this property will trigger replacement. boolean
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.
bgpAlwaysCompareMed boolean
Enables/disables the comparison of MED across routes with different Neighbor ASNs. This value can only be set if the --bgp-best-path-selection-mode is STANDARD
bgpBestPathSelectionMode string
The BGP best selection algorithm to be employed. MODE can be LEGACY or STANDARD. Possible values are: LEGACY, STANDARD.
bgpInterRegionCost string
Choice of the behavior of inter-regional cost and MED in the BPS algorithm. Possible values are: DEFAULT, ADD_COST_TO_MED.
deleteDefaultRoutesOnCreate boolean
If set to true, default routes (0.0.0.0/0) will be deleted immediately after network creation. Defaults to false.
description Changes to this property will trigger replacement. string
An optional description of this resource. The resource must be recreated to modify this field.
enableUlaInternalIpv6 Changes to this property will trigger replacement. boolean
Enable ULA internal ipv6 on this network. Enabling this feature will assign a /48 from google defined ULA prefix fd20::/20.
internalIpv6Range Changes to this property will trigger replacement. string
When enabling ula internal ipv6, caller optionally can specify the /48 range they want from the google defined ULA prefix fd20::/20. The input must be a valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will fail if the speficied /48 is already in used by another resource. If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field.
mtu Changes to this property will trigger replacement. number
Maximum Transmission Unit in bytes. The default value is 1460 bytes. The minimum value for this field is 1300 and the maximum value is 8896 bytes (jumbo frames). Note that packets larger than 1500 bytes (standard Ethernet) can be subject to TCP-MSS clamping or dropped with an ICMP Fragmentation-Needed message if the packets are routed to the Internet or other VPCs with varying MTUs.
name Changes to this property will trigger replacement. string
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.


networkFirewallPolicyEnforcementOrder string
Set the order that Firewall Rules and Firewall Policies are evaluated. Default value is AFTER_CLASSIC_FIREWALL. Possible values are: BEFORE_CLASSIC_FIREWALL, AFTER_CLASSIC_FIREWALL.
networkProfile Changes to this property will trigger replacement. string
A full or partial URL of the network profile to apply to this network. This field can be set only at resource creation time. For example, the following are valid URLs:

  • https://www.googleapis.com/compute/v1/projects/{projectId}/global/networkProfiles/{network_profile_name}
  • projects/{projectId}/global/networkProfiles/{network_profile_name}
project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
routingMode string
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. Possible values are: REGIONAL, GLOBAL.
auto_create_subnetworks Changes to this property will trigger replacement. bool
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.
bgp_always_compare_med bool
Enables/disables the comparison of MED across routes with different Neighbor ASNs. This value can only be set if the --bgp-best-path-selection-mode is STANDARD
bgp_best_path_selection_mode str
The BGP best selection algorithm to be employed. MODE can be LEGACY or STANDARD. Possible values are: LEGACY, STANDARD.
bgp_inter_region_cost str
Choice of the behavior of inter-regional cost and MED in the BPS algorithm. Possible values are: DEFAULT, ADD_COST_TO_MED.
delete_default_routes_on_create bool
If set to true, default routes (0.0.0.0/0) will be deleted immediately after network creation. Defaults to false.
description Changes to this property will trigger replacement. str
An optional description of this resource. The resource must be recreated to modify this field.
enable_ula_internal_ipv6 Changes to this property will trigger replacement. bool
Enable ULA internal ipv6 on this network. Enabling this feature will assign a /48 from google defined ULA prefix fd20::/20.
internal_ipv6_range Changes to this property will trigger replacement. str
When enabling ula internal ipv6, caller optionally can specify the /48 range they want from the google defined ULA prefix fd20::/20. The input must be a valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will fail if the speficied /48 is already in used by another resource. If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field.
mtu Changes to this property will trigger replacement. int
Maximum Transmission Unit in bytes. The default value is 1460 bytes. The minimum value for this field is 1300 and the maximum value is 8896 bytes (jumbo frames). Note that packets larger than 1500 bytes (standard Ethernet) can be subject to TCP-MSS clamping or dropped with an ICMP Fragmentation-Needed message if the packets are routed to the Internet or other VPCs with varying MTUs.
name Changes to this property will trigger replacement. str
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.


network_firewall_policy_enforcement_order str
Set the order that Firewall Rules and Firewall Policies are evaluated. Default value is AFTER_CLASSIC_FIREWALL. Possible values are: BEFORE_CLASSIC_FIREWALL, AFTER_CLASSIC_FIREWALL.
network_profile Changes to this property will trigger replacement. str
A full or partial URL of the network profile to apply to this network. This field can be set only at resource creation time. For example, the following are valid URLs:

  • https://www.googleapis.com/compute/v1/projects/{projectId}/global/networkProfiles/{network_profile_name}
  • projects/{projectId}/global/networkProfiles/{network_profile_name}
project Changes to this property will trigger replacement. str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
routing_mode str
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. Possible values are: REGIONAL, GLOBAL.
autoCreateSubnetworks Changes to this property will trigger replacement. Boolean
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.
bgpAlwaysCompareMed Boolean
Enables/disables the comparison of MED across routes with different Neighbor ASNs. This value can only be set if the --bgp-best-path-selection-mode is STANDARD
bgpBestPathSelectionMode String
The BGP best selection algorithm to be employed. MODE can be LEGACY or STANDARD. Possible values are: LEGACY, STANDARD.
bgpInterRegionCost String
Choice of the behavior of inter-regional cost and MED in the BPS algorithm. Possible values are: DEFAULT, ADD_COST_TO_MED.
deleteDefaultRoutesOnCreate Boolean
If set to true, default routes (0.0.0.0/0) will be deleted immediately after network creation. Defaults to false.
description Changes to this property will trigger replacement. String
An optional description of this resource. The resource must be recreated to modify this field.
enableUlaInternalIpv6 Changes to this property will trigger replacement. Boolean
Enable ULA internal ipv6 on this network. Enabling this feature will assign a /48 from google defined ULA prefix fd20::/20.
internalIpv6Range Changes to this property will trigger replacement. String
When enabling ula internal ipv6, caller optionally can specify the /48 range they want from the google defined ULA prefix fd20::/20. The input must be a valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will fail if the speficied /48 is already in used by another resource. If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field.
mtu Changes to this property will trigger replacement. Number
Maximum Transmission Unit in bytes. The default value is 1460 bytes. The minimum value for this field is 1300 and the maximum value is 8896 bytes (jumbo frames). Note that packets larger than 1500 bytes (standard Ethernet) can be subject to TCP-MSS clamping or dropped with an ICMP Fragmentation-Needed message if the packets are routed to the Internet or other VPCs with varying MTUs.
name Changes to this property will trigger replacement. String
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.


networkFirewallPolicyEnforcementOrder String
Set the order that Firewall Rules and Firewall Policies are evaluated. Default value is AFTER_CLASSIC_FIREWALL. Possible values are: BEFORE_CLASSIC_FIREWALL, AFTER_CLASSIC_FIREWALL.
networkProfile Changes to this property will trigger replacement. String
A full or partial URL of the network profile to apply to this network. This field can be set only at resource creation time. For example, the following are valid URLs:

  • https://www.googleapis.com/compute/v1/projects/{projectId}/global/networkProfiles/{network_profile_name}
  • projects/{projectId}/global/networkProfiles/{network_profile_name}
project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
routingMode String
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. Possible values are: REGIONAL, GLOBAL.

Outputs

All input properties are implicitly available as output properties. Additionally, the Network resource produces the following output properties:

GatewayIpv4 string
The gateway address for default routing out of the network. This value is selected by GCP.
Id string
The provider-assigned unique ID for this managed resource.
NetworkId string
The unique identifier for the resource. This identifier is defined by the server.
NumericId string
(Deprecated) The unique identifier for the resource. This identifier is defined by the server.

Deprecated: numeric_id is deprecated and will be removed in a future major release. Use network_id instead.

SelfLink string
The URI of the created resource.
GatewayIpv4 string
The gateway address for default routing out of the network. This value is selected by GCP.
Id string
The provider-assigned unique ID for this managed resource.
NetworkId string
The unique identifier for the resource. This identifier is defined by the server.
NumericId string
(Deprecated) The unique identifier for the resource. This identifier is defined by the server.

Deprecated: numeric_id is deprecated and will be removed in a future major release. Use network_id instead.

SelfLink string
The URI of the created resource.
gatewayIpv4 String
The gateway address for default routing out of the network. This value is selected by GCP.
id String
The provider-assigned unique ID for this managed resource.
networkId String
The unique identifier for the resource. This identifier is defined by the server.
numericId String
(Deprecated) The unique identifier for the resource. This identifier is defined by the server.

Deprecated: numeric_id is deprecated and will be removed in a future major release. Use network_id instead.

selfLink String
The URI of the created resource.
gatewayIpv4 string
The gateway address for default routing out of the network. This value is selected by GCP.
id string
The provider-assigned unique ID for this managed resource.
networkId string
The unique identifier for the resource. This identifier is defined by the server.
numericId string
(Deprecated) The unique identifier for the resource. This identifier is defined by the server.

Deprecated: numeric_id is deprecated and will be removed in a future major release. Use network_id instead.

selfLink string
The URI of the created resource.
gateway_ipv4 str
The gateway address for default routing out of the network. This value is selected by GCP.
id str
The provider-assigned unique ID for this managed resource.
network_id str
The unique identifier for the resource. This identifier is defined by the server.
numeric_id str
(Deprecated) The unique identifier for the resource. This identifier is defined by the server.

Deprecated: numeric_id is deprecated and will be removed in a future major release. Use network_id instead.

self_link str
The URI of the created resource.
gatewayIpv4 String
The gateway address for default routing out of the network. This value is selected by GCP.
id String
The provider-assigned unique ID for this managed resource.
networkId String
The unique identifier for the resource. This identifier is defined by the server.
numericId String
(Deprecated) The unique identifier for the resource. This identifier is defined by the server.

Deprecated: numeric_id is deprecated and will be removed in a future major release. Use network_id instead.

selfLink String
The URI of the created resource.

Look up Existing Network Resource

Get an existing Network 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?: NetworkState, opts?: CustomResourceOptions): Network
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        auto_create_subnetworks: Optional[bool] = None,
        bgp_always_compare_med: Optional[bool] = None,
        bgp_best_path_selection_mode: Optional[str] = None,
        bgp_inter_region_cost: Optional[str] = None,
        delete_default_routes_on_create: Optional[bool] = None,
        description: Optional[str] = None,
        enable_ula_internal_ipv6: Optional[bool] = None,
        gateway_ipv4: Optional[str] = None,
        internal_ipv6_range: Optional[str] = None,
        mtu: Optional[int] = None,
        name: Optional[str] = None,
        network_firewall_policy_enforcement_order: Optional[str] = None,
        network_id: Optional[str] = None,
        network_profile: Optional[str] = None,
        numeric_id: Optional[str] = None,
        project: Optional[str] = None,
        routing_mode: Optional[str] = None,
        self_link: Optional[str] = None) -> Network
func GetNetwork(ctx *Context, name string, id IDInput, state *NetworkState, opts ...ResourceOption) (*Network, error)
public static Network Get(string name, Input<string> id, NetworkState? state, CustomResourceOptions? opts = null)
public static Network get(String name, Output<String> id, NetworkState state, CustomResourceOptions options)
resources:  _:    type: gcp:compute:Network    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
AutoCreateSubnetworks Changes to this property will trigger replacement. bool
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.
BgpAlwaysCompareMed bool
Enables/disables the comparison of MED across routes with different Neighbor ASNs. This value can only be set if the --bgp-best-path-selection-mode is STANDARD
BgpBestPathSelectionMode string
The BGP best selection algorithm to be employed. MODE can be LEGACY or STANDARD. Possible values are: LEGACY, STANDARD.
BgpInterRegionCost string
Choice of the behavior of inter-regional cost and MED in the BPS algorithm. Possible values are: DEFAULT, ADD_COST_TO_MED.
DeleteDefaultRoutesOnCreate bool
If set to true, default routes (0.0.0.0/0) will be deleted immediately after network creation. Defaults to false.
Description Changes to this property will trigger replacement. string
An optional description of this resource. The resource must be recreated to modify this field.
EnableUlaInternalIpv6 Changes to this property will trigger replacement. bool
Enable ULA internal ipv6 on this network. Enabling this feature will assign a /48 from google defined ULA prefix fd20::/20.
GatewayIpv4 string
The gateway address for default routing out of the network. This value is selected by GCP.
InternalIpv6Range Changes to this property will trigger replacement. string
When enabling ula internal ipv6, caller optionally can specify the /48 range they want from the google defined ULA prefix fd20::/20. The input must be a valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will fail if the speficied /48 is already in used by another resource. If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field.
Mtu Changes to this property will trigger replacement. int
Maximum Transmission Unit in bytes. The default value is 1460 bytes. The minimum value for this field is 1300 and the maximum value is 8896 bytes (jumbo frames). Note that packets larger than 1500 bytes (standard Ethernet) can be subject to TCP-MSS clamping or dropped with an ICMP Fragmentation-Needed message if the packets are routed to the Internet or other VPCs with varying MTUs.
Name Changes to this property will trigger replacement. string
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.


NetworkFirewallPolicyEnforcementOrder string
Set the order that Firewall Rules and Firewall Policies are evaluated. Default value is AFTER_CLASSIC_FIREWALL. Possible values are: BEFORE_CLASSIC_FIREWALL, AFTER_CLASSIC_FIREWALL.
NetworkId string
The unique identifier for the resource. This identifier is defined by the server.
NetworkProfile Changes to this property will trigger replacement. string
A full or partial URL of the network profile to apply to this network. This field can be set only at resource creation time. For example, the following are valid URLs:

  • https://www.googleapis.com/compute/v1/projects/{projectId}/global/networkProfiles/{network_profile_name}
  • projects/{projectId}/global/networkProfiles/{network_profile_name}
NumericId string
(Deprecated) The unique identifier for the resource. This identifier is defined by the server.

Deprecated: numeric_id is deprecated and will be removed in a future major release. Use network_id instead.

Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
RoutingMode string
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. Possible values are: REGIONAL, GLOBAL.
SelfLink string
The URI of the created resource.
AutoCreateSubnetworks Changes to this property will trigger replacement. bool
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.
BgpAlwaysCompareMed bool
Enables/disables the comparison of MED across routes with different Neighbor ASNs. This value can only be set if the --bgp-best-path-selection-mode is STANDARD
BgpBestPathSelectionMode string
The BGP best selection algorithm to be employed. MODE can be LEGACY or STANDARD. Possible values are: LEGACY, STANDARD.
BgpInterRegionCost string
Choice of the behavior of inter-regional cost and MED in the BPS algorithm. Possible values are: DEFAULT, ADD_COST_TO_MED.
DeleteDefaultRoutesOnCreate bool
If set to true, default routes (0.0.0.0/0) will be deleted immediately after network creation. Defaults to false.
Description Changes to this property will trigger replacement. string
An optional description of this resource. The resource must be recreated to modify this field.
EnableUlaInternalIpv6 Changes to this property will trigger replacement. bool
Enable ULA internal ipv6 on this network. Enabling this feature will assign a /48 from google defined ULA prefix fd20::/20.
GatewayIpv4 string
The gateway address for default routing out of the network. This value is selected by GCP.
InternalIpv6Range Changes to this property will trigger replacement. string
When enabling ula internal ipv6, caller optionally can specify the /48 range they want from the google defined ULA prefix fd20::/20. The input must be a valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will fail if the speficied /48 is already in used by another resource. If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field.
Mtu Changes to this property will trigger replacement. int
Maximum Transmission Unit in bytes. The default value is 1460 bytes. The minimum value for this field is 1300 and the maximum value is 8896 bytes (jumbo frames). Note that packets larger than 1500 bytes (standard Ethernet) can be subject to TCP-MSS clamping or dropped with an ICMP Fragmentation-Needed message if the packets are routed to the Internet or other VPCs with varying MTUs.
Name Changes to this property will trigger replacement. string
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.


NetworkFirewallPolicyEnforcementOrder string
Set the order that Firewall Rules and Firewall Policies are evaluated. Default value is AFTER_CLASSIC_FIREWALL. Possible values are: BEFORE_CLASSIC_FIREWALL, AFTER_CLASSIC_FIREWALL.
NetworkId string
The unique identifier for the resource. This identifier is defined by the server.
NetworkProfile Changes to this property will trigger replacement. string
A full or partial URL of the network profile to apply to this network. This field can be set only at resource creation time. For example, the following are valid URLs:

  • https://www.googleapis.com/compute/v1/projects/{projectId}/global/networkProfiles/{network_profile_name}
  • projects/{projectId}/global/networkProfiles/{network_profile_name}
NumericId string
(Deprecated) The unique identifier for the resource. This identifier is defined by the server.

Deprecated: numeric_id is deprecated and will be removed in a future major release. Use network_id instead.

Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
RoutingMode string
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. Possible values are: REGIONAL, GLOBAL.
SelfLink string
The URI of the created resource.
autoCreateSubnetworks Changes to this property will trigger replacement. Boolean
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.
bgpAlwaysCompareMed Boolean
Enables/disables the comparison of MED across routes with different Neighbor ASNs. This value can only be set if the --bgp-best-path-selection-mode is STANDARD
bgpBestPathSelectionMode String
The BGP best selection algorithm to be employed. MODE can be LEGACY or STANDARD. Possible values are: LEGACY, STANDARD.
bgpInterRegionCost String
Choice of the behavior of inter-regional cost and MED in the BPS algorithm. Possible values are: DEFAULT, ADD_COST_TO_MED.
deleteDefaultRoutesOnCreate Boolean
If set to true, default routes (0.0.0.0/0) will be deleted immediately after network creation. Defaults to false.
description Changes to this property will trigger replacement. String
An optional description of this resource. The resource must be recreated to modify this field.
enableUlaInternalIpv6 Changes to this property will trigger replacement. Boolean
Enable ULA internal ipv6 on this network. Enabling this feature will assign a /48 from google defined ULA prefix fd20::/20.
gatewayIpv4 String
The gateway address for default routing out of the network. This value is selected by GCP.
internalIpv6Range Changes to this property will trigger replacement. String
When enabling ula internal ipv6, caller optionally can specify the /48 range they want from the google defined ULA prefix fd20::/20. The input must be a valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will fail if the speficied /48 is already in used by another resource. If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field.
mtu Changes to this property will trigger replacement. Integer
Maximum Transmission Unit in bytes. The default value is 1460 bytes. The minimum value for this field is 1300 and the maximum value is 8896 bytes (jumbo frames). Note that packets larger than 1500 bytes (standard Ethernet) can be subject to TCP-MSS clamping or dropped with an ICMP Fragmentation-Needed message if the packets are routed to the Internet or other VPCs with varying MTUs.
name Changes to this property will trigger replacement. String
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.


networkFirewallPolicyEnforcementOrder String
Set the order that Firewall Rules and Firewall Policies are evaluated. Default value is AFTER_CLASSIC_FIREWALL. Possible values are: BEFORE_CLASSIC_FIREWALL, AFTER_CLASSIC_FIREWALL.
networkId String
The unique identifier for the resource. This identifier is defined by the server.
networkProfile Changes to this property will trigger replacement. String
A full or partial URL of the network profile to apply to this network. This field can be set only at resource creation time. For example, the following are valid URLs:

  • https://www.googleapis.com/compute/v1/projects/{projectId}/global/networkProfiles/{network_profile_name}
  • projects/{projectId}/global/networkProfiles/{network_profile_name}
numericId String
(Deprecated) The unique identifier for the resource. This identifier is defined by the server.

Deprecated: numeric_id is deprecated and will be removed in a future major release. Use network_id instead.

project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
routingMode String
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. Possible values are: REGIONAL, GLOBAL.
selfLink String
The URI of the created resource.
autoCreateSubnetworks Changes to this property will trigger replacement. boolean
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.
bgpAlwaysCompareMed boolean
Enables/disables the comparison of MED across routes with different Neighbor ASNs. This value can only be set if the --bgp-best-path-selection-mode is STANDARD
bgpBestPathSelectionMode string
The BGP best selection algorithm to be employed. MODE can be LEGACY or STANDARD. Possible values are: LEGACY, STANDARD.
bgpInterRegionCost string
Choice of the behavior of inter-regional cost and MED in the BPS algorithm. Possible values are: DEFAULT, ADD_COST_TO_MED.
deleteDefaultRoutesOnCreate boolean
If set to true, default routes (0.0.0.0/0) will be deleted immediately after network creation. Defaults to false.
description Changes to this property will trigger replacement. string
An optional description of this resource. The resource must be recreated to modify this field.
enableUlaInternalIpv6 Changes to this property will trigger replacement. boolean
Enable ULA internal ipv6 on this network. Enabling this feature will assign a /48 from google defined ULA prefix fd20::/20.
gatewayIpv4 string
The gateway address for default routing out of the network. This value is selected by GCP.
internalIpv6Range Changes to this property will trigger replacement. string
When enabling ula internal ipv6, caller optionally can specify the /48 range they want from the google defined ULA prefix fd20::/20. The input must be a valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will fail if the speficied /48 is already in used by another resource. If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field.
mtu Changes to this property will trigger replacement. number
Maximum Transmission Unit in bytes. The default value is 1460 bytes. The minimum value for this field is 1300 and the maximum value is 8896 bytes (jumbo frames). Note that packets larger than 1500 bytes (standard Ethernet) can be subject to TCP-MSS clamping or dropped with an ICMP Fragmentation-Needed message if the packets are routed to the Internet or other VPCs with varying MTUs.
name Changes to this property will trigger replacement. string
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.


networkFirewallPolicyEnforcementOrder string
Set the order that Firewall Rules and Firewall Policies are evaluated. Default value is AFTER_CLASSIC_FIREWALL. Possible values are: BEFORE_CLASSIC_FIREWALL, AFTER_CLASSIC_FIREWALL.
networkId string
The unique identifier for the resource. This identifier is defined by the server.
networkProfile Changes to this property will trigger replacement. string
A full or partial URL of the network profile to apply to this network. This field can be set only at resource creation time. For example, the following are valid URLs:

  • https://www.googleapis.com/compute/v1/projects/{projectId}/global/networkProfiles/{network_profile_name}
  • projects/{projectId}/global/networkProfiles/{network_profile_name}
numericId string
(Deprecated) The unique identifier for the resource. This identifier is defined by the server.

Deprecated: numeric_id is deprecated and will be removed in a future major release. Use network_id instead.

project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
routingMode string
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. Possible values are: REGIONAL, GLOBAL.
selfLink string
The URI of the created resource.
auto_create_subnetworks Changes to this property will trigger replacement. bool
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.
bgp_always_compare_med bool
Enables/disables the comparison of MED across routes with different Neighbor ASNs. This value can only be set if the --bgp-best-path-selection-mode is STANDARD
bgp_best_path_selection_mode str
The BGP best selection algorithm to be employed. MODE can be LEGACY or STANDARD. Possible values are: LEGACY, STANDARD.
bgp_inter_region_cost str
Choice of the behavior of inter-regional cost and MED in the BPS algorithm. Possible values are: DEFAULT, ADD_COST_TO_MED.
delete_default_routes_on_create bool
If set to true, default routes (0.0.0.0/0) will be deleted immediately after network creation. Defaults to false.
description Changes to this property will trigger replacement. str
An optional description of this resource. The resource must be recreated to modify this field.
enable_ula_internal_ipv6 Changes to this property will trigger replacement. bool
Enable ULA internal ipv6 on this network. Enabling this feature will assign a /48 from google defined ULA prefix fd20::/20.
gateway_ipv4 str
The gateway address for default routing out of the network. This value is selected by GCP.
internal_ipv6_range Changes to this property will trigger replacement. str
When enabling ula internal ipv6, caller optionally can specify the /48 range they want from the google defined ULA prefix fd20::/20. The input must be a valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will fail if the speficied /48 is already in used by another resource. If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field.
mtu Changes to this property will trigger replacement. int
Maximum Transmission Unit in bytes. The default value is 1460 bytes. The minimum value for this field is 1300 and the maximum value is 8896 bytes (jumbo frames). Note that packets larger than 1500 bytes (standard Ethernet) can be subject to TCP-MSS clamping or dropped with an ICMP Fragmentation-Needed message if the packets are routed to the Internet or other VPCs with varying MTUs.
name Changes to this property will trigger replacement. str
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.


network_firewall_policy_enforcement_order str
Set the order that Firewall Rules and Firewall Policies are evaluated. Default value is AFTER_CLASSIC_FIREWALL. Possible values are: BEFORE_CLASSIC_FIREWALL, AFTER_CLASSIC_FIREWALL.
network_id str
The unique identifier for the resource. This identifier is defined by the server.
network_profile Changes to this property will trigger replacement. str
A full or partial URL of the network profile to apply to this network. This field can be set only at resource creation time. For example, the following are valid URLs:

  • https://www.googleapis.com/compute/v1/projects/{projectId}/global/networkProfiles/{network_profile_name}
  • projects/{projectId}/global/networkProfiles/{network_profile_name}
numeric_id str
(Deprecated) The unique identifier for the resource. This identifier is defined by the server.

Deprecated: numeric_id is deprecated and will be removed in a future major release. Use network_id instead.

project Changes to this property will trigger replacement. str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
routing_mode str
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. Possible values are: REGIONAL, GLOBAL.
self_link str
The URI of the created resource.
autoCreateSubnetworks Changes to this property will trigger replacement. Boolean
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.
bgpAlwaysCompareMed Boolean
Enables/disables the comparison of MED across routes with different Neighbor ASNs. This value can only be set if the --bgp-best-path-selection-mode is STANDARD
bgpBestPathSelectionMode String
The BGP best selection algorithm to be employed. MODE can be LEGACY or STANDARD. Possible values are: LEGACY, STANDARD.
bgpInterRegionCost String
Choice of the behavior of inter-regional cost and MED in the BPS algorithm. Possible values are: DEFAULT, ADD_COST_TO_MED.
deleteDefaultRoutesOnCreate Boolean
If set to true, default routes (0.0.0.0/0) will be deleted immediately after network creation. Defaults to false.
description Changes to this property will trigger replacement. String
An optional description of this resource. The resource must be recreated to modify this field.
enableUlaInternalIpv6 Changes to this property will trigger replacement. Boolean
Enable ULA internal ipv6 on this network. Enabling this feature will assign a /48 from google defined ULA prefix fd20::/20.
gatewayIpv4 String
The gateway address for default routing out of the network. This value is selected by GCP.
internalIpv6Range Changes to this property will trigger replacement. String
When enabling ula internal ipv6, caller optionally can specify the /48 range they want from the google defined ULA prefix fd20::/20. The input must be a valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will fail if the speficied /48 is already in used by another resource. If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field.
mtu Changes to this property will trigger replacement. Number
Maximum Transmission Unit in bytes. The default value is 1460 bytes. The minimum value for this field is 1300 and the maximum value is 8896 bytes (jumbo frames). Note that packets larger than 1500 bytes (standard Ethernet) can be subject to TCP-MSS clamping or dropped with an ICMP Fragmentation-Needed message if the packets are routed to the Internet or other VPCs with varying MTUs.
name Changes to this property will trigger replacement. String
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.


networkFirewallPolicyEnforcementOrder String
Set the order that Firewall Rules and Firewall Policies are evaluated. Default value is AFTER_CLASSIC_FIREWALL. Possible values are: BEFORE_CLASSIC_FIREWALL, AFTER_CLASSIC_FIREWALL.
networkId String
The unique identifier for the resource. This identifier is defined by the server.
networkProfile Changes to this property will trigger replacement. String
A full or partial URL of the network profile to apply to this network. This field can be set only at resource creation time. For example, the following are valid URLs:

  • https://www.googleapis.com/compute/v1/projects/{projectId}/global/networkProfiles/{network_profile_name}
  • projects/{projectId}/global/networkProfiles/{network_profile_name}
numericId String
(Deprecated) The unique identifier for the resource. This identifier is defined by the server.

Deprecated: numeric_id is deprecated and will be removed in a future major release. Use network_id instead.

project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
routingMode String
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. Possible values are: REGIONAL, GLOBAL.
selfLink String
The URI of the created resource.

Import

Network can be imported using any of these accepted formats:

  • projects/{{project}}/global/networks/{{name}}

  • {{project}}/{{name}}

  • {{name}}

When using the pulumi import command, Network can be imported using one of the formats above. For example:

$ pulumi import gcp:compute/network:Network default projects/{{project}}/global/networks/{{name}}
Copy
$ pulumi import gcp:compute/network:Network default {{project}}/{{name}}
Copy
$ pulumi import gcp:compute/network:Network default {{name}}
Copy

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.