@pulumi/awsx 2.1.1 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/ec2/vpc.d.ts CHANGED
@@ -1,6 +1,49 @@
1
1
  import * as pulumi from "@pulumi/pulumi";
2
2
  import * as inputs from "../types/input";
3
+ import * as outputs from "../types/output";
4
+ import * as enums from "../types/enums";
3
5
  import * as pulumiAws from "@pulumi/aws";
6
+ /**
7
+ * The VPC component provides a VPC with configured subnets and NAT gateways.
8
+ *
9
+ * ## Example Usage
10
+ *
11
+ * Basic usage:
12
+ *
13
+ * ```typescript
14
+ * import * as pulumi from "@pulumi/pulumi";
15
+ * import * as awsx from "@pulumi/awsx";
16
+ *
17
+ * const vpc = new awsx.ec2.Vpc("vpc", {});
18
+ * export const vpcId = vpc.vpcId;
19
+ * export const vpcPrivateSubnetIds = vpc.privateSubnetIds;
20
+ * export const vpcPublicSubnetIds = vpc.publicSubnetIds;
21
+ * ```
22
+ *
23
+ * ## Subnet Layout Strategies
24
+ *
25
+ * If no subnet arguments are passed, then a public and private subnet will be created in each AZ with default sizing. The layout of these subnets can be customised by specifying additional arguments.
26
+ *
27
+ * All strategies are designed to help build a uniform layout of subnets each each availability zone.
28
+ *
29
+ * If no strategy is specified, "Legacy" will be used for backward compatibility reasons. In the next major version this will change to defaulting to "Auto".
30
+ *
31
+ * ### Auto
32
+ *
33
+ * The "Auto" strategy divides the VPC space evenly between the availability zones. Within each availability zone it allocates each subnet in the order they were specified. If a CIDR mask or size was not specified it will default to an even division of the availability zone range. If subnets have different sizes, spaces will be automatically added to ensure subnets don't overlap (e.g. where a previous subnet is smaller than the next).
34
+ *
35
+ * ### Exact
36
+ *
37
+ * The "Exact" strategy is the same as "Auto" with the additional requirement to explicitly specify what the whole of each zone's range will be used for. Where you expect to have a gap between or after subnets, these must be passed using the subnet specification type "Unused" to show all space has been properly accounted for.
38
+ *
39
+ * ### Explicit CIDR Blocks
40
+ *
41
+ * If you prefer to do your CIDR block calculations yourself, you can specify a list of CIDR blocks for each subnet spec which it will be allocated for in each availability zone. If using explicit layouts, all subnet specs must be declared with explicit CIDR blocks. Each list of CIDR blocks must have the same length as the number of availability zones for the VPC.
42
+ *
43
+ * ### Legacy
44
+ *
45
+ * The "Legacy" works similarly to the "Auto" strategy except that within each availability zone it allocates the private subnet first, followed by the private subnets, and lastly the isolated subnets. The order of subnet specifications of the same type can be changed, but the ordering of private, public, isolated is not overridable. For more flexibility we recommend moving to the "Auto" strategy. The output property `subnetLayout` shows the configuration required if specifying the "Auto" strategy to maintain the current layout.
46
+ */
4
47
  export declare class Vpc extends pulumi.ComponentResource {
5
48
  /**
6
49
  * Returns true if the given object is an instance of Vpc. This is designed to work even
@@ -34,6 +77,10 @@ export declare class Vpc extends pulumi.ComponentResource {
34
77
  * The Routes for the VPC.
35
78
  */
36
79
  readonly routes: pulumi.Output<pulumiAws.ec2.Route[]>;
80
+ /**
81
+ * The resolved subnet specs layout deployed to each availability zone.
82
+ */
83
+ readonly subnetLayout: pulumi.Output<outputs.ec2.ResolvedSubnetSpec[]>;
37
84
  /**
38
85
  * The VPC's subnets.
39
86
  */
@@ -64,6 +111,10 @@ export interface VpcArgs {
64
111
  * 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`
65
112
  */
66
113
  assignGeneratedIpv6CidrBlock?: pulumi.Input<boolean>;
114
+ /**
115
+ * The netmask for each available zone to be aligned to. This is optional, the default value is inferred based on an even distribution of available space from the VPC's CIDR block after being divided evenly by the number of availability zones.
116
+ */
117
+ availabilityZoneCidrMask?: number;
67
118
  /**
68
119
  * 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.
69
120
  */
@@ -124,6 +175,10 @@ export interface VpcArgs {
124
175
  * 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. Private subnets are allocated CIDR block ranges first, followed by Private subnets, and Isolated subnets are allocated last.
125
176
  */
126
177
  subnetSpecs?: inputs.ec2.SubnetSpecArgs[];
178
+ /**
179
+ * The strategy to use when allocating subnets for the VPC. Optional. Defaults to `Legacy`.
180
+ */
181
+ subnetStrategy?: enums.ec2.SubnetAllocationStrategy;
127
182
  /**
128
183
  * 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.
129
184
  */
package/ec2/vpc.js CHANGED
@@ -5,6 +5,47 @@ Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.Vpc = void 0;
6
6
  const pulumi = require("@pulumi/pulumi");
7
7
  const utilities = require("../utilities");
8
+ /**
9
+ * The VPC component provides a VPC with configured subnets and NAT gateways.
10
+ *
11
+ * ## Example Usage
12
+ *
13
+ * Basic usage:
14
+ *
15
+ * ```typescript
16
+ * import * as pulumi from "@pulumi/pulumi";
17
+ * import * as awsx from "@pulumi/awsx";
18
+ *
19
+ * const vpc = new awsx.ec2.Vpc("vpc", {});
20
+ * export const vpcId = vpc.vpcId;
21
+ * export const vpcPrivateSubnetIds = vpc.privateSubnetIds;
22
+ * export const vpcPublicSubnetIds = vpc.publicSubnetIds;
23
+ * ```
24
+ *
25
+ * ## Subnet Layout Strategies
26
+ *
27
+ * If no subnet arguments are passed, then a public and private subnet will be created in each AZ with default sizing. The layout of these subnets can be customised by specifying additional arguments.
28
+ *
29
+ * All strategies are designed to help build a uniform layout of subnets each each availability zone.
30
+ *
31
+ * If no strategy is specified, "Legacy" will be used for backward compatibility reasons. In the next major version this will change to defaulting to "Auto".
32
+ *
33
+ * ### Auto
34
+ *
35
+ * The "Auto" strategy divides the VPC space evenly between the availability zones. Within each availability zone it allocates each subnet in the order they were specified. If a CIDR mask or size was not specified it will default to an even division of the availability zone range. If subnets have different sizes, spaces will be automatically added to ensure subnets don't overlap (e.g. where a previous subnet is smaller than the next).
36
+ *
37
+ * ### Exact
38
+ *
39
+ * The "Exact" strategy is the same as "Auto" with the additional requirement to explicitly specify what the whole of each zone's range will be used for. Where you expect to have a gap between or after subnets, these must be passed using the subnet specification type "Unused" to show all space has been properly accounted for.
40
+ *
41
+ * ### Explicit CIDR Blocks
42
+ *
43
+ * If you prefer to do your CIDR block calculations yourself, you can specify a list of CIDR blocks for each subnet spec which it will be allocated for in each availability zone. If using explicit layouts, all subnet specs must be declared with explicit CIDR blocks. Each list of CIDR blocks must have the same length as the number of availability zones for the VPC.
44
+ *
45
+ * ### Legacy
46
+ *
47
+ * The "Legacy" works similarly to the "Auto" strategy except that within each availability zone it allocates the private subnet first, followed by the private subnets, and lastly the isolated subnets. The order of subnet specifications of the same type can be changed, but the ordering of private, public, isolated is not overridable. For more flexibility we recommend moving to the "Auto" strategy. The output property `subnetLayout` shows the configuration required if specifying the "Auto" strategy to maintain the current layout.
48
+ */
8
49
  class Vpc extends pulumi.ComponentResource {
9
50
  /**
10
51
  * Returns true if the given object is an instance of Vpc. This is designed to work even
@@ -28,6 +69,7 @@ class Vpc extends pulumi.ComponentResource {
28
69
  opts = opts || {};
29
70
  if (!opts.id) {
30
71
  resourceInputs["assignGeneratedIpv6CidrBlock"] = args ? args.assignGeneratedIpv6CidrBlock : undefined;
72
+ resourceInputs["availabilityZoneCidrMask"] = args ? args.availabilityZoneCidrMask : undefined;
31
73
  resourceInputs["availabilityZoneNames"] = args ? args.availabilityZoneNames : undefined;
32
74
  resourceInputs["cidrBlock"] = args ? args.cidrBlock : undefined;
33
75
  resourceInputs["enableDnsHostnames"] = args ? args.enableDnsHostnames : undefined;
@@ -43,6 +85,7 @@ class Vpc extends pulumi.ComponentResource {
43
85
  resourceInputs["natGateways"] = args ? args.natGateways : undefined;
44
86
  resourceInputs["numberOfAvailabilityZones"] = args ? args.numberOfAvailabilityZones : undefined;
45
87
  resourceInputs["subnetSpecs"] = args ? args.subnetSpecs : undefined;
88
+ resourceInputs["subnetStrategy"] = args ? args.subnetStrategy : undefined;
46
89
  resourceInputs["tags"] = args ? args.tags : undefined;
47
90
  resourceInputs["vpcEndpointSpecs"] = args ? args.vpcEndpointSpecs : undefined;
48
91
  resourceInputs["eips"] = undefined /*out*/;
@@ -53,6 +96,7 @@ class Vpc extends pulumi.ComponentResource {
53
96
  resourceInputs["routeTableAssociations"] = undefined /*out*/;
54
97
  resourceInputs["routeTables"] = undefined /*out*/;
55
98
  resourceInputs["routes"] = undefined /*out*/;
99
+ resourceInputs["subnetLayout"] = undefined /*out*/;
56
100
  resourceInputs["subnets"] = undefined /*out*/;
57
101
  resourceInputs["vpc"] = undefined /*out*/;
58
102
  resourceInputs["vpcEndpoints"] = undefined /*out*/;
@@ -68,6 +112,7 @@ class Vpc extends pulumi.ComponentResource {
68
112
  resourceInputs["routeTableAssociations"] = undefined /*out*/;
69
113
  resourceInputs["routeTables"] = undefined /*out*/;
70
114
  resourceInputs["routes"] = undefined /*out*/;
115
+ resourceInputs["subnetLayout"] = undefined /*out*/;
71
116
  resourceInputs["subnets"] = undefined /*out*/;
72
117
  resourceInputs["vpc"] = undefined /*out*/;
73
118
  resourceInputs["vpcEndpoints"] = undefined /*out*/;
package/ec2/vpc.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"vpc.js","sourceRoot":"","sources":["../../ec2/vpc.ts"],"names":[],"mappings":";AAAA,+DAA+D;AAC/D,iFAAiF;;;AAEjF,yCAAyC;AAIzC,0CAA0C;AAI1C,MAAa,GAAI,SAAQ,MAAM,CAAC,iBAAiB;IAI7C;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC7B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE;YACnC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,GAAG,CAAC,cAAc,CAAC,KAAK,GAAG,CAAC,YAAY,CAAC;IACpD,CAAC;IA2CD;;;;;;OAMG;IACH,YAAY,IAAY,EAAE,IAAc,EAAE,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AAC,CAAC;QACnE,KAAK,CAAC,GAAG,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IACzE,CAAC;;AA1HL,kBA2HC;AA1HG,gBAAgB;AACO,gBAAY,GAAG,cAAc,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pulumi/awsx",
3
- "version": "v2.1.1",
3
+ "version": "v2.2.0",
4
4
  "keywords": [
5
5
  "pulumi",
6
6
  "aws",
@@ -13,7 +13,7 @@
13
13
  "license": "Apache-2.0",
14
14
  "scripts": {
15
15
  "build": "tsc",
16
- "install": "node scripts/install-pulumi-plugin.js resource awsx v2.1.1"
16
+ "install": "node scripts/install-pulumi-plugin.js resource awsx v2.2.0"
17
17
  },
18
18
  "dependencies": {
19
19
  "@aws-sdk/client-ecs": "^3.405.0",
package/package.json.dev CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pulumi/awsx",
3
- "version": "v2.1.1",
3
+ "version": "v2.2.0",
4
4
  "keywords": [
5
5
  "pulumi",
6
6
  "aws",
@@ -16,6 +16,24 @@ export declare const NatGatewayStrategy: {
16
16
  * A strategy for creating NAT Gateways for private subnets within a VPC.
17
17
  */
18
18
  export type NatGatewayStrategy = (typeof NatGatewayStrategy)[keyof typeof NatGatewayStrategy];
19
+ export declare const SubnetAllocationStrategy: {
20
+ /**
21
+ * Group private subnets first, followed by public subnets, followed by isolated subnets.
22
+ */
23
+ readonly Legacy: "Legacy";
24
+ /**
25
+ * Order remains as specified by specs, allowing gaps where required.
26
+ */
27
+ readonly Auto: "Auto";
28
+ /**
29
+ * Whole range of VPC must be accounted for, using "Unused" spec types for deliberate gaps.
30
+ */
31
+ readonly Exact: "Exact";
32
+ };
33
+ /**
34
+ * Strategy for calculating subnet ranges from the subnet specifications.
35
+ */
36
+ export type SubnetAllocationStrategy = (typeof SubnetAllocationStrategy)[keyof typeof SubnetAllocationStrategy];
19
37
  export declare const SubnetType: {
20
38
  /**
21
39
  * A subnet whose hosts can directly communicate with the internet.
@@ -29,6 +47,10 @@ export declare const SubnetType: {
29
47
  * A subnet whose hosts have no connectivity with the internet.
30
48
  */
31
49
  readonly Isolated: "Isolated";
50
+ /**
51
+ * A subnet range which is reserved, but no subnet will be created.
52
+ */
53
+ readonly Unused: "Unused";
32
54
  };
33
55
  /**
34
56
  * A type of subnet within a VPC.
@@ -2,7 +2,7 @@
2
2
  // *** WARNING: this file was generated by pulumi-gen-awsx. ***
3
3
  // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.SubnetType = exports.NatGatewayStrategy = void 0;
5
+ exports.SubnetType = exports.SubnetAllocationStrategy = exports.NatGatewayStrategy = void 0;
6
6
  exports.NatGatewayStrategy = {
7
7
  /**
8
8
  * Do not create any NAT Gateways. Resources in private subnets will not be able to access the internet.
@@ -17,6 +17,20 @@ exports.NatGatewayStrategy = {
17
17
  */
18
18
  OnePerAz: "OnePerAz",
19
19
  };
20
+ exports.SubnetAllocationStrategy = {
21
+ /**
22
+ * Group private subnets first, followed by public subnets, followed by isolated subnets.
23
+ */
24
+ Legacy: "Legacy",
25
+ /**
26
+ * Order remains as specified by specs, allowing gaps where required.
27
+ */
28
+ Auto: "Auto",
29
+ /**
30
+ * Whole range of VPC must be accounted for, using "Unused" spec types for deliberate gaps.
31
+ */
32
+ Exact: "Exact",
33
+ };
20
34
  exports.SubnetType = {
21
35
  /**
22
36
  * A subnet whose hosts can directly communicate with the internet.
@@ -30,5 +44,9 @@ exports.SubnetType = {
30
44
  * A subnet whose hosts have no connectivity with the internet.
31
45
  */
32
46
  Isolated: "Isolated",
47
+ /**
48
+ * A subnet range which is reserved, but no subnet will be created.
49
+ */
50
+ Unused: "Unused",
33
51
  };
34
52
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../types/enums/ec2/index.ts"],"names":[],"mappings":";AAAA,+DAA+D;AAC/D,iFAAiF;;;AAGpE,QAAA,kBAAkB,GAAG;IAC9B;;OAEG;IACH,IAAI,EAAE,MAAM;IACZ;;OAEG;IACH,MAAM,EAAE,QAAQ;IAChB;;OAEG;IACH,QAAQ,EAAE,UAAU;CACd,CAAC;AAOE,QAAA,UAAU,GAAG;IACtB;;OAEG;IACH,MAAM,EAAE,QAAQ;IAChB;;OAEG;IACH,OAAO,EAAE,SAAS;IAClB;;OAEG;IACH,QAAQ,EAAE,UAAU;CACd,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../types/enums/ec2/index.ts"],"names":[],"mappings":";AAAA,+DAA+D;AAC/D,iFAAiF;;;AAGpE,QAAA,kBAAkB,GAAG;IAC9B;;OAEG;IACH,IAAI,EAAE,MAAM;IACZ;;OAEG;IACH,MAAM,EAAE,QAAQ;IAChB;;OAEG;IACH,QAAQ,EAAE,UAAU;CACd,CAAC;AAOE,QAAA,wBAAwB,GAAG;IACpC;;OAEG;IACH,MAAM,EAAE,QAAQ;IAChB;;OAEG;IACH,IAAI,EAAE,MAAM;IACZ;;OAEG;IACH,KAAK,EAAE,OAAO;CACR,CAAC;AAOE,QAAA,UAAU,GAAG;IACtB;;OAEG;IACH,MAAM,EAAE,QAAQ;IAChB;;OAEG;IACH,OAAO,EAAE,SAAS;IAClB;;OAEG;IACH,QAAQ,EAAE,UAAU;IACpB;;OAEG;IACH,MAAM,EAAE,QAAQ;CACV,CAAC"}
package/types/input.d.ts CHANGED
@@ -362,13 +362,21 @@ export declare namespace ec2 {
362
362
  */
363
363
  interface SubnetSpecArgs {
364
364
  /**
365
- * The bitmask for the subnet's CIDR block.
365
+ * An optional list of CIDR blocks to assign to the subnet spec for each AZ. If specified, the count must match the number of AZs being used for the VPC, and must also be specified for all other subnet specs.
366
+ */
367
+ cidrBlocks?: string[];
368
+ /**
369
+ * The netmask for the subnet's CIDR block. This is optional, the default value is inferred from the `cidrMask`, `cidrBlocks` or based on an even distribution of available space from the VPC's CIDR block after being divided evenly by availability zone.
366
370
  */
367
371
  cidrMask?: number;
368
372
  /**
369
373
  * The subnet's name. Will be templated upon creation.
370
374
  */
371
375
  name?: string;
376
+ /**
377
+ * Optional size of the subnet's CIDR block - the number of hosts. This value must be a power of 2 (e.g. 256, 512, 1024, etc.). This is optional, the default value is inferred from the `cidrMask`, `cidrBlocks` or based on an even distribution of available space from the VPC's CIDR block after being divided evenly by availability zone.
378
+ */
379
+ size?: number;
372
380
  /**
373
381
  * A map of tags to assign to the resource.
374
382
  */
package/types/output.d.ts CHANGED
@@ -1,8 +1,34 @@
1
+ import * as enums from "../types/enums";
1
2
  export declare namespace awsx {
2
3
  }
3
4
  export declare namespace cloudtrail {
4
5
  }
5
6
  export declare namespace ec2 {
7
+ /**
8
+ * Configuration for a VPC subnet spec.
9
+ */
10
+ interface ResolvedSubnetSpec {
11
+ /**
12
+ * An optional list of CIDR blocks to assign to the subnet spec for each AZ. If specified, the count must match the number of AZs being used for the VPC, and must also be specified for all other subnet specs.
13
+ */
14
+ cidrBlocks?: string[];
15
+ /**
16
+ * The netmask for the subnet's CIDR block. This is optional, the default value is inferred from the `cidrMask`, `cidrBlocks` or based on an even distribution of available space from the VPC's CIDR block after being divided evenly by availability zone.
17
+ */
18
+ cidrMask?: number;
19
+ /**
20
+ * The subnet's name. Will be templated upon creation.
21
+ */
22
+ name?: string;
23
+ /**
24
+ * Optional size of the subnet's CIDR block - the number of hosts. This value must be a power of 2 (e.g. 256, 512, 1024, etc.). This is optional, the default value is inferred from the `cidrMask`, `cidrBlocks` or based on an even distribution of available space from the VPC's CIDR block after being divided evenly by availability zone.
25
+ */
26
+ size?: number;
27
+ /**
28
+ * The type of subnet.
29
+ */
30
+ type: enums.ec2.SubnetType;
31
+ }
6
32
  }
7
33
  export declare namespace ecr {
8
34
  }