cdk-real-drift 0.12.61 → 0.12.62
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 +28 -5
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -9687,6 +9687,24 @@ const readEc2Eip = async ({ physicalId, region }) => {
|
|
|
9687
9687
|
if (tags && tags.length > 0) model.Tags = tags;
|
|
9688
9688
|
return model;
|
|
9689
9689
|
};
|
|
9690
|
+
const resolveEc2EipCcIdentifier = async (physicalId, region) => {
|
|
9691
|
+
const id = str$1(physicalId);
|
|
9692
|
+
if (!id || !region) return void 0;
|
|
9693
|
+
try {
|
|
9694
|
+
const c = new EC2Client({
|
|
9695
|
+
region,
|
|
9696
|
+
...READ_RETRY
|
|
9697
|
+
});
|
|
9698
|
+
const input = id.startsWith("eipalloc-") ? { AllocationIds: [id] } : { PublicIps: [id] };
|
|
9699
|
+
const addr = (await c.send(new DescribeAddressesCommand(input))).Addresses?.[0];
|
|
9700
|
+
const publicIp = str$1(addr?.PublicIp);
|
|
9701
|
+
const allocationId = str$1(addr?.AllocationId);
|
|
9702
|
+
if (!publicIp || !allocationId) return void 0;
|
|
9703
|
+
return `${publicIp}|${allocationId}`;
|
|
9704
|
+
} catch {
|
|
9705
|
+
return;
|
|
9706
|
+
}
|
|
9707
|
+
};
|
|
9690
9708
|
const dimSetEqual = (a, b) => {
|
|
9691
9709
|
const norm = (v) => JSON.stringify((Array.isArray(v) ? v : []).map((d) => [str$1(d.Name) ?? "", str$1(d.Value) ?? ""]).sort((x, y) => x[0] === y[0] ? x[1].localeCompare(y[1]) : x[0].localeCompare(y[0])));
|
|
9692
9710
|
return norm(a) === norm(b);
|
|
@@ -11994,7 +12012,8 @@ const CC_IDENTIFIER_ADAPTERS = {
|
|
|
11994
12012
|
const { partition } = partitionForRegion(region);
|
|
11995
12013
|
return `arn:${partition}:events:${region}:${account}:rule/${busName}/${ruleName}`;
|
|
11996
12014
|
}
|
|
11997
|
-
}
|
|
12015
|
+
},
|
|
12016
|
+
"AWS::EC2::EIP": (physicalId, _declared, region) => resolveEc2EipCcIdentifier(physicalId, region ?? "")
|
|
11998
12017
|
};
|
|
11999
12018
|
function scalingPolicyComposite(pid, declared) {
|
|
12000
12019
|
if (pid.includes("|")) return pid;
|
|
@@ -12047,7 +12066,7 @@ async function readLive(cc, resource, region, accountId) {
|
|
|
12047
12066
|
return { skippedReason: `SDK override (${resourceType}): ${e.name}` };
|
|
12048
12067
|
}
|
|
12049
12068
|
try {
|
|
12050
|
-
const identifier = CC_IDENTIFIER_ADAPTERS[resourceType]?.(physicalId ?? "", declared, region, accountId) ?? physicalId ?? "";
|
|
12069
|
+
const identifier = await CC_IDENTIFIER_ADAPTERS[resourceType]?.(physicalId ?? "", declared, region, accountId) ?? physicalId ?? "";
|
|
12051
12070
|
const g = await cc.send(new GetResourceCommand({
|
|
12052
12071
|
TypeName: resourceType,
|
|
12053
12072
|
Identifier: identifier
|
|
@@ -16152,7 +16171,11 @@ const SYNTHETIC_READ_SIGNAL_PATHS = {
|
|
|
16152
16171
|
"AWS::Lambda::Function": ["CodeSha256"],
|
|
16153
16172
|
"AWS::Glue::Job": ["ScriptSha256"]
|
|
16154
16173
|
};
|
|
16155
|
-
const CC_REVERTABLE_DESPITE_READ_OVERRIDE = new Set([
|
|
16174
|
+
const CC_REVERTABLE_DESPITE_READ_OVERRIDE = new Set([
|
|
16175
|
+
"AWS::Scheduler::Schedule",
|
|
16176
|
+
"AWS::Cognito::IdentityPool",
|
|
16177
|
+
"AWS::EC2::EIP"
|
|
16178
|
+
]);
|
|
16156
16179
|
const REVERT_SET_DEFAULT_PATHS = new Set([
|
|
16157
16180
|
"AWS::IAM::Role\0MaxSessionDuration",
|
|
16158
16181
|
"AWS::IAM::Role\0Description",
|
|
@@ -17776,7 +17799,7 @@ async function revertStack(p) {
|
|
|
17776
17799
|
try {
|
|
17777
17800
|
const writer = resolveSdkWriter(item.resourceType, item.ops);
|
|
17778
17801
|
if (!writer) throw new Error(`no SDK writer for ${item.resourceType}`);
|
|
17779
|
-
const identifier = CC_IDENTIFIER_ADAPTERS[item.resourceType]?.(item.physicalId, res?.declared ?? {}, region, gathered.desired.accountId) ?? item.physicalId;
|
|
17802
|
+
const identifier = await CC_IDENTIFIER_ADAPTERS[item.resourceType]?.(item.physicalId, res?.declared ?? {}, region, gathered.desired.accountId) ?? item.physicalId;
|
|
17780
17803
|
await writer({
|
|
17781
17804
|
physicalId: item.physicalId,
|
|
17782
17805
|
identifier,
|
|
@@ -17795,7 +17818,7 @@ async function revertStack(p) {
|
|
|
17795
17818
|
}, buildRetryOpts(item.displayId));
|
|
17796
17819
|
} else {
|
|
17797
17820
|
const res = resByLogical.get(item.logicalId);
|
|
17798
|
-
r = await applyRevertItem(cc, item, CC_IDENTIFIER_ADAPTERS[item.resourceType]?.(item.physicalId, res?.declared ?? {}, region, gathered.desired.accountId) ?? item.physicalId, buildRetryOpts(item.displayId));
|
|
17821
|
+
r = await applyRevertItem(cc, item, await CC_IDENTIFIER_ADAPTERS[item.resourceType]?.(item.physicalId, res?.declared ?? {}, region, gathered.desired.accountId) ?? item.physicalId, buildRetryOpts(item.displayId));
|
|
17799
17822
|
}
|
|
17800
17823
|
applied.push({
|
|
17801
17824
|
logicalId: item.logicalId,
|