Module ec2
Resources
Functions
Others
Resources
Resource DefaultVpc
class DefaultVpc extends ComponentResource
Pseudo resource representing the default VPC and associated subnets for an account and region. This does not create any resources. This will be replaced with getDefaultVpc
in the future.
constructor
new DefaultVpc(name: string, args?: DefaultVpcArgs, opts?: pulumi.ComponentResourceOptions)
Create a DefaultVpc resource with the given unique name, arguments, and options.
name
The unique name of the resource.args
The arguments to use to populate this resource's properties.opts
A bag of options that control this resource's behavior.
method getData
protected getData(): Promise<TData>
Retrieves the data produces by [initialize]. The data is immediately available in a
derived class’s constructor after the super(...)
call to ComponentResource
.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefined
method initialize
protected initialize(args: Inputs): Promise<TData>
Can be overridden by a subclass to asynchronously initialize data for this Component
automatically when constructed. The data will be available immediately for subclass
constructors to use. To access the data use .getData
.
method isInstance
public static isInstance(obj: any): obj is DefaultVpc
Returns true if the given object is an instance of DefaultVpc. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
method registerOutputs
protected registerOutputs(outputs?: Inputs | Promise<Inputs> | Output<Inputs>): void
registerOutputs registers synthetic outputs that a component has initialized, usually by allocating other child sub-resources and propagating their resulting property values.
ComponentResources can call this at the end of their constructor to indicate that they are
done creating child resources. This is not strictly necessary as this will automatically be
called after the initialize
method completes.
property privateSubnetIds
public privateSubnetIds: pulumi.Output<string[]>;
property publicSubnetIds
public publicSubnetIds: pulumi.Output<string[]>;
property urn
urn: Output<URN>;
urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
property vpcId
public vpcId: pulumi.Output<string>;
The VPC ID for the default VPC
Resource Vpc
class Vpc extends ComponentResource
constructor
new Vpc(name: string, args?: VpcArgs, opts?: pulumi.ComponentResourceOptions)
Create a Vpc resource with the given unique name, arguments, and options.
name
The unique name of the resource.args
The arguments to use to populate this resource's properties.opts
A bag of options that control this resource's behavior.
method getData
protected getData(): Promise<TData>
Retrieves the data produces by [initialize]. The data is immediately available in a
derived class’s constructor after the super(...)
call to ComponentResource
.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefined
method initialize
protected initialize(args: Inputs): Promise<TData>
Can be overridden by a subclass to asynchronously initialize data for this Component
automatically when constructed. The data will be available immediately for subclass
constructors to use. To access the data use .getData
.
method isInstance
public static isInstance(obj: any): obj is Vpc
Returns true if the given object is an instance of Vpc. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
method registerOutputs
protected registerOutputs(outputs?: Inputs | Promise<Inputs> | Output<Inputs>): void
registerOutputs registers synthetic outputs that a component has initialized, usually by allocating other child sub-resources and propagating their resulting property values.
ComponentResources can call this at the end of their constructor to indicate that they are
done creating child resources. This is not strictly necessary as this will automatically be
called after the initialize
method completes.
property eips
public eips: pulumi.Output<Eip[]>;
The EIPs for any NAT Gateways for the VPC. If no NAT Gateways are specified, this will be an empty list.
property internetGateway
public internetGateway: pulumi.Output<InternetGateway>;
The Internet Gateway for the VPC.
property isolatedSubnetIds
public isolatedSubnetIds: pulumi.Output<string[]>;
property natGateways
public natGateways: pulumi.Output<NatGateway[]>;
The NAT Gateways for the VPC. If no NAT Gateways are specified, this will be an empty list.
property privateSubnetIds
public privateSubnetIds: pulumi.Output<string[]>;
property publicSubnetIds
public publicSubnetIds: pulumi.Output<string[]>;
property routeTableAssociations
public routeTableAssociations: pulumi.Output<RouteTableAssociation[]>;
The Route Table Associations for the VPC.
property routeTables
public routeTables: pulumi.Output<RouteTable[]>;
The Route Tables for the VPC.
property routes
public routes: pulumi.Output<Route[]>;
The Routes for the VPC.
property subnets
public subnets: pulumi.Output<Subnet[]>;
The VPC’s subnets.
property urn
urn: Output<URN>;
urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
property vpc
public vpc: pulumi.Output<Vpc>;
The VPC.
property vpcEndpoints
public vpcEndpoints: pulumi.Output<VpcEndpoint[]>;
The VPC Endpoints that are enabled
property vpcId
public vpcId: pulumi.Output<string>;
Functions
Function getDefaultVpc
getDefaultVpc(args?: GetDefaultVpcArgs, opts?: pulumi.InvokeOptions): Promise<GetDefaultVpcResult>
Others
interface DefaultVpcArgs
interface DefaultVpcArgs
The set of arguments for constructing a DefaultVpc resource.
interface GetDefaultVpcArgs
interface GetDefaultVpcArgs
Arguments for getting the default VPC
interface GetDefaultVpcResult
interface GetDefaultVpcResult
Outputs from the default VPC configuration
property privateSubnetIds
privateSubnetIds: string[];
property publicSubnetIds
publicSubnetIds: string[];
property vpcId
vpcId: string;
The VPC ID for the default VPC
interface VpcArgs
interface VpcArgs
The set of arguments for constructing a Vpc resource.
property assignGeneratedIpv6CidrBlock
assignGeneratedIpv6CidrBlock?: pulumi.Input<boolean>;
Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IP addresses, or the size of the CIDR block. Default is false
. Conflicts with ipv6_ipam_pool_id
property availabilityZoneNames
availabilityZoneNames?: string[];
A list of availability zone names to which the subnets defined in subnetSpecs will be deployed. Optional, defaults to the first 3 AZs in the current region.
property cidrBlock
cidrBlock?: undefined | string;
The CIDR block for the VPC. Optional. Defaults to 10.0.0.0/16.
property enableClassiclink
enableClassiclink?: pulumi.Input<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.
property enableClassiclinkDnsSupport
enableClassiclinkDnsSupport?: pulumi.Input<boolean>;
A boolean flag to enable/disable ClassicLink DNS Support for the VPC. Only valid in regions and accounts that support EC2 Classic.
property enableDnsHostnames
enableDnsHostnames?: pulumi.Input<boolean>;
A boolean flag to enable/disable DNS hostnames in the VPC. Defaults false.
property enableDnsSupport
enableDnsSupport?: pulumi.Input<boolean>;
A boolean flag to enable/disable DNS support in the VPC. Defaults true.
property instanceTenancy
instanceTenancy?: pulumi.Input<string>;
A tenancy option for instances launched into the VPC. Default is default
, which ensures that EC2 instances launched in this VPC use the EC2 instance tenancy attribute specified when the EC2 instance is launched. The only other option is dedicated
, which ensures that EC2 instances launched in this VPC are run on dedicated tenancy instances regardless of the tenancy attribute specified at launch. This has a dedicated per region fee of $2 per hour, plus an hourly per instance usage fee.
property ipv4IpamPoolId
ipv4IpamPoolId?: pulumi.Input<string>;
The ID of an IPv4 IPAM pool you want to use for allocating this VPC’s CIDR. IPAM is a VPC feature that you can use to automate your IP address management workflows including assigning, tracking, troubleshooting, and auditing IP addresses across AWS Regions and accounts. Using IPAM you can monitor IP address usage throughout your AWS Organization.
property ipv4NetmaskLength
ipv4NetmaskLength?: pulumi.Input<number>;
The netmask length of the IPv4 CIDR you want to allocate to this VPC. Requires specifying a ipv4_ipam_pool_id
.
property ipv6CidrBlock
ipv6CidrBlock?: pulumi.Input<string>;
IPv6 CIDR block to request from an IPAM Pool. Can be set explicitly or derived from IPAM using ipv6_netmask_length
.
property ipv6CidrBlockNetworkBorderGroup
ipv6CidrBlockNetworkBorderGroup?: pulumi.Input<string>;
By default when an IPv6 CIDR is assigned to a VPC a default ipv6_cidr_block_network_border_group will be set to the region of the VPC. This can be changed to restrict advertisement of public addresses to specific Network Border Groups such as LocalZones.
property ipv6IpamPoolId
ipv6IpamPoolId?: pulumi.Input<string>;
IPAM Pool ID for a IPv6 pool. Conflicts with assign_generated_ipv6_cidr_block
.
property ipv6NetmaskLength
ipv6NetmaskLength?: pulumi.Input<number>;
Netmask length to request from IPAM Pool. Conflicts with ipv6_cidr_block
. This can be omitted if IPAM pool as a allocation_default_netmask_length
set. Valid values: 56
.
property natGateways
natGateways?: inputs.ec2.NatGatewayConfigurationArgs;
Configuration for NAT Gateways. Optional. If private and public subnets are both specified, defaults to one gateway per availability zone. Otherwise, no gateways will be created.
property numberOfAvailabilityZones
numberOfAvailabilityZones?: undefined | number;
A number of availability zones to which the subnets defined in subnetSpecs will be deployed. Optional, defaults to the first 3 AZs in the current region.
property subnetSpecs
subnetSpecs?: SubnetSpecArgs[];
A list of subnet specs that should be deployed to each AZ specified in availabilityZoneNames. Optional. Defaults to a (smaller) public subnet and a (larger) private subnet based on the size of the CIDR block for the VPC.
property tags
tags?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;
A map of tags to assign to the resource. If configured with a provider default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
property vpcEndpointSpecs
vpcEndpointSpecs?: VpcEndpointSpecArgs[];
A list of VPC Endpoints specs to be deployed as part of the VPC
Thank you for your feedback!
If you have a question about how to use Pulumi, reach out in Community Slack.
Open an issue on GitHub to report a problem or suggest an improvement.