cdk-real-drift 0.2.71 → 0.2.73
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/cli.js +31 -14
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1006,6 +1006,7 @@ function resolve$1(node, ctx) {
|
|
|
1006
1006
|
case "Fn::Cidr": {
|
|
1007
1007
|
if (!Array.isArray(v) || v.length < 3) return UNRESOLVED;
|
|
1008
1008
|
const [ipBlock, count, cidrBits] = v.slice(0, 3).map((x) => resolve$1(x, ctx));
|
|
1009
|
+
if (ipBlock === UNRESOLVED || count === UNRESOLVED || cidrBits === UNRESOLVED) return UNRESOLVED;
|
|
1009
1010
|
return resolveCidr(ipBlock, count, cidrBits);
|
|
1010
1011
|
}
|
|
1011
1012
|
case "Fn::ImportValue": {
|
|
@@ -1126,11 +1127,11 @@ function resolveCidr(ipBlock, count, cidrBits) {
|
|
|
1126
1127
|
if (maskLen < prefix) return UNRESOLVED;
|
|
1127
1128
|
const step = 2 ** bits;
|
|
1128
1129
|
const blockSize = 2 ** (32 - prefix);
|
|
1129
|
-
|
|
1130
|
+
if (base % blockSize !== 0) return UNRESOLVED;
|
|
1130
1131
|
if (cnt * step > blockSize) return UNRESOLVED;
|
|
1131
1132
|
const out = [];
|
|
1132
1133
|
for (let i = 0; i < cnt; i++) {
|
|
1133
|
-
const addr =
|
|
1134
|
+
const addr = base + i * step;
|
|
1134
1135
|
if (addr > 4294967295) return UNRESOLVED;
|
|
1135
1136
|
out.push(`${intToIpv4(addr)}/${maskLen}`);
|
|
1136
1137
|
}
|
|
@@ -8813,6 +8814,8 @@ const CC_IDENTIFIER_ADAPTERS = {
|
|
|
8813
8814
|
"AWS::ApiGatewayV2::Stage": compositeWith("ApiId"),
|
|
8814
8815
|
"AWS::ApiGatewayV2::Route": compositeWith("ApiId"),
|
|
8815
8816
|
"AWS::ApiGatewayV2::Integration": compositeWith("ApiId"),
|
|
8817
|
+
"AWS::ApiGatewayV2::Model": compositeWith("ApiId"),
|
|
8818
|
+
"AWS::ApiGatewayV2::Deployment": compositeWith("ApiId"),
|
|
8816
8819
|
"AWS::ApiGatewayV2::Authorizer": (pid, declared) => {
|
|
8817
8820
|
if (pid.includes("|")) return pid;
|
|
8818
8821
|
const apiId = declared.ApiId;
|
|
@@ -8889,6 +8892,12 @@ const CC_IDENTIFIER_ADAPTERS = {
|
|
|
8889
8892
|
const routeId = declared.RouteId;
|
|
8890
8893
|
return typeof apiId === "string" && apiId.length > 0 && typeof routeId === "string" && routeId.length > 0 ? `${apiId}|${routeId}|${pid}` : void 0;
|
|
8891
8894
|
},
|
|
8895
|
+
"AWS::ApiGatewayV2::IntegrationResponse": (pid, declared) => {
|
|
8896
|
+
if (pid.includes("|")) return pid;
|
|
8897
|
+
const apiId = declared.ApiId;
|
|
8898
|
+
const integrationId = declared.IntegrationId;
|
|
8899
|
+
return typeof apiId === "string" && apiId.length > 0 && typeof integrationId === "string" && integrationId.length > 0 ? `${apiId}|${integrationId}|${pid}` : void 0;
|
|
8900
|
+
},
|
|
8892
8901
|
"AWS::GuardDuty::Filter": compositeWith("DetectorId")
|
|
8893
8902
|
};
|
|
8894
8903
|
function scalingPolicyComposite(pid, declared) {
|
|
@@ -10425,12 +10434,15 @@ const writeGlueWorkflow = async (ctx, ops) => {
|
|
|
10425
10434
|
const m = await desiredModel("AWS::Glue::Workflow", ctx, ops);
|
|
10426
10435
|
const name = str(m.Name) ?? str(ctx.physicalId) ?? str(ctx.declared["Name"]);
|
|
10427
10436
|
if (!name) throw new Error("cannot resolve Glue workflow target for revert");
|
|
10428
|
-
|
|
10429
|
-
|
|
10430
|
-
|
|
10431
|
-
|
|
10432
|
-
|
|
10433
|
-
|
|
10437
|
+
const removed = (field) => ops.some((o) => o.op === "remove" && o.path.replace(/^\//, "").split("/")[0] === field);
|
|
10438
|
+
if (removed("MaxConcurrentRuns")) throw new Error("Glue Workflow MaxConcurrentRuns cannot be cleared via UpdateWorkflow (its unset state, \"no limit\", is not expressible in a selective update); update it manually");
|
|
10439
|
+
const input = { Name: name };
|
|
10440
|
+
if (m.Description !== void 0) input.Description = str(m.Description);
|
|
10441
|
+
else if (removed("Description")) input.Description = "";
|
|
10442
|
+
if (m.DefaultRunProperties !== void 0) input.DefaultRunProperties = m.DefaultRunProperties;
|
|
10443
|
+
else if (removed("DefaultRunProperties")) input.DefaultRunProperties = {};
|
|
10444
|
+
if (m.MaxConcurrentRuns !== void 0) input.MaxConcurrentRuns = Number(m.MaxConcurrentRuns);
|
|
10445
|
+
await new GlueClient({ region: ctx.region }).send(new UpdateWorkflowCommand(input));
|
|
10434
10446
|
};
|
|
10435
10447
|
const GLUE_CONNECTION_PASSWORD_KEY = /PASSWORD/i;
|
|
10436
10448
|
const writeGlueConnection = async (ctx, ops) => {
|
|
@@ -10492,6 +10504,10 @@ const writeCloudWatchAnomalyDetector = async (ctx, ops) => {
|
|
|
10492
10504
|
const writeDlmLifecyclePolicy = async (ctx, ops) => {
|
|
10493
10505
|
const id = str(ctx.physicalId);
|
|
10494
10506
|
if (!id) throw new Error("cannot resolve DLM lifecycle policy id for revert");
|
|
10507
|
+
for (const o of ops) {
|
|
10508
|
+
const top = o.path.replace(/^\//, "").split("/")[0] ?? "";
|
|
10509
|
+
if (o.op === "remove" && (top === "State" || top === "Description" || top === "ExecutionRoleArn")) throw new Error(`DLM LifecyclePolicy ${top} cannot be cleared via UpdateLifecyclePolicy (no safe clearing value; needs live confirmation); update it manually`);
|
|
10510
|
+
}
|
|
10495
10511
|
const c = new DLMClient({ region: ctx.region });
|
|
10496
10512
|
const m = await desiredModel("AWS::DLM::LifecyclePolicy", ctx, ops);
|
|
10497
10513
|
let details = m.PolicyDetails;
|
|
@@ -10579,7 +10595,8 @@ const writeConfigRuleInputParameters = async (ctx, ops) => {
|
|
|
10579
10595
|
const name = str(ctx.physicalId) ?? str(ctx.declared["ConfigRuleName"]);
|
|
10580
10596
|
if (!name) throw new Error("cannot resolve Config rule name for revert");
|
|
10581
10597
|
const op = ops.find((o) => o.path === "/InputParameters");
|
|
10582
|
-
if (op
|
|
10598
|
+
if (!op) throw new Error("Config rule InputParameters revert: op not found");
|
|
10599
|
+
if (op.op !== "add") throw new Error("Config rule InputParameters cannot be cleared via revert: PutConfigRule re-PUTs the whole rule and the exact clearing payload (omit vs empty {}) needs live confirmation; clear it manually");
|
|
10583
10600
|
const client = new ConfigServiceClient({ region: ctx.region });
|
|
10584
10601
|
const rule = (await client.send(new DescribeConfigRulesCommand({ ConfigRuleNames: [name] }))).ConfigRules?.[0];
|
|
10585
10602
|
if (!rule) throw new Error(`Config rule not found for revert: ${name}`);
|
|
@@ -10826,11 +10843,11 @@ const writeDaxCluster = async (ctx, ops) => {
|
|
|
10826
10843
|
const top = op.path.replace(/^\//, "").split("/")[0] ?? "";
|
|
10827
10844
|
const apiKey = DAX_CLUSTER_MODIFY_PARAMS[top];
|
|
10828
10845
|
if (!apiKey) continue;
|
|
10829
|
-
|
|
10830
|
-
if (val
|
|
10831
|
-
|
|
10832
|
-
|
|
10833
|
-
|
|
10846
|
+
let val = desired[top];
|
|
10847
|
+
if (val === void 0) if (top === "NotificationTopicARN" || top === "Description") val = "";
|
|
10848
|
+
else throw new Error(`DAX Cluster ${top} cannot be cleared via UpdateCluster (its unset state is AWS-assigned, not expressible in a selective modify); update it manually`);
|
|
10849
|
+
input[apiKey] = val;
|
|
10850
|
+
any = true;
|
|
10834
10851
|
}
|
|
10835
10852
|
if (!any) return;
|
|
10836
10853
|
await new DAXClient({ region: ctx.region }).send(new UpdateClusterCommand(input));
|