Skip to main content
Providers

Vpc

A resource of the AWS provider, version 0.3.0, in its Networking group. Import it with:

import Vpc from "aws/networking"

Example

resource Vpc example {
    cidrBlock          = "example-value"
    ipv6CidrBlock      = "example-value"
    instanceTenancy    = "default"
    enableDnsSupport   = true
    enableDnsHostnames = false
    tags               = "..."
}

Properties

Set by your code in the resource block. A required one must be set; any other you leave out takes the value under Default, if it has one.

NameTypeDefaultRequiredDescription
cidrBlockstring—NoThe IPv4 CIDR block for the VPC (e.g., 10.0.0.0/16)
ipv6CidrBlockstring—NoThe IPv6 CIDR block for the VPC. If specified, AWS associates an IPv6 CIDR block
instanceTenancystring"default"NoTenancy option for instances Allowed: "default", "dedicated"
enableDnsSupportbooleantrueNoEnable DNS support in the VPC
enableDnsHostnamesbooleanfalseNoEnable DNS hostnames in the VPC
tagsobject—NoTags to apply to the VPC

Set by AWS after the resource is created: your code can read them but not set them. An importable one identifies an existing resource.

NameTypeImportableDescription
vpcIdstringNoThe VPC ID assigned by AWS
statestringNoThe current state of the VPC (pending, available)
mainRouteTableIdstringNoThe ID of the main route table
defaultNetworkAclIdstringNoThe ID of the default network ACL
defaultSecurityGroupIdstringNoThe ID of the default security group
ownerIdstringNoThe AWS account ID that owns the VPC
arnstringYesThe Amazon Resource Name (ARN) of the VPC

On this page