Network
Provides a Vpc Vpc resource. A VPC instance creates a VPC. You can fully control your own VPC, such as selecting IP address ranges, configuring routing tables, and gateways. You can use Alibaba cloud resources such as cloud servers, apsaradb for RDS, and load balancer in your own VPC.
NOTE: This resource will auto build a router and a route table while it uses
alicloud.vpc.Network
to build a vpc resource. NOTE: Currently, the IPv4 / IPv6 dual-stack VPC function is under public testing. Only the following regions support IPv4 / IPv6 dual-stack VPC:cn-hangzhou
,cn-shanghai
,cn-shenzhen
,cn-beijing
,cn-huhehaote
,cn-hongkong
andap-southeast-1
, and need to apply for public beta qualification. To use, please submit an application.
Module Support
You can use the existing vpc module to create a VPC and several VSwitches one-click. For information about Vpc Vpc and how to use it, see What is Vpc.
Example Usage
Basic Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.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) {
final var config = ctx.config();
final var name = config.get("name").orElse("terraform-example");
var default_ = new Network("default", NetworkArgs.builder()
.ipv6Isp("BGP")
.description("test")
.cidrBlock("10.0.0.0/8")
.vpcName(name)
.enableIpv6(true)
.build());
}
}
Import
Vpc Vpc can be imported using the id, e.g.
$ pulumi import alicloud:vpc/network:Network example <id>