Network

class Network : KotlinCustomResource

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 and ap-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>

Properties

Link copied to clipboard
val cidrBlock: Output<String>

The CIDR block for the VPC. The cidr_block is Optional and default value is 172.16.0.0/12 after v1.119.0+.

Link copied to clipboard

The status of ClassicLink function.

Link copied to clipboard
val createTime: Output<String>

The creation time of the VPC.

Link copied to clipboard
val description: Output<String>?

The VPC description. Defaults to null.

Link copied to clipboard
val dryRun: Output<Boolean>?

Whether to PreCheck this request only. Value:

Link copied to clipboard
val enableIpv6: Output<Boolean>?

Whether to enable the IPv6 network segment. Value:

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val ipv6CidrBlock: Output<String>

The IPv6 CIDR block of the VPC.

Link copied to clipboard

The IPv6 CIDR block information of the VPC.

Link copied to clipboard
val ipv6Isp: Output<String>?

The IPv6 address segment type of the VPC. Value:

Link copied to clipboard
val name: Output<String>

Field 'name' has been deprecated from provider version 1.119.0. New field 'vpc_name' instead.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val resourceGroupId: Output<String>

The ID of the resource group to which the VPC belongs.

Link copied to clipboard
val routerId: Output<String>

The ID of the router created by default on VPC creation.

Link copied to clipboard
val routerTableId: Output<String>

Field 'router_table_id' has been deprecated from provider version 1.206.0. New field 'route_table_id' instead.

Link copied to clipboard
val routeTableId: Output<String>

The route table ID of the router created by default on VPC creation.

Link copied to clipboard

Field 'secondary_cidr_blocks' has been deprecated from provider version 1.185.0 and it will be removed in the future version. Please use the new resource 'alicloud_vpc_ipv4_cidr_block'. secondary_cidr_blocks attributes and alicloud.vpc.Ipv4CidrBlock resource cannot be used at the same time.

Link copied to clipboard
val status: Output<String>

The status of the VPC. Valid values: Pending: The VPC is being configured. Available: The VPC is available.

Link copied to clipboard
val tags: Output<Map<String, Any>>?

The tags of Vpc.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val userCidrs: Output<List<String>>

A list of user CIDRs.

Link copied to clipboard
val vpcName: Output<String>

The name of the VPC. Defaults to null. The following arguments will be discarded. Please use new fields as soon as possible: