DefaultVpc
Provides a resource to manage the default AWS VPC in the current region.
For AWS accounts created after 2013-12-04, each region comes with a Default VPC. 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 behaves differently from normal resources, in that
this provider does not create this resource, but instead “adopts” it
into management.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var @default = new Aws.Ec2.DefaultVpc("default", new Aws.Ec2.DefaultVpcArgs
{
Tags =
{
{ "Name", "Default VPC" },
},
});
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ec2"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ec2.NewDefaultVpc(ctx, "_default", &ec2.DefaultVpcArgs{
Tags: pulumi.StringMap{
"Name": pulumi.String("Default VPC"),
},
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
default = aws.ec2.DefaultVpc("default", tags={
"Name": "Default VPC",
})import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const defaultDefaultVpc = new aws.ec2.DefaultVpc("default", {
tags: {
Name: "Default VPC",
},
});Create a DefaultVpc Resource
new DefaultVpc(name: string, args?: DefaultVpcArgs, opts?: CustomResourceOptions);def DefaultVpc(resource_name, opts=None, enable_classiclink=None, enable_classiclink_dns_support=None, enable_dns_hostnames=None, enable_dns_support=None, tags=None, __props__=None);func NewDefaultVpc(ctx *Context, name string, args *DefaultVpcArgs, opts ...ResourceOption) (*DefaultVpc, error)public DefaultVpc(string name, DefaultVpcArgs? args = null, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args DefaultVpcArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args DefaultVpcArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DefaultVpcArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
DefaultVpc Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The DefaultVpc resource accepts the following input properties:
- Enable
Classiclink bool A boolean flag to enable/disable ClassicLink for the VPC. Only valid in regions and accounts that support EC2 Classic. See the ClassicLink documentation for more information. Defaults false.
- Enable
Classiclink boolDns Support - Enable
Dns boolHostnames A boolean flag to enable/disable DNS hostnames in the VPC. Defaults false.
- Enable
Dns boolSupport A boolean flag to enable/disable DNS support in the VPC. Defaults true.
- Dictionary<string, string>
A map of tags to assign to the resource.
- Enable
Classiclink bool A boolean flag to enable/disable ClassicLink for the VPC. Only valid in regions and accounts that support EC2 Classic. See the ClassicLink documentation for more information. Defaults false.
- Enable
Classiclink boolDns Support - Enable
Dns boolHostnames A boolean flag to enable/disable DNS hostnames in the VPC. Defaults false.
- Enable
Dns boolSupport A boolean flag to enable/disable DNS support in the VPC. Defaults true.
- map[string]string
A map of tags to assign to the resource.
- enable
Classiclink boolean A boolean flag to enable/disable ClassicLink for the VPC. Only valid in regions and accounts that support EC2 Classic. See the ClassicLink documentation for more information. Defaults false.
- enable
Classiclink booleanDns Support - enable
Dns booleanHostnames A boolean flag to enable/disable DNS hostnames in the VPC. Defaults false.
- enable
Dns booleanSupport A boolean flag to enable/disable DNS support in the VPC. Defaults true.
- {[key: string]: string}
A map of tags to assign to the resource.
- enable_
classiclink bool A boolean flag to enable/disable ClassicLink for the VPC. Only valid in regions and accounts that support EC2 Classic. See the ClassicLink documentation for more information. Defaults false.
- enable_
classiclink_ booldns_ support - enable_
dns_ boolhostnames A boolean flag to enable/disable DNS hostnames in the VPC. Defaults false.
- enable_
dns_ boolsupport A boolean flag to enable/disable DNS support in the VPC. Defaults true.
- Dict[str, str]
A map of tags to assign to the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the DefaultVpc resource produces the following output properties:
- Arn string
Amazon Resource Name (ARN) of VPC
- Assign
Generated boolIpv6Cidr Block Whether or not an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC was assigned
- Cidr
Block string The CIDR block of the VPC
- Default
Network stringAcl Id The ID of the network ACL created by default on VPC creation
- Default
Route stringTable Id The ID of the route table created by default on VPC creation
- Default
Security stringGroup Id The ID of the security group created by default on VPC creation
- Dhcp
Options stringId - Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Tenancy string Tenancy of instances spin up within VPC.
- Ipv6Association
Id string The association ID for the IPv6 CIDR block of the VPC
- Ipv6Cidr
Block string The IPv6 CIDR block of the VPC
- Main
Route stringTable Id The ID of the main route table associated with this VPC. Note that you can change a VPC’s main route table by using an
aws.ec2.MainRouteTableAssociation- Owner
Id string The ID of the AWS account that owns the VPC.
- Arn string
Amazon Resource Name (ARN) of VPC
- Assign
Generated boolIpv6Cidr Block Whether or not an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC was assigned
- Cidr
Block string The CIDR block of the VPC
- Default
Network stringAcl Id The ID of the network ACL created by default on VPC creation
- Default
Route stringTable Id The ID of the route table created by default on VPC creation
- Default
Security stringGroup Id The ID of the security group created by default on VPC creation
- Dhcp
Options stringId - Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Tenancy string Tenancy of instances spin up within VPC.
- Ipv6Association
Id string The association ID for the IPv6 CIDR block of the VPC
- Ipv6Cidr
Block string The IPv6 CIDR block of the VPC
- Main
Route stringTable Id The ID of the main route table associated with this VPC. Note that you can change a VPC’s main route table by using an
aws.ec2.MainRouteTableAssociation- Owner
Id string The ID of the AWS account that owns the VPC.
- arn string
Amazon Resource Name (ARN) of VPC
- assign
Generated booleanIpv6Cidr Block Whether or not an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC was assigned
- cidr
Block string The CIDR block of the VPC
- default
Network stringAcl Id The ID of the network ACL created by default on VPC creation
- default
Route stringTable Id The ID of the route table created by default on VPC creation
- default
Security stringGroup Id The ID of the security group created by default on VPC creation
- dhcp
Options stringId - id string
- The provider-assigned unique ID for this managed resource.
- instance
Tenancy string Tenancy of instances spin up within VPC.
- ipv6Association
Id string The association ID for the IPv6 CIDR block of the VPC
- ipv6Cidr
Block string The IPv6 CIDR block of the VPC
- main
Route stringTable Id The ID of the main route table associated with this VPC. Note that you can change a VPC’s main route table by using an
aws.ec2.MainRouteTableAssociation- owner
Id string The ID of the AWS account that owns the VPC.
- arn str
Amazon Resource Name (ARN) of VPC
- assign_
generated_ boolipv6_ cidr_ block Whether or not an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC was assigned
- cidr_
block str The CIDR block of the VPC
- default_
network_ stracl_ id The ID of the network ACL created by default on VPC creation
- default_
route_ strtable_ id The ID of the route table created by default on VPC creation
- default_
security_ strgroup_ id The ID of the security group created by default on VPC creation
- dhcp_
options_ strid - id str
- The provider-assigned unique ID for this managed resource.
- instance_
tenancy str Tenancy of instances spin up within VPC.
- ipv6_
association_ strid The association ID for the IPv6 CIDR block of the VPC
- ipv6_
cidr_ strblock The IPv6 CIDR block of the VPC
- main_
route_ strtable_ id The ID of the main route table associated with this VPC. Note that you can change a VPC’s main route table by using an
aws.ec2.MainRouteTableAssociation- owner_
id str The ID of the AWS account that owns the VPC.
Look up an Existing DefaultVpc Resource
Get an existing DefaultVpc resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: DefaultVpcState, opts?: CustomResourceOptions): DefaultVpcstatic get(resource_name, id, opts=None, arn=None, assign_generated_ipv6_cidr_block=None, cidr_block=None, default_network_acl_id=None, default_route_table_id=None, default_security_group_id=None, dhcp_options_id=None, enable_classiclink=None, enable_classiclink_dns_support=None, enable_dns_hostnames=None, enable_dns_support=None, instance_tenancy=None, ipv6_association_id=None, ipv6_cidr_block=None, main_route_table_id=None, owner_id=None, tags=None, __props__=None);func GetDefaultVpc(ctx *Context, name string, id IDInput, state *DefaultVpcState, opts ...ResourceOption) (*DefaultVpc, error)public static DefaultVpc Get(string name, Input<string> id, DefaultVpcState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Arn string
Amazon Resource Name (ARN) of VPC
- Assign
Generated boolIpv6Cidr Block Whether or not an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC was assigned
- Cidr
Block string The CIDR block of the VPC
- Default
Network stringAcl Id The ID of the network ACL created by default on VPC creation
- Default
Route stringTable Id The ID of the route table created by default on VPC creation
- Default
Security stringGroup Id The ID of the security group created by default on VPC creation
- Dhcp
Options stringId - Enable
Classiclink bool A boolean flag to enable/disable ClassicLink for the VPC. Only valid in regions and accounts that support EC2 Classic. See the ClassicLink documentation for more information. Defaults false.
- Enable
Classiclink boolDns Support - Enable
Dns boolHostnames A boolean flag to enable/disable DNS hostnames in the VPC. Defaults false.
- Enable
Dns boolSupport A boolean flag to enable/disable DNS support in the VPC. Defaults true.
- Instance
Tenancy string Tenancy of instances spin up within VPC.
- Ipv6Association
Id string The association ID for the IPv6 CIDR block of the VPC
- Ipv6Cidr
Block string The IPv6 CIDR block of the VPC
- Main
Route stringTable Id The ID of the main route table associated with this VPC. Note that you can change a VPC’s main route table by using an
aws.ec2.MainRouteTableAssociation- Owner
Id string The ID of the AWS account that owns the VPC.
- Dictionary<string, string>
A map of tags to assign to the resource.
- Arn string
Amazon Resource Name (ARN) of VPC
- Assign
Generated boolIpv6Cidr Block Whether or not an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC was assigned
- Cidr
Block string The CIDR block of the VPC
- Default
Network stringAcl Id The ID of the network ACL created by default on VPC creation
- Default
Route stringTable Id The ID of the route table created by default on VPC creation
- Default
Security stringGroup Id The ID of the security group created by default on VPC creation
- Dhcp
Options stringId - Enable
Classiclink bool A boolean flag to enable/disable ClassicLink for the VPC. Only valid in regions and accounts that support EC2 Classic. See the ClassicLink documentation for more information. Defaults false.
- Enable
Classiclink boolDns Support - Enable
Dns boolHostnames A boolean flag to enable/disable DNS hostnames in the VPC. Defaults false.
- Enable
Dns boolSupport A boolean flag to enable/disable DNS support in the VPC. Defaults true.
- Instance
Tenancy string Tenancy of instances spin up within VPC.
- Ipv6Association
Id string The association ID for the IPv6 CIDR block of the VPC
- Ipv6Cidr
Block string The IPv6 CIDR block of the VPC
- Main
Route stringTable Id The ID of the main route table associated with this VPC. Note that you can change a VPC’s main route table by using an
aws.ec2.MainRouteTableAssociation- Owner
Id string The ID of the AWS account that owns the VPC.
- map[string]string
A map of tags to assign to the resource.
- arn string
Amazon Resource Name (ARN) of VPC
- assign
Generated booleanIpv6Cidr Block Whether or not an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC was assigned
- cidr
Block string The CIDR block of the VPC
- default
Network stringAcl Id The ID of the network ACL created by default on VPC creation
- default
Route stringTable Id The ID of the route table created by default on VPC creation
- default
Security stringGroup Id The ID of the security group created by default on VPC creation
- dhcp
Options stringId - enable
Classiclink boolean A boolean flag to enable/disable ClassicLink for the VPC. Only valid in regions and accounts that support EC2 Classic. See the ClassicLink documentation for more information. Defaults false.
- enable
Classiclink booleanDns Support - enable
Dns booleanHostnames A boolean flag to enable/disable DNS hostnames in the VPC. Defaults false.
- enable
Dns booleanSupport A boolean flag to enable/disable DNS support in the VPC. Defaults true.
- instance
Tenancy string Tenancy of instances spin up within VPC.
- ipv6Association
Id string The association ID for the IPv6 CIDR block of the VPC
- ipv6Cidr
Block string The IPv6 CIDR block of the VPC
- main
Route stringTable Id The ID of the main route table associated with this VPC. Note that you can change a VPC’s main route table by using an
aws.ec2.MainRouteTableAssociation- owner
Id string The ID of the AWS account that owns the VPC.
- {[key: string]: string}
A map of tags to assign to the resource.
- arn str
Amazon Resource Name (ARN) of VPC
- assign_
generated_ boolipv6_ cidr_ block Whether or not an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC was assigned
- cidr_
block str The CIDR block of the VPC
- default_
network_ stracl_ id The ID of the network ACL created by default on VPC creation
- default_
route_ strtable_ id The ID of the route table created by default on VPC creation
- default_
security_ strgroup_ id The ID of the security group created by default on VPC creation
- dhcp_
options_ strid - enable_
classiclink bool A boolean flag to enable/disable ClassicLink for the VPC. Only valid in regions and accounts that support EC2 Classic. See the ClassicLink documentation for more information. Defaults false.
- enable_
classiclink_ booldns_ support - enable_
dns_ boolhostnames A boolean flag to enable/disable DNS hostnames in the VPC. Defaults false.
- enable_
dns_ boolsupport A boolean flag to enable/disable DNS support in the VPC. Defaults true.
- instance_
tenancy str Tenancy of instances spin up within VPC.
- ipv6_
association_ strid The association ID for the IPv6 CIDR block of the VPC
- ipv6_
cidr_ strblock The IPv6 CIDR block of the VPC
- main_
route_ strtable_ id The ID of the main route table associated with this VPC. Note that you can change a VPC’s main route table by using an
aws.ec2.MainRouteTableAssociation- owner_
id str The ID of the AWS account that owns the VPC.
- Dict[str, str]
A map of tags to assign to the resource.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.