cdk-real-drift 0.2.72 → 0.2.74
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 +36 -13
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -3426,7 +3426,14 @@ function restrictYaml11Tags(baseTags) {
|
|
|
3426
3426
|
restricted.push(tag);
|
|
3427
3427
|
continue;
|
|
3428
3428
|
}
|
|
3429
|
-
if (tag.tag === TIMESTAMP_TAG)
|
|
3429
|
+
if (tag.tag === TIMESTAMP_TAG) {
|
|
3430
|
+
const scalar = tag;
|
|
3431
|
+
restricted.push({
|
|
3432
|
+
...scalar,
|
|
3433
|
+
resolve: (value) => value
|
|
3434
|
+
});
|
|
3435
|
+
continue;
|
|
3436
|
+
}
|
|
3430
3437
|
if (tag.tag === BOOL_TAG) {
|
|
3431
3438
|
const scalar = tag;
|
|
3432
3439
|
const isTrueTag = scalar.identify?.(true) === true;
|
|
@@ -8814,6 +8821,8 @@ const CC_IDENTIFIER_ADAPTERS = {
|
|
|
8814
8821
|
"AWS::ApiGatewayV2::Stage": compositeWith("ApiId"),
|
|
8815
8822
|
"AWS::ApiGatewayV2::Route": compositeWith("ApiId"),
|
|
8816
8823
|
"AWS::ApiGatewayV2::Integration": compositeWith("ApiId"),
|
|
8824
|
+
"AWS::ApiGatewayV2::Model": compositeWith("ApiId"),
|
|
8825
|
+
"AWS::ApiGatewayV2::Deployment": compositeWith("ApiId"),
|
|
8817
8826
|
"AWS::ApiGatewayV2::Authorizer": (pid, declared) => {
|
|
8818
8827
|
if (pid.includes("|")) return pid;
|
|
8819
8828
|
const apiId = declared.ApiId;
|
|
@@ -8890,6 +8899,12 @@ const CC_IDENTIFIER_ADAPTERS = {
|
|
|
8890
8899
|
const routeId = declared.RouteId;
|
|
8891
8900
|
return typeof apiId === "string" && apiId.length > 0 && typeof routeId === "string" && routeId.length > 0 ? `${apiId}|${routeId}|${pid}` : void 0;
|
|
8892
8901
|
},
|
|
8902
|
+
"AWS::ApiGatewayV2::IntegrationResponse": (pid, declared) => {
|
|
8903
|
+
if (pid.includes("|")) return pid;
|
|
8904
|
+
const apiId = declared.ApiId;
|
|
8905
|
+
const integrationId = declared.IntegrationId;
|
|
8906
|
+
return typeof apiId === "string" && apiId.length > 0 && typeof integrationId === "string" && integrationId.length > 0 ? `${apiId}|${integrationId}|${pid}` : void 0;
|
|
8907
|
+
},
|
|
8893
8908
|
"AWS::GuardDuty::Filter": compositeWith("DetectorId")
|
|
8894
8909
|
};
|
|
8895
8910
|
function scalingPolicyComposite(pid, declared) {
|
|
@@ -10426,12 +10441,15 @@ const writeGlueWorkflow = async (ctx, ops) => {
|
|
|
10426
10441
|
const m = await desiredModel("AWS::Glue::Workflow", ctx, ops);
|
|
10427
10442
|
const name = str(m.Name) ?? str(ctx.physicalId) ?? str(ctx.declared["Name"]);
|
|
10428
10443
|
if (!name) throw new Error("cannot resolve Glue workflow target for revert");
|
|
10429
|
-
|
|
10430
|
-
|
|
10431
|
-
|
|
10432
|
-
|
|
10433
|
-
|
|
10434
|
-
|
|
10444
|
+
const removed = (field) => ops.some((o) => o.op === "remove" && o.path.replace(/^\//, "").split("/")[0] === field);
|
|
10445
|
+
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");
|
|
10446
|
+
const input = { Name: name };
|
|
10447
|
+
if (m.Description !== void 0) input.Description = str(m.Description);
|
|
10448
|
+
else if (removed("Description")) input.Description = "";
|
|
10449
|
+
if (m.DefaultRunProperties !== void 0) input.DefaultRunProperties = m.DefaultRunProperties;
|
|
10450
|
+
else if (removed("DefaultRunProperties")) input.DefaultRunProperties = {};
|
|
10451
|
+
if (m.MaxConcurrentRuns !== void 0) input.MaxConcurrentRuns = Number(m.MaxConcurrentRuns);
|
|
10452
|
+
await new GlueClient({ region: ctx.region }).send(new UpdateWorkflowCommand(input));
|
|
10435
10453
|
};
|
|
10436
10454
|
const GLUE_CONNECTION_PASSWORD_KEY = /PASSWORD/i;
|
|
10437
10455
|
const writeGlueConnection = async (ctx, ops) => {
|
|
@@ -10493,6 +10511,10 @@ const writeCloudWatchAnomalyDetector = async (ctx, ops) => {
|
|
|
10493
10511
|
const writeDlmLifecyclePolicy = async (ctx, ops) => {
|
|
10494
10512
|
const id = str(ctx.physicalId);
|
|
10495
10513
|
if (!id) throw new Error("cannot resolve DLM lifecycle policy id for revert");
|
|
10514
|
+
for (const o of ops) {
|
|
10515
|
+
const top = o.path.replace(/^\//, "").split("/")[0] ?? "";
|
|
10516
|
+
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`);
|
|
10517
|
+
}
|
|
10496
10518
|
const c = new DLMClient({ region: ctx.region });
|
|
10497
10519
|
const m = await desiredModel("AWS::DLM::LifecyclePolicy", ctx, ops);
|
|
10498
10520
|
let details = m.PolicyDetails;
|
|
@@ -10580,7 +10602,8 @@ const writeConfigRuleInputParameters = async (ctx, ops) => {
|
|
|
10580
10602
|
const name = str(ctx.physicalId) ?? str(ctx.declared["ConfigRuleName"]);
|
|
10581
10603
|
if (!name) throw new Error("cannot resolve Config rule name for revert");
|
|
10582
10604
|
const op = ops.find((o) => o.path === "/InputParameters");
|
|
10583
|
-
if (op
|
|
10605
|
+
if (!op) throw new Error("Config rule InputParameters revert: op not found");
|
|
10606
|
+
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");
|
|
10584
10607
|
const client = new ConfigServiceClient({ region: ctx.region });
|
|
10585
10608
|
const rule = (await client.send(new DescribeConfigRulesCommand({ ConfigRuleNames: [name] }))).ConfigRules?.[0];
|
|
10586
10609
|
if (!rule) throw new Error(`Config rule not found for revert: ${name}`);
|
|
@@ -10827,11 +10850,11 @@ const writeDaxCluster = async (ctx, ops) => {
|
|
|
10827
10850
|
const top = op.path.replace(/^\//, "").split("/")[0] ?? "";
|
|
10828
10851
|
const apiKey = DAX_CLUSTER_MODIFY_PARAMS[top];
|
|
10829
10852
|
if (!apiKey) continue;
|
|
10830
|
-
|
|
10831
|
-
if (val
|
|
10832
|
-
|
|
10833
|
-
|
|
10834
|
-
|
|
10853
|
+
let val = desired[top];
|
|
10854
|
+
if (val === void 0) if (top === "NotificationTopicARN" || top === "Description") val = "";
|
|
10855
|
+
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`);
|
|
10856
|
+
input[apiKey] = val;
|
|
10857
|
+
any = true;
|
|
10835
10858
|
}
|
|
10836
10859
|
if (!any) return;
|
|
10837
10860
|
await new DAXClient({ region: ctx.region }).send(new UpdateClusterCommand(input));
|