@go-to-k/cdkd 0.284.4 → 0.284.6
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/{asg-provider-C0L3_pHn.js → asg-provider-B9L-88MC.js} +2 -2
- package/dist/{asg-provider-C0L3_pHn.js.map → asg-provider-B9L-88MC.js.map} +1 -1
- package/dist/cli.js +77 -15
- package/dist/cli.js.map +1 -1
- package/dist/{deploy-engine-3Z7P1hKs.js → deploy-engine-Ce7kNQp2.js} +104 -22
- package/dist/deploy-engine-Ce7kNQp2.js.map +1 -0
- package/dist/index.d.ts +8 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/deploy-engine-3Z7P1hKs.js.map +0 -1
|
@@ -8727,6 +8727,15 @@ const defaultSleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
|
8727
8727
|
* by `markNonRetryable`, which is rethrown ahead of either, so a deliberate
|
|
8728
8728
|
* cdkd refusal cannot be turned back into a retry by a custom classifier
|
|
8729
8729
|
* (issue #1778).
|
|
8730
|
+
*
|
|
8731
|
+
* REPORTING (issue #2018). A propagation sequence that gives up emits ONE
|
|
8732
|
+
* `warn` line naming how many retries it spent and how much of the budget it
|
|
8733
|
+
* slept, and the per-attempt `debug` lines carry the running total. Before
|
|
8734
|
+
* this, an exhausted retry rethrew the raw AWS error and nothing in a
|
|
8735
|
+
* default-verbosity run distinguished "cdkd retried for 47.75s" from "cdkd
|
|
8736
|
+
* has no retry for this at all" — which is why a field report of exactly this
|
|
8737
|
+
* failure could only be diagnosed by reading the source and diffing two
|
|
8738
|
+
* releases. Neither counter feeds a control decision; they are reporting only.
|
|
8730
8739
|
*/
|
|
8731
8740
|
async function withRetry(operation, logicalId, opts = {}) {
|
|
8732
8741
|
const maxRetries = opts.maxRetries ?? 8;
|
|
@@ -8737,6 +8746,8 @@ async function withRetry(operation, logicalId, opts = {}) {
|
|
|
8737
8746
|
const attemptCeiling = defaultSchedule ? Math.max(maxRetries, 26) : maxRetries;
|
|
8738
8747
|
let lastError;
|
|
8739
8748
|
let sawPropagation = false;
|
|
8749
|
+
let propagationRetries = 0;
|
|
8750
|
+
let propagationSleptMs = 0;
|
|
8740
8751
|
for (let attempt = 0; attempt <= attemptCeiling; attempt++) try {
|
|
8741
8752
|
return await operation();
|
|
8742
8753
|
} catch (error) {
|
|
@@ -8747,13 +8758,27 @@ async function withRetry(operation, logicalId, opts = {}) {
|
|
|
8747
8758
|
const propagation = defaultSchedule && isIamPropagationError(message);
|
|
8748
8759
|
if (propagation) sawPropagation = true;
|
|
8749
8760
|
const attemptLimit = sawPropagation ? 26 : maxRetries;
|
|
8750
|
-
if (!retryable || attempt >= attemptLimit)
|
|
8761
|
+
if (!retryable || attempt >= attemptLimit) {
|
|
8762
|
+
if (propagationRetries > 0) {
|
|
8763
|
+
const budgetExhausted = sawPropagation && attempt >= attemptLimit;
|
|
8764
|
+
const summary = `${logicalId}: gave up after ${propagationRetries} IAM-propagation ${propagationRetries === 1 ? "retry" : "retries"} over ${(propagationSleptMs / 1e3).toFixed(2)}s of propagation backoff${budgetExhausted ? " (the full propagation budget)" : ""} - ${message}`;
|
|
8765
|
+
try {
|
|
8766
|
+
opts.logger?.warn?.(summary);
|
|
8767
|
+
} catch {}
|
|
8768
|
+
}
|
|
8769
|
+
throw error;
|
|
8770
|
+
}
|
|
8751
8771
|
const delay = propagation ? Math.min(250 * Math.pow(2, attempt), IAM_PROPAGATION_MAX_DELAY_MS) : Math.min(initialDelayMs * Math.pow(2, attempt), maxDelayMs);
|
|
8752
|
-
|
|
8772
|
+
const backoffThroughThisAttemptMs = propagation ? propagationSleptMs + delay : propagationSleptMs;
|
|
8773
|
+
opts.logger?.debug(` ⏳ Retrying ${logicalId} in ${delay / 1e3}s (attempt ${attempt + 1}/${attemptLimit}${propagation ? `, ${(backoffThroughThisAttemptMs / 1e3).toFixed(2)}s backoff through this attempt` : ""}) - ${message}`);
|
|
8753
8774
|
for (let waited = 0; waited < delay; waited += 1e3) {
|
|
8754
8775
|
if (opts.isInterrupted?.()) throw opts.onInterrupted ? opts.onInterrupted() : /* @__PURE__ */ new Error("Interrupted");
|
|
8755
8776
|
await sleep(Math.min(1e3, delay - waited));
|
|
8756
8777
|
}
|
|
8778
|
+
if (propagation) {
|
|
8779
|
+
propagationRetries++;
|
|
8780
|
+
propagationSleptMs = backoffThroughThisAttemptMs;
|
|
8781
|
+
}
|
|
8757
8782
|
}
|
|
8758
8783
|
throw lastError;
|
|
8759
8784
|
}
|
|
@@ -10659,6 +10684,29 @@ function maskSecretsInText(text, secrets) {
|
|
|
10659
10684
|
if (!regex) return text;
|
|
10660
10685
|
return text.replace(regex, "***");
|
|
10661
10686
|
}
|
|
10687
|
+
/**
|
|
10688
|
+
* Bind a {@link RecordedSecretValues} bag into a {@link SecretMasker} for a
|
|
10689
|
+
* caller to hand to a provider.
|
|
10690
|
+
*
|
|
10691
|
+
* The bag is captured BY REFERENCE and read on every call, and there is
|
|
10692
|
+
* deliberately NO `secrets.size === 0` short-circuit here: collapsing an empty
|
|
10693
|
+
* bag to the identity function at BIND time would go permanently blind to
|
|
10694
|
+
* everything added afterwards. {@link maskSecretsInText} makes that check at
|
|
10695
|
+
* CALL time, where it is correct and costs a `Map.size` read.
|
|
10696
|
+
*
|
|
10697
|
+
* Stated as a property rather than a live requirement, because it is worth
|
|
10698
|
+
* being exact about: every caller today FILLS its bag before binding — the
|
|
10699
|
+
* rollback executor's arms run `resolveReplayProps` first and only then build
|
|
10700
|
+
* the masker, and the deploy engine resolves before it calls the provider — so
|
|
10701
|
+
* a bind-time short-circuit would pass every existing integration. It is the
|
|
10702
|
+
* ORDER, not the reference capture, that makes them work now, and the order is
|
|
10703
|
+
* the kind of thing a later refactor reverses without noticing. The unit test
|
|
10704
|
+
* `masks values added to the bag AFTER the masker was built` is what holds the
|
|
10705
|
+
* property up on its own.
|
|
10706
|
+
*/
|
|
10707
|
+
function createSecretMasker(secrets) {
|
|
10708
|
+
return (text) => maskSecretsInText(text, secrets);
|
|
10709
|
+
}
|
|
10662
10710
|
|
|
10663
10711
|
//#endregion
|
|
10664
10712
|
//#region src/provisioning/config-shape.ts
|
|
@@ -15595,7 +15643,7 @@ var CloudControlProvider = class {
|
|
|
15595
15643
|
if (context?.finalSnapshotIdentifier !== void 0) throw new ProvisioningError(`${logicalId} (${resourceType}) requires a final snapshot (DeletionPolicy: Snapshot), but the Cloud Control API delete route has no final-snapshot parameter. Re-run with --skip-final-snapshot after snapshotting manually, or retain the resource.`, resourceType, logicalId, physicalId);
|
|
15596
15644
|
if (context?.removeProtection === true && resourceType === "AWS::AutoScaling::AutoScalingGroup") {
|
|
15597
15645
|
this.logger.debug(`Delegating protected AutoScalingGroup ${logicalId} delete to the SDK ASGProvider (Cloud Control cannot force-delete a protected ASG)`);
|
|
15598
|
-
const { ASGProvider } = await import("./asg-provider-
|
|
15646
|
+
const { ASGProvider } = await import("./asg-provider-B9L-88MC.js").then((n) => n.n);
|
|
15599
15647
|
return await new ASGProvider().delete(logicalId, physicalId, resourceType, _properties, context);
|
|
15600
15648
|
}
|
|
15601
15649
|
const isProtectedEc2Instance = context?.removeProtection === true && resourceType === "AWS::EC2::Instance";
|
|
@@ -22201,21 +22249,52 @@ const SKIP_FINAL_SNAPSHOT_FLAG = "--skip-final-snapshot";
|
|
|
22201
22249
|
* engine's five sites (CREATE, the property-driven replacement, the
|
|
22202
22250
|
* `--recreate-via-*` destroy-then-create, the `--replace` delete-first
|
|
22203
22251
|
* fallback, and the update-failure replacement) are all driven by freshly
|
|
22204
|
-
* resolved TEMPLATE properties, so they
|
|
22205
|
-
*
|
|
22252
|
+
* resolved TEMPLATE properties, so they never set THIS FLAG and the refusal
|
|
22253
|
+
* stands where the user can edit the input. They DO pass a context — since
|
|
22254
|
+
* issue #1932 every create site REACHED FROM THE ENGINE carries a
|
|
22255
|
+
* `maskSecrets` capability — so the invariant is "no `replayingState`", not
|
|
22256
|
+
* "no context object". (A provider that re-creates inside its own `update()`
|
|
22257
|
+
* still passes none; see `CreateContext`.)
|
|
22206
22258
|
*
|
|
22207
22259
|
* The remaining call sites are the providers that re-create inside their own
|
|
22208
22260
|
* `update()` (`this.create(...)` in ACM certificate / IAM managed policy / IAM
|
|
22209
22261
|
* role / Lambda permission / SNS subscription). Those are NOT template-driven
|
|
22210
22262
|
* — this executor's `revert` arm calls `provider.update(...)` with
|
|
22211
22263
|
* `previousState.properties`, so they forward a STATE record on a replay — but
|
|
22212
|
-
* they CANNOT receive a
|
|
22264
|
+
* they CANNOT receive a `CreateContext`: `update()`'s own context is an
|
|
22265
|
+
* `UpdateContext`, which carries no `replayingState` to forward.
|
|
22213
22266
|
* The constraint that follows is on providers, not on this constant: a
|
|
22214
22267
|
* provider with a create-side pre-flight refusal must not re-create inside
|
|
22215
22268
|
* `update()`. See `CreateContext` in `src/types/resource.ts`.
|
|
22216
22269
|
*/
|
|
22217
22270
|
const REPLAYING_STATE_CREATE_CONTEXT = { replayingState: true };
|
|
22218
22271
|
/**
|
|
22272
|
+
* The rollback arms' {@link CreateContext}, with this op's secret masker bound
|
|
22273
|
+
* in (issue #1932 item 3).
|
|
22274
|
+
*
|
|
22275
|
+
* The rollback path needs this MORE than the forward deploy does, not less:
|
|
22276
|
+
* {@link resolveReplayProps} deliberately re-resolves every redacted
|
|
22277
|
+
* `{{resolve:...}}` expression back to plaintext before handing the bag to a
|
|
22278
|
+
* provider, so a replayed bag is guaranteed to carry the concrete secret
|
|
22279
|
+
* whenever the resource has one. Leaving the masker off here would have left
|
|
22280
|
+
* the contract applied at one caller and absent at the one whose bag is
|
|
22281
|
+
* provably plaintext.
|
|
22282
|
+
*
|
|
22283
|
+
* Spreads the shared constant rather than mutating it: `maskSecrets` is
|
|
22284
|
+
* per-op, and a module-level object is shared by every op in the run.
|
|
22285
|
+
*
|
|
22286
|
+
* Called AFTER `resolveReplayProps` has filled `secrets` at every call site, so
|
|
22287
|
+
* the masker sees this op's re-resolved values. `createSecretMasker` reads the
|
|
22288
|
+
* bag by reference on every call and so does not depend on that ordering, but
|
|
22289
|
+
* the ordering is what makes it correct here without relying on that.
|
|
22290
|
+
*/
|
|
22291
|
+
function replayingStateCreateContext(secrets) {
|
|
22292
|
+
return {
|
|
22293
|
+
...REPLAYING_STATE_CREATE_CONTEXT,
|
|
22294
|
+
maskSecrets: createSecretMasker(secrets)
|
|
22295
|
+
};
|
|
22296
|
+
}
|
|
22297
|
+
/**
|
|
22219
22298
|
* Which provisioning layer a delete must be judged against: the CURRENT
|
|
22220
22299
|
* state record wins (it is what state says AWS holds right now), with the
|
|
22221
22300
|
* journaled op's routing as the legacy-state fallback. Shared by both
|
|
@@ -22770,7 +22849,7 @@ async function replaySingle(op, stateResources, stackName, ctx, resolver, orphan
|
|
|
22770
22849
|
let deletedNewFirst = false;
|
|
22771
22850
|
let createResult;
|
|
22772
22851
|
try {
|
|
22773
|
-
createResult = await withRetry(() => createProvider.create(op.logicalId, op.resourceType, { ...resolvedPrevProps },
|
|
22852
|
+
createResult = await withRetry(() => createProvider.create(op.logicalId, op.resourceType, { ...resolvedPrevProps }, replayingStateCreateContext(secrets)), op.logicalId, {
|
|
22774
22853
|
...RECREATE_RETRY_SCHEDULE,
|
|
22775
22854
|
logger,
|
|
22776
22855
|
...isInterrupted && {
|
|
@@ -22793,7 +22872,7 @@ async function replaySingle(op, stateResources, stackName, ctx, resolver, orphan
|
|
|
22793
22872
|
delete stateResources[op.logicalId];
|
|
22794
22873
|
await afterOp?.(op.logicalId);
|
|
22795
22874
|
try {
|
|
22796
|
-
createResult = await withRetry(() => createProvider.create(op.logicalId, op.resourceType, { ...resolvedPrevProps },
|
|
22875
|
+
createResult = await withRetry(() => createProvider.create(op.logicalId, op.resourceType, { ...resolvedPrevProps }, replayingStateCreateContext(secrets)), op.logicalId, {
|
|
22797
22876
|
...RECREATE_RETRY_SCHEDULE,
|
|
22798
22877
|
logger,
|
|
22799
22878
|
...isInterrupted && {
|
|
@@ -22866,7 +22945,8 @@ async function replaySingle(op, stateResources, stackName, ctx, resolver, orphan
|
|
|
22866
22945
|
current.physicalId,
|
|
22867
22946
|
op.resourceType,
|
|
22868
22947
|
desiredProps ?? {},
|
|
22869
|
-
currentProps ?? {}
|
|
22948
|
+
currentProps ?? {},
|
|
22949
|
+
{ maskSecrets: createSecretMasker(secrets) }
|
|
22870
22950
|
], op.logicalId, logger, isInterrupted);
|
|
22871
22951
|
stateResources[op.logicalId] = redactRollbackRecord(recordAfterRollbackUpdate(previousState, revertResult), secrets, previousState.properties);
|
|
22872
22952
|
const rollbackPartial = updatePartialReason(revertResult);
|
|
@@ -23009,7 +23089,8 @@ async function replayFailedOperations(failedOps, stateResources, stackName, ctx,
|
|
|
23009
23089
|
current.physicalId,
|
|
23010
23090
|
op.resourceType,
|
|
23011
23091
|
desiredProps ?? {},
|
|
23012
|
-
attemptedProps ?? {}
|
|
23092
|
+
attemptedProps ?? {},
|
|
23093
|
+
{ maskSecrets: createSecretMasker(secrets) }
|
|
23013
23094
|
], op.logicalId, logger, options.isInterrupted);
|
|
23014
23095
|
stateResources[op.logicalId] = redactRollbackRecord(recordAfterRollbackUpdate(prev, revertFailedResult), secrets, prev.properties);
|
|
23015
23096
|
const revertFailedPartial = updatePartialReason(revertFailedResult);
|
|
@@ -23140,7 +23221,7 @@ const FLUSH_INTERVAL_MS = 2e3;
|
|
|
23140
23221
|
const FLUSH_EVENT_THRESHOLD = 50;
|
|
23141
23222
|
/** Build-time cdkd version, with a dev fallback for non-built contexts. */
|
|
23142
23223
|
function getCdkdVersion() {
|
|
23143
|
-
return "0.284.
|
|
23224
|
+
return "0.284.6";
|
|
23144
23225
|
}
|
|
23145
23226
|
/**
|
|
23146
23227
|
* Generate a time-sortable unique run id, e.g.
|
|
@@ -24908,7 +24989,7 @@ var DeployEngine = class {
|
|
|
24908
24989
|
* #960 follow-up) and the name-idempotent same-id guard (issue #1238) so
|
|
24909
24990
|
* the two --replace escape hatches cannot drift apart.
|
|
24910
24991
|
*/
|
|
24911
|
-
async replaceDeleteFirstAndRecreate(logicalId, resourceType, currentResource, oldDeleteProvider, replaceProvider, replaceProps, updateReplacePolicy) {
|
|
24992
|
+
async replaceDeleteFirstAndRecreate(logicalId, resourceType, currentResource, oldDeleteProvider, replaceProvider, replaceProps, createContext, updateReplacePolicy) {
|
|
24912
24993
|
const finalSnapshotIdentifier = await this.prepareFinalSnapshotForDelete(logicalId, resourceType, currentResource, updateReplacePolicy);
|
|
24913
24994
|
let deleteResult;
|
|
24914
24995
|
try {
|
|
@@ -24925,7 +25006,7 @@ var DeployEngine = class {
|
|
|
24925
25006
|
this.logger.info(` ${green("✓")} Old resource deleted`);
|
|
24926
25007
|
this.logger.info(` Re-creating ${logicalId}...`);
|
|
24927
25008
|
try {
|
|
24928
|
-
return await withRetry(() => this.withRetry(() => replaceProvider.create(logicalId, resourceType, replaceProps), logicalId, void 0, void 0, replaceProvider), logicalId, {
|
|
25009
|
+
return await withRetry(() => this.withRetry(() => replaceProvider.create(logicalId, resourceType, replaceProps, createContext), logicalId, void 0, void 0, replaceProvider), logicalId, {
|
|
24929
25010
|
maxRetries: 8,
|
|
24930
25011
|
initialDelayMs: 2e3,
|
|
24931
25012
|
maxDelayMs: 1e4,
|
|
@@ -24959,6 +25040,7 @@ var DeployEngine = class {
|
|
|
24959
25040
|
}, stackName);
|
|
24960
25041
|
const resolvedProps = await this.resolver.resolve(desiredProps, context);
|
|
24961
25042
|
this.perResourceTemplateProps.set(logicalId, desiredProps);
|
|
25043
|
+
const createSecrets = context.recordedSecretValues ?? /* @__PURE__ */ new Map();
|
|
24962
25044
|
if (context.recordedSecretValues) this.perResourceSecrets.set(logicalId, context.recordedSecretValues);
|
|
24963
25045
|
this.auditResolvedAssetReferences(logicalId, resourceType, resolvedProps);
|
|
24964
25046
|
this.attemptedResolvedProps.set(logicalId, resolvedProps);
|
|
@@ -24968,7 +25050,7 @@ var DeployEngine = class {
|
|
|
24968
25050
|
});
|
|
24969
25051
|
const createProvider = createDecision.provider;
|
|
24970
25052
|
const createProps = createDecision.provisionedBy === "cc-api" ? this.preparePropertiesForCcApi(resourceType, resolvedProps, logicalId) : resolvedProps;
|
|
24971
|
-
const result = await this.withRetry(() => createProvider.create(logicalId, resourceType, createProps), logicalId, void 0, void 0, createProvider);
|
|
25053
|
+
const result = await this.withRetry(() => createProvider.create(logicalId, resourceType, createProps, { maskSecrets: createSecretMasker(createSecrets) }), logicalId, void 0, void 0, createProvider);
|
|
24972
25054
|
const dependencies = this.extractAllDependencies(template, logicalId);
|
|
24973
25055
|
const templateAttrs = this.extractTemplateAttributes(template, logicalId);
|
|
24974
25056
|
stateResources[logicalId] = {
|
|
@@ -25079,7 +25161,7 @@ var DeployEngine = class {
|
|
|
25079
25161
|
this.logger.info(` ${green("✓")} Old resource deleted`);
|
|
25080
25162
|
}
|
|
25081
25163
|
this.logger.info(` Creating new ${logicalId}...`);
|
|
25082
|
-
createResult = await withRetry(() => this.withRetry(() => replaceProvider.create(logicalId, resourceType, replaceProps), logicalId, void 0, void 0, replaceProvider), logicalId, {
|
|
25164
|
+
createResult = await withRetry(() => this.withRetry(() => replaceProvider.create(logicalId, resourceType, replaceProps, { maskSecrets: createSecretMasker(updateSecrets) }), logicalId, void 0, void 0, replaceProvider), logicalId, {
|
|
25083
25165
|
maxRetries: 8,
|
|
25084
25166
|
initialDelayMs: 2e3,
|
|
25085
25167
|
maxDelayMs: 1e4,
|
|
@@ -25093,7 +25175,7 @@ var DeployEngine = class {
|
|
|
25093
25175
|
this.logger.info(` Creating new ${logicalId}...`);
|
|
25094
25176
|
let deletedOldFirst = false;
|
|
25095
25177
|
try {
|
|
25096
|
-
createResult = await this.withRetry(() => replaceProvider.create(logicalId, resourceType, replaceProps), logicalId, void 0, void 0, replaceProvider);
|
|
25178
|
+
createResult = await this.withRetry(() => replaceProvider.create(logicalId, resourceType, replaceProps, { maskSecrets: createSecretMasker(updateSecrets) }), logicalId, void 0, void 0, replaceProvider);
|
|
25097
25179
|
} catch (createError) {
|
|
25098
25180
|
const createMsg = createError instanceof Error ? createError.message : String(createError);
|
|
25099
25181
|
if (!isNameCollisionError(createMsg)) throw createError;
|
|
@@ -25102,7 +25184,7 @@ var DeployEngine = class {
|
|
|
25102
25184
|
if (this.options.replace !== true) throw new CdkdError(`${logicalId} (${resourceType}) requires replacement, but the create-first attempt collided with the existing resource: ${createMsg}. ${nameOrigin.descriptor}, so the CloudFormation-style safe replacement order (create the new resource before deleting the old) cannot reuse the occupied name — CloudFormation refuses this shape with "cannot update a stack when a custom-named resource requires replacing". ${nameOrigin.remedy}, or re-run with \`cdkd deploy --replace\` to delete the old resource FIRST and recreate it under the same name (the resource is briefly unavailable while it is recreated).`, "NAMED_REPLACEMENT_COLLISION");
|
|
25103
25185
|
this.logger.info(` Create-first collided with the existing resource's name and --replace is set — deleting old ${logicalId} (${currentResource.physicalId}) first...`);
|
|
25104
25186
|
deletedOldFirst = true;
|
|
25105
|
-
createResult = await this.replaceDeleteFirstAndRecreate(logicalId, resourceType, currentResource, oldDeleteProvider, replaceProvider, replaceProps, updateReplacePolicy);
|
|
25187
|
+
createResult = await this.replaceDeleteFirstAndRecreate(logicalId, resourceType, currentResource, oldDeleteProvider, replaceProvider, replaceProps, { maskSecrets: createSecretMasker(updateSecrets) }, updateReplacePolicy);
|
|
25106
25188
|
}
|
|
25107
25189
|
if (!deletedOldFirst && createResult.physicalId === currentResource.physicalId) {
|
|
25108
25190
|
const idempotentNameOrigin = this.replacementNameOrigin(logicalId, currentResource.physicalId);
|
|
@@ -25110,7 +25192,7 @@ var DeployEngine = class {
|
|
|
25110
25192
|
if (this.options.replace !== true) throw new CdkdError(`${logicalId} (${resourceType}) requires replacement, but its Create API is name-idempotent: the create-first attempt returned the EXISTING resource (${currentResource.physicalId}) instead of creating a new one, so deleting the "old" resource would silently destroy the resource the deploy just reported as created. ${idempotentNameOrigin.descriptor}; ${idempotentNameOrigin.remedy}, or re-run with \`cdkd deploy --replace\` to delete the old resource FIRST and recreate it under the same name (the resource is briefly unavailable while it is recreated). Note: this branch is also reached when the old resource was deleted out-of-band and the physical id is name-derived — there the create was a genuine fresh create; \`--replace\` converges that case too.`, "NAMED_REPLACEMENT_IDEMPOTENT_CREATE");
|
|
25111
25193
|
this.logger.info(` Create-first returned the existing resource (name-idempotent Create API) and --replace is set — deleting old ${logicalId} (${currentResource.physicalId}) first...`);
|
|
25112
25194
|
deletedOldFirst = true;
|
|
25113
|
-
createResult = await this.replaceDeleteFirstAndRecreate(logicalId, resourceType, currentResource, oldDeleteProvider, replaceProvider, replaceProps, updateReplacePolicy);
|
|
25195
|
+
createResult = await this.replaceDeleteFirstAndRecreate(logicalId, resourceType, currentResource, oldDeleteProvider, replaceProvider, replaceProps, { maskSecrets: createSecretMasker(updateSecrets) }, updateReplacePolicy);
|
|
25114
25196
|
}
|
|
25115
25197
|
if (deletedOldFirst) {} else if (updateReplacePolicy === "Retain") this.logger.info(` Retaining old ${logicalId} (${currentResource.physicalId}) - UpdateReplacePolicy: Retain`);
|
|
25116
25198
|
else {
|
|
@@ -25170,7 +25252,7 @@ var DeployEngine = class {
|
|
|
25170
25252
|
let result;
|
|
25171
25253
|
let resultProvisionedBy = updateDecision.provisionedBy;
|
|
25172
25254
|
try {
|
|
25173
|
-
result = await this.withRetry(() => updateProvider.update(logicalId, currentResource.physicalId, resourceType, updateProps, currentProps), logicalId, void 0, void 0, updateProvider);
|
|
25255
|
+
result = await this.withRetry(() => updateProvider.update(logicalId, currentResource.physicalId, resourceType, updateProps, currentProps, { maskSecrets: createSecretMasker(updateSecrets) }), logicalId, void 0, void 0, updateProvider);
|
|
25174
25256
|
} catch (updateError) {
|
|
25175
25257
|
const msg = updateError instanceof Error ? updateError.message : String(updateError);
|
|
25176
25258
|
const ccUnsupported = msg.includes("UnsupportedActionException") || msg.includes("does not support UPDATE");
|
|
@@ -25202,7 +25284,7 @@ var DeployEngine = class {
|
|
|
25202
25284
|
});
|
|
25203
25285
|
const replProvider = replDecision.provider;
|
|
25204
25286
|
const replProps = replDecision.provisionedBy === "cc-api" ? this.preparePropertiesForCcApi(resourceType, resolvedProps, logicalId) : resolvedProps;
|
|
25205
|
-
const createResult = await this.withRetry(() => replProvider.create(logicalId, resourceType, replProps), logicalId, void 0, void 0, replProvider);
|
|
25287
|
+
const createResult = await this.withRetry(() => replProvider.create(logicalId, resourceType, replProps, { maskSecrets: createSecretMasker(updateSecrets) }), logicalId, void 0, void 0, replProvider);
|
|
25206
25288
|
const replacementResult = {
|
|
25207
25289
|
physicalId: createResult.physicalId,
|
|
25208
25290
|
wasReplaced: true,
|
|
@@ -25607,5 +25689,5 @@ var DeployEngine = class {
|
|
|
25607
25689
|
};
|
|
25608
25690
|
|
|
25609
25691
|
//#endregion
|
|
25610
|
-
export { IntrinsicFunctionResolver as $,
|
|
25611
|
-
//# sourceMappingURL=deploy-engine-
|
|
25692
|
+
export { IntrinsicFunctionResolver as $, StackHasActiveImportsError as $n, validateContainerRepoName as $t, formatResourceLine as A, AssemblyReader as An, describeTypeWithThrottleRetry as At, isExportAliasCollision as B, ConfigError as Bn, WorkGraph as Bt, refusesFinalSnapshot as C, MIGRATE_TMP_PREFIX as Cn, s3BucketDomainName as Ct, MULTI_REGION_RECREATE_BLOCKED_TYPES as D, PARTITION_TABLE as Dn, applyRoleArnIfSet as Dt, extractDeploymentEventError as E, expectedOwnerParam as En, s3BucketWebsiteUrl as Et, red as F, getAwsClients as Fn, S3StateBackend as Ft, clearOnUpdateRemoval as G, LocalStartServiceError as Gn, escapeRegExp$1 as Gt, stateKeySecretExposure as H, DeployCancelledError as Hn, createAssetRedirectResolver as Ht, yellow as I, resetAwsClients as In, rebuildClientForBucketRegion as It, findSilentDropProperties as J, NestedStackChildDirectDestroyError as Jn, BOOTSTRAP_MARKER_PREFIX as Jt, ProviderRegistry as K, LockError as Kn, stripControlChars as Kt, collectDeclaredOutputNames as L, setAwsClients as Ln, shouldRetainResource as Lt, cyan as M, clearBucketRegionCache as Mn, DagBuilder as Mt, gray as N, resolveBucketRegion as Nn, TemplateParser as Nt, isStatefulRecreateTargetSync as O, canonicalizeRegion as On, DiffCalculator as Ot, green as P, AwsClients as Pn, LockManager as Pt, isTerminationProtectionPropagationError as Q, ResourceUpdateNotSupportedError as Qn, validateAssetBucketName as Qt, collectPublishedOutputNames as R, AssetError as Rn, AssetPublisher as Rt, isFinalSnapshotError as S, CFN_TEMPLATE_URL_LIMIT as Sn, s3BucketArn as St, makeCanonicalizePropertiesFn as T, uploadCfnTemplate as Tn, s3BucketRegionalDomainName as Tt, IAMRoleProvider as U, LocalInvokeBuildError as Un, loadPublishableAssetManifest as Ut, secretBearingStateKeyWarning as V, DependencyError as Vn, buildAssetRedirectMap as Vt, collectInlinePolicyNamesManagedBySiblings as W, LocalMigrateError as Wn, rewriteTemplateAssetReferences as Wt, slowCcOperationTimeoutMs as X, ProvisioningError as Xn, getBootstrapMarkerKey as Xt, CloudControlProvider as Y, PartialFailureError as Yn, ensureAssetStorage as Yt, disableInstanceApiTermination as Z, ResourceTimeoutError as Zn, parseBootstrapMarker as Zt, ATOMIC_FINAL_SNAPSHOT_TYPES as _, resolveStateBucketWithDefaultAndSource as _n, TEMPLATE_SOURCED_RULES as _t, DeploymentEventsStore as a, runDockerStreaming as an, normalizeAwsError as ar, resolveExplicitPhysicalId as at, ccRoutedFinalSnapshotError as b, warnDeprecatedNoPrefixCliFlag as bn, redactSecretsForState as bt, replayFailedOperations as c, Synthesizer as cn, isRetryableTransientError as cr, configBooleanRefusal as ct, updatePartialReason as d, getLegacyStateBucketName as dn, __exportAll as dr, replayWarn as dt, buildDenyExternalAccessPolicy as en, StackTerminationProtectionError as er, cfnRefValueFromPhysicalId as et, UNSPECIFIED_SKIP_REASON as f, resolveApp as fn, requireConfigArray as ft, computeImplicitDeleteEdges as g, resolveStateBucketWithDefault as gn, STATE_SOURCED_READBACK_RULES as gt, IMPLICIT_DELETE_DEPENDENCIES as h, resolveSkipPrefix as hn, STATE_SOURCED_CROSS_GENERATION_RULES as ht, DeploymentEventsReader as i, runDockerForeground as in, isCdkdError as ir, normalizeAwsTagsToCfn as it, bold as j, processStackMessages as jn, withRetry as jt, renderStatefulReason as k, derivePartitionAndUrlSuffix as kn, INTRINSIC_KEYS as kt, replayRollback as l, synthesisStatusMessage as ln, isThrottlingError as lr, configStringRefusal as lt, withResourceDeadline as m, resolveCaptureObservedState as mn, requireConfigString as mt, DEFAULT_RESOURCE_WARN_AFTER_MS as n, formatDockerLoginError as nn, SynthesisError as nr, refStateLookupFromResource as nt, planFailedOps as o, AssetManifestLoader as on, withErrorHandling as or, assertRegionMatch as ot, deleteSkipReason as p, resolveAutoAssetStorage as pn, requireConfigObject as pt, findActionableSilentDrops as q, MissingCdkCliError as qn, AssetModeResolver as qt, DeployEngine as r, getDockerCmd as rn, formatError as rr, WAFv2WebACLProvider as rt, planRollback as s, getDockerImageBySourceHash as sn, isMarkedNonRetryable as sr, coerceCfnBoolean as st, DEFAULT_RESOURCE_TIMEOUT_MS as t, buildDockerImage as tn, StateError as tr, getAccountInfo as tt, updatePartialMessage as u, getDefaultStateBucketName as un, markNonRetryable as ur, readConfigString as ut, PRE_DELETE_SNAPSHOT_TYPES as v, resolveUseCdkBootstrapAssets as vn, createSecretMasker as vt, unsupportedFinalSnapshotError as w, findLargeInlineResources as wn, s3BucketDualStackDomainName as wt, createPreDeleteFinalSnapshot as x, CFN_TEMPLATE_BODY_LIMIT as xn, scrubResourceRecord as xt, buildFinalSnapshotIdentifier as y, stateBucketExistenceConfirmed as yn, maskSecretsInText as yt, exportAliasCollisionScrubWarning as z, CdkdError as zn, stringifyValue as zt };
|
|
25693
|
+
//# sourceMappingURL=deploy-engine-Ce7kNQp2.js.map
|