Network
Manages a VPC network or legacy network resource on GCP. To get more information about Network, see:
How-to Guides
Example Usage
Network Basic
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.Network;
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");
}
}
Network Custom Mtu
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()
.autoCreateSubnetworks(true)
.mtu(1460)
.project("my-project-name")
.build());
}
}
Import
Network can be imported using any of these accepted formats
$ pulumi import gcp:compute/network:Network default projects/{{project}}/global/networks/{{name}}
$ pulumi import gcp:compute/network:Network default {{project}}/{{name}}
$ pulumi import gcp:compute/network:Network default {{name}}
Properties
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.
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.
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
and GLOBAL
.