cdk-real-drift 0.12.44 → 0.12.46
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 +25 -7
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -3181,6 +3181,7 @@ const VALUE_INDEPENDENT_DEFAULT_TOPLEVEL_PATHS = {
|
|
|
3181
3181
|
"PreferredBackupWindow",
|
|
3182
3182
|
"EngineLifecycleSupport"
|
|
3183
3183
|
]),
|
|
3184
|
+
"AWS::RDS::GlobalCluster": new Set(["EngineLifecycleSupport"]),
|
|
3184
3185
|
"AWS::EKS::Cluster": new Set(["Version"]),
|
|
3185
3186
|
"AWS::EKS::Addon": new Set(["AddonVersion"]),
|
|
3186
3187
|
"AWS::Glue::Job": new Set(["MaxCapacity", "AllocatedCapacity"]),
|
|
@@ -9148,6 +9149,17 @@ function sha256Hex(bytes) {
|
|
|
9148
9149
|
|
|
9149
9150
|
//#endregion
|
|
9150
9151
|
//#region src/read/overrides.ts
|
|
9152
|
+
const OVERRIDE_READ_GAP = Symbol.for("cdkrd.overrideReadGap");
|
|
9153
|
+
function overrideReadGap(model, readGapPaths) {
|
|
9154
|
+
return {
|
|
9155
|
+
[OVERRIDE_READ_GAP]: true,
|
|
9156
|
+
model,
|
|
9157
|
+
readGapPaths
|
|
9158
|
+
};
|
|
9159
|
+
}
|
|
9160
|
+
function isOverrideReadResult(x) {
|
|
9161
|
+
return typeof x === "object" && x !== null && x[OVERRIDE_READ_GAP] === true;
|
|
9162
|
+
}
|
|
9151
9163
|
const str$1 = (v) => typeof v === "string" && v.length > 0 ? v : void 0;
|
|
9152
9164
|
const firstStr = (v) => Array.isArray(v) ? str$1(v[0]) : str$1(v);
|
|
9153
9165
|
function parsePolicy(s) {
|
|
@@ -10658,12 +10670,13 @@ const readCognitoIdentityPool = async ({ physicalId, declared, region }) => {
|
|
|
10658
10670
|
}).send(new GetCognitoEventsCommand({ IdentityPoolId: id }));
|
|
10659
10671
|
if (ev.Events && Object.keys(ev.Events).length > 0) model.CognitoEvents = ev.Events;
|
|
10660
10672
|
} catch (e) {
|
|
10661
|
-
if (
|
|
10662
|
-
|
|
10663
|
-
|
|
10664
|
-
const gap = "CognitoEvents" in declared ? " — treating CognitoEvents as an unverifiable read-gap (declared value assumed unchanged; grant cognito-sync:GetCognitoEvents to detect out-of-band drift on it)" : "";
|
|
10665
|
-
process.stderr.write(`[cdkrd] warning: cognito-sync:GetCognitoEvents for ${id} failed (${call})${gap}\n`);
|
|
10673
|
+
if (isCognitoSyncRegionUnavailable(e)) {
|
|
10674
|
+
if ("CognitoEvents" in declared && !("CognitoEvents" in model)) model.CognitoEvents = declared.CognitoEvents;
|
|
10675
|
+
return model;
|
|
10666
10676
|
}
|
|
10677
|
+
const call = e?.name || "unknown error";
|
|
10678
|
+
process.stderr.write(`[cdkrd] warning: cognito-sync:GetCognitoEvents for ${id} failed (${call}) — treating CognitoEvents as an unverifiable read-gap (grant cognito-sync:GetCognitoEvents to detect out-of-band drift on it)\n`);
|
|
10679
|
+
return overrideReadGap(model, ["CognitoEvents"]);
|
|
10667
10680
|
}
|
|
10668
10681
|
return model;
|
|
10669
10682
|
};
|
|
@@ -11751,13 +11764,18 @@ async function readLive(cc, resource, region, accountId) {
|
|
|
11751
11764
|
if (resourceType.startsWith("Custom::") || resourceType === "AWS::CloudFormation::CustomResource") return { skippedReason: "custom resource — no cloud-side model to read" };
|
|
11752
11765
|
const override = SDK_OVERRIDES[resourceType];
|
|
11753
11766
|
if (override) try {
|
|
11754
|
-
const
|
|
11767
|
+
const result = await override({
|
|
11755
11768
|
physicalId: physicalId ?? "",
|
|
11756
11769
|
declared,
|
|
11757
11770
|
region,
|
|
11758
11771
|
accountId
|
|
11759
11772
|
});
|
|
11760
|
-
|
|
11773
|
+
if (result === void 0) return { skippedReason: "SDK override: target not resolvable from template" };
|
|
11774
|
+
if (isOverrideReadResult(result)) return {
|
|
11775
|
+
live: result.model,
|
|
11776
|
+
readGapPaths: result.readGapPaths
|
|
11777
|
+
};
|
|
11778
|
+
return { live: result };
|
|
11761
11779
|
} catch (e) {
|
|
11762
11780
|
if (isResourceNotFoundError(e)) return { deleted: true };
|
|
11763
11781
|
return { skippedReason: `SDK override (${resourceType}): ${e.name}` };
|