Class 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" },
},
});
}
}
Inherited Members
Namespace: Pulumi.Aws.Ec2
Assembly: Pulumi.Aws.dll
Syntax
public class DefaultVpc : CustomResource
Constructors
View SourceDefaultVpc(String, DefaultVpcArgs, CustomResourceOptions)
Create a DefaultVpc resource with the given unique name, arguments, and options.
Declaration
public DefaultVpc(string name, DefaultVpcArgs args = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| DefaultVpcArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceArn
Amazon Resource Name (ARN) of VPC
Declaration
public Output<string> Arn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
AssignGeneratedIpv6CidrBlock
Whether or not an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC was assigned
Declaration
public Output<bool> AssignGeneratedIpv6CidrBlock { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Boolean> |
CidrBlock
The CIDR block of the VPC
Declaration
public Output<string> CidrBlock { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DefaultNetworkAclId
The ID of the network ACL created by default on VPC creation
Declaration
public Output<string> DefaultNetworkAclId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DefaultRouteTableId
The ID of the route table created by default on VPC creation
Declaration
public Output<string> DefaultRouteTableId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DefaultSecurityGroupId
The ID of the security group created by default on VPC creation
Declaration
public Output<string> DefaultSecurityGroupId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DhcpOptionsId
Declaration
public Output<string> DhcpOptionsId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
EnableClassiclink
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.
Declaration
public Output<bool> EnableClassiclink { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Boolean> |
EnableClassiclinkDnsSupport
Declaration
public Output<bool> EnableClassiclinkDnsSupport { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Boolean> |
EnableDnsHostnames
A boolean flag to enable/disable DNS hostnames in the VPC. Defaults false.
Declaration
public Output<bool> EnableDnsHostnames { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Boolean> |
EnableDnsSupport
A boolean flag to enable/disable DNS support in the VPC. Defaults true.
Declaration
public Output<bool?> EnableDnsSupport { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
InstanceTenancy
Tenancy of instances spin up within VPC.
Declaration
public Output<string> InstanceTenancy { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Ipv6AssociationId
The association ID for the IPv6 CIDR block of the VPC
Declaration
public Output<string> Ipv6AssociationId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Ipv6CidrBlock
The IPv6 CIDR block of the VPC
Declaration
public Output<string> Ipv6CidrBlock { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
MainRouteTableId
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
Declaration
public Output<string> MainRouteTableId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
OwnerId
The ID of the AWS account that owns the VPC.
Declaration
public Output<string> OwnerId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Tags
A map of tags to assign to the resource.
Declaration
public Output<ImmutableDictionary<string, object>> Tags { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>> |
Methods
View SourceGet(String, Input<String>, DefaultVpcState, CustomResourceOptions)
Get an existing DefaultVpc resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static DefaultVpc Get(string name, Input<string> id, DefaultVpcState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| DefaultVpcState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| DefaultVpc |