cdk-real-drift 0.4.19 → 0.4.21
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 +24 -13
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1274,7 +1274,10 @@ function resolve$1(node, ctx, inCondition = false) {
|
|
|
1274
1274
|
}
|
|
1275
1275
|
case "Fn::FindInMap": {
|
|
1276
1276
|
if (!Array.isArray(v) || v.length < 3) return UNRESOLVED;
|
|
1277
|
-
const [mapName, topKey, secondKey] = v.slice(0, 3).map((x) =>
|
|
1277
|
+
const [mapName, topKey, secondKey] = v.slice(0, 3).map((x) => {
|
|
1278
|
+
const r = resolve$1(x, ctx);
|
|
1279
|
+
return typeof r === "number" || typeof r === "boolean" ? String(r) : r;
|
|
1280
|
+
});
|
|
1278
1281
|
if (typeof mapName !== "string" || typeof topKey !== "string" || typeof secondKey !== "string") return UNRESOLVED;
|
|
1279
1282
|
const val = ctx.mappings?.[mapName]?.[topKey]?.[secondKey];
|
|
1280
1283
|
if (val !== void 0) return val;
|
|
@@ -2135,7 +2138,9 @@ const KNOWN_DEFAULTS = {
|
|
|
2135
2138
|
"AWS::EC2::IPAM": { MeteredAccount: "ipam-owner" },
|
|
2136
2139
|
"AWS::EC2::ClientVpnEndpoint": {
|
|
2137
2140
|
VpnPort: 443,
|
|
2138
|
-
DisconnectOnSessionTimeout: true
|
|
2141
|
+
DisconnectOnSessionTimeout: true,
|
|
2142
|
+
TransportProtocol: "udp",
|
|
2143
|
+
SessionTimeoutHours: 24
|
|
2139
2144
|
},
|
|
2140
2145
|
"AWS::DAX::Cluster": { ClusterEndpointEncryptionType: "NONE" },
|
|
2141
2146
|
"AWS::APS::Workspace": { WorkspaceConfiguration: {
|
|
@@ -3515,7 +3520,8 @@ const READGAP_COLLECTION_PATHS = {
|
|
|
3515
3520
|
"AWS::Budgets::Budget": new Set(["NotificationsWithSubscribers"]),
|
|
3516
3521
|
"AWS::DynamoDB::GlobalTable": new Set(["SSESpecification"]),
|
|
3517
3522
|
"AWS::DynamoDB::Table": new Set(["SSESpecification"]),
|
|
3518
|
-
"AWS::CertificateManager::Certificate": new Set(["DomainValidationOptions"])
|
|
3523
|
+
"AWS::CertificateManager::Certificate": new Set(["DomainValidationOptions"]),
|
|
3524
|
+
"AWS::EC2::ClientVpnEndpoint": new Set(["TagSpecifications"])
|
|
3519
3525
|
};
|
|
3520
3526
|
const SCALAR_RETURNED_WHEN_SET = {
|
|
3521
3527
|
"AWS::NetworkFirewall::RuleGroup": new Set(["Description"]),
|
|
@@ -11747,24 +11753,28 @@ const writeEc2ClientVpnEndpoint = async (ctx, ops) => {
|
|
|
11747
11753
|
const desired = await desiredModel("AWS::EC2::ClientVpnEndpoint", ctx, ops);
|
|
11748
11754
|
const input = { ClientVpnEndpointId: id };
|
|
11749
11755
|
let any = false;
|
|
11756
|
+
const unExpressible = [];
|
|
11750
11757
|
const tops = new Set(ops.map((op) => op.path.replace(/^\//, "").split("/")[0] ?? ""));
|
|
11751
11758
|
const removed = (field) => ops.some((o) => o.op === "remove" && (o.path.replace(/^\//, "").split("/")[0] ?? "") === field);
|
|
11752
11759
|
for (const top of tops) if (CLIENT_VPN_SCALAR_PARAMS.has(top)) {
|
|
11753
11760
|
if (desired[top] !== void 0) {
|
|
11754
11761
|
input[top] = desired[top];
|
|
11755
11762
|
any = true;
|
|
11756
|
-
} else if (removed(top)) {
|
|
11757
|
-
|
|
11758
|
-
else if (top === "SplitTunnel") input.SplitTunnel = false;
|
|
11759
|
-
else if (top === "DisconnectOnSessionTimeout") input.DisconnectOnSessionTimeout = false;
|
|
11760
|
-
else throw new Error(`EC2 ClientVpnEndpoint ${top} cannot be cleared via ModifyClientVpnEndpoint (its unset state is not expressible in a selective modify); update it manually`);
|
|
11763
|
+
} else if (removed(top)) if (top === "Description") {
|
|
11764
|
+
input.Description = "";
|
|
11761
11765
|
any = true;
|
|
11762
|
-
}
|
|
11766
|
+
} else if (top === "SplitTunnel") {
|
|
11767
|
+
input.SplitTunnel = false;
|
|
11768
|
+
any = true;
|
|
11769
|
+
} else if (top === "DisconnectOnSessionTimeout") {
|
|
11770
|
+
input.DisconnectOnSessionTimeout = false;
|
|
11771
|
+
any = true;
|
|
11772
|
+
} else unExpressible.push(top);
|
|
11763
11773
|
} else if (top === "ConnectionLogOptions") {
|
|
11764
11774
|
if (desired.ConnectionLogOptions !== void 0) {
|
|
11765
11775
|
input.ConnectionLogOptions = desired.ConnectionLogOptions;
|
|
11766
11776
|
any = true;
|
|
11767
|
-
} else if (removed("ConnectionLogOptions"))
|
|
11777
|
+
} else if (removed("ConnectionLogOptions")) unExpressible.push("ConnectionLogOptions");
|
|
11768
11778
|
} else if (top === "DnsServers") {
|
|
11769
11779
|
const list = desired.DnsServers;
|
|
11770
11780
|
input.DnsServers = Array.isArray(list) && list.length > 0 ? {
|
|
@@ -11779,13 +11789,13 @@ const writeEc2ClientVpnEndpoint = async (ctx, ops) => {
|
|
|
11779
11789
|
input.SecurityGroupIds = list;
|
|
11780
11790
|
input.VpcId = vpcId;
|
|
11781
11791
|
any = true;
|
|
11782
|
-
} else if (removed("SecurityGroupIds"))
|
|
11792
|
+
} else if (removed("SecurityGroupIds")) unExpressible.push("SecurityGroupIds");
|
|
11783
11793
|
}
|
|
11784
|
-
if (
|
|
11785
|
-
await new EC2Client({
|
|
11794
|
+
if (any) await new EC2Client({
|
|
11786
11795
|
region: ctx.region,
|
|
11787
11796
|
...CLIENT_TIMEOUTS
|
|
11788
11797
|
}).send(new ModifyClientVpnEndpointCommand(input));
|
|
11798
|
+
if (unExpressible.length > 0) throw new Error(`EC2 ClientVpnEndpoint ${unExpressible.join(", ")} cannot be cleared via ModifyClientVpnEndpoint (unset state is not expressible in a selective modify)${any ? "; the other revert op(s) were applied" : ""}; update ${unExpressible.length > 1 ? "them" : "it"} manually`);
|
|
11789
11799
|
};
|
|
11790
11800
|
const LEX_CFN_TO_LEX_RESOLUTION_STRATEGY = {
|
|
11791
11801
|
ORIGINAL_VALUE: "OriginalValue",
|
|
@@ -15353,6 +15363,7 @@ async function main(argv) {
|
|
|
15353
15363
|
default:
|
|
15354
15364
|
console.error(`unknown command: ${cmd}\n`);
|
|
15355
15365
|
console.error(HELP);
|
|
15366
|
+
if (argv.includes("--json")) console.log("[]");
|
|
15356
15367
|
return 2;
|
|
15357
15368
|
}
|
|
15358
15369
|
}
|