cdk-preflight 0.0.83 → 0.0.84
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/.jsii +2 -2
- package/docs/rules.md +97 -0
- package/lib/index.js +1 -1
- package/lib/rules.generated.js +1087 -13
- package/package.json +1 -1
package/.jsii
CHANGED
|
@@ -9599,6 +9599,6 @@
|
|
|
9599
9599
|
"symbolId": "src/index:PreflightOptions"
|
|
9600
9600
|
}
|
|
9601
9601
|
},
|
|
9602
|
-
"version": "0.0.
|
|
9603
|
-
"fingerprint": "
|
|
9602
|
+
"version": "0.0.84",
|
|
9603
|
+
"fingerprint": "jZIjrKpXlWuPqRccsARIjDZ3bcEwV6DPTx/b/J9oQ0s="
|
|
9604
9604
|
}
|
package/docs/rules.md
CHANGED
|
@@ -103,11 +103,108 @@
|
|
|
103
103
|
| `pf-apigwv2-websocket-no-cors` | AWS::ApiGatewayV2::Api | WebSocket APIs take no CORS configuration | none |
|
|
104
104
|
| `pf-apigwv2-websocket-payload-version` | AWS::ApiGatewayV2::Integration | WebSocket AWS_PROXY integrations reject payload format 2.0 | none |
|
|
105
105
|
| `pf-apigwv2-websocket-route-selection` | AWS::ApiGatewayV2::Api | WebSocket APIs need RouteSelectionExpression | none |
|
|
106
|
+
| `pf-asg-az-xor-azid` | AWS::AutoScaling::AutoScalingGroup | A group names zones by name or by id, not both | none |
|
|
107
|
+
| `pf-asg-capacity-reservation-none-target-exclusive` | AWS::AutoScaling::AutoScalingGroup | A capacity reservation target needs the capacity-reservations-only preference | none |
|
|
106
108
|
| `pf-asg-cooldown-non-negative` | AWS::AutoScaling::AutoScalingGroup | Cooldown cannot be negative | none |
|
|
107
109
|
| `pf-asg-desired-capacity-range` | AWS::AutoScaling::AutoScalingGroup | DesiredCapacity must sit between MinSize and MaxSize | none |
|
|
110
|
+
| `pf-asg-exactcapacity-nonnegative` | AWS::AutoScaling::ScalingPolicy | ExactCapacity takes no negative ScalingAdjustment | none |
|
|
108
111
|
| `pf-asg-health-check-grace-period` | AWS::AutoScaling::AutoScalingGroup | HealthCheckGracePeriod cannot be negative | none |
|
|
112
|
+
| `pf-asg-healthchecktype-ec2-exclusive-with-others` | AWS::AutoScaling::AutoScalingGroup | EC2 health checks do not combine with the others | none |
|
|
113
|
+
| `pf-asg-instance-maintenance-policy-range-diff` | AWS::AutoScaling::AutoScalingGroup | An instance maintenance policy spans at most 100 points | none |
|
|
114
|
+
| `pf-asg-instance-requirements-allowed-xor-excluded` | AWS::AutoScaling::AutoScalingGroup | Instance requirements allow types or exclude them, not both | none |
|
|
115
|
+
| `pf-asg-instance-requirements-spot-price-protection-xor` | AWS::AutoScaling::AutoScalingGroup | Spot price protection takes one baseline, not two | none |
|
|
116
|
+
| `pf-asg-instance-requirements-vcpu-min-max` | AWS::AutoScaling::AutoScalingGroup | Instance requirement ranges run from Min up to Max | none |
|
|
117
|
+
| `pf-asg-lh-default-result-enum` | AWS::AutoScaling::LifecycleHook | A lifecycle hook DefaultResult is CONTINUE or ABANDON | pending-engine |
|
|
118
|
+
| `pf-asg-lh-fifo-queue-unsupported` | AWS::AutoScaling::LifecycleHook | A FIFO SQS queue cannot be a lifecycle hook target | none |
|
|
119
|
+
| `pf-asg-lh-heartbeat-timeout-range` | AWS::AutoScaling::LifecycleHook | A lifecycle hook HeartbeatTimeout runs from 30 to 7200 seconds | none |
|
|
120
|
+
| `pf-asg-lh-role-forbidden-for-lambda-target` | AWS::AutoScaling::LifecycleHook | A Lambda notification target takes no RoleARN | none |
|
|
121
|
+
| `pf-asg-lh-target-arn-format` | AWS::AutoScaling::LifecycleHook | NotificationTargetARN is an ARN | none |
|
|
122
|
+
| `pf-asg-lh-target-region-match` | AWS::AutoScaling::LifecycleHook | A lifecycle hook target lives in the deploy region | none |
|
|
123
|
+
| `pf-asg-lh-target-role-mutual-required` | AWS::AutoScaling::LifecycleHook | NotificationTargetARN and RoleARN come as a pair | none |
|
|
124
|
+
| `pf-asg-lh-transition-enum` | AWS::AutoScaling::LifecycleHook | LifecycleTransition names one of the two lifecycle transitions | pending-engine |
|
|
125
|
+
| `pf-asg-lifecycle-hook-heartbeat-timeout-range` | AWS::AutoScaling::AutoScalingGroup | An inline lifecycle hook HeartbeatTimeout runs from 30 to 7200 seconds | none |
|
|
126
|
+
| `pf-asg-lifecyclehook-defaultresult-enum` | AWS::AutoScaling::AutoScalingGroup | An inline lifecycle hook DefaultResult is CONTINUE or ABANDON | none |
|
|
127
|
+
| `pf-asg-lifecyclehook-name-duplicate-rejected` | AWS::AutoScaling::AutoScalingGroup | Inline lifecycle hook names are unique within a group | none |
|
|
128
|
+
| `pf-asg-lifecyclehook-rolearn-requires-target` | AWS::AutoScaling::AutoScalingGroup | An inline hook RoleARN needs a notification target | none |
|
|
129
|
+
| `pf-asg-lifecyclehook-transition-enum` | AWS::AutoScaling::AutoScalingGroup | An inline lifecycle hook names one of the two transitions | none |
|
|
130
|
+
| `pf-asg-lifecyclehookspec-max-5` | AWS::AutoScaling::AutoScalingGroup | A group creates at most five lifecycle hooks inline | none |
|
|
131
|
+
| `pf-asg-max-instance-lifetime-range` | AWS::AutoScaling::AutoScalingGroup | MaxInstanceLifetime is zero or a day to a year | none |
|
|
132
|
+
| `pf-asg-metrics-granularity-enum` | AWS::AutoScaling::AutoScalingGroup | Group metrics come at one-minute granularity | none |
|
|
133
|
+
| `pf-asg-metrics-name-enum` | AWS::AutoScaling::AutoScalingGroup | Collected group metrics come from the published list | none |
|
|
134
|
+
| `pf-asg-minadjustmagnitude-positive` | AWS::AutoScaling::ScalingPolicy | MinAdjustmentMagnitude is greater than zero | none |
|
|
135
|
+
| `pf-asg-minadjustmagnitude-requires-percent` | AWS::AutoScaling::ScalingPolicy | MinAdjustmentMagnitude only goes with PercentChangeInCapacity | none |
|
|
136
|
+
| `pf-asg-notification-sns-topics-max-10` | AWS::AutoScaling::AutoScalingGroup | A group notifies at most ten topics | none |
|
|
137
|
+
| `pf-asg-notification-topic-cross-region-rejected` | AWS::AutoScaling::AutoScalingGroup | A notification topic lives in the deploy region | none |
|
|
138
|
+
| `pf-asg-notification-type-enum` | AWS::AutoScaling::AutoScalingGroup | A notification type comes from the published five | none |
|
|
139
|
+
| `pf-asg-ondemand-allocation-prioritized-invalid-with-instance-requirements` | AWS::AutoScaling::AutoScalingGroup | Prioritized On-Demand allocation does not go with instance requirements | none |
|
|
109
140
|
| `pf-asg-ondemand-percentage-max` | AWS::AutoScaling::AutoScalingGroup | OnDemandPercentageAboveBaseCapacity tops out at 100 | none |
|
|
141
|
+
| `pf-asg-overrides-instance-requirements-max-4` | AWS::AutoScaling::AutoScalingGroup | At most four overrides pick instances by requirements | none |
|
|
142
|
+
| `pf-asg-overrides-instance-requirements-xor-type` | AWS::AutoScaling::AutoScalingGroup | An override names an instance type or its requirements, not both | none |
|
|
143
|
+
| `pf-asg-overrides-instancetype-duplicate-rejected` | AWS::AutoScaling::AutoScalingGroup | An instance type appears once across the overrides | none |
|
|
144
|
+
| `pf-asg-overrides-instancetype-max-40` | AWS::AutoScaling::AutoScalingGroup | A mixed instances policy lists at most 40 overrides | none |
|
|
145
|
+
| `pf-asg-overrides-weighted-capacity-uniform` | AWS::AutoScaling::AutoScalingGroup | Instance weights go on every override or none | none |
|
|
146
|
+
| `pf-asg-predictive-alb-requires-resourcelabel` | AWS::AutoScaling::ScalingPolicy | A predictive ALB metric needs a ResourceLabel | none |
|
|
147
|
+
| `pf-asg-predictive-buffer-forbidden-with-honormax` | AWS::AutoScaling::ScalingPolicy | MaxCapacityBuffer only goes with IncreaseMaxCapacity | none |
|
|
148
|
+
| `pf-asg-predictive-buffer-requires-increasemode` | AWS::AutoScaling::ScalingPolicy | IncreaseMaxCapacity needs a MaxCapacityBuffer | none |
|
|
149
|
+
| `pf-asg-predictive-capacity-metric-requires-load-and-scaling` | AWS::AutoScaling::ScalingPolicy | A customized capacity metric is an add-on to a load and a scaling metric | none |
|
|
150
|
+
| `pf-asg-predictive-forbids-other-policy-props` | AWS::AutoScaling::ScalingPolicy | A predictive policy carries no other policy settings | none |
|
|
151
|
+
| `pf-asg-predictive-metric-pair-xor-individual` | AWS::AutoScaling::ScalingPolicy | A metric pair does not mix with individual load and scaling metrics | none |
|
|
152
|
+
| `pf-asg-predictive-metricspecs-single-element` | AWS::AutoScaling::ScalingPolicy | Predictive scaling takes exactly one metric specification | none |
|
|
153
|
+
| `pf-asg-predictive-mq-dup-id-per-array` | AWS::AutoScaling::ScalingPolicy | Metric data query ids are unique within one array | none |
|
|
154
|
+
| `pf-asg-predictive-mq-exactly-one-returndata` | AWS::AutoScaling::ScalingPolicy | Exactly one metric data query returns each predictive metric | none |
|
|
155
|
+
| `pf-asg-predictive-requires-config` | AWS::AutoScaling::ScalingPolicy | A PredictiveScaling policy carries its configuration | none |
|
|
156
|
+
| `pf-asg-sched-capacity-fields-ordering` | AWS::AutoScaling::ScheduledAction | A scheduled action keeps MinSize <= DesiredCapacity <= MaxSize | none |
|
|
157
|
+
| `pf-asg-sched-desiredcapacity-nonnegative` | AWS::AutoScaling::ScheduledAction | A scheduled action DesiredCapacity is not negative | none |
|
|
158
|
+
| `pf-asg-sched-endtime-alone-requires-starttime-or-recurrence` | AWS::AutoScaling::ScheduledAction | EndTime alone does not describe a scheduled action | none |
|
|
159
|
+
| `pf-asg-sched-endtime-not-before-starttime` | AWS::AutoScaling::ScheduledAction | A scheduled action EndTime is not before its StartTime | none |
|
|
160
|
+
| `pf-asg-sched-endtime-not-past` | AWS::AutoScaling::ScheduledAction | A scheduled action EndTime is not a date already gone by | none |
|
|
161
|
+
| `pf-asg-sched-minsize-nonnegative` | AWS::AutoScaling::ScheduledAction | A scheduled action MinSize is not negative | none |
|
|
162
|
+
| `pf-asg-sched-recurrence-field-range` | AWS::AutoScaling::ScheduledAction | Every Recurrence cron field stays in its own range | none |
|
|
163
|
+
| `pf-asg-sched-recurrence-five-fields-no-cron-wrapper` | AWS::AutoScaling::ScheduledAction | Recurrence is a bare five-field cron string | none |
|
|
164
|
+
| `pf-asg-sched-recurrence-rejects-question-mark` | AWS::AutoScaling::ScheduledAction | Recurrence takes no ? wildcard | none |
|
|
165
|
+
| `pf-asg-sched-requires-a-capacity-field` | AWS::AutoScaling::ScheduledAction | A scheduled action sets at least one capacity field | none |
|
|
166
|
+
| `pf-asg-sched-starttime-not-past` | AWS::AutoScaling::ScheduledAction | A scheduled action StartTime is not a date already gone by | none |
|
|
167
|
+
| `pf-asg-sched-starttime-unique-per-group` | AWS::AutoScaling::ScheduledAction | Two scheduled actions on one group need different start times | none |
|
|
168
|
+
| `pf-asg-sched-timezone-iana-only` | AWS::AutoScaling::ScheduledAction | TimeZone is a canonical IANA zone name | none |
|
|
169
|
+
| `pf-asg-simple-forbids-other-policy-props` | AWS::AutoScaling::ScalingPolicy | A SimpleScaling policy carries no step or target-tracking settings | none |
|
|
170
|
+
| `pf-asg-simple-requires-adjustmenttype` | AWS::AutoScaling::ScalingPolicy | A SimpleScaling policy names an AdjustmentType | none |
|
|
171
|
+
| `pf-asg-simple-requires-scalingadjustment` | AWS::AutoScaling::ScalingPolicy | A SimpleScaling policy names a ScalingAdjustment | none |
|
|
172
|
+
| `pf-asg-spot-allocation-capacity-optimized-prioritized-invalid-with-instance-requirements` | AWS::AutoScaling::AutoScalingGroup | Capacity-optimized-prioritized Spot allocation does not go with instance requirements | none |
|
|
173
|
+
| `pf-asg-spot-instance-pools-requires-lowest-price` | AWS::AutoScaling::AutoScalingGroup | SpotInstancePools only counts under lowest-price allocation | none |
|
|
174
|
+
| `pf-asg-step-adjustments-max-20` | AWS::AutoScaling::ScalingPolicy | A step policy holds at most 20 steps | none |
|
|
175
|
+
| `pf-asg-step-both-bounds-null-forbidden` | AWS::AutoScaling::ScalingPolicy | A step names at least one of its two bounds | none |
|
|
176
|
+
| `pf-asg-step-exactcapacity-nonnegative` | AWS::AutoScaling::ScalingPolicy | ExactCapacity takes no negative step adjustment | none |
|
|
177
|
+
| `pf-asg-step-forbids-other-policy-props` | AWS::AutoScaling::ScalingPolicy | A StepScaling policy carries no simple or target-tracking settings | none |
|
|
178
|
+
| `pf-asg-step-interval-gap` | AWS::AutoScaling::ScalingPolicy | Step intervals leave no gap between them | none |
|
|
179
|
+
| `pf-asg-step-interval-overlap` | AWS::AutoScaling::ScalingPolicy | Step intervals do not overlap | none |
|
|
180
|
+
| `pf-asg-step-multiple-null-lower` | AWS::AutoScaling::ScalingPolicy | At most one step leaves out its lower bound | none |
|
|
181
|
+
| `pf-asg-step-multiple-null-upper` | AWS::AutoScaling::ScalingPolicy | At most one step leaves out its upper bound | none |
|
|
182
|
+
| `pf-asg-step-negative-lower-needs-null-lower` | AWS::AutoScaling::ScalingPolicy | A negative lower bound needs a step that runs to minus infinity | none |
|
|
183
|
+
| `pf-asg-step-positive-upper-needs-null-upper` | AWS::AutoScaling::ScalingPolicy | A positive upper bound needs a step that runs to plus infinity | none |
|
|
184
|
+
| `pf-asg-step-requires-adjustmenttype` | AWS::AutoScaling::ScalingPolicy | A StepScaling policy names an AdjustmentType | none |
|
|
185
|
+
| `pf-asg-step-requires-stepadjustments` | AWS::AutoScaling::ScalingPolicy | A StepScaling policy carries at least one step | none |
|
|
186
|
+
| `pf-asg-step-upper-must-exceed-lower` | AWS::AutoScaling::ScalingPolicy | A step upper bound sits above its lower bound | none |
|
|
187
|
+
| `pf-asg-tags-aws-prefix-rejected` | AWS::AutoScaling::AutoScalingGroup | A group tag key does not start with the reserved aws: prefix | none |
|
|
188
|
+
| `pf-asg-tags-max-50` | AWS::AutoScaling::AutoScalingGroup | A group carries at most 50 tags | none |
|
|
110
189
|
| `pf-asg-target-value-positive` | AWS::AutoScaling::ScalingPolicy | Target tracking needs a positive TargetValue | none |
|
|
190
|
+
| `pf-asg-termination-policy-lambda-arn-format` | AWS::AutoScaling::AutoScalingGroup | A termination policy is a published name or a Lambda ARN | none |
|
|
191
|
+
| `pf-asg-tt-alb-requires-resourcelabel` | AWS::AutoScaling::ScalingPolicy | The ALB request-count metric needs a ResourceLabel | none |
|
|
192
|
+
| `pf-asg-tt-custom-metrics-array-exclusive` | AWS::AutoScaling::ScalingPolicy | A metric-math specification takes none of the single-metric fields | none |
|
|
193
|
+
| `pf-asg-tt-custom-simple-requires-namespace-and-statistic` | AWS::AutoScaling::ScalingPolicy | A single-metric specification names its Namespace and Statistic | none |
|
|
194
|
+
| `pf-asg-tt-forbids-step-and-simple-props` | AWS::AutoScaling::ScalingPolicy | A target-tracking policy carries no step or simple settings | none |
|
|
195
|
+
| `pf-asg-tt-metric-spec-exclusive` | AWS::AutoScaling::ScalingPolicy | Target tracking takes exactly one metric specification | none |
|
|
196
|
+
| `pf-asg-tt-mq-exactly-one-returndata` | AWS::AutoScaling::ScalingPolicy | Exactly one metric data query returns the value to track | none |
|
|
197
|
+
| `pf-asg-tt-mq-expression-xor-metricstat` | AWS::AutoScaling::ScalingPolicy | A metric data query holds an Expression or a MetricStat, not both | none |
|
|
198
|
+
| `pf-asg-tt-mq-same-period-required` | AWS::AutoScaling::ScalingPolicy | Every metric in one specification shares a period | none |
|
|
199
|
+
| `pf-asg-tt-non-alb-forbids-resourcelabel` | AWS::AutoScaling::ScalingPolicy | Only the ALB metric takes a ResourceLabel | none |
|
|
200
|
+
| `pf-asg-tt-period-max-60` | AWS::AutoScaling::ScalingPolicy | A customized target-tracking metric uses a period of 60 seconds or less | none |
|
|
201
|
+
| `pf-asg-tt-requires-config` | AWS::AutoScaling::ScalingPolicy | A TargetTrackingScaling policy carries its configuration | none |
|
|
202
|
+
| `pf-asg-vpczone-az-mismatch` | AWS::AutoScaling::AutoScalingGroup | The listed zones cover the subnets the group launches into | none |
|
|
203
|
+
| `pf-asg-wp-hibernated-requires-encrypted-root` | AWS::AutoScaling::WarmPool<br>AWS::EC2::LaunchTemplate | A hibernating warm pool needs an encrypted root volume | none |
|
|
204
|
+
| `pf-asg-wp-poolstate-enum` | AWS::AutoScaling::WarmPool | A warm pool PoolState is Stopped, Running or Hibernated | pending-engine |
|
|
205
|
+
| `pf-asg-wp-spot-incompatible` | AWS::AutoScaling::WarmPool<br>AWS::EC2::LaunchTemplate | A group asking for Spot instances takes no warm pool | none |
|
|
206
|
+
| `pf-asg-wp-weighted-mixed-instances-incompatible` | AWS::AutoScaling::WarmPool<br>AWS::AutoScaling::AutoScalingGroup | A weighted mixed instances policy takes no warm pool | none |
|
|
207
|
+
| `pf-asg-zonalshift-cross-zone-disabled-requires-skip-validation` | AWS::AutoScaling::AutoScalingGroup | Zonal shift needs cross-zone load balancing on its target groups | none |
|
|
111
208
|
| `pf-asg-zone-or-subnet-required` | AWS::AutoScaling::AutoScalingGroup | A group needs AvailabilityZones, AvailabilityZoneIds, or subnets | none |
|
|
112
209
|
| `pf-batch-ce-name` | AWS::Batch::ComputeEnvironment | Compute environment names allow only letters, numbers, hyphen and underscore | none |
|
|
113
210
|
| `pf-batch-ce-vcpus-order` | AWS::Batch::ComputeEnvironment | MaxvCpus must be at least MinvCpus | none |
|
package/lib/index.js
CHANGED
|
@@ -17,7 +17,7 @@ const rules_generated_1 = require("./rules.generated");
|
|
|
17
17
|
* Preflight.apply(app);
|
|
18
18
|
*/
|
|
19
19
|
class Preflight {
|
|
20
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "cdk-preflight.Preflight", version: "0.0.
|
|
20
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "cdk-preflight.Preflight", version: "0.0.84" };
|
|
21
21
|
/**
|
|
22
22
|
* Register the cdk-preflight rules on an App or Stage.
|
|
23
23
|
*/
|