NetworkArgs

data class NetworkArgs(val cidrBlock: Output<String>? = null, val classicLinkEnabled: Output<Boolean>? = null, val description: Output<String>? = null, val dryRun: Output<Boolean>? = null, val enableIpv6: Output<Boolean>? = null, val ipv6Isp: Output<String>? = null, val name: Output<String>? = null, val resourceGroupId: Output<String>? = null, val routeTableId: Output<String>? = null, val routerTableId: Output<String>? = null, val secondaryCidrBlocks: Output<List<String>>? = null, val tags: Output<Map<String, Any>>? = null, val userCidrs: Output<List<String>>? = null, val vpcName: Output<String>? = null) : ConvertibleToJava<NetworkArgs>

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>

Constructors

Link copied to clipboard
fun NetworkArgs(cidrBlock: Output<String>? = null, classicLinkEnabled: Output<Boolean>? = null, description: Output<String>? = null, dryRun: Output<Boolean>? = null, enableIpv6: Output<Boolean>? = null, ipv6Isp: Output<String>? = null, name: Output<String>? = null, resourceGroupId: Output<String>? = null, routeTableId: Output<String>? = null, routerTableId: Output<String>? = null, secondaryCidrBlocks: Output<List<String>>? = null, tags: Output<Map<String, Any>>? = null, userCidrs: Output<List<String>>? = null, vpcName: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): NetworkArgs

Properties

Link copied to clipboard
val cidrBlock: Output<String>? = null

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
val classicLinkEnabled: Output<Boolean>? = null

The status of ClassicLink function.

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

The VPC description. Defaults to null.

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

Whether to PreCheck this request only. Value:

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

Whether to enable the IPv6 network segment. Value:

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

The IPv6 address segment type of the VPC. Value:

Link copied to clipboard
val name: Output<String>? = null

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

Link copied to clipboard
val resourceGroupId: Output<String>? = null

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

Link copied to clipboard
val routerTableId: Output<String>? = null

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>? = null

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

Link copied to clipboard
val secondaryCidrBlocks: Output<List<String>>? = null

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 tags: Output<Map<String, Any>>? = null

The tags of Vpc.

Link copied to clipboard
val userCidrs: Output<List<String>>? = null

A list of user CIDRs.

Link copied to clipboard
val vpcName: Output<String>? = null

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