@go-to-k/cdkd 0.231.7 → 0.231.9
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 +141 -11
- package/dist/cli.js.map +1 -1
- package/dist/{deploy-engine-D-51YceH.js → deploy-engine-BvraZ92_.js} +61 -1
- package/dist/{deploy-engine-D-51YceH.js.map → deploy-engine-BvraZ92_.js.map} +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -8971,11 +8971,71 @@ var CloudControlProvider = class {
|
|
|
8971
8971
|
this.logger.debug(`Failed to enrich OpenSearch Domain ${physicalId}: ${error instanceof Error ? error.message : String(error)}`);
|
|
8972
8972
|
}
|
|
8973
8973
|
break;
|
|
8974
|
+
case "AWS::Backup::BackupVault":
|
|
8975
|
+
if (!enriched["BackupVaultArn"]) {
|
|
8976
|
+
const model = await this.readBackupResourceModel(resourceType, physicalId);
|
|
8977
|
+
if (model) {
|
|
8978
|
+
if (typeof model["BackupVaultArn"] === "string") enriched["BackupVaultArn"] = model["BackupVaultArn"];
|
|
8979
|
+
if (!enriched["BackupVaultName"] && typeof model["BackupVaultName"] === "string") enriched["BackupVaultName"] = model["BackupVaultName"];
|
|
8980
|
+
this.logger.debug(`Enriched Backup BackupVault ${physicalId} with BackupVaultArn from CC GetResource`);
|
|
8981
|
+
}
|
|
8982
|
+
}
|
|
8983
|
+
if (!enriched["BackupVaultName"]) enriched["BackupVaultName"] = physicalId;
|
|
8984
|
+
break;
|
|
8985
|
+
case "AWS::Backup::BackupPlan":
|
|
8986
|
+
if (!enriched["BackupPlanArn"] || !enriched["VersionId"]) {
|
|
8987
|
+
const model = await this.readBackupResourceModel(resourceType, physicalId);
|
|
8988
|
+
if (model) {
|
|
8989
|
+
if (!enriched["BackupPlanArn"] && typeof model["BackupPlanArn"] === "string") enriched["BackupPlanArn"] = model["BackupPlanArn"];
|
|
8990
|
+
if (!enriched["VersionId"] && typeof model["VersionId"] === "string") enriched["VersionId"] = model["VersionId"];
|
|
8991
|
+
if (!enriched["BackupPlanId"] && typeof model["BackupPlanId"] === "string") enriched["BackupPlanId"] = model["BackupPlanId"];
|
|
8992
|
+
this.logger.debug(`Enriched Backup BackupPlan ${physicalId} with BackupPlanArn/VersionId from CC GetResource`);
|
|
8993
|
+
}
|
|
8994
|
+
}
|
|
8995
|
+
if (!enriched["BackupPlanId"]) enriched["BackupPlanId"] = physicalId;
|
|
8996
|
+
break;
|
|
8997
|
+
case "AWS::Backup::BackupSelection":
|
|
8998
|
+
if (!enriched["SelectionId"] || !enriched["BackupPlanId"]) {
|
|
8999
|
+
const compoundSegments = physicalId.split("|");
|
|
9000
|
+
if (compoundSegments.length >= 2) {
|
|
9001
|
+
if (!enriched["SelectionId"]) enriched["SelectionId"] = compoundSegments[0];
|
|
9002
|
+
if (!enriched["BackupPlanId"]) enriched["BackupPlanId"] = compoundSegments[1];
|
|
9003
|
+
}
|
|
9004
|
+
const model = await this.readBackupResourceModel(resourceType, physicalId);
|
|
9005
|
+
if (model) {
|
|
9006
|
+
if (typeof model["SelectionId"] === "string") enriched["SelectionId"] = model["SelectionId"];
|
|
9007
|
+
if (typeof model["BackupPlanId"] === "string") enriched["BackupPlanId"] = model["BackupPlanId"];
|
|
9008
|
+
this.logger.debug(`Enriched Backup BackupSelection ${physicalId} with SelectionId from CC GetResource`);
|
|
9009
|
+
}
|
|
9010
|
+
}
|
|
9011
|
+
break;
|
|
8974
9012
|
default: break;
|
|
8975
9013
|
}
|
|
8976
9014
|
return enriched;
|
|
8977
9015
|
}
|
|
8978
9016
|
/**
|
|
9017
|
+
* Read the Cloud Control GetResource model for a pure-CC Backup resource and
|
|
9018
|
+
* return its parsed property map, or `undefined` on any failure. Backup types
|
|
9019
|
+
* have no SDK provider, so this generic CC read-back is the cleanest source
|
|
9020
|
+
* of their readOnly attributes (ARNs, VersionId, SelectionId) that the sparse
|
|
9021
|
+
* CREATE ResourceModel does not reliably surface. Best-effort: never throws.
|
|
9022
|
+
*/
|
|
9023
|
+
async readBackupResourceModel(resourceType, physicalId) {
|
|
9024
|
+
try {
|
|
9025
|
+
const raw = (await this.cloudControlClient.send(new GetResourceCommand({
|
|
9026
|
+
TypeName: resourceType,
|
|
9027
|
+
Identifier: physicalId
|
|
9028
|
+
}))).ResourceDescription?.Properties;
|
|
9029
|
+
if (typeof raw !== "string" || raw.length === 0) return;
|
|
9030
|
+
const parsed = JSON.parse(raw);
|
|
9031
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) return;
|
|
9032
|
+
return parsed;
|
|
9033
|
+
} catch (error) {
|
|
9034
|
+
this.logger.debug(`Failed to read CC model for ${resourceType} ${physicalId}: ${error instanceof Error ? error.message : String(error)}`);
|
|
9035
|
+
return;
|
|
9036
|
+
}
|
|
9037
|
+
}
|
|
9038
|
+
/**
|
|
8979
9039
|
* Handle errors and throw ProvisioningError
|
|
8980
9040
|
*/
|
|
8981
9041
|
handleError(error, operation, resourceType, logicalId, physicalId) {
|
|
@@ -14895,4 +14955,4 @@ var DeployEngine = class {
|
|
|
14895
14955
|
|
|
14896
14956
|
//#endregion
|
|
14897
14957
|
export { resolveSkipPrefix as $, DiffCalculator as A, buildDockerImage as B, findActionableSilentDrops as C, refStateLookupFromResource as D, cfnRefValueFromPhysicalId as E, rebuildClientForBucketRegion as F, AssetManifestLoader as G, getDockerCmd as H, shouldRetainResource as I, synthesisStatusMessage as J, getDockerImageBySourceHash as K, AssetPublisher as L, TemplateParser as M, LockManager as N, WAFv2WebACLProvider as O, S3StateBackend as P, resolveCaptureObservedState as Q, stringifyValue as R, ProviderRegistry as S, IntrinsicFunctionResolver as T, runDockerForeground as U, formatDockerLoginError as V, runDockerStreaming as W, getLegacyStateBucketName as X, getDefaultStateBucketName as Y, resolveApp as Z, green as _, withRetry as a, MIGRATE_TMP_PREFIX as at, IAMRoleProvider as b, computeImplicitDeleteEdges as c, AssemblyReader as ct, isStatefulRecreateTargetSync as d, resolveStateBucketWithDefault as et, renderStatefulReason as f, gray as g, cyan as h, withResourceDeadline as i, CFN_TEMPLATE_URL_LIMIT as it, DagBuilder as j, applyRoleArnIfSet as k, extractDeploymentEventError as l, clearBucketRegionCache as lt, bold as m, DEFAULT_RESOURCE_WARN_AFTER_MS as n, warnDeprecatedNoPrefixCliFlag as nt, isRetryableTransientError as o, findLargeInlineResources as ot, formatResourceLine as p, Synthesizer as q, DeployEngine as r, CFN_TEMPLATE_BODY_LIMIT as rt, IMPLICIT_DELETE_DEPENDENCIES as s, uploadCfnTemplate as st, DEFAULT_RESOURCE_TIMEOUT_MS as t, resolveStateBucketWithDefaultAndSource as tt, MULTI_REGION_RECREATE_BLOCKED_TYPES as u, resolveBucketRegion as ut, red as v, CloudControlProvider as w, collectInlinePolicyNamesManagedBySiblings as x, yellow as y, WorkGraph as z };
|
|
14898
|
-
//# sourceMappingURL=deploy-engine-
|
|
14958
|
+
//# sourceMappingURL=deploy-engine-BvraZ92_.js.map
|