@cdkd/cli 0.350.3 → 0.351.0
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/{ambient-client-defaults-CqrM5nDS.js → ambient-client-defaults-BdOY70NL.js} +3 -3
- package/dist/{ambient-client-defaults-CqrM5nDS.js.map → ambient-client-defaults-BdOY70NL.js.map} +1 -1
- package/dist/{asg-provider-hZ4nyheM.js → asg-provider-BhktjcGM.js} +6 -6
- package/dist/{asg-provider-hZ4nyheM.js.map → asg-provider-BhktjcGM.js.map} +1 -1
- package/dist/cli.js +3 -3
- package/dist/{custom-resource-runtime-CcClWTa-.js → custom-resource-runtime-BkEa9HAa.js} +6 -6
- package/dist/{custom-resource-runtime-CcClWTa-.js.map → custom-resource-runtime-BkEa9HAa.js.map} +1 -1
- package/dist/db-associated-roles-DZ1mRuUA.js +74 -0
- package/dist/db-associated-roles-DZ1mRuUA.js.map +1 -0
- package/dist/delete-started-ByP_GmQ7.js +887 -0
- package/dist/delete-started-ByP_GmQ7.js.map +1 -0
- package/dist/{deploy-engine-Sw2eta-t.js → deploy-engine-BZNCiQ-B.js} +748 -313
- package/dist/deploy-engine-BZNCiQ-B.js.map +1 -0
- package/dist/{diff-calculator-BvN5rnLe.js → diff-calculator-vaWjL6sQ.js} +24 -15
- package/dist/{diff-calculator-BvN5rnLe.js.map → diff-calculator-vaWjL6sQ.js.map} +1 -1
- package/dist/{ec2-termination-protection-BIIHrzUa.js → ec2-termination-protection-DpNlPDar.js} +6 -6
- package/dist/{ec2-termination-protection-BIIHrzUa.js.map → ec2-termination-protection-DpNlPDar.js.map} +1 -1
- package/dist/{ecr-uri-CQ_BCOjX.js → ecr-uri-Cd_x_ldh.js} +2 -2
- package/dist/{ecr-uri-CQ_BCOjX.js.map → ecr-uri-Cd_x_ldh.js.map} +1 -1
- package/dist/{expected-bucket-owner-DR9qK772.js → expected-bucket-owner-Ba9LshiP.js} +2 -2
- package/dist/{expected-bucket-owner-DR9qK772.js.map → expected-bucket-owner-Ba9LshiP.js.map} +1 -1
- package/dist/{iam-role-provider-i52A7e_4.js → iam-role-provider-CL-dMrn4.js} +7 -7
- package/dist/{iam-role-provider-i52A7e_4.js.map → iam-role-provider-CL-dMrn4.js.map} +1 -1
- package/dist/{image-plan-DOnhBOIa.js → image-plan-C0B05bHS.js} +8 -8
- package/dist/{image-plan-DOnhBOIa.js.map → image-plan-C0B05bHS.js.map} +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -5
- package/dist/{logger-Ce9kvuBB.js → logger-DpAGzSvV.js} +2 -2
- package/dist/{logger-Ce9kvuBB.js.map → logger-DpAGzSvV.js.map} +1 -1
- package/dist/{neptune-provider-Bir1AdqM.js → neptune-provider-CJuYc8IB.js} +7 -7
- package/dist/{neptune-provider-Bir1AdqM.js.map → neptune-provider-CJuYc8IB.js.map} +1 -1
- package/dist/{program-DAAu8qUr.js → program-CUCE3lAz.js} +180 -51
- package/dist/program-CUCE3lAz.js.map +1 -0
- package/dist/{provider-classes-CM8Txuvb.js → provider-classes-YUbciPtV.js} +317 -65
- package/dist/provider-classes-YUbciPtV.js.map +1 -0
- package/dist/{rds-provider-DmVAU_Mv.js → rds-provider-CbmVLapS.js} +20 -691
- package/dist/rds-provider-CbmVLapS.js.map +1 -0
- package/dist/{read-replica-Bmq3NTlC.js → read-replica-BQ5dRRmm.js} +3 -3
- package/dist/{read-replica-Bmq3NTlC.js.map → read-replica-BQ5dRRmm.js.map} +1 -1
- package/dist/{replacement-rules-lOM1aGPr.js → replacement-rules-DZphESoc.js} +60 -7
- package/dist/replacement-rules-DZphESoc.js.map +1 -0
- package/dist/{resource-deadline-1VcUPyH4.js → resource-deadline-_gEj2hxY.js} +45 -5
- package/dist/resource-deadline-_gEj2hxY.js.map +1 -0
- package/dist/{run-cli-BlVizMfM.js → run-cli-bzXhjxpe.js} +2 -2
- package/dist/{run-cli-BlVizMfM.js.map → run-cli-bzXhjxpe.js.map} +1 -1
- package/dist/{update-removal-BOue-bJm.js → update-removal-DOUUID3B.js} +5 -5
- package/dist/{update-removal-BOue-bJm.js.map → update-removal-DOUUID3B.js.map} +1 -1
- package/dist/{version-DINEmsQH.js → version-DTKcNNDa.js} +2 -2
- package/dist/{version-DINEmsQH.js.map → version-DTKcNNDa.js.map} +1 -1
- package/package.json +3 -3
- package/dist/db-instance-modify-retry-CsIlFgIJ.js +0 -116
- package/dist/db-instance-modify-retry-CsIlFgIJ.js.map +0 -1
- package/dist/delete-started-C0g7PYI-.js +0 -191
- package/dist/delete-started-C0g7PYI-.js.map +0 -1
- package/dist/deploy-engine-Sw2eta-t.js.map +0 -1
- package/dist/program-DAAu8qUr.js.map +0 -1
- package/dist/provider-classes-CM8Txuvb.js.map +0 -1
- package/dist/rds-provider-DmVAU_Mv.js.map +0 -1
- package/dist/replacement-rules-lOM1aGPr.js.map +0 -1
- package/dist/resource-deadline-1VcUPyH4.js.map +0 -1
|
@@ -0,0 +1,887 @@
|
|
|
1
|
+
import { P as safeMsg } from "./version-DTKcNNDa.js";
|
|
2
|
+
import { W as markNonRetryable, at as ProvisioningError } from "./ambient-client-defaults-BdOY70NL.js";
|
|
3
|
+
import { _ as isModifyNotAvailableRefusal, b as stringifyIfAssigned, y as definedAttributes } from "./resource-deadline-_gEj2hxY.js";
|
|
4
|
+
import { isDeepStrictEqual } from "node:util";
|
|
5
|
+
import { DeleteDBInstanceCommand } from "@aws-sdk/client-rds";
|
|
6
|
+
|
|
7
|
+
// src/types/state/helpers.ts
|
|
8
|
+
function shouldRetainResource(deletionPolicy) {
|
|
9
|
+
return deletionPolicy === "Retain" || deletionPolicy === "RetainExceptOnCreate";
|
|
10
|
+
}
|
|
11
|
+
function isReadableBag(container) {
|
|
12
|
+
return typeof container === "object" && container !== null && !Array.isArray(container);
|
|
13
|
+
}
|
|
14
|
+
function describeRegionValueKind(value) {
|
|
15
|
+
if (value === null) return "null";
|
|
16
|
+
if (Array.isArray(value)) return "an array";
|
|
17
|
+
const type = typeof value;
|
|
18
|
+
return `${/^[aeiou]/.test(type) ? "an" : "a"} ${type}`;
|
|
19
|
+
}
|
|
20
|
+
function importableOutputKeys(state) {
|
|
21
|
+
if (!hasReadableExportSet(state)) return [];
|
|
22
|
+
const outputs = state.outputs;
|
|
23
|
+
if (state.exportNames === void 0) return Object.keys(outputs);
|
|
24
|
+
return state.exportNames.filter((name) => typeof name === "string" && Object.hasOwn(outputs, name));
|
|
25
|
+
}
|
|
26
|
+
function acceptedCreateOnlyDropsOf(record) {
|
|
27
|
+
if (record === null || typeof record !== "object") return /* @__PURE__ */ new Set();
|
|
28
|
+
const value = record.acceptedCreateOnlyDrops;
|
|
29
|
+
if (!Array.isArray(value)) return /* @__PURE__ */ new Set();
|
|
30
|
+
return new Set(value.filter((entry) => typeof entry === "string"));
|
|
31
|
+
}
|
|
32
|
+
function hasReadableExportSet(state) {
|
|
33
|
+
if (!isReadableBag(state.outputs)) return false;
|
|
34
|
+
if (state.exportNames === void 0) return true;
|
|
35
|
+
if (!Array.isArray(state.exportNames)) return false;
|
|
36
|
+
return state.exportNames.length === 0 || state.exportNames.some((n) => typeof n === "string");
|
|
37
|
+
}
|
|
38
|
+
function importableOutputs(state) {
|
|
39
|
+
const outputs = isReadableBag(state.outputs) ? state.outputs : {};
|
|
40
|
+
const picked = Object.create(null);
|
|
41
|
+
for (const name of importableOutputKeys(state)) picked[name] = outputs[name];
|
|
42
|
+
return picked;
|
|
43
|
+
}
|
|
44
|
+
function exportNamesCarriedFrom(previous) {
|
|
45
|
+
return previous.exportNames === void 0 ? {} : { exportNames: previous.exportNames };
|
|
46
|
+
}
|
|
47
|
+
function stackInstanceIdCarriedFrom(previous) {
|
|
48
|
+
return {
|
|
49
|
+
...previous?.stackInstanceId !== void 0 && { stackInstanceId: previous.stackInstanceId },
|
|
50
|
+
...previous?.stackIdFromInstance !== void 0 && { stackIdFromInstance: previous.stackIdFromInstance },
|
|
51
|
+
...previous?.retiredNameGenerations !== void 0 && { retiredNameGenerations: previous.retiredNameGenerations },
|
|
52
|
+
...previous?.supersededResources !== void 0 && { supersededResources: previous.supersededResources },
|
|
53
|
+
...previous?.pendingMovesOut !== void 0 && { pendingMovesOut: previous.pendingMovesOut },
|
|
54
|
+
...previous?.terminationProtection === true && { terminationProtection: true },
|
|
55
|
+
...previous?.nestedSsmNamesChecked === true && { nestedSsmNamesChecked: true }
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function skippedOutputsCarriedFrom(previous) {
|
|
59
|
+
return previous.skippedOutputs === void 0 ? {} : { skippedOutputs: previous.skippedOutputs };
|
|
60
|
+
}
|
|
61
|
+
function orphansCarriedFrom(previous) {
|
|
62
|
+
return previous.orphans === void 0 ? {} : { orphans: previous.orphans };
|
|
63
|
+
}
|
|
64
|
+
function orphansAfterRollback(previous, newlyOrphaned) {
|
|
65
|
+
if (previous.orphans === void 0 && newlyOrphaned.length === 0) return {};
|
|
66
|
+
const byLogicalId = /* @__PURE__ */ new Map();
|
|
67
|
+
for (const entry of previous.orphans ?? []) byLogicalId.set(entry.logicalId, entry);
|
|
68
|
+
for (const entry of newlyOrphaned) byLogicalId.set(entry.logicalId, entry);
|
|
69
|
+
return { orphans: [...byLogicalId.values()] };
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// src/provisioning/slow-cc-operation-timeouts.ts
|
|
73
|
+
const MINUTE_MS = 6e4;
|
|
74
|
+
const SLOW_CC_OPERATION_TIMEOUTS = {
|
|
75
|
+
"AWS::OpenSearchService::Domain": {
|
|
76
|
+
create: 60 * MINUTE_MS,
|
|
77
|
+
update: 60 * MINUTE_MS,
|
|
78
|
+
delete: 60 * MINUTE_MS
|
|
79
|
+
},
|
|
80
|
+
"AWS::Elasticsearch::Domain": {
|
|
81
|
+
create: 60 * MINUTE_MS,
|
|
82
|
+
update: 60 * MINUTE_MS,
|
|
83
|
+
delete: 60 * MINUTE_MS
|
|
84
|
+
},
|
|
85
|
+
"AWS::Redshift::Cluster": {
|
|
86
|
+
create: 60 * MINUTE_MS,
|
|
87
|
+
delete: 60 * MINUTE_MS
|
|
88
|
+
},
|
|
89
|
+
"AWS::ElastiCache::ReplicationGroup": {
|
|
90
|
+
create: 60 * MINUTE_MS,
|
|
91
|
+
delete: 60 * MINUTE_MS
|
|
92
|
+
},
|
|
93
|
+
"AWS::ElastiCache::CacheCluster": {
|
|
94
|
+
create: 60 * MINUTE_MS,
|
|
95
|
+
update: 60 * MINUTE_MS,
|
|
96
|
+
delete: 60 * MINUTE_MS
|
|
97
|
+
},
|
|
98
|
+
"AWS::RDS::DBInstance": {
|
|
99
|
+
create: 60 * MINUTE_MS,
|
|
100
|
+
delete: 60 * MINUTE_MS
|
|
101
|
+
},
|
|
102
|
+
"AWS::RDS::DBCluster": {
|
|
103
|
+
create: 60 * MINUTE_MS,
|
|
104
|
+
update: 90 * MINUTE_MS,
|
|
105
|
+
delete: 60 * MINUTE_MS
|
|
106
|
+
},
|
|
107
|
+
"AWS::DynamoDB::Table": { update: 75 * MINUTE_MS },
|
|
108
|
+
"AWS::DynamoDB::GlobalTable": { update: 75 * MINUTE_MS },
|
|
109
|
+
"AWS::EKS::Cluster": {
|
|
110
|
+
create: 30 * MINUTE_MS,
|
|
111
|
+
delete: 30 * MINUTE_MS
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
function slowCcOperationTimeoutMs(resourceType, operation) {
|
|
115
|
+
const entry = SLOW_CC_OPERATION_TIMEOUTS[resourceType];
|
|
116
|
+
if (!entry) return 0;
|
|
117
|
+
switch (operation) {
|
|
118
|
+
case "CREATE": return entry.create ?? 0;
|
|
119
|
+
case "UPDATE": return entry.update ?? 0;
|
|
120
|
+
case "DELETE": return entry.delete ?? 0;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// src/provisioning/providers/rds/instance-attributes.ts
|
|
125
|
+
function dbInstanceAttributes(instance, read) {
|
|
126
|
+
const transient = read.settled && instance?.DBInstanceStatus === "available";
|
|
127
|
+
const described = instance !== void 0;
|
|
128
|
+
return definedAttributes({
|
|
129
|
+
"Endpoint.Address": instance?.Endpoint?.Address,
|
|
130
|
+
"Endpoint.Port": stringifyIfAssigned(instance?.Endpoint?.Port),
|
|
131
|
+
"Endpoint.HostedZoneId": instance?.Endpoint?.HostedZoneId,
|
|
132
|
+
Arn: instance?.DBInstanceArn,
|
|
133
|
+
DbiResourceId: instance?.DbiResourceId,
|
|
134
|
+
"ListenerEndpoint.Address": instance?.ListenerEndpoint?.Address,
|
|
135
|
+
"ListenerEndpoint.Port": stringifyIfAssigned(instance?.ListenerEndpoint?.Port),
|
|
136
|
+
"ListenerEndpoint.HostedZoneId": instance?.ListenerEndpoint?.HostedZoneId,
|
|
137
|
+
"CertificateDetails.CAIdentifier": instance?.CertificateDetails?.CAIdentifier,
|
|
138
|
+
"CertificateDetails.ValidTill": javaInstantText(instance?.CertificateDetails?.ValidTill),
|
|
139
|
+
InstanceCreateTime: javaInstantText(instance?.InstanceCreateTime),
|
|
140
|
+
LatestRestorableTime: javaInstantText(instance?.LatestRestorableTime),
|
|
141
|
+
AutomaticRestartTime: javaInstantText(instance?.AutomaticRestartTime),
|
|
142
|
+
ResumeFullAutomationModeTime: javaInstantText(instance?.ResumeFullAutomationModeTime),
|
|
143
|
+
SecondaryAvailabilityZone: instance?.SecondaryAvailabilityZone,
|
|
144
|
+
IsStorageConfigUpgradeAvailable: instance?.IsStorageConfigUpgradeAvailable,
|
|
145
|
+
ReadReplicaDBInstanceIdentifiers: described ? [...instance.ReadReplicaDBInstanceIdentifiers ?? []] : void 0,
|
|
146
|
+
ReadReplicaDBClusterIdentifiers: described ? [...instance.ReadReplicaDBClusterIdentifiers ?? []] : void 0,
|
|
147
|
+
StatusInfos: described ? (instance.StatusInfos ?? []).map(statusInfo) : void 0,
|
|
148
|
+
DBInstanceStatus: transient ? instance?.DBInstanceStatus : void 0,
|
|
149
|
+
PercentProgress: transient ? instance?.PercentProgress : void 0,
|
|
150
|
+
StorageOperationStatus: transient ? instance?.StorageOperationStatus : void 0,
|
|
151
|
+
StorageOperationPercentProgress: transient ? instance?.StorageOperationPercentProgress : void 0
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
function statusInfo(info) {
|
|
155
|
+
return definedAttributes({
|
|
156
|
+
StatusType: info.StatusType,
|
|
157
|
+
Normal: info.Normal,
|
|
158
|
+
Status: info.Status,
|
|
159
|
+
Message: info.Message
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
function javaInstantText(value) {
|
|
163
|
+
if (!(value instanceof Date) || Number.isNaN(value.getTime())) return void 0;
|
|
164
|
+
return value.toISOString().replace(".000Z", "Z");
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// src/provisioning/providers/rds/instance-members.ts
|
|
168
|
+
function numberOrUndefined(value) {
|
|
169
|
+
return value == null ? void 0 : Number(value);
|
|
170
|
+
}
|
|
171
|
+
const STORAGE_MEMBERS = /* @__PURE__ */ new Set([
|
|
172
|
+
"AllocatedStorage",
|
|
173
|
+
"Iops",
|
|
174
|
+
"StorageType",
|
|
175
|
+
"StorageThroughput"
|
|
176
|
+
]);
|
|
177
|
+
function instanceValueChanged(properties, previousProperties, key, context) {
|
|
178
|
+
const desired = properties[key];
|
|
179
|
+
if (desired == null) return false;
|
|
180
|
+
const previous = previousProperties[key];
|
|
181
|
+
if (previous == null) return true;
|
|
182
|
+
const differs = typeof desired === "object" || typeof previous === "object" ? !isDeepStrictEqual(desired, previous) : String(desired) !== String(previous);
|
|
183
|
+
if (STORAGE_MEMBERS.has(key) && !differs) return false;
|
|
184
|
+
if (context?.changedProperties !== void 0) return context.changedProperties.has(key);
|
|
185
|
+
return differs;
|
|
186
|
+
}
|
|
187
|
+
function sizeOrZero(value) {
|
|
188
|
+
const size = Number(value);
|
|
189
|
+
return value != null && Number.isFinite(size) ? size : 0;
|
|
190
|
+
}
|
|
191
|
+
function isProvisionedIoStorage(properties) {
|
|
192
|
+
const storageType = properties["StorageType"];
|
|
193
|
+
if (typeof storageType === "string" && storageType !== "") return [
|
|
194
|
+
"io1",
|
|
195
|
+
"io2",
|
|
196
|
+
"gp3"
|
|
197
|
+
].includes(storageType.toLowerCase());
|
|
198
|
+
return properties["Iops"] != null;
|
|
199
|
+
}
|
|
200
|
+
async function instanceModifyBackfillMembers(properties, previousProperties, liveAllocatedStorage, logicalId, context) {
|
|
201
|
+
const changed = (key) => instanceValueChanged(properties, previousProperties, key, context);
|
|
202
|
+
const desiredAllocated = numberOrUndefined(properties["AllocatedStorage"]);
|
|
203
|
+
const members = {};
|
|
204
|
+
if (changed("BackupRetentionPeriod")) members.BackupRetentionPeriod = Number(properties["BackupRetentionPeriod"]);
|
|
205
|
+
for (const key of [
|
|
206
|
+
"PreferredBackupWindow",
|
|
207
|
+
"PreferredMaintenanceWindow",
|
|
208
|
+
"StorageType",
|
|
209
|
+
"OptionGroupName",
|
|
210
|
+
"CACertificateIdentifier"
|
|
211
|
+
]) if (changed(key)) members[key] = properties[key];
|
|
212
|
+
for (const key of ["NetworkType", "LicenseModel"]) if (changed(key)) members[key] = properties[key];
|
|
213
|
+
if (changed("DatabaseInsightsMode")) members.DatabaseInsightsMode = properties["DatabaseInsightsMode"];
|
|
214
|
+
for (const key of [
|
|
215
|
+
"MultiAZ",
|
|
216
|
+
"AutoMinorVersionUpgrade",
|
|
217
|
+
"CopyTagsToSnapshot",
|
|
218
|
+
"DedicatedLogVolume"
|
|
219
|
+
]) if (changed(key)) members[key] = properties[key];
|
|
220
|
+
if (changed("StorageThroughput")) members.StorageThroughput = Number(properties["StorageThroughput"]);
|
|
221
|
+
if (changed("PromotionTier")) members.PromotionTier = Number(properties["PromotionTier"]);
|
|
222
|
+
if (changed("CACertificateIdentifier") && properties["CertificateRotationRestart"] != null) members.CertificateRotationRestart = properties["CertificateRotationRestart"];
|
|
223
|
+
if (changed("MaxAllocatedStorage")) members.MaxAllocatedStorage = Number(properties["MaxAllocatedStorage"]);
|
|
224
|
+
else if (properties["MaxAllocatedStorage"] == null && previousProperties["MaxAllocatedStorage"] != null) {
|
|
225
|
+
const live = await liveAllocatedStorage();
|
|
226
|
+
if (live === void 0) throw new Error(safeMsg`DBInstance ${logicalId}: MaxAllocatedStorage was removed from the template, which turns storage autoscaling off by setting it to the allocated storage, but DescribeDBInstances did not report the allocated storage`);
|
|
227
|
+
members.MaxAllocatedStorage = Math.max(live, sizeOrZero(desiredAllocated));
|
|
228
|
+
}
|
|
229
|
+
const rollback = context?.replayingState === true;
|
|
230
|
+
if (changed("EngineVersion") && !rollback) members.EngineVersion = String(properties["EngineVersion"]);
|
|
231
|
+
if (changed("DBParameterGroupName") && !(rollback && changed("EngineVersion"))) members.DBParameterGroupName = properties["DBParameterGroupName"];
|
|
232
|
+
if (changed("AllowMajorVersionUpgrade") || members.EngineVersion !== void 0 && properties["AllowMajorVersionUpgrade"] != null) members.AllowMajorVersionUpgrade = properties["AllowMajorVersionUpgrade"];
|
|
233
|
+
if (changed("AllocatedStorage") && !rollback) members.AllocatedStorage = desiredAllocated;
|
|
234
|
+
if (isProvisionedIoStorage(properties)) {
|
|
235
|
+
if (changed("AllocatedStorage") || changed("Iops") || changed("StorageThroughput") || changed("StorageType")) {
|
|
236
|
+
if (members.AllocatedStorage === void 0) {
|
|
237
|
+
const live = await liveAllocatedStorage();
|
|
238
|
+
const larger = Math.max(sizeOrZero(live), sizeOrZero(desiredAllocated), rollback ? sizeOrZero(previousProperties["AllocatedStorage"]) : 0);
|
|
239
|
+
if (larger > 0) members.AllocatedStorage = larger;
|
|
240
|
+
}
|
|
241
|
+
if (properties["Iops"] != null) members.Iops = Number(properties["Iops"]);
|
|
242
|
+
}
|
|
243
|
+
} else if (changed("Iops") && !rollback) members.Iops = Number(properties["Iops"]);
|
|
244
|
+
const enableChanged = changed("EnablePerformanceInsights");
|
|
245
|
+
const keyChanged = changed("PerformanceInsightsKMSKeyId");
|
|
246
|
+
const enableDesired = properties["EnablePerformanceInsights"];
|
|
247
|
+
const keyDesired = properties["PerformanceInsightsKMSKeyId"];
|
|
248
|
+
if (enableChanged || keyChanged) {
|
|
249
|
+
members.EnablePerformanceInsights = enableDesired;
|
|
250
|
+
if (keyChanged || String(enableDesired) === "true") members.PerformanceInsightsKMSKeyId = keyDesired;
|
|
251
|
+
}
|
|
252
|
+
if (changed("PerformanceInsightsRetentionPeriod")) {
|
|
253
|
+
members.PerformanceInsightsRetentionPeriod = Number(properties["PerformanceInsightsRetentionPeriod"]);
|
|
254
|
+
members.EnablePerformanceInsights = enableDesired;
|
|
255
|
+
members.PerformanceInsightsKMSKeyId = keyDesired;
|
|
256
|
+
}
|
|
257
|
+
return Object.fromEntries(Object.entries(members).filter(([, value]) => value !== void 0));
|
|
258
|
+
}
|
|
259
|
+
function instanceParameterGroupPendingReboot(instance) {
|
|
260
|
+
return (instance?.DBParameterGroups ?? []).some((group) => group.ParameterApplyStatus === "pending-reboot");
|
|
261
|
+
}
|
|
262
|
+
function instanceParameterGroupApplying(instance) {
|
|
263
|
+
return (instance?.DBParameterGroups ?? []).some((group) => group.ParameterApplyStatus === "applying");
|
|
264
|
+
}
|
|
265
|
+
function instanceHasPendingChanges(instance, caRotationRestarts) {
|
|
266
|
+
const pending = instance.PendingModifiedValues;
|
|
267
|
+
if (pending === void 0) return false;
|
|
268
|
+
return pending.DBInstanceClass !== void 0 || pending.AllocatedStorage !== void 0 || pending.AutomationMode !== void 0 || pending.BackupRetentionPeriod !== void 0 || pending.DBInstanceIdentifier !== void 0 || pending.DBSubnetGroupName !== void 0 || pending.Engine !== void 0 || pending.EngineVersion !== void 0 || pending.IAMDatabaseAuthenticationEnabled !== void 0 || pending.Iops !== void 0 || pending.LicenseModel !== void 0 || pending.MasterUserPassword !== void 0 || pending.MultiAZ !== void 0 || pending.PendingCloudwatchLogsExports !== void 0 || pending.Port !== void 0 || (pending.ProcessorFeatures ?? []).length > 0 || pending.ResumeFullAutomationModeTime !== void 0 || pending.StorageThroughput !== void 0 || pending.StorageType !== void 0 || caRotationRestarts && pending.CACertificateIdentifier !== void 0;
|
|
269
|
+
}
|
|
270
|
+
function instanceParameterGroupSettled(instance, sentGroup, caRotationRestarts) {
|
|
271
|
+
if (instance.DBInstanceStatus !== "available") return false;
|
|
272
|
+
if (instanceHasPendingChanges(instance, caRotationRestarts)) return false;
|
|
273
|
+
const groups = instance.DBParameterGroups ?? [];
|
|
274
|
+
if (groups.some((group) => group.ParameterApplyStatus === "applying")) return false;
|
|
275
|
+
if (sentGroup === void 0 || groups.length === 0) return true;
|
|
276
|
+
return groups.some((group) => group.DBParameterGroupName?.toLowerCase() === sentGroup.toLowerCase());
|
|
277
|
+
}
|
|
278
|
+
function instanceRebootApplied(instance) {
|
|
279
|
+
return instance.DBInstanceStatus === "available" && (instance.DBParameterGroups ?? []).every((group) => group.ParameterApplyStatus === "in-sync") && (instance.OptionGroupMemberships ?? []).every((group) => group.Status === "in-sync");
|
|
280
|
+
}
|
|
281
|
+
function logExportsList(value) {
|
|
282
|
+
if (value == null) return void 0;
|
|
283
|
+
if (!Array.isArray(value) || !value.every((type) => typeof type === "string")) return "malformed";
|
|
284
|
+
return [...new Set(value)];
|
|
285
|
+
}
|
|
286
|
+
function desiredLogExports(properties, resourceType, logicalId, physicalId) {
|
|
287
|
+
const desired = logExportsList(properties["EnableCloudwatchLogsExports"]);
|
|
288
|
+
if (desired !== "malformed") return desired;
|
|
289
|
+
throw markNonRetryable(new ProvisioningError(`${resourceType} ${logicalId}: EnableCloudwatchLogsExports must be a list of log type names`, resourceType, logicalId, physicalId));
|
|
290
|
+
}
|
|
291
|
+
function logExportsDelta(desired, previousValue) {
|
|
292
|
+
const previous = logExportsList(previousValue);
|
|
293
|
+
const had = previous === void 0 || previous === "malformed" ? [] : previous;
|
|
294
|
+
const want = desired ?? [];
|
|
295
|
+
const enable = want.filter((type) => !had.includes(type));
|
|
296
|
+
const disable = had.filter((type) => !want.includes(type));
|
|
297
|
+
if (enable.length === 0 && disable.length === 0) return void 0;
|
|
298
|
+
return {
|
|
299
|
+
...enable.length > 0 && { EnableLogTypes: enable },
|
|
300
|
+
...disable.length > 0 && { DisableLogTypes: disable }
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
function liveLogExports(enabled, pending) {
|
|
304
|
+
const disabled = pending?.LogTypesToDisable ?? [];
|
|
305
|
+
const out = (enabled ?? []).filter((type) => !disabled.includes(type));
|
|
306
|
+
for (const type of pending?.LogTypesToEnable ?? []) if (!out.includes(type)) out.push(type);
|
|
307
|
+
return out;
|
|
308
|
+
}
|
|
309
|
+
function logExportsApplied(config, enabled, pending) {
|
|
310
|
+
if ((pending?.LogTypesToEnable?.length ?? 0) > 0) return false;
|
|
311
|
+
if ((pending?.LogTypesToDisable?.length ?? 0) > 0) return false;
|
|
312
|
+
const live = enabled ?? [];
|
|
313
|
+
return (config.EnableLogTypes ?? []).every((type) => live.includes(type)) && !(config.DisableLogTypes ?? []).some((type) => live.includes(type));
|
|
314
|
+
}
|
|
315
|
+
function instanceAvailabilityZoneKept(properties, previousProperties) {
|
|
316
|
+
const desired = properties["AvailabilityZone"];
|
|
317
|
+
if (desired === previousProperties["AvailabilityZone"]) return true;
|
|
318
|
+
return (desired == null || desired === "") && String(properties["MultiAZ"]) === "true";
|
|
319
|
+
}
|
|
320
|
+
function withPreviousAvailabilityZone(properties, previousProperties) {
|
|
321
|
+
const { AvailabilityZone: _desired, ...rest } = properties;
|
|
322
|
+
const previous = previousProperties["AvailabilityZone"];
|
|
323
|
+
return previous === void 0 ? rest : {
|
|
324
|
+
...rest,
|
|
325
|
+
AvailabilityZone: previous
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
function processorFeatureList(value) {
|
|
329
|
+
if (value == null) return void 0;
|
|
330
|
+
if (!Array.isArray(value)) return "malformed";
|
|
331
|
+
const out = [];
|
|
332
|
+
for (const item of value) {
|
|
333
|
+
if (item === null || typeof item !== "object" || Array.isArray(item)) return "malformed";
|
|
334
|
+
const feature = {};
|
|
335
|
+
for (const key of ["Name", "Value"]) {
|
|
336
|
+
const member = item[key];
|
|
337
|
+
if (member == null) continue;
|
|
338
|
+
if (typeof member !== "string" && typeof member !== "number") return "malformed";
|
|
339
|
+
feature[key] = String(member);
|
|
340
|
+
}
|
|
341
|
+
out.push(feature);
|
|
342
|
+
}
|
|
343
|
+
return out;
|
|
344
|
+
}
|
|
345
|
+
function useDefaultProcessorFeaturesOf(value) {
|
|
346
|
+
if (value == null) return void 0;
|
|
347
|
+
if (typeof value === "boolean") return value;
|
|
348
|
+
if (typeof value === "string" && ["true", "false"].includes(value.toLowerCase())) return value.toLowerCase() === "true";
|
|
349
|
+
return "malformed";
|
|
350
|
+
}
|
|
351
|
+
function processorFeaturesRefusalText(features, resourceType, logicalId) {
|
|
352
|
+
return features === "malformed" ? `${resourceType} ${logicalId}: ProcessorFeatures must be a list of { Name, Value } objects` : `${resourceType} ${logicalId}: UseDefaultProcessorFeatures must be true or false`;
|
|
353
|
+
}
|
|
354
|
+
function desiredProcessorFeatures(properties, resourceType, logicalId) {
|
|
355
|
+
const features = processorFeatureList(properties["ProcessorFeatures"]);
|
|
356
|
+
const useDefault = useDefaultProcessorFeaturesOf(properties["UseDefaultProcessorFeatures"]);
|
|
357
|
+
if (features !== "malformed" && useDefault !== "malformed") return {
|
|
358
|
+
features,
|
|
359
|
+
useDefault
|
|
360
|
+
};
|
|
361
|
+
throw markNonRetryable(new ProvisioningError(processorFeaturesRefusalText(features, resourceType, logicalId), resourceType, logicalId));
|
|
362
|
+
}
|
|
363
|
+
function sameProcessorValue(read, desired, previous) {
|
|
364
|
+
const a = read(desired);
|
|
365
|
+
const b = read(previous);
|
|
366
|
+
return a === "malformed" && b === "malformed" ? isDeepStrictEqual(desired, previous) : isDeepStrictEqual(a, b);
|
|
367
|
+
}
|
|
368
|
+
function instanceProcessorFeatureMembers(properties, previousProperties, resourceType, logicalId, physicalId) {
|
|
369
|
+
if (sameProcessorValue(processorFeatureList, properties["ProcessorFeatures"], previousProperties["ProcessorFeatures"]) && sameProcessorValue(useDefaultProcessorFeaturesOf, properties["UseDefaultProcessorFeatures"], previousProperties["UseDefaultProcessorFeatures"])) return {};
|
|
370
|
+
const features = processorFeatureList(properties["ProcessorFeatures"]);
|
|
371
|
+
const useDefault = useDefaultProcessorFeaturesOf(properties["UseDefaultProcessorFeatures"]);
|
|
372
|
+
if (features === "malformed" || useDefault === "malformed") throw markNonRetryable(new ProvisioningError(processorFeaturesRefusalText(features, resourceType, logicalId), resourceType, logicalId, physicalId));
|
|
373
|
+
return {
|
|
374
|
+
...features !== void 0 && { ProcessorFeatures: features },
|
|
375
|
+
...useDefault !== void 0 && { UseDefaultProcessorFeatures: useDefault }
|
|
376
|
+
};
|
|
377
|
+
}
|
|
378
|
+
function sameFeatureValue(a, b) {
|
|
379
|
+
if (a === b) return true;
|
|
380
|
+
return a !== void 0 && b !== void 0 && a.trim() !== "" && b.trim() !== "" && Number(a) === Number(b);
|
|
381
|
+
}
|
|
382
|
+
const FLAG_ONLY_QUIET_READS = 3;
|
|
383
|
+
const PROCESSOR_SETTLED_STATUSES = /* @__PURE__ */ new Set(["available", "storage-optimization"]);
|
|
384
|
+
function processorChangeUnderWay(instance) {
|
|
385
|
+
return !PROCESSOR_SETTLED_STATUSES.has(instance.DBInstanceStatus ?? "") || (instance.PendingModifiedValues?.ProcessorFeatures ?? []).length > 0;
|
|
386
|
+
}
|
|
387
|
+
function processorFeaturesSettled(sent, modified) {
|
|
388
|
+
let changeSeen = modified !== void 0 && processorChangeUnderWay(modified);
|
|
389
|
+
let quietReads = 0;
|
|
390
|
+
return (instance) => {
|
|
391
|
+
if (processorChangeUnderWay(instance)) {
|
|
392
|
+
changeSeen = true;
|
|
393
|
+
return false;
|
|
394
|
+
}
|
|
395
|
+
if (sent !== void 0) {
|
|
396
|
+
const live = instance.ProcessorFeatures ?? [];
|
|
397
|
+
return sent.every((feature) => live.some((item) => item.Name === feature.Name && sameFeatureValue(item.Value, feature.Value)));
|
|
398
|
+
}
|
|
399
|
+
if (changeSeen) return true;
|
|
400
|
+
quietReads += 1;
|
|
401
|
+
return quietReads >= FLAG_ONLY_QUIET_READS;
|
|
402
|
+
};
|
|
403
|
+
}
|
|
404
|
+
function liveProcessorFeatures(instance) {
|
|
405
|
+
const pending = instance.PendingModifiedValues?.ProcessorFeatures ?? [];
|
|
406
|
+
if (pending.length === 0) return instance.ProcessorFeatures;
|
|
407
|
+
const out = (instance.ProcessorFeatures ?? []).map((feature) => pending.find((item) => item.Name === feature.Name) ?? feature);
|
|
408
|
+
for (const item of pending) if (!out.some((feature) => feature.Name === item.Name)) out.push(item);
|
|
409
|
+
return out;
|
|
410
|
+
}
|
|
411
|
+
function engineLifecycleSupportOf(bag) {
|
|
412
|
+
const value = bag["EngineLifecycleSupport"];
|
|
413
|
+
return value == null || value === "" ? void 0 : String(value);
|
|
414
|
+
}
|
|
415
|
+
function engineLifecycleSupportAction(properties, previousProperties, context) {
|
|
416
|
+
const desired = engineLifecycleSupportOf(properties);
|
|
417
|
+
if (desired === engineLifecycleSupportOf(previousProperties)) return "unchanged";
|
|
418
|
+
if (context?.replayingState === true) return "unchanged";
|
|
419
|
+
if (context?.desiredFromAwsReadback === true) return desired === void 0 ? "unchanged" : "send";
|
|
420
|
+
return desired === void 0 ? "refuse" : "check-live";
|
|
421
|
+
}
|
|
422
|
+
function engineLifecycleSupportRefusalText(resourceType, logicalId, physicalId, kind, liveRead) {
|
|
423
|
+
const cli = kind === "DB cluster" ? "aws rds modify-db-cluster" : "aws rds modify-db-instance";
|
|
424
|
+
return `${resourceType} ${logicalId}: EngineLifecycleSupport cannot change on an existing ${kind}. CloudFormation refuses the same update ("EngineLifecycleSupport cannot be modified."), whether the value changes, is added or is removed. Nothing was applied to ${kind} ${physicalId}. ` + (liveRead === "unreadable" ? `cdkd could not read the live setting (an AWS read failed), so it could not tell whether the ${kind} already holds the declared value; a re-run may succeed. ` : liveRead === "not-found" ? `RDS reports no such ${kind}: it was deleted outside cdkd, so the state record no longer matches AWS. ` : "") + `Declare the value the previous deploy declared (or none, if it declared none). To change the live setting, run ${cli} with --engine-lifecycle-support and --apply-immediately, then declare that value: a declared value the ${kind} already holds is no change.`;
|
|
425
|
+
}
|
|
426
|
+
const BACKUP_REPLICATION_KEYS = [
|
|
427
|
+
"AutomaticBackupReplicationRegion",
|
|
428
|
+
"AutomaticBackupReplicationKmsKeyId",
|
|
429
|
+
"AutomaticBackupReplicationRetentionPeriod"
|
|
430
|
+
];
|
|
431
|
+
const MALFORMED = Symbol("malformed");
|
|
432
|
+
function optionalString(value) {
|
|
433
|
+
if (value == null || value === "") return void 0;
|
|
434
|
+
return typeof value === "string" ? value : MALFORMED;
|
|
435
|
+
}
|
|
436
|
+
function optionalWholeNumber(value) {
|
|
437
|
+
if (value == null || value === "") return void 0;
|
|
438
|
+
const parsed = typeof value === "number" ? value : typeof value === "string" ? Number(value) : NaN;
|
|
439
|
+
return Number.isInteger(parsed) ? parsed : MALFORMED;
|
|
440
|
+
}
|
|
441
|
+
function backupReplicationOf(bag) {
|
|
442
|
+
const region = optionalString(bag["AutomaticBackupReplicationRegion"]);
|
|
443
|
+
const kmsKeyId = optionalString(bag["AutomaticBackupReplicationKmsKeyId"]);
|
|
444
|
+
const retention = optionalWholeNumber(bag["AutomaticBackupReplicationRetentionPeriod"]);
|
|
445
|
+
if (region === MALFORMED || kmsKeyId === MALFORMED || retention === MALFORMED) return "malformed";
|
|
446
|
+
return {
|
|
447
|
+
region,
|
|
448
|
+
kmsKeyId,
|
|
449
|
+
retention
|
|
450
|
+
};
|
|
451
|
+
}
|
|
452
|
+
function backupRetentionPeriodOf(bag) {
|
|
453
|
+
const value = optionalWholeNumber(bag["BackupRetentionPeriod"]);
|
|
454
|
+
return value === MALFORMED ? void 0 : value;
|
|
455
|
+
}
|
|
456
|
+
function backupReplicationPlan(properties, previousProperties, resourceType, logicalId, physicalId, stateBorne, warn) {
|
|
457
|
+
const none = {
|
|
458
|
+
stop: false,
|
|
459
|
+
start: void 0
|
|
460
|
+
};
|
|
461
|
+
const keys = [...BACKUP_REPLICATION_KEYS, "BackupRetentionPeriod"];
|
|
462
|
+
const desired = backupReplicationOf(properties);
|
|
463
|
+
const previous = backupReplicationOf(previousProperties);
|
|
464
|
+
if (desired === "malformed") {
|
|
465
|
+
if (keys.every((key) => isDeepStrictEqual(properties[key], previousProperties[key]))) return none;
|
|
466
|
+
throw markNonRetryable(new ProvisioningError(`${resourceType} ${logicalId}: AutomaticBackupReplicationRegion and AutomaticBackupReplicationKmsKeyId must be strings, and AutomaticBackupReplicationRetentionPeriod a whole number`, resourceType, logicalId, physicalId));
|
|
467
|
+
}
|
|
468
|
+
const misuse = desired.region === void 0 ? desired.kmsKeyId !== void 0 ? "You must specify the AutomaticBackupReplicationRegion parameter when setting the AutomaticBackupReplicationKmsKeyId parameter" : desired.retention !== void 0 ? "You must specify the AutomaticBackupReplicationRegion parameter when setting the AutomaticBackupReplicationRetentionPeriod parameter" : void 0 : backupRetentionPeriodOf(properties) === 0 ? "AutomaticBackupReplicationRegion cannot be specified when BackupRetentionPeriod is 0" : void 0;
|
|
469
|
+
if (misuse !== void 0) {
|
|
470
|
+
const message = `${resourceType} ${logicalId}: ${misuse} (as CloudFormation refuses it)`;
|
|
471
|
+
if (!stateBorne) throw markNonRetryable(new ProvisioningError(message, resourceType, logicalId, physicalId));
|
|
472
|
+
warn(`${message}; the restored properties declare it, so it is applied as declared`);
|
|
473
|
+
}
|
|
474
|
+
const start = desired.region === void 0 ? void 0 : {
|
|
475
|
+
...desired,
|
|
476
|
+
region: desired.region
|
|
477
|
+
};
|
|
478
|
+
if (previous === "malformed") return {
|
|
479
|
+
stop: true,
|
|
480
|
+
start
|
|
481
|
+
};
|
|
482
|
+
if (previous.region === void 0) return {
|
|
483
|
+
stop: false,
|
|
484
|
+
start
|
|
485
|
+
};
|
|
486
|
+
if (desired.region === void 0) return {
|
|
487
|
+
stop: true,
|
|
488
|
+
start: void 0
|
|
489
|
+
};
|
|
490
|
+
return desired.retention === void 0 && backupRetentionPeriodOf(properties) !== void 0 && backupRetentionPeriodOf(properties) !== backupRetentionPeriodOf(previousProperties) || desired.region !== previous.region || desired.kmsKeyId !== previous.kmsKeyId || desired.retention !== previous.retention ? {
|
|
491
|
+
stop: true,
|
|
492
|
+
start
|
|
493
|
+
} : none;
|
|
494
|
+
}
|
|
495
|
+
function liveBackupReplicationRegions(instance) {
|
|
496
|
+
const regions = [];
|
|
497
|
+
for (const replication of instance.DBInstanceAutomatedBackupsReplications ?? []) {
|
|
498
|
+
const region = replication.DBInstanceAutomatedBackupsArn?.split(":")[3];
|
|
499
|
+
if (region !== void 0 && region !== "" && !regions.includes(region)) regions.push(region);
|
|
500
|
+
}
|
|
501
|
+
return regions;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
// src/provisioning/providers/rds/cluster-members.ts
|
|
505
|
+
const CLUSTER_REMOVED_PORT = /* @__PURE__ */ new Map([
|
|
506
|
+
["aurora-postgresql", 5432],
|
|
507
|
+
["aurora-mysql", 3306],
|
|
508
|
+
["mysql", 3306],
|
|
509
|
+
["postgres", 3306]
|
|
510
|
+
]);
|
|
511
|
+
function isClusterBusyRefusal(error) {
|
|
512
|
+
if (isModifyNotAvailableRefusal(error)) return true;
|
|
513
|
+
return error instanceof Error && error.name === "InvalidDBClusterStateFault" && /could not be modified\. Please try again/i.test(error.message);
|
|
514
|
+
}
|
|
515
|
+
function serverlessV2ScalingToSend(config) {
|
|
516
|
+
const seconds = numberOrUndefined(config.SecondsUntilAutoPause);
|
|
517
|
+
return {
|
|
518
|
+
MinCapacity: config.MinCapacity,
|
|
519
|
+
MaxCapacity: config.MaxCapacity,
|
|
520
|
+
...seconds !== void 0 && { SecondsUntilAutoPause: seconds }
|
|
521
|
+
};
|
|
522
|
+
}
|
|
523
|
+
const CLUSTER_BACKFILL_STRING_MEMBERS = [
|
|
524
|
+
"DBClusterParameterGroupName",
|
|
525
|
+
"PreferredBackupWindow",
|
|
526
|
+
"PreferredMaintenanceWindow",
|
|
527
|
+
"StorageType"
|
|
528
|
+
];
|
|
529
|
+
function clusterCreateBackfillMembers(properties) {
|
|
530
|
+
const members = {};
|
|
531
|
+
for (const key of CLUSTER_BACKFILL_STRING_MEMBERS) if (properties[key] != null) members[key] = properties[key];
|
|
532
|
+
if (properties["CopyTagsToSnapshot"] != null) members.CopyTagsToSnapshot = properties["CopyTagsToSnapshot"];
|
|
533
|
+
return members;
|
|
534
|
+
}
|
|
535
|
+
function clusterModifyBackfillMembers(properties, previousProperties, context) {
|
|
536
|
+
const changed = (key) => instanceValueChanged(properties, previousProperties, key, context);
|
|
537
|
+
const members = {};
|
|
538
|
+
for (const key of CLUSTER_BACKFILL_STRING_MEMBERS) if (changed(key)) members[key] = properties[key];
|
|
539
|
+
if (changed("CopyTagsToSnapshot")) members.CopyTagsToSnapshot = properties["CopyTagsToSnapshot"];
|
|
540
|
+
return members;
|
|
541
|
+
}
|
|
542
|
+
function clusterSizeValue(value) {
|
|
543
|
+
return retentionPeriodValue(value);
|
|
544
|
+
}
|
|
545
|
+
function malformedInstanceClass(value) {
|
|
546
|
+
return value != null && typeof value !== "string";
|
|
547
|
+
}
|
|
548
|
+
const usableInstanceClass = (value) => typeof value === "string";
|
|
549
|
+
const usableClusterSize = (value) => typeof clusterSizeValue(value) === "number";
|
|
550
|
+
function clusterCreateMultiAzMembers(properties) {
|
|
551
|
+
const members = {};
|
|
552
|
+
const instanceClass = properties["DBClusterInstanceClass"];
|
|
553
|
+
if (typeof instanceClass === "string") members.DBClusterInstanceClass = instanceClass;
|
|
554
|
+
const allocated = clusterSizeValue(properties["AllocatedStorage"]);
|
|
555
|
+
if (typeof allocated === "number") members.AllocatedStorage = allocated;
|
|
556
|
+
const iops = clusterSizeValue(properties["Iops"]);
|
|
557
|
+
if (typeof iops === "number") members.Iops = iops;
|
|
558
|
+
return members;
|
|
559
|
+
}
|
|
560
|
+
function clusterModifyMultiAzMembers(properties, previousProperties, context, onShrinkSkipped = () => {}) {
|
|
561
|
+
const changed = (key) => instanceValueChanged(properties, previousProperties, key, context);
|
|
562
|
+
const members = {};
|
|
563
|
+
const instanceClass = properties["DBClusterInstanceClass"];
|
|
564
|
+
if (typeof instanceClass === "string" && changed("DBClusterInstanceClass")) members.DBClusterInstanceClass = instanceClass;
|
|
565
|
+
const allocated = clusterSizeValue(properties["AllocatedStorage"]);
|
|
566
|
+
const previousAllocated = clusterSizeValue(previousProperties["AllocatedStorage"]);
|
|
567
|
+
const shrinkSkipped = (context?.replayingState === true || context?.desiredFromAwsReadback === true) && changed("AllocatedStorage") && typeof allocated === "number" && typeof previousAllocated === "number" && allocated < previousAllocated;
|
|
568
|
+
if (shrinkSkipped) onShrinkSkipped(allocated, previousAllocated);
|
|
569
|
+
if (changed("AllocatedStorage") && !shrinkSkipped || changed("Iops") || changed("StorageType")) {
|
|
570
|
+
if (shrinkSkipped) members.AllocatedStorage = previousAllocated;
|
|
571
|
+
else if (typeof allocated === "number") members.AllocatedStorage = allocated;
|
|
572
|
+
const iops = clusterSizeValue(properties["Iops"]);
|
|
573
|
+
if (typeof iops === "number") members.Iops = iops;
|
|
574
|
+
}
|
|
575
|
+
return members;
|
|
576
|
+
}
|
|
577
|
+
function multiAzSettledStatuses(fullWait) {
|
|
578
|
+
return new Set(fullWait ? ["available"] : ["available", "storage-optimization"]);
|
|
579
|
+
}
|
|
580
|
+
function multiAzReadState(cluster, sent, fullWait) {
|
|
581
|
+
if (sent.DBClusterInstanceClass === void 0 && sent.AllocatedStorage === void 0 && sent.Iops === void 0) return "applied";
|
|
582
|
+
if (!multiAzSettledStatuses(fullWait).has(cluster.Status ?? "")) return "pending";
|
|
583
|
+
if (sent.DBClusterInstanceClass !== void 0 && cluster.DBClusterInstanceClass !== sent.DBClusterInstanceClass) return "pending";
|
|
584
|
+
if (sent.AllocatedStorage === void 0 && sent.Iops === void 0) return "applied";
|
|
585
|
+
if (sent.AllocatedStorage !== void 0 && cluster.AllocatedStorage !== sent.AllocatedStorage) return "pending";
|
|
586
|
+
const pending = cluster.PendingModifiedValues;
|
|
587
|
+
if (pending?.AllocatedStorage !== void 0 || pending?.Iops !== void 0 || pending?.StorageType !== void 0) return "pending";
|
|
588
|
+
if (sent.Iops === void 0 || cluster.Iops === sent.Iops) return "applied";
|
|
589
|
+
return ["io1", "io2"].includes(cluster.StorageType?.toLowerCase() ?? "") ? "pending" : "iops-unconfirmed";
|
|
590
|
+
}
|
|
591
|
+
const MULTI_AZ_IOPS_CONFIRM_READS = 3;
|
|
592
|
+
function multiAzAppliedProbe(sent, fullWait) {
|
|
593
|
+
let unconfirmedReads = 0;
|
|
594
|
+
return (cluster) => {
|
|
595
|
+
const state = multiAzReadState(cluster, sent, fullWait);
|
|
596
|
+
if (state !== "iops-unconfirmed") {
|
|
597
|
+
unconfirmedReads = 0;
|
|
598
|
+
return state === "applied";
|
|
599
|
+
}
|
|
600
|
+
unconfirmedReads += 1;
|
|
601
|
+
return unconfirmedReads >= 3;
|
|
602
|
+
};
|
|
603
|
+
}
|
|
604
|
+
const CLUSTER_PERFORMANCE_INSIGHTS_MEMBERS = [
|
|
605
|
+
["PerformanceInsightsEnabled", "EnablePerformanceInsights"],
|
|
606
|
+
["PerformanceInsightsKmsKeyId", "PerformanceInsightsKMSKeyId"],
|
|
607
|
+
["PerformanceInsightsRetentionPeriod", "PerformanceInsightsRetentionPeriod"]
|
|
608
|
+
];
|
|
609
|
+
function clusterPerformanceInsightsMembers(properties) {
|
|
610
|
+
const members = {};
|
|
611
|
+
if (properties["PerformanceInsightsEnabled"] != null) members.EnablePerformanceInsights = properties["PerformanceInsightsEnabled"];
|
|
612
|
+
if (properties["PerformanceInsightsKmsKeyId"] != null) members.PerformanceInsightsKMSKeyId = properties["PerformanceInsightsKmsKeyId"];
|
|
613
|
+
const retention = retentionPeriodValue(properties["PerformanceInsightsRetentionPeriod"]);
|
|
614
|
+
if (typeof retention === "number") members.PerformanceInsightsRetentionPeriod = retention;
|
|
615
|
+
return members;
|
|
616
|
+
}
|
|
617
|
+
function clusterCreateScalarMembers(properties) {
|
|
618
|
+
return {
|
|
619
|
+
...properties["AutoMinorVersionUpgrade"] != null && { AutoMinorVersionUpgrade: properties["AutoMinorVersionUpgrade"] },
|
|
620
|
+
...properties["NetworkType"] != null && { NetworkType: properties["NetworkType"] },
|
|
621
|
+
...clusterPerformanceInsightsMembers(properties),
|
|
622
|
+
...properties["DatabaseInsightsMode"] != null && { DatabaseInsightsMode: properties["DatabaseInsightsMode"] },
|
|
623
|
+
...engineLifecycleSupportOf(properties) !== void 0 && { EngineLifecycleSupport: engineLifecycleSupportOf(properties) },
|
|
624
|
+
...properties["MasterUserAuthenticationType"] != null && { MasterUserAuthenticationType: properties["MasterUserAuthenticationType"] },
|
|
625
|
+
...typeof backtrackWindowValue(properties["BacktrackWindow"]) === "number" && { BacktrackWindow: backtrackWindowValue(properties["BacktrackWindow"]) },
|
|
626
|
+
...typeof localWriteForwardingFlag(properties["EnableLocalWriteForwarding"]) === "boolean" && { EnableLocalWriteForwarding: localWriteForwardingFlag(properties["EnableLocalWriteForwarding"]) },
|
|
627
|
+
...typeof globalWriteForwardingFlag(properties["EnableGlobalWriteForwarding"]) === "boolean" && { EnableGlobalWriteForwarding: globalWriteForwardingFlag(properties["EnableGlobalWriteForwarding"]) }
|
|
628
|
+
};
|
|
629
|
+
}
|
|
630
|
+
function clusterModifyScalarMembers(properties, previousProperties, context) {
|
|
631
|
+
const changed = (key) => instanceValueChanged(properties, previousProperties, key, context);
|
|
632
|
+
const members = {};
|
|
633
|
+
if (changed("AutoMinorVersionUpgrade")) members.AutoMinorVersionUpgrade = properties["AutoMinorVersionUpgrade"];
|
|
634
|
+
if (changed("NetworkType")) members.NetworkType = properties["NetworkType"];
|
|
635
|
+
const insightsModeChanged = changed("DatabaseInsightsMode");
|
|
636
|
+
if (insightsModeChanged || CLUSTER_PERFORMANCE_INSIGHTS_MEMBERS.some(([key]) => changed(key))) Object.assign(members, clusterPerformanceInsightsMembers(properties));
|
|
637
|
+
if (insightsModeChanged) members.DatabaseInsightsMode = properties["DatabaseInsightsMode"];
|
|
638
|
+
const backtrackWindow = backtrackWindowValue(properties["BacktrackWindow"]);
|
|
639
|
+
if (typeof backtrackWindow === "number" && changed("BacktrackWindow")) members.BacktrackWindow = backtrackWindow;
|
|
640
|
+
const localWriteForwarding = localWriteForwardingToSend(properties, previousProperties, context);
|
|
641
|
+
if (typeof localWriteForwarding === "boolean") members.EnableLocalWriteForwarding = localWriteForwarding;
|
|
642
|
+
const globalWriteForwarding = globalWriteForwardingFlag(properties["EnableGlobalWriteForwarding"]);
|
|
643
|
+
if (typeof globalWriteForwarding === "boolean" && changed("EnableGlobalWriteForwarding")) members.EnableGlobalWriteForwarding = globalWriteForwarding;
|
|
644
|
+
return members;
|
|
645
|
+
}
|
|
646
|
+
function backtrackWindowValue(value) {
|
|
647
|
+
return retentionPeriodValue(value);
|
|
648
|
+
}
|
|
649
|
+
function localWriteForwardingFlag(value) {
|
|
650
|
+
return httpEndpointFlag(value);
|
|
651
|
+
}
|
|
652
|
+
function localWriteForwardingToSend(properties, previousProperties, context) {
|
|
653
|
+
const desired = localWriteForwardingFlag(properties["EnableLocalWriteForwarding"]);
|
|
654
|
+
const previousFlag = localWriteForwardingFlag(previousProperties["EnableLocalWriteForwarding"]);
|
|
655
|
+
const previous = typeof previousFlag === "boolean" ? previousFlag : void 0;
|
|
656
|
+
if (desired === void 0) return previous === true ? false : void 0;
|
|
657
|
+
if (desired === "malformed") return void 0;
|
|
658
|
+
if (previous === void 0 && desired === false) return void 0;
|
|
659
|
+
if (!instanceValueChanged(properties, previousProperties, "EnableLocalWriteForwarding", context)) return;
|
|
660
|
+
return desired && context?.desiredFromAwsReadback === true && context.declaredTrueProperties?.has("EnableLocalWriteForwarding") !== true ? "withheld" : desired;
|
|
661
|
+
}
|
|
662
|
+
function localWriteForwardingApplied(cluster, enabled) {
|
|
663
|
+
const status = cluster.LocalWriteForwardingStatus;
|
|
664
|
+
if (status === void 0) return true;
|
|
665
|
+
if (status === "enabling" || status === "disabling") return false;
|
|
666
|
+
return (status === "requested" || status === "enabled") === enabled;
|
|
667
|
+
}
|
|
668
|
+
function globalWriteForwardingFlag(value) {
|
|
669
|
+
return httpEndpointFlag(value);
|
|
670
|
+
}
|
|
671
|
+
function globalWriteForwardingApplied(cluster) {
|
|
672
|
+
if (cluster.GlobalWriteForwardingRequested !== true) return true;
|
|
673
|
+
const status = cluster.GlobalWriteForwardingStatus;
|
|
674
|
+
return status !== "enabling" && status !== "disabling";
|
|
675
|
+
}
|
|
676
|
+
function httpEndpointFlag(value) {
|
|
677
|
+
if (value == null) return void 0;
|
|
678
|
+
if (value === true || value === "true") return true;
|
|
679
|
+
if (value === false || value === "false") return false;
|
|
680
|
+
return "malformed";
|
|
681
|
+
}
|
|
682
|
+
const CLUSTER_BOOLEAN_SCALARS = [
|
|
683
|
+
"AutoMinorVersionUpgrade",
|
|
684
|
+
"PerformanceInsightsEnabled",
|
|
685
|
+
"EnableHttpEndpoint",
|
|
686
|
+
"EnableLocalWriteForwarding"
|
|
687
|
+
];
|
|
688
|
+
function retentionPeriodValue(value) {
|
|
689
|
+
if (value == null) return void 0;
|
|
690
|
+
const parsed = typeof value === "number" ? value : typeof value === "string" && /^\d+$/.test(value.trim()) ? Number(value) : NaN;
|
|
691
|
+
return Number.isInteger(parsed) && parsed >= 0 ? parsed : "malformed";
|
|
692
|
+
}
|
|
693
|
+
function clusterHttpEndpointAction(properties, previousProperties, resourceType, logicalId, physicalId, context) {
|
|
694
|
+
const desired = httpEndpointFlag(properties["EnableHttpEndpoint"]);
|
|
695
|
+
if (desired === "malformed") {
|
|
696
|
+
if (context?.replayingState === true || context?.desiredFromAwsReadback === true) return "skip";
|
|
697
|
+
throw markNonRetryable(new ProvisioningError(`${resourceType} ${logicalId}: EnableHttpEndpoint must be true or false`, resourceType, logicalId, physicalId));
|
|
698
|
+
}
|
|
699
|
+
const engine = properties["Engine"];
|
|
700
|
+
if (typeof engine !== "string") return void 0;
|
|
701
|
+
if (!["aurora-mysql", "aurora-postgresql"].includes(engine.toLowerCase())) return void 0;
|
|
702
|
+
const recorded = httpEndpointFlag(previousProperties["EnableHttpEndpoint"]);
|
|
703
|
+
if (desired === (recorded === "malformed" ? void 0 : recorded)) return void 0;
|
|
704
|
+
if (desired !== true) return "disable";
|
|
705
|
+
return context?.desiredFromAwsReadback === true && context.declaredTrueProperties?.has("EnableHttpEndpoint") !== true ? "withheld" : "enable";
|
|
706
|
+
}
|
|
707
|
+
function withPreviousValues(properties, previousProperties, skipped) {
|
|
708
|
+
const out = { ...properties };
|
|
709
|
+
for (const [key, usable] of skipped) {
|
|
710
|
+
delete out[key];
|
|
711
|
+
const previous = previousProperties[key];
|
|
712
|
+
if (previous != null && usable(previous)) out[key] = previous;
|
|
713
|
+
}
|
|
714
|
+
return out;
|
|
715
|
+
}
|
|
716
|
+
const usableHttpEndpoint = (value) => typeof httpEndpointFlag(value) === "boolean";
|
|
717
|
+
const usableRetentionPeriod = (value) => typeof retentionPeriodValue(value) === "number";
|
|
718
|
+
const usableBacktrackWindow = (value) => typeof backtrackWindowValue(value) === "number";
|
|
719
|
+
const usableLocalWriteForwarding = (value) => typeof localWriteForwardingFlag(value) === "boolean";
|
|
720
|
+
const usableGlobalWriteForwarding = (value) => typeof globalWriteForwardingFlag(value) === "boolean";
|
|
721
|
+
const usableAvailabilityZones = (value) => value == null || Array.isArray(value) && value.every((zone) => typeof zone === "string" && zone.trim() !== "");
|
|
722
|
+
function clusterEngineVersionChanged(properties, previousProperties, context) {
|
|
723
|
+
if (context?.replayingState === true) return false;
|
|
724
|
+
return instanceValueChanged(properties, previousProperties, "EngineVersion", context);
|
|
725
|
+
}
|
|
726
|
+
function clusterInstanceParameterGroupToSend(properties, previousProperties, engineVersionChanged, context) {
|
|
727
|
+
const desired = properties["DBInstanceParameterGroupName"];
|
|
728
|
+
if (!engineVersionChanged || typeof desired !== "string") return void 0;
|
|
729
|
+
return instanceValueChanged(properties, previousProperties, "DBInstanceParameterGroupName", context) ? desired : void 0;
|
|
730
|
+
}
|
|
731
|
+
const SECURITY_GROUP_CHANGE_MEMBER_STATUSES = /* @__PURE__ */ new Set(["modifying"]);
|
|
732
|
+
const PORT_CHANGE_MEMBER_STATUSES = /* @__PURE__ */ new Set(["modifying", "rebooting"]);
|
|
733
|
+
function clusterPortToSend(properties, previousProperties) {
|
|
734
|
+
if (properties["Port"] != null) return Number(properties["Port"]);
|
|
735
|
+
if (previousProperties["Port"] == null) return void 0;
|
|
736
|
+
const engine = properties["Engine"] ?? previousProperties["Engine"];
|
|
737
|
+
const reset = typeof engine === "string" ? CLUSTER_REMOVED_PORT.get(engine.toLowerCase()) : void 0;
|
|
738
|
+
return reset === Number(previousProperties["Port"]) ? void 0 : reset;
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
// src/provisioning/providers/rds/express-writer.ts
|
|
742
|
+
const EXPRESS_WRITER_RESOURCE_ID_KEY = "cdkd:ExpressWriterResourceId";
|
|
743
|
+
var ExpressWriterRefusal = class extends Error {
|
|
744
|
+
constructor(message) {
|
|
745
|
+
super(message);
|
|
746
|
+
this.name = "ExpressWriterRefusal";
|
|
747
|
+
}
|
|
748
|
+
};
|
|
749
|
+
function sameDbIdentifier(a, b) {
|
|
750
|
+
return a !== void 0 && a.toLowerCase() === b.toLowerCase();
|
|
751
|
+
}
|
|
752
|
+
function expressWriterIdentifier(dbClusterIdentifier) {
|
|
753
|
+
return `${dbClusterIdentifier}-instance-1`;
|
|
754
|
+
}
|
|
755
|
+
function expressConfigurationFlag(value) {
|
|
756
|
+
return httpEndpointFlag(value);
|
|
757
|
+
}
|
|
758
|
+
function recordedExpressWriterId(attributes) {
|
|
759
|
+
const value = attributes?.[EXPRESS_WRITER_RESOURCE_ID_KEY];
|
|
760
|
+
return typeof value === "string" && value !== "" ? value : void 0;
|
|
761
|
+
}
|
|
762
|
+
async function readExpressWriterId(dbClusterIdentifier, mask) {
|
|
763
|
+
try {
|
|
764
|
+
const writer = await this.describeDBInstance(expressWriterIdentifier(dbClusterIdentifier));
|
|
765
|
+
return sameDbIdentifier(writer?.DBClusterIdentifier, dbClusterIdentifier) ? writer?.DbiResourceId : void 0;
|
|
766
|
+
} catch (error) {
|
|
767
|
+
this.logger.debug(mask(safeMsg`Could not read the express writer of DBCluster ${dbClusterIdentifier}: ${error instanceof Error ? error.name : "unknown error"}`));
|
|
768
|
+
return;
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
async function isOwnExpressWriter(dbClusterIdentifier) {
|
|
772
|
+
try {
|
|
773
|
+
return sameDbIdentifier((await this.describeDBInstance(expressWriterIdentifier(dbClusterIdentifier)))?.DBClusterIdentifier, dbClusterIdentifier);
|
|
774
|
+
} catch {
|
|
775
|
+
return false;
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
async function deleteExpressWriter(logicalId, physicalId, cluster, recordedWriterId, protectionFlippedOff, mask) {
|
|
779
|
+
if (cluster === void 0) return false;
|
|
780
|
+
if (cluster.DeletionProtection === true && !protectionFlippedOff) return false;
|
|
781
|
+
const writerName = expressWriterIdentifier(physicalId);
|
|
782
|
+
const members = cluster.DBClusterMembers ?? [];
|
|
783
|
+
if (!members.some((member) => sameDbIdentifier(member.DBInstanceIdentifier, writerName))) return false;
|
|
784
|
+
const refuse = (detail) => {
|
|
785
|
+
throw new ExpressWriterRefusal(detail);
|
|
786
|
+
};
|
|
787
|
+
const others = [];
|
|
788
|
+
for (const member of members) {
|
|
789
|
+
const name = member.DBInstanceIdentifier;
|
|
790
|
+
if (name === void 0 || sameDbIdentifier(name, writerName)) continue;
|
|
791
|
+
const instance = await this.describeDBInstance(name).catch((error) => {
|
|
792
|
+
if (this.isNotFoundError(error, "DBInstanceNotFoundFault")) return void 0;
|
|
793
|
+
throw error;
|
|
794
|
+
});
|
|
795
|
+
if (instance !== void 0 && instance.DBInstanceStatus !== "deleting") others.push(name);
|
|
796
|
+
}
|
|
797
|
+
if (others.length > 0) refuse(safeMsg`it still has DB instance(s) ${others.join(", ")} besides the writer express configuration created; delete them first, then re-run`);
|
|
798
|
+
if (recordedWriterId !== void 0) {
|
|
799
|
+
const writer = await this.describeDBInstance(writerName).catch((error) => {
|
|
800
|
+
if (this.isNotFoundError(error, "DBInstanceNotFoundFault")) return void 0;
|
|
801
|
+
throw error;
|
|
802
|
+
});
|
|
803
|
+
if (writer === void 0) return false;
|
|
804
|
+
if (writer.DbiResourceId !== recordedWriterId) refuse(safeMsg`DB instance ${writerName} is not the writer express configuration created for it, so cdkd did not delete it; delete it yourself, then re-run`);
|
|
805
|
+
}
|
|
806
|
+
try {
|
|
807
|
+
await this.getClient().send(new DeleteDBInstanceCommand({
|
|
808
|
+
DBInstanceIdentifier: writerName,
|
|
809
|
+
SkipFinalSnapshot: true
|
|
810
|
+
}));
|
|
811
|
+
} catch (error) {
|
|
812
|
+
if (this.isNotFoundError(error, "DBInstanceNotFoundFault")) return false;
|
|
813
|
+
if (error instanceof Error && error.name === "InvalidDBInstanceStateFault") {
|
|
814
|
+
if ((await this.describeDBInstance(writerName).catch(() => void 0))?.DBInstanceStatus === "deleting") return true;
|
|
815
|
+
}
|
|
816
|
+
throw error;
|
|
817
|
+
}
|
|
818
|
+
this.logger.debug(mask(safeMsg`Deleted the express writer ${writerName} of DBCluster ${logicalId}`));
|
|
819
|
+
return true;
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
// src/provisioning/providers/rds/cluster-attributes.ts
|
|
823
|
+
function dbClusterAttributes(cluster, extras = {}) {
|
|
824
|
+
return definedAttributes({
|
|
825
|
+
"Endpoint.Address": cluster?.Endpoint,
|
|
826
|
+
"Endpoint.Port": stringifyIfAssigned(cluster !== void 0 && extras.port !== void 0 ? extras.port : cluster?.Port),
|
|
827
|
+
"ReadEndpoint.Address": cluster?.ReaderEndpoint,
|
|
828
|
+
Arn: cluster?.DBClusterArn,
|
|
829
|
+
DBClusterResourceId: cluster?.DbClusterResourceId,
|
|
830
|
+
StorageEncryptionType: cluster?.StorageEncryptionType,
|
|
831
|
+
[EXPRESS_WRITER_RESOURCE_ID_KEY]: extras.expressWriterId
|
|
832
|
+
});
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
// src/provisioning/delete-started.ts
|
|
836
|
+
const DELETE_STARTED = Symbol.for("cdkd.deleteStarted");
|
|
837
|
+
const MAX_DEPTH = 10;
|
|
838
|
+
function markDeleteStarted(error) {
|
|
839
|
+
try {
|
|
840
|
+
if (typeof error !== "object" || error === null || !Object.isExtensible(error)) return error;
|
|
841
|
+
Object.defineProperty(error, DELETE_STARTED, {
|
|
842
|
+
value: true,
|
|
843
|
+
enumerable: false,
|
|
844
|
+
writable: false,
|
|
845
|
+
configurable: true
|
|
846
|
+
});
|
|
847
|
+
} catch {}
|
|
848
|
+
return error;
|
|
849
|
+
}
|
|
850
|
+
function isDeleteStarted(error) {
|
|
851
|
+
try {
|
|
852
|
+
let current = error;
|
|
853
|
+
for (let depth = 0; depth < MAX_DEPTH && typeof current === "object" && current !== null; depth++) {
|
|
854
|
+
if (current[DELETE_STARTED] === true) return true;
|
|
855
|
+
current = current.cause;
|
|
856
|
+
}
|
|
857
|
+
} catch {}
|
|
858
|
+
return false;
|
|
859
|
+
}
|
|
860
|
+
const REFUSAL_NAMES = /* @__PURE__ */ new Set([
|
|
861
|
+
"AccessDenied",
|
|
862
|
+
"AccessDeniedException",
|
|
863
|
+
"UnauthorizedOperation",
|
|
864
|
+
"AuthorizationError",
|
|
865
|
+
"DependencyViolation",
|
|
866
|
+
"DeleteConflict",
|
|
867
|
+
"DeleteConflictException"
|
|
868
|
+
]);
|
|
869
|
+
function isRefusedByName(error) {
|
|
870
|
+
try {
|
|
871
|
+
let current = error;
|
|
872
|
+
for (let depth = 0; depth < MAX_DEPTH && current != null; depth++) {
|
|
873
|
+
if (typeof current !== "object") break;
|
|
874
|
+
const link = current;
|
|
875
|
+
for (const name of [
|
|
876
|
+
link.name,
|
|
877
|
+
link.Code,
|
|
878
|
+
link.code
|
|
879
|
+
]) if (typeof name === "string" && REFUSAL_NAMES.has(name)) return true;
|
|
880
|
+
current = link.cause;
|
|
881
|
+
}
|
|
882
|
+
} catch {}
|
|
883
|
+
return false;
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
export { instanceAvailabilityZoneKept as $, isClusterBusyRefusal as A, usableClusterSize as B, clusterModifyMultiAzMembers as C, isReadableBag as Ct, globalWriteForwardingApplied as D, skippedOutputsCarriedFrom as Dt, clusterSizeValue as E, shouldRetainResource as Et, multiAzAppliedProbe as F, usableRetentionPeriod as G, usableHttpEndpoint as H, retentionPeriodValue as I, desiredLogExports as J, withPreviousValues as K, serverlessV2ScalingToSend as L, localWriteForwardingFlag as M, localWriteForwardingToSend as N, globalWriteForwardingFlag as O, stackInstanceIdCarriedFrom as Ot, malformedInstanceClass as P, engineLifecycleSupportRefusalText as Q, usableAvailabilityZones as R, clusterModifyBackfillMembers as S, importableOutputs as St, clusterPortToSend as T, orphansCarriedFrom as Tt, usableInstanceClass as U, usableGlobalWriteForwarding as V, usableLocalWriteForwarding as W, engineLifecycleSupportAction as X, desiredProcessorFeatures as Y, engineLifecycleSupportOf as Z, clusterCreateMultiAzMembers as _, acceptedCreateOnlyDropsOf as _t, ExpressWriterRefusal as a, instanceRebootApplied as at, clusterHttpEndpointAction as b, hasReadableExportSet as bt, expressWriterIdentifier as c, liveLogExports as ct, recordedExpressWriterId as d, logExportsDelta as dt, instanceModifyBackfillMembers as et, CLUSTER_BOOLEAN_SCALARS as f, numberOrUndefined as ft, clusterCreateBackfillMembers as g, slowCcOperationTimeoutMs as gt, backtrackWindowValue as h, dbInstanceAttributes as ht, dbClusterAttributes as i, instanceProcessorFeatureMembers as it, localWriteForwardingApplied as j, httpEndpointFlag as k, isOwnExpressWriter as l, liveProcessorFeatures as lt, SECURITY_GROUP_CHANGE_MEMBER_STATUSES as m, withPreviousAvailabilityZone as mt, isRefusedByName as n, instanceParameterGroupPendingReboot as nt, deleteExpressWriter as o, instanceValueChanged as ot, PORT_CHANGE_MEMBER_STATUSES as p, processorFeaturesSettled as pt, backupReplicationPlan as q, markDeleteStarted as r, instanceParameterGroupSettled as rt, expressConfigurationFlag as s, liveBackupReplicationRegions as st, isDeleteStarted as t, instanceParameterGroupApplying as tt, readExpressWriterId as u, logExportsApplied as ut, clusterCreateScalarMembers as v, describeRegionValueKind as vt, clusterModifyScalarMembers as w, orphansAfterRollback as wt, clusterInstanceParameterGroupToSend as x, importableOutputKeys as xt, clusterEngineVersionChanged as y, exportNamesCarriedFrom as yt, usableBacktrackWindow as z };
|
|
887
|
+
//# sourceMappingURL=delete-started-ByP_GmQ7.js.map
|