@go-to-k/cdkd 0.288.1 → 0.288.3
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/dist/{asg-provider-4QzW_6q5.js → asg-provider-CQrHElrl.js} +16 -12
- package/dist/{asg-provider-4QzW_6q5.js.map → asg-provider-CQrHElrl.js.map} +1 -1
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +2 -2
- package/dist/{deploy-engine-ZPkBIilF.js → deploy-engine-CfxcC3q3.js} +798 -110
- package/dist/deploy-engine-CfxcC3q3.js.map +1 -0
- package/dist/index.d.ts +10 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/{program-BPeZLD0q.js → program-BXH3FeeV.js} +1436 -552
- package/dist/{program-BPeZLD0q.js.map → program-BXH3FeeV.js.map} +1 -1
- package/dist/{version-CGFRodgE.js → version-CEyZvTcB.js} +2 -2
- package/dist/{version-CGFRodgE.js.map → version-CEyZvTcB.js.map} +1 -1
- package/package.json +11 -21
- package/dist/deploy-engine-ZPkBIilF.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $r as ResourceUpdateNotSupportedError, Dt as assertRegionMatch, Q as clearOnUpdateRemoval, Tr as displaySafe, Tt as normalizeAwsTagsToCfn, Zr as ProvisioningError, hi as __exportAll, mt as disableInstanceApiTermination, yn as shellQuote } from "./deploy-engine-CfxcC3q3.js";
|
|
2
2
|
import { f as generateResourceName, n as getLogger } from "./logger-Dw-3y48G.js";
|
|
3
3
|
import { t as awsClientDefaults } from "./aws-client-defaults-D-iYiIJ6.js";
|
|
4
4
|
import { EC2Client } from "@aws-sdk/client-ec2";
|
|
@@ -337,15 +337,18 @@ var ASGProvider = class ASGProvider {
|
|
|
337
337
|
if (resourceType !== "AWS::AutoScaling::AutoScalingGroup") throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId, physicalId);
|
|
338
338
|
this.logger.debug(`Updating AutoScalingGroup ${logicalId}: ${physicalId}`);
|
|
339
339
|
const stringEq = (a, b) => JSON.stringify(a) === JSON.stringify(b);
|
|
340
|
-
if (!stringEq(properties["AutoScalingGroupName"], previousProperties["AutoScalingGroupName"]))
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
340
|
+
if (!stringEq(properties["AutoScalingGroupName"], previousProperties["AutoScalingGroupName"])) {
|
|
341
|
+
const remedy = previousProperties["DeletionProtection"] === "prevent-all-deletion" ? protectedReplacementAdvice({
|
|
342
|
+
evidence: "cdkd's recorded properties for this group carry DeletionProtection: prevent-all-deletion",
|
|
343
|
+
replaceFlags: "cdkd deploy --replace",
|
|
344
|
+
disable: {
|
|
345
|
+
before: "aws autoscaling update-auto-scaling-group --auto-scaling-group-name",
|
|
346
|
+
identifier: physicalId,
|
|
347
|
+
after: "--deletion-protection none"
|
|
348
|
+
}
|
|
349
|
+
}) : "Use cdkd deploy --replace to replace the group.";
|
|
350
|
+
throw new ResourceUpdateNotSupportedError(resourceType, logicalId, "AutoScalingGroupName is immutable on AWS — UpdateAutoScalingGroup does not accept a new name; the name is fixed at creation. " + remedy);
|
|
351
|
+
}
|
|
349
352
|
try {
|
|
350
353
|
await this.applyTagsDiff(physicalId, properties["Tags"], previousProperties["Tags"]);
|
|
351
354
|
await this.applyLoadBalancerNamesDiff(physicalId, properties["LoadBalancerNames"], previousProperties["LoadBalancerNames"]);
|
|
@@ -440,7 +443,8 @@ var ASGProvider = class ASGProvider {
|
|
|
440
443
|
await this.waitForGroupDeleted(physicalId);
|
|
441
444
|
} catch (error) {
|
|
442
445
|
if (this.isNotFoundError(error)) {
|
|
443
|
-
|
|
446
|
+
const clientRegion = await this.getClient().config.region();
|
|
447
|
+
assertRegionMatch(clientRegion, context?.expectedRegion, resourceType, logicalId, physicalId);
|
|
444
448
|
this.logger.debug(`AutoScalingGroup ${physicalId} does not exist, skipping deletion`);
|
|
445
449
|
return;
|
|
446
450
|
}
|
|
@@ -994,4 +998,4 @@ function mapNotificationsToCfn(configurations) {
|
|
|
994
998
|
|
|
995
999
|
//#endregion
|
|
996
1000
|
export { asg_provider_exports as n, protectedReplacementAdvice as r, ASGProvider as t };
|
|
997
|
-
//# sourceMappingURL=asg-provider-
|
|
1001
|
+
//# sourceMappingURL=asg-provider-CQrHElrl.js.map
|