DefaultVpcArgs

data class DefaultVpcArgs(val assignGeneratedIpv6CidrBlock: Output<Boolean>? = null, val enableClassiclink: Output<Boolean>? = null, val enableClassiclinkDnsSupport: Output<Boolean>? = null, val enableDnsHostnames: Output<Boolean>? = null, val enableDnsSupport: Output<Boolean>? = null, val enableNetworkAddressUsageMetrics: Output<Boolean>? = null, val forceDestroy: Output<Boolean>? = null, val ipv6CidrBlock: Output<String>? = null, val ipv6CidrBlockNetworkBorderGroup: Output<String>? = null, val ipv6IpamPoolId: Output<String>? = null, val ipv6NetmaskLength: Output<Int>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<DefaultVpcArgs>

Provides a resource to manage the default AWS VPC in the current AWS Region. If you created your AWS account after 2013-12-04 you have a default VPC in each AWS Region. This is an advanced resource and has special caveats to be aware of when using it. Please read this document in its entirety before using this resource. The aws.ec2.DefaultVpc resource behaves differently from normal resources in that if a default VPC exists, this provider does not create this resource, but instead "adopts" it into management. If no default VPC exists, the provider creates a new default VPC, which leads to the implicit creation of other resources. By default, pulumi destroy does not delete the default VPC but does remove the resource from the state. Set the force_destroy argument to true to delete the default VPC.

Example Usage

Basic usage with tags:

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.DefaultVpc;
import com.pulumi.aws.ec2.DefaultVpcArgs;
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 default_ = new DefaultVpc("default", DefaultVpcArgs.builder()
.tags(Map.of("Name", "Default VPC"))
.build());
}
}

Import

Default VPCs can be imported using the vpc id, e.g.,

$ pulumi import aws:ec2/defaultVpc:DefaultVpc default vpc-a01106c2

Constructors

Link copied to clipboard
constructor(assignGeneratedIpv6CidrBlock: Output<Boolean>? = null, enableClassiclink: Output<Boolean>? = null, enableClassiclinkDnsSupport: Output<Boolean>? = null, enableDnsHostnames: Output<Boolean>? = null, enableDnsSupport: Output<Boolean>? = null, enableNetworkAddressUsageMetrics: Output<Boolean>? = null, forceDestroy: Output<Boolean>? = null, ipv6CidrBlock: Output<String>? = null, ipv6CidrBlockNetworkBorderGroup: Output<String>? = null, ipv6IpamPoolId: Output<String>? = null, ipv6NetmaskLength: Output<Int>? = null, tags: Output<Map<String, String>>? = null)

Properties

Link copied to clipboard
Link copied to clipboard
val enableClassiclink: Output<Boolean>? = null
Link copied to clipboard
Link copied to clipboard
val enableDnsHostnames: Output<Boolean>? = null
Link copied to clipboard
val enableDnsSupport: Output<Boolean>? = null
Link copied to clipboard
Link copied to clipboard
val forceDestroy: Output<Boolean>? = null

Whether destroying the resource deletes the default VPC. Default: false

Link copied to clipboard
val ipv6CidrBlock: Output<String>? = null
Link copied to clipboard
Link copied to clipboard
val ipv6IpamPoolId: Output<String>? = null
Link copied to clipboard
val ipv6NetmaskLength: Output<Int>? = null
Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Functions

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