Documentation ¶
Overview ¶
Package aws-vpc exports types, functions, subpackages for provisioning aws-vpc resources.
Index ¶
- Constants
- func PkgVersion() (semver.Version, error)
- type NatGatewayConfiguration
- type NatGatewayStrategy
- type Provider
- type ProviderArgs
- type ProviderInput
- type ProviderOutput
- type SubnetSpec
- type SubnetType
- type Vpc
- type VpcArgs
- type VpcArray
- type VpcArrayInput
- type VpcArrayOutput
- type VpcEndpointSpec
- type VpcInput
- type VpcMap
- type VpcMapInput
- type VpcMapOutput
- type VpcOutput
Constants ¶
const ( // Do not create any NAT Gateways. Resources in private subnets will not be able to access the internet. NatGatewayStrategyNone = NatGatewayStrategy("None") // Create a single NAT Gateway for the entire VPC. This configuration is not recommended for production infrastructure as it creates a single point of failure. NatGatewayStrategySingle = NatGatewayStrategy("Single") // Create a NAT Gateway in each availability zone. This is the recommended configuration for production infrastructure. NatGatewayStrategyOnePerAz = NatGatewayStrategy("OnePerAz") )
const ( // A subnet whose hosts can directly communicate with the internet. SubnetTypePublic = SubnetType("Public") // A subnet whose hosts can not directly communicate with the internet, but can initiate outbound network traffic via a NAT Gateway. SubnetTypePrivate = SubnetType("Private") // A subnet whose hosts have no connectivity with the internet. SubnetTypeIsolated = SubnetType("Isolated") )
Variables ¶
This section is empty.
Functions ¶
func PkgVersion ¶
PkgVersion uses reflection to determine the version of the current package. If a version cannot be determined, v1 will be assumed. The second return value is always nil.
Types ¶
type NatGatewayConfiguration ¶
type NatGatewayConfiguration struct { // A list of EIP allocation IDs to assign to the NAT Gateways. Optional. If specified, the number of supplied values must match the chosen strategy (either one, or the number of availability zones). ElasticIpAllocationIds []string `pulumi:"elasticIpAllocationIds"` // The strategy for deploying NAT Gateways. Strategy NatGatewayStrategy `pulumi:"strategy"` }
Configuration for NAT Gateways.
type NatGatewayStrategy ¶
type NatGatewayStrategy string
A strategy for creating NAT Gateways for private subnets within a VPC.
type Provider ¶
type Provider struct {
pulumi.ProviderResourceState
}
func NewProvider ¶
func NewProvider(ctx *pulumi.Context, name string, args *ProviderArgs, opts ...pulumi.ResourceOption) (*Provider, error)
NewProvider registers a new resource with the given unique name, arguments, and options.
func (*Provider) ElementType ¶
func (*Provider) ToProviderOutput ¶
func (i *Provider) ToProviderOutput() ProviderOutput
func (*Provider) ToProviderOutputWithContext ¶
func (i *Provider) ToProviderOutputWithContext(ctx context.Context) ProviderOutput
type ProviderArgs ¶
type ProviderArgs struct { }
The set of arguments for constructing a Provider resource.
func (ProviderArgs) ElementType ¶
func (ProviderArgs) ElementType() reflect.Type
type ProviderInput ¶
type ProviderInput interface { pulumi.Input ToProviderOutput() ProviderOutput ToProviderOutputWithContext(ctx context.Context) ProviderOutput }
type ProviderOutput ¶
type ProviderOutput struct{ *pulumi.OutputState }
func (ProviderOutput) ElementType ¶
func (ProviderOutput) ElementType() reflect.Type
func (ProviderOutput) ToProviderOutput ¶
func (o ProviderOutput) ToProviderOutput() ProviderOutput
func (ProviderOutput) ToProviderOutputWithContext ¶
func (o ProviderOutput) ToProviderOutputWithContext(ctx context.Context) ProviderOutput
type SubnetSpec ¶
type SubnetSpec struct { // The bitmask for the subnet's CIDR block. CidrMask int `pulumi:"cidrMask"` // The subnet's name. Will be templated upon creation. Name *string `pulumi:"name"` // The type of subnet. Type SubnetType `pulumi:"type"` }
Configuration for a VPC subnet.
type Vpc ¶
type Vpc struct { pulumi.ResourceState // The EIPs for any NAT Gateways for the VPC. If no NAT Gateways are specified, this will be an empty list. Eips ec2.EipArrayOutput `pulumi:"eips"` // The Internet Gateway for the VPC. InternetGateway ec2.InternetGatewayOutput `pulumi:"internetGateway"` IsolatedSubnetIds pulumi.StringArrayOutput `pulumi:"isolatedSubnetIds"` // The NAT Gateways for the VPC. If no NAT Gateways are specified, this will be an empty list. NatGateways ec2.NatGatewayArrayOutput `pulumi:"natGateways"` PrivateSubnetIds pulumi.StringArrayOutput `pulumi:"privateSubnetIds"` PublicSubnetIds pulumi.StringArrayOutput `pulumi:"publicSubnetIds"` // The Route Table Associations for the VPC. RouteTableAssociations ec2.RouteTableAssociationArrayOutput `pulumi:"routeTableAssociations"` // The Route Tables for the VPC. RouteTables ec2.RouteTableArrayOutput `pulumi:"routeTables"` // The Routes for the VPC. Routes ec2.RouteArrayOutput `pulumi:"routes"` // The VPC's subnets. Subnets ec2.SubnetArrayOutput `pulumi:"subnets"` // The VPC. Vpc ec2.VpcOutput `pulumi:"vpc"` // The VPC Endpoints that are enabled VpcEndpoints ec2.VpcEndpointArrayOutput `pulumi:"vpcEndpoints"` VpcId pulumi.StringOutput `pulumi:"vpcId"` }
func NewVpc ¶
func NewVpc(ctx *pulumi.Context, name string, args *VpcArgs, opts ...pulumi.ResourceOption) (*Vpc, error)
NewVpc registers a new resource with the given unique name, arguments, and options.
func (*Vpc) ElementType ¶
func (*Vpc) ToVpcOutput ¶
type VpcArgs ¶
type VpcArgs struct { // 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` AssignGeneratedIpv6CidrBlock pulumi.BoolPtrInput // 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. AvailabilityZoneNames []string // The CIDR block for the VPC. Optional. Defaults to 10.0.0.0/16. CidrBlock *string // A boolean flag to enable/disable ClassicLink // for the VPC. Only valid in regions and accounts that support EC2 Classic. // See the [ClassicLink documentation](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html) for more information. Defaults false. EnableClassiclink pulumi.BoolPtrInput // A boolean flag to enable/disable ClassicLink DNS Support for the VPC. // Only valid in regions and accounts that support EC2 Classic. EnableClassiclinkDnsSupport pulumi.BoolPtrInput // A boolean flag to enable/disable DNS hostnames in the VPC. Defaults false. EnableDnsHostnames pulumi.BoolPtrInput // A boolean flag to enable/disable DNS support in the VPC. Defaults true. EnableDnsSupport pulumi.BoolPtrInput // 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. InstanceTenancy pulumi.StringPtrInput // 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. Ipv4IpamPoolId pulumi.StringPtrInput // The netmask length of the IPv4 CIDR you want to allocate to this // VPC. Requires specifying a `ipv4_ipam_pool_id`. Ipv4NetmaskLength pulumi.IntPtrInput // IPv6 CIDR block to request from an IPAM Pool. Can be set explicitly // or derived from IPAM using `ipv6_netmask_length`. Ipv6CidrBlock pulumi.StringPtrInput // 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. Ipv6CidrBlockNetworkBorderGroup pulumi.StringPtrInput // IPAM Pool ID for a IPv6 pool. Conflicts with `assign_generated_ipv6_cidr_block`. Ipv6IpamPoolId pulumi.StringPtrInput // 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`. Ipv6NetmaskLength pulumi.IntPtrInput // 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. NatGateways *NatGatewayStrategy // 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. NumberOfAvailabilityZones *int // 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. SubnetSpecs []SubnetSpecArgs // 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. Tags pulumi.StringMapInput // A list of VPC Endpoints specs to be deployed as part of the VPC VpcEndpointSpecs []VpcEndpointSpecArgs }
The set of arguments for constructing a Vpc resource.
func (VpcArgs) ElementType ¶
type VpcArray ¶
type VpcArray []VpcInput
func (VpcArray) ElementType ¶
func (VpcArray) ToVpcArrayOutput ¶
func (i VpcArray) ToVpcArrayOutput() VpcArrayOutput
func (VpcArray) ToVpcArrayOutputWithContext ¶
func (i VpcArray) ToVpcArrayOutputWithContext(ctx context.Context) VpcArrayOutput
type VpcArrayInput ¶
type VpcArrayInput interface { pulumi.Input ToVpcArrayOutput() VpcArrayOutput ToVpcArrayOutputWithContext(context.Context) VpcArrayOutput }
VpcArrayInput is an input type that accepts VpcArray and VpcArrayOutput values. You can construct a concrete instance of `VpcArrayInput` via:
VpcArray{ VpcArgs{...} }
type VpcArrayOutput ¶
type VpcArrayOutput struct{ *pulumi.OutputState }
func (VpcArrayOutput) ElementType ¶
func (VpcArrayOutput) ElementType() reflect.Type
func (VpcArrayOutput) ToVpcArrayOutput ¶
func (o VpcArrayOutput) ToVpcArrayOutput() VpcArrayOutput
func (VpcArrayOutput) ToVpcArrayOutputWithContext ¶
func (o VpcArrayOutput) ToVpcArrayOutputWithContext(ctx context.Context) VpcArrayOutput
type VpcEndpointSpec ¶
type VpcEndpointSpec struct { // Accept the VPC endpoint (the VPC endpoint and service need to be in the same AWS account). AutoAccept *bool `pulumi:"autoAccept"` // A policy to attach to the endpoint that controls access to the service. This is a JSON formatted string. Defaults to full access. All `Gateway` and some `Interface` endpoints support policies - see the [relevant AWS documentation](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-endpoints-access.html) for more details. Policy *string `pulumi:"policy"` // Whether or not to associate a private hosted zone with the specified VPC. Applicable for endpoints of type Interface. Defaults to `false`. PrivateDnsEnabled *bool `pulumi:"privateDnsEnabled"` // One or more route table IDs. Applicable for endpoints of type `Gateway`. RouteTableIds []string `pulumi:"routeTableIds"` // The ID of one or more security groups to associate with the network interface. Applicable for endpoints of type `Interface`. // If no security groups are specified, the VPC's [default security group](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html#DefaultSecurityGroup) is associated with the endpoint. SecurityGroupIds []string `pulumi:"securityGroupIds"` // The service name. For AWS services the service name is usually in the form `com.amazonaws.<region>.<service>` (the SageMaker Notebook service is an exception to this rule, the service name is in the form `aws.sagemaker.<region>.notebook`). ServiceName string `pulumi:"serviceName"` // The ID of one or more subnets in which to create a network interface for the endpoint. Applicable for endpoints of type `GatewayLoadBalancer` and `Interface`. SubnetIds []string `pulumi:"subnetIds"` // 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. Tags map[string]string `pulumi:"tags"` // The VPC endpoint type, `Gateway`, `GatewayLoadBalancer`, or `Interface`. Defaults to `Gateway`. VpcEndpointType *string `pulumi:"vpcEndpointType"` }
type VpcMap ¶
func (VpcMap) ElementType ¶
func (VpcMap) ToVpcMapOutput ¶
func (i VpcMap) ToVpcMapOutput() VpcMapOutput
func (VpcMap) ToVpcMapOutputWithContext ¶
func (i VpcMap) ToVpcMapOutputWithContext(ctx context.Context) VpcMapOutput
type VpcMapInput ¶
type VpcMapInput interface { pulumi.Input ToVpcMapOutput() VpcMapOutput ToVpcMapOutputWithContext(context.Context) VpcMapOutput }
VpcMapInput is an input type that accepts VpcMap and VpcMapOutput values. You can construct a concrete instance of `VpcMapInput` via:
VpcMap{ "key": VpcArgs{...} }
type VpcMapOutput ¶
type VpcMapOutput struct{ *pulumi.OutputState }
func (VpcMapOutput) ElementType ¶
func (VpcMapOutput) ElementType() reflect.Type
func (VpcMapOutput) MapIndex ¶
func (o VpcMapOutput) MapIndex(k pulumi.StringInput) VpcOutput
func (VpcMapOutput) ToVpcMapOutput ¶
func (o VpcMapOutput) ToVpcMapOutput() VpcMapOutput
func (VpcMapOutput) ToVpcMapOutputWithContext ¶
func (o VpcMapOutput) ToVpcMapOutputWithContext(ctx context.Context) VpcMapOutput
type VpcOutput ¶
type VpcOutput struct{ *pulumi.OutputState }