@go-to-k/cdkd 0.302.1 → 0.302.2

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.
Files changed (31) hide show
  1. package/dist/{asg-provider-BpRcm_UB.js → asg-provider-B5RKfCs2.js} +27 -9
  2. package/dist/asg-provider-B5RKfCs2.js.map +1 -0
  3. package/dist/cli.js +2 -2
  4. package/dist/{deploy-engine-CYVt2NQR.js → deploy-engine-B_xWnZ4Q.js} +315 -4242
  5. package/dist/deploy-engine-B_xWnZ4Q.js.map +1 -0
  6. package/dist/{iam-policy-targets-CmHNH1DY.js → iam-policy-targets-OtGPguLH.js} +3 -2
  7. package/dist/{iam-policy-targets-CmHNH1DY.js.map → iam-policy-targets-OtGPguLH.js.map} +1 -1
  8. package/dist/{iam-role-provider-R1GC6KcT.js → iam-role-provider-TdX7t0Ac.js} +9 -5
  9. package/dist/iam-role-provider-TdX7t0Ac.js.map +1 -0
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +3 -3
  12. package/dist/{neptune-provider-DzTl6-74.js → neptune-provider-CUoBJ6Ys.js} +121 -11
  13. package/dist/neptune-provider-CUoBJ6Ys.js.map +1 -0
  14. package/dist/{program-CvRs5pV_.js → program-DDJHp1K3.js} +9 -5
  15. package/dist/program-DDJHp1K3.js.map +1 -0
  16. package/dist/{provider-classes-B2_u4Fg0.js → provider-classes-CUKmyCQ8.js} +359 -104
  17. package/dist/provider-classes-CUKmyCQ8.js.map +1 -0
  18. package/dist/{rds-provider-CmKbYAvr.js → rds-provider-Bxh9YW5y.js} +208 -42
  19. package/dist/rds-provider-Bxh9YW5y.js.map +1 -0
  20. package/dist/secret-redaction-BHWS-PZK.js +3937 -0
  21. package/dist/secret-redaction-BHWS-PZK.js.map +1 -0
  22. package/dist/{version-CaejipV3.js → version-CZS6bEuG.js} +2 -2
  23. package/dist/{version-CaejipV3.js.map → version-CZS6bEuG.js.map} +1 -1
  24. package/package.json +2 -2
  25. package/dist/asg-provider-BpRcm_UB.js.map +0 -1
  26. package/dist/deploy-engine-CYVt2NQR.js.map +0 -1
  27. package/dist/iam-role-provider-R1GC6KcT.js.map +0 -1
  28. package/dist/neptune-provider-DzTl6-74.js.map +0 -1
  29. package/dist/program-CvRs5pV_.js.map +0 -1
  30. package/dist/provider-classes-B2_u4Fg0.js.map +0 -1
  31. package/dist/rds-provider-CmKbYAvr.js.map +0 -1
@@ -1,13 +1,14 @@
1
1
  import { r as getAwsClients } from "./aws-clients-B_CEQGE1.js";
2
2
  import { B as SECRET_REF_MAX_CODE_POINTS, C as generateResourceName, D as getCurrentStackInstanceId, J as displayStackName, K as displayIdent, M as recordedGeneratedNameKept, Q as safeMsg, T as generatedNameFor, Y as isPasteableIdent, Z as plainIdentOr, a as safeStringify, i as isAwsAuthoredFailure, k as isBeforeStateRead, n as describeAwsFailure, q as displaySafe, r as describeAwsStatusReason, s as getLogger, w as generateResourceNameWithFallback } from "./aws-failure-text-e_ddrDDo.js";
3
- import { $ as protectedReplacementAdvice, $t as ambientCredentialConfig, A as isQuotableImportValue, B as isTerminalDeleteFailure, Bn as plainOrDescribed, C as setBounded, D as VALUE_NOT_SHOWN, E as assertRegionMatch, F as resolveExplicitPhysicalId, Fn as commandHole, H as observeThenDisableProtection, In as hasClauseBreak, Kt as injectiveKey, L as ProtectionFlipRegistry, Ln as isInertUnquoted, M as quotedRemedyLogicalId, Mt as markCreatedBeforeFailure, N as refusalTypeShown, Nt as markSupersedesEarlierCreate, O as isPlainImportJson, P as remedyLogicalId, Q as pasteableAwsCommand, Qt as ambientClientDefaults, Rn as pasteableCommand, S as replayedSendWindow, St as withDerivedNameMasks, T as RESOURCE_NOT_FOUND, Tt as clearCreatedBeforeFailure, U as protectionFlipKey, Un as shellQuote, V as logGroupProtectionSite, W as rdsFamilyProtectionSite, Wn as withheldTargetClause, X as WITHHELD_AWS_COMMAND, Y as UNNAMEABLE_ID_CLAUSE, Yn as isNameCollisionError, Z as isAwsCliLiteral, Zt as withPasteableAwsProfile, _ as RecentIdSet, _r as isThrottlingError, _t as createMaskedLogSinks, a as onlySecretDerived, at as startInterruptWatch, b as isInsideWindow, br as wrapMaskedAwsError, bt as maskDeep, c as recordedPrincipalsRepair, ct as canonicalizeRoute53QueryName, dt as compositeIdSkipResult, en as clientDefaultsFor, er as markNameCollision, et as renderDisableCommand, fr as isRetryableTransientError, ft as logicalIdShown, g as AmbiguousCreateLatch, gr as isMarkedNonRetryable, gt as stateOrphanRecordRemedy, h as AMBIGUOUS_LATCH_TTL_MS, hr as THROTTLING_ERROR_NAMES, ht as segmentAfterAnchor, i as holdsSecretDerivedEntry, in as CdkdError, it as isInterruptedWaitError, j as normalizeAwsTagsToCfn, jt as markAuxiliaryFailure, k as isPlainImportValue, lr as isAmbiguousOutcomeError, lt as compositeIdFormatMessage, nn as AccountIdUnavailableError, nr as relayedNameCollision, o as readPrincipalLists, or as explicitDenyPolicyKind, ot as ElapsedBudgetRegistry, p as withRemovalDefaults, pr as isTransientServerError, pt as packCompositeId, q as userPoolProtectionSite, qt as injectiveKeyPrefix, r as SECRET_DERIVED_READ_LIVE, tn as credentialFingerprint, tr as markReplayMayCollide, u as clearOnUpdateRemoval, ur as isExplicitDenyError, ut as compositeIdSeparatorRefusal, v as ambiguousAttemptLead, vr as markNonRetryable, vt as createMaskedRetryLogger, w as withoutServerErrorRetries, x as replayFollowedAmbiguousAttempt, xn as ResourceUpdateNotSupportedError, xt as maskerOrIdentity, y as createAttemptKey, yn as ProvisioningError, yr as markRedactedCause, yt as isSecretDerivedValue, z as deleteWithProtectionCompensation } from "./iam-policy-targets-CmHNH1DY.js";
3
+ import { $ as protectedReplacementAdvice, $t as ambientCredentialConfig, A as isQuotableImportValue, B as isTerminalDeleteFailure, Bn as plainOrDescribed, C as setBounded, D as VALUE_NOT_SHOWN, E as assertRegionMatch, F as resolveExplicitPhysicalId, Fn as commandHole, H as observeThenDisableProtection, In as hasClauseBreak, Kt as injectiveKey, L as ProtectionFlipRegistry, Ln as isInertUnquoted, M as quotedRemedyLogicalId, Mt as markCreatedBeforeFailure, N as refusalTypeShown, Nt as markSupersedesEarlierCreate, O as isPlainImportJson, P as remedyLogicalId, Q as pasteableAwsCommand, Qt as ambientClientDefaults, Rn as pasteableCommand, S as replayedSendWindow, St as withDerivedNameMasks, T as RESOURCE_NOT_FOUND, Tt as clearCreatedBeforeFailure, U as protectionFlipKey, Un as shellQuote, V as logGroupProtectionSite, W as rdsFamilyProtectionSite, Wn as withheldTargetClause, X as WITHHELD_AWS_COMMAND, Y as UNNAMEABLE_ID_CLAUSE, Yn as isNameCollisionError, Z as isAwsCliLiteral, Zt as withPasteableAwsProfile, _ as RecentIdSet, _r as isThrottlingError, _t as createMaskedLogSinks, a as onlySecretDerived, at as startInterruptWatch, b as isInsideWindow, br as wrapMaskedAwsError, bt as maskDeep, c as recordedPrincipalsRepair, ct as canonicalizeRoute53QueryName, dt as compositeIdSkipResult, en as clientDefaultsFor, er as markNameCollision, et as renderDisableCommand, fr as isRetryableTransientError, ft as logicalIdShown, g as AmbiguousCreateLatch, gr as isMarkedNonRetryable, gt as stateOrphanRecordRemedy, h as AMBIGUOUS_LATCH_TTL_MS, hr as THROTTLING_ERROR_NAMES, ht as segmentAfterAnchor, i as holdsSecretDerivedEntry, in as CdkdError, it as isInterruptedWaitError, j as normalizeAwsTagsToCfn, jt as markAuxiliaryFailure, k as isPlainImportValue, kt as isAuxiliaryFailure, lr as isAmbiguousOutcomeError, lt as compositeIdFormatMessage, nn as AccountIdUnavailableError, nr as relayedNameCollision, o as readPrincipalLists, or as explicitDenyPolicyKind, ot as ElapsedBudgetRegistry, p as withRemovalDefaults, pr as isTransientServerError, pt as packCompositeId, q as userPoolProtectionSite, qt as injectiveKeyPrefix, r as SECRET_DERIVED_READ_LIVE, tn as credentialFingerprint, tr as markReplayMayCollide, u as clearOnUpdateRemoval, ur as isExplicitDenyError, ut as compositeIdSeparatorRefusal, v as ambiguousAttemptLead, vr as markNonRetryable, vt as createMaskedRetryLogger, w as withoutServerErrorRetries, x as replayFollowedAmbiguousAttempt, xn as ResourceUpdateNotSupportedError, xt as maskerOrIdentity, y as createAttemptKey, yn as ProvisioningError, yr as markRedactedCause, yt as isSecretDerivedValue, z as deleteWithProtectionCompensation } from "./iam-policy-targets-OtGPguLH.js";
4
4
  import { s as ambientRegion } from "./aws-client-defaults-DBXBcg0J.js";
5
- import { Ar as markDeleteStarted, Bo as toCfnInteger, C as hasCdkAutoDeleteTag, Ci as s3BucketDomainName, Cr as reserveStackCreateToken, Cs as redactForState, Dt as withApiLimit, E as markRefusedBeforeApplying, Ei as s3BucketWebsiteUrl, Eo as findSilentDropProperties, Et as lookupEachName, F as findNestedTemplateTreeDefect, Fr as refuseMalformedDesiredTags, Go as configIntegerRefusal, Gr as waitForLambdaFunctionActive, Ho as coerceCfnBoolean, Hs as withoutPhysicalNameCopies, I as isAbsoluteAssetPath, Ir as tagMapAsList, Jo as replayWarn, Jt as redactedDeleteAddressFields, Ka as refuseMalformedNestedChildOutputs, Kl as canonicalizeRegion, Ko as configStringRefusal, Kt as REDACTED_DELETE_ADDRESS_SKIP_REASON, L as listNestedTemplateRows, Lo as WARM_THROUGHPUT_MEMBERS, Lr as tagPlanWarning, Mr as DBPROXY_TAG_OPTIONS, Nn as replacedDeleteFailureVerdict, Nr as planTagDiff, Oo as withoutSilentDropProperties, Os as hasMaskableValues, Pr as readTagList, Qs as recordAttributeIdCopy, R as renderNestedTemplateTreeDefect, Ro as coerceWarmThroughput$1, Rr as definedAttributes, S as S3_AUTO_DELETE_OBJECTS_TAG, Si as s3BucketArn, Ss as markSameGenerationBag, T as getPriorAttempts, Ti as s3BucketRegionalDomainName, Tr as acquireIdempotencyToken, Ts as snapshotPassProvenance, Tt as isAccessDeniedError, Ul as decodeListingKey, Uo as coerceCfnInteger, Vo as toFiniteNumber, Wc as rewriteTemplateAssetReferences, Wo as configBooleanRefusal, Ws as dynamicReferenceTokens, Wt as getCurrentProducerRegions, Xo as requireConfigObject, Xs as recoverMaskedOutput, Yo as requireConfigArray, Yr as getCurrentResourceSecrets, Yt as redactedDeleteAddressSkip, Zi as getAccountInfo, Zo as requireConfigString, Zs as physicalNameCopiesOf, _ as deleteTableWithIndexBusyRetry, _a as accountArgs, au as renderAssemblyPathEscape, b as waitForIndexesSettled, c as DynamoDBGlobalTableProvider, ci as withIndeterminateGuard, cr as secretNamedAttributeNamesOf, d as compensateRemovedDeletionProtection, f as deleteBudgetKey, fi as ec2InstanceProtectionSite, fo as refuseMalformedResourcesForDestroy, g as INDEX_SETTLE_POLL_INTERVAL_MS, gi as reEnableInstanceApiTermination, gs as passedNoEchoParametersOf, h as DELETE_INDEX_WAIT_PROCEED_NOTE, hi as reDisableInstanceApiTermination, is as sameLambdaFunctionAddress, iu as displayAssemblyPath, ji as outputReferenceProvenanceOf, jn as getStackRecords, jr as DBPROXY_TAGS_WHAT, kn as awaitInFlightSibling, kr as isRefusedByName, l as DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS, li as isWaitAbandonedError, lt as revertNestedChildFromJournal, m as resolveDynamoDbDeleteBudgetMs, mi as observeThenDisableInstanceApiTermination, mt as withNestedStackContext, ni as unchangedBehindSecretReference, ns as canonicalLambdaFunctionName, ot as getNestedRevertRun, ou as resolveAssemblyPath, p as resolveDynamoDbDeleteBudgetClock, pi as isTerminationProtectionPropagationError, pt as getCurrentNestedStackContext, ql as derivePartitionAndUrlSuffix, qo as readConfigString, qt as isRedactedRecordedValue, rs as lambdaFunctionNameForMask, ru as describeFileReadFailure, sa as parseWebACLArn, si as deleteSkipReason, t as DeployEngine, tc as carriesSecretMask, ti as slowCcOperationTimeoutMs, ts as withRetry, u as beginDeleteWait, ua as passedParameterClassesOf, ui as markWaitAbandoned, v as maskedLogger, w as isTruthyCfnBoolean, wi as s3BucketDualStackDomainName, wo as withheldAccountClause, ws as recordReferenceProvenanceEntry, wt as chunks, x as ECR_AUTO_DELETE_IMAGES_TAG, xi as isSettledInstanceState, xr as earliestDefined, y as relayedIndexBusyDelete, zc as stringifyValue, zo as isWarmThroughputDecrease, zr as stringifyIfAssigned } from "./deploy-engine-CYVt2NQR.js";
6
- import { n as collectInlinePolicyNamesManagedBySiblings, r as IamCreateClientCache, t as IAMRoleProvider } from "./iam-role-provider-R1GC6KcT.js";
7
- import { a as resolveSecretDerivedPrincipals, i as isResolvableSecretPrincipalList, n as runDestroyForStack, o as canonicalizeIpProtocolValue, r as holdsUnprovenSecretPrincipalToken, s as resolvedResourceTimeoutMs, t as canonicalizeIpv4Cidr } from "./program-CvRs5pV_.js";
8
- import { RDSProvider } from "./rds-provider-CmKbYAvr.js";
9
- import { NeptuneProvider } from "./neptune-provider-DzTl6-74.js";
10
- import { ASGProvider } from "./asg-provider-BpRcm_UB.js";
5
+ import { An as awaitInFlightSibling, Ar as isRefusedByName, Bc as decodeListingKey, Bo as isWarmThroughputDecrease, Br as stringifyIfAssigned, C as hasCdkAutoDeleteTag, Ci as s3BucketArn, Di as s3BucketWebsiteUrl, Do as findSilentDropProperties, Dt as lookupEachName, E as markRefusedBeforeApplying, Ei as s3BucketRegionalDomainName, Er as acquireIdempotencyToken, Et as isAccessDeniedError, F as findNestedTemplateTreeDefect, Fr as readTagList, Go as configBooleanRefusal, Gt as getCurrentProducerRegions, Ho as toFiniteNumber, I as isAbsoluteAssetPath, Ir as refuseMalformedDesiredTags, Is as stringifyValue, Jo as readConfigString, Jt as isRedactedRecordedValue, Ko as configIntegerRefusal, Kr as waitForLambdaFunctionActive, L as listNestedTemplateRows, Lr as tagMapAsList, Mi as outputReferenceProvenanceOf, Mn as getStackRecords, Mr as DBPROXY_TAGS_WHAT, Nr as DBPROXY_TAG_OPTIONS, Ot as withApiLimit, Pn as replacedDeleteFailureVerdict, Pr as planTagDiff, Qi as getAccountInfo, Qo as requireConfigString, R as renderNestedTemplateTreeDefect, Ro as WARM_THROUGHPUT_MEMBERS, Rr as tagPlanWarning, S as S3_AUTO_DELETE_OBJECTS_TAG, Si as isSettledInstanceState, Sr as earliestDefined, T as getPriorAttempts, Ti as s3BucketDualStackDomainName, To as withheldAccountClause, Tt as chunks, Uc as canonicalizeRegion, Uo as coerceCfnBoolean, Vo as toCfnInteger, Vs as rewriteTemplateAssetReferences, W as enclosingDeadlineRemainingMs, Wc as derivePartitionAndUrlSuffix, Wo as coerceCfnInteger, Xo as requireConfigArray, Xr as getCurrentResourceSecrets, Xt as redactedDeleteAddressSkip, Yo as replayWarn, Yt as redactedDeleteAddressFields, Zo as requireConfigObject, _ as deleteTableWithIndexBusyRetry, _i as reEnableInstanceApiTermination, as as sameLambdaFunctionAddress, b as waitForIndexesSettled, c as DynamoDBGlobalTableProvider, ca as parseWebACLArn, ci as deleteSkipReason, d as compensateRemovedDeletionProtection, da as passedParameterClassesOf, di as markWaitAbandoned, el as describeFileReadFailure, f as deleteBudgetKey, g as INDEX_SETTLE_POLL_INTERVAL_MS, gi as reDisableInstanceApiTermination, h as DELETE_INDEX_WAIT_PROCEED_NOTE, hi as observeThenDisableInstanceApiTermination, ht as withNestedStackContext, is as lambdaFunctionNameForMask, jr as markDeleteStarted, ko as withoutSilentDropProperties, l as DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS, li as withIndeterminateGuard, lr as secretNamedAttributeNamesOf, m as resolveDynamoDbDeleteBudgetMs, mi as isTerminationProtectionPropagationError, mt as getCurrentNestedStackContext, ni as slowCcOperationTimeoutMs, nl as renderAssemblyPathEscape, ns as withRetry, p as resolveDynamoDbDeleteBudgetClock, pi as ec2InstanceProtectionSite, po as refuseMalformedResourcesForDestroy, qa as refuseMalformedNestedChildOutputs, qo as configStringRefusal, qt as REDACTED_DELETE_ADDRESS_SKIP_REASON, ri as unchangedBehindSecretReference, rl as resolveAssemblyPath, rs as canonicalLambdaFunctionName, st as getNestedRevertRun, t as DeployEngine, tl as displayAssemblyPath, u as beginDeleteWait, ui as isWaitAbandonedError, ut as revertNestedChildFromJournal, v as maskedLogger, va as accountArgs, w as isTruthyCfnBoolean, wi as s3BucketDomainName, wr as reserveStackCreateToken, x as ECR_AUTO_DELETE_IMAGES_TAG, y as relayedIndexBusyDelete, zo as coerceWarmThroughput$1, zr as definedAttributes } from "./deploy-engine-B_xWnZ4Q.js";
6
+ import { D as markSameGenerationBag, F as redactForState, H as recordReferenceProvenanceEntry, Jt as physicalNameCopiesOf, Tt as dynamicReferenceTokens, W as snapshotPassProvenance, Y as hasMaskableValues, Yt as recordAttributeIdCopy, m as passedNoEchoParametersOf, nn as carriesSecretMask, qt as recoverMaskedOutput, xt as withoutPhysicalNameCopies } from "./secret-redaction-BHWS-PZK.js";
7
+ import { n as collectInlinePolicyNamesManagedBySiblings, r as IamCreateClientCache, t as IAMRoleProvider } from "./iam-role-provider-TdX7t0Ac.js";
8
+ import { a as resolveSecretDerivedPrincipals, i as isResolvableSecretPrincipalList, n as runDestroyForStack, o as canonicalizeIpProtocolValue, r as holdsUnprovenSecretPrincipalToken, s as resolvedResourceTimeoutMs, t as canonicalizeIpv4Cidr } from "./program-DDJHp1K3.js";
9
+ import { RDSProvider } from "./rds-provider-Bxh9YW5y.js";
10
+ import { NeptuneProvider } from "./neptune-provider-CUoBJ6Ys.js";
11
+ import { ASGProvider } from "./asg-provider-B5RKfCs2.js";
11
12
  import { createHash, randomUUID } from "node:crypto";
12
13
  import { CreateBucketCommand, DeleteBucketAnalyticsConfigurationCommand, DeleteBucketCommand, DeleteBucketCorsCommand, DeleteBucketEncryptionCommand, DeleteBucketIntelligentTieringConfigurationCommand, DeleteBucketInventoryConfigurationCommand, DeleteBucketLifecycleCommand, DeleteBucketMetricsConfigurationCommand, DeleteBucketOwnershipControlsCommand, DeleteBucketPolicyCommand, DeleteBucketReplicationCommand, DeleteBucketTaggingCommand, DeleteBucketWebsiteCommand, DeleteObjectsCommand, GetBucketAccelerateConfigurationCommand, GetBucketCorsCommand, GetBucketEncryptionCommand, GetBucketLifecycleConfigurationCommand, GetBucketLocationCommand, GetBucketLoggingCommand, GetBucketNotificationConfigurationCommand, GetBucketOwnershipControlsCommand, GetBucketPolicyCommand, GetBucketReplicationCommand, GetBucketTaggingCommand, GetBucketVersioningCommand, GetBucketWebsiteCommand, GetObjectCommand, GetObjectLockConfigurationCommand, GetPublicAccessBlockCommand, HeadBucketCommand, ListBucketAnalyticsConfigurationsCommand, ListBucketIntelligentTieringConfigurationsCommand, ListBucketInventoryConfigurationsCommand, ListBucketMetricsConfigurationsCommand, ListBucketsCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchBucket, PutBucketAccelerateConfigurationCommand, PutBucketAnalyticsConfigurationCommand, PutBucketCorsCommand, PutBucketEncryptionCommand, PutBucketIntelligentTieringConfigurationCommand, PutBucketInventoryConfigurationCommand, PutBucketLifecycleConfigurationCommand, PutBucketLoggingCommand, PutBucketMetricsConfigurationCommand, PutBucketNotificationConfigurationCommand, PutBucketOwnershipControlsCommand, PutBucketPolicyCommand, PutBucketReplicationCommand, PutBucketTaggingCommand, PutBucketVersioningCommand, PutBucketWebsiteCommand, PutObjectLockConfigurationCommand, PutPublicAccessBlockCommand, S3Client } from "@aws-sdk/client-s3";
13
14
  import { AddRoleToInstanceProfileCommand, AddUserToGroupCommand, AttachGroupPolicyCommand, AttachRolePolicyCommand, AttachUserPolicyCommand, CreateAccessKeyCommand, CreateGroupCommand, CreateInstanceProfileCommand, CreateLoginProfileCommand, CreatePolicyCommand, CreatePolicyVersionCommand, CreateUserCommand, DeleteAccessKeyCommand, DeleteGroupCommand, DeleteGroupPolicyCommand, DeleteInstanceProfileCommand, DeleteLoginProfileCommand, DeletePolicyCommand, DeletePolicyVersionCommand, DeleteRolePolicyCommand, DeleteUserCommand, DeleteUserPermissionsBoundaryCommand, DeleteUserPolicyCommand, DetachGroupPolicyCommand, DetachRolePolicyCommand, DetachUserPolicyCommand, GetAccessKeyLastUsedCommand, GetGroupCommand, GetGroupPolicyCommand, GetInstanceProfileCommand, GetPolicyCommand, GetPolicyVersionCommand, GetRolePolicyCommand, GetUserCommand, GetUserPolicyCommand, IAMClient, ListAccessKeysCommand, ListAttachedGroupPoliciesCommand, ListAttachedUserPoliciesCommand, ListEntitiesForPolicyCommand, ListGroupPoliciesCommand, ListGroupsForUserCommand, ListPoliciesCommand, ListPolicyTagsCommand, ListPolicyVersionsCommand, ListUserPoliciesCommand, NoSuchEntityException, PutGroupPolicyCommand, PutRolePolicyCommand, PutUserPermissionsBoundaryCommand, PutUserPolicyCommand, RemoveRoleFromInstanceProfileCommand, RemoveUserFromGroupCommand, TagPolicyCommand, TagUserCommand, UntagPolicyCommand, UntagUserCommand, UpdateAccessKeyCommand, UpdateLoginProfileCommand } from "@aws-sdk/client-iam";
@@ -597,7 +598,11 @@ var IAMManagedPolicyProvider = class {
597
598
  createClient = new IamCreateClientCache(() => this.iamClient);
598
599
  logger = getLogger().child("IAMManagedPolicyProvider");
599
600
  wrapMaskedError(mask, error, build) {
600
- return wrapMaskedAwsError(mask, error, build);
601
+ const failure = describeAwsFailure(error);
602
+ if (!(error instanceof Error)) return build(mask(failure.detail));
603
+ if (!failure.redacted) return wrapMaskedAwsError(mask, error, build);
604
+ this.logger.debug(mask(build(mask(failure.detail)).message));
605
+ return markRedactedCause(build(`${mask(failure.summary)}${relayedNameCollision(failure.detail)}`));
601
606
  }
602
607
  handledProperties = /* @__PURE__ */ new Map([["AWS::IAM::ManagedPolicy", /* @__PURE__ */ new Set([
603
608
  "ManagedPolicyName",
@@ -1457,8 +1462,18 @@ var IAMAccessKeyProvider = class {
1457
1462
  iamClient;
1458
1463
  createClient = new IamCreateClientCache(() => this.iamClient);
1459
1464
  logger = getLogger().child("IAMAccessKeyProvider");
1460
- wrapMaskedError(mask, error, build) {
1461
- return wrapMaskedAwsError(mask, error, build);
1465
+ wrapMaskedError(log, error, build) {
1466
+ const failure = describeAwsFailure(error);
1467
+ if (!failure.redacted) return wrapMaskedAwsError(log.mask, error, build);
1468
+ log.debug(build(log.mask(failure.detail)).message);
1469
+ const wrapped = build(`${log.mask(failure.summary)}${relayedNameCollision(failure.detail)}`);
1470
+ return error instanceof Error ? markRedactedCause(wrapped) : wrapped;
1471
+ }
1472
+ warnFailureSentence(log, lead, error) {
1473
+ const failure = describeAwsFailure(error);
1474
+ if (!failure.redacted) return `${log.value(failure.detail)}.`;
1475
+ log.debug(`${lead}: ${log.value(failure.detail)}`);
1476
+ return log.value(failure.summary);
1462
1477
  }
1463
1478
  disableCcApiFallback = true;
1464
1479
  handledProperties = /* @__PURE__ */ new Map([["AWS::IAM::AccessKey", /* @__PURE__ */ new Set([
@@ -1499,7 +1514,8 @@ var IAMAccessKeyProvider = class {
1499
1514
  }));
1500
1515
  leftBehindKeyId = void 0;
1501
1516
  } catch (cleanupError) {
1502
- log.warn(`Failed to clean up IAM access key ${logicalId} (${v(accessKeyId)}) minted by a partial CreateAccessKey response: ${v(describeAwsFailure(cleanupError).detail)}. Manual deletion may be required: ${aws`aws iam delete-access-key --user-name ${userName} --access-key-id ${accessKeyId}`.render()}`);
1517
+ const lead = `Failed to clean up IAM access key ${logicalId} (${v(accessKeyId)}) minted by a partial CreateAccessKey response`;
1518
+ log.warn(`${lead}: ${this.warnFailureSentence(log, lead, cleanupError)} Manual deletion may be required: ${aws`aws iam delete-access-key --user-name ${userName} --access-key-id ${accessKeyId}`.render()}`);
1503
1519
  }
1504
1520
  throw new Error("CreateAccessKey returned no AccessKeyId/SecretAccessKey");
1505
1521
  }
@@ -1518,7 +1534,8 @@ var IAMAccessKeyProvider = class {
1518
1534
  leftBehindKeyId = void 0;
1519
1535
  log.debug(`Cleaned up partially-created IAM access key ${logicalId} (${v(accessKeyId)}) after status wiring failure`);
1520
1536
  } catch (cleanupError) {
1521
- log.warn(`Failed to clean up partially-created IAM access key ${logicalId} (${v(accessKeyId)}): ${v(describeAwsFailure(cleanupError).detail)}. Manual deletion may be required before the next deploy: ${aws`aws iam delete-access-key --user-name ${userName} --access-key-id ${accessKeyId}`.render()}`);
1537
+ const lead = `Failed to clean up partially-created IAM access key ${logicalId} (${v(accessKeyId)})`;
1538
+ log.warn(`${lead}: ${this.warnFailureSentence(log, lead, cleanupError)} Manual deletion may be required before the next deploy: ${aws`aws iam delete-access-key --user-name ${userName} --access-key-id ${accessKeyId}`.render()}`);
1522
1539
  }
1523
1540
  throw markAuxiliaryFailure(innerError, logicalId);
1524
1541
  }
@@ -1527,7 +1544,8 @@ var IAMAccessKeyProvider = class {
1527
1544
  if (replayFollowedAmbiguousAttempt(response)) try {
1528
1545
  await this.deleteOrphanFromFailedAttempt(userName, logicalId, baseline, attemptStartMs, log, "replayed");
1529
1546
  } catch (reconcileError) {
1530
- log.warn(`Could not check user ${v(userName)} for an access key left by the replayed CreateAccessKey for ${logicalId}: ${v(describeAwsFailure(reconcileError).detail)}. List the user's keys and delete any that no deploy records: ${aws`aws iam list-access-keys --user-name ${userName}`.render()}`);
1547
+ const lead = `Could not check user ${v(userName)} for an access key left by the replayed CreateAccessKey for ${logicalId}`;
1548
+ log.warn(`${lead}: ${this.warnFailureSentence(log, lead, reconcileError)} List the user's keys and delete any that no deploy records: ${aws`aws iam list-access-keys --user-name ${userName}`.render()}`);
1531
1549
  }
1532
1550
  return {
1533
1551
  physicalId: accessKeyId,
@@ -1540,7 +1558,7 @@ var IAMAccessKeyProvider = class {
1540
1558
  const reconciled = await this.deleteOrphanFromFailedAttempt(userName, logicalId, baseline, attemptStartMs, log);
1541
1559
  if (leftBehindKeyId !== void 0 && reconciled.has(leftBehindKeyId)) leftBehindKeyId = void 0;
1542
1560
  const cause = error instanceof Error ? error : void 0;
1543
- const thrown = this.wrapMaskedError(log.mask, error, (text) => new ProvisioningError(`Failed to create IAM access key ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
1561
+ const thrown = this.wrapMaskedError(log, error, (text) => new ProvisioningError(`Failed to create IAM access key ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
1544
1562
  if (leftBehindKeyId !== void 0) {
1545
1563
  markCreatedBeforeFailure(thrown, logicalId, resourceType, leftBehindKeyId);
1546
1564
  markNonRetryable(thrown);
@@ -1584,7 +1602,8 @@ var IAMAccessKeyProvider = class {
1584
1602
  }));
1585
1603
  deleted.add(accessKeyId);
1586
1604
  } catch (error) {
1587
- log.warn(`Failed to delete the orphaned IAM access key ${v(accessKeyId)} for user ${v(userName)}: ${v(describeAwsFailure(error).detail)}. Manual deletion may be required: ${aws`aws iam delete-access-key --user-name ${userName} --access-key-id ${accessKeyId}`.render()}`);
1605
+ const lead = `Failed to delete the orphaned IAM access key ${v(accessKeyId)} for user ${v(userName)}`;
1606
+ log.warn(`${lead}: ${this.warnFailureSentence(log, lead, error)} Manual deletion may be required: ${aws`aws iam delete-access-key --user-name ${userName} --access-key-id ${accessKeyId}`.render()}`);
1588
1607
  }
1589
1608
  }
1590
1609
  return deleted;
@@ -1611,7 +1630,8 @@ var IAMAccessKeyProvider = class {
1611
1630
  marker = page.IsTruncated ? page.Marker : void 0;
1612
1631
  } while (marker);
1613
1632
  } catch (error) {
1614
- log.warn(`Could not list existing access keys for user ${v(userName)} while creating ${logicalId}: ${v(describeAwsFailure(error).detail)}. Orphan detection is DISABLED for this create, so a retried attempt may leave an unusable but ACTIVE access key on the user. Grant iam:ListAccessKeys, or check the user's keys after the deploy: ${aws`aws iam list-access-keys --user-name ${userName}`.render()}`);
1633
+ const lead = `Could not list existing access keys for user ${v(userName)} while creating ${logicalId}`;
1634
+ log.warn(`${lead}: ${this.warnFailureSentence(log, lead, error)} Orphan detection is DISABLED for this create, so a retried attempt may leave an unusable but ACTIVE access key on the user. Grant iam:ListAccessKeys, or check the user's keys after the deploy: ${aws`aws iam list-access-keys --user-name ${userName}`.render()}`);
1615
1635
  return;
1616
1636
  }
1617
1637
  return keys;
@@ -1642,7 +1662,7 @@ var IAMAccessKeyProvider = class {
1642
1662
  };
1643
1663
  } catch (error) {
1644
1664
  const cause = error instanceof Error ? error : void 0;
1645
- throw this.wrapMaskedError(log.mask, error, (text) => new ProvisioningError(`Failed to update IAM access key ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
1665
+ throw this.wrapMaskedError(log, error, (text) => new ProvisioningError(`Failed to update IAM access key ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
1646
1666
  }
1647
1667
  }
1648
1668
  async delete(logicalId, physicalId, resourceType, properties, context) {
@@ -1665,7 +1685,7 @@ var IAMAccessKeyProvider = class {
1665
1685
  return;
1666
1686
  }
1667
1687
  const cause = error instanceof Error ? error : void 0;
1668
- throw new ProvisioningError(`Failed to delete IAM access key ${logicalId}: ${describeAwsFailure(error).detail}`, resourceType, logicalId, physicalId, cause);
1688
+ throw this.wrapMaskedError(createMaskedLogSinks(this.logger, context?.maskSecrets), error, (text) => new ProvisioningError(`Failed to delete IAM access key ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
1669
1689
  }
1670
1690
  }
1671
1691
  async getAttribute(physicalId, resourceType, attributeName, logicalId) {
@@ -11293,8 +11313,14 @@ var LambdaNetworkConnectorProvider = class {
11293
11313
  async waitForSettled(arn, logicalId, operation) {
11294
11314
  for (let attempt = 1; attempt <= MAX_POLL_ATTEMPTS; attempt++) {
11295
11315
  const resp = await this.client.send(new GetNetworkConnectorCommand({ Identifier: arn }));
11296
- if (resp.State === "FAILED" || resp.State === "DELETING" || resp.State === "DELETE_FAILED" || resp.State === "INACTIVE") throw new TerminalConnectorStateError(`Lambda network connector ${logicalIdShown(logicalId)} entered ${resp.State}: ${resp.StateReason ?? resp.StateReasonCode ?? "no reason given"}`);
11297
- if (operation === "update" && resp.LastUpdateStatus === "Failed") throw new Error(`Lambda network connector ${logicalIdShown(logicalId)} update failed: ${resp.LastUpdateStatusReason ?? resp.LastUpdateStatusReasonCode ?? "no reason given"}`);
11316
+ if (resp.State === "FAILED" || resp.State === "DELETING" || resp.State === "DELETE_FAILED" || resp.State === "INACTIVE") throw this.wrapStatusReasonError(`Lambda network connector ${logicalIdShown(logicalId)} entered ${resp.State}`, {
11317
+ code: resp.StateReasonCode,
11318
+ message: resp.StateReason
11319
+ }, (message, options) => new TerminalConnectorStateError(message, options));
11320
+ if (operation === "update" && resp.LastUpdateStatus === "Failed") throw this.wrapStatusReasonError(`Lambda network connector ${logicalIdShown(logicalId)} update failed`, {
11321
+ code: resp.LastUpdateStatusReasonCode,
11322
+ message: resp.LastUpdateStatusReason
11323
+ }, (message, options) => new Error(message, options));
11298
11324
  if (resp.State === "ACTIVE" && resp.LastUpdateStatus !== "InProgress") return resp;
11299
11325
  await sleep$1(POLL_INTERVAL_MS$2);
11300
11326
  }
@@ -11309,15 +11335,28 @@ var LambdaNetworkConnectorProvider = class {
11309
11335
  if (error instanceof ResourceNotFoundException$10) return;
11310
11336
  throw error;
11311
11337
  }
11312
- if (resp.State === "DELETE_FAILED") throw new Error(`Lambda network connector ${logicalIdShown(logicalId)} entered DELETE_FAILED: ${resp.StateReason ?? resp.StateReasonCode ?? "no reason given"}`);
11338
+ if (resp.State === "DELETE_FAILED") throw this.wrapStatusReasonError(`Lambda network connector ${logicalIdShown(logicalId)} entered DELETE_FAILED`, {
11339
+ code: resp.StateReasonCode,
11340
+ message: resp.StateReason
11341
+ }, (message, options) => new Error(message, options));
11313
11342
  await sleep$1(POLL_INTERVAL_MS$2);
11314
11343
  }
11315
11344
  throw new Error(`Lambda network connector ${logicalIdShown(logicalId)} was not fully deleted within ${MAX_POLL_ATTEMPTS * POLL_INTERVAL_MS$2 / 1e3}s.`);
11316
11345
  }
11346
+ wrapStatusReasonError(prefix, reason, build) {
11347
+ const text = describeAwsStatusReason(reason, reason.code || "no reason given");
11348
+ if (!text.redacted) return build(`${prefix}: ${text.detail}`);
11349
+ this.logger.debug(safeMsg`${prefix}: ${text.detail}`);
11350
+ return markRedactedCause(build(`${prefix}: ${text.summary}`, { cause: new Error(text.detail) }));
11351
+ }
11317
11352
  wrapError(operation, logicalId, resourceType, physicalId, error) {
11318
11353
  if (error instanceof ProvisioningError) return error;
11319
11354
  const cause = error instanceof Error ? error : void 0;
11320
- return new ProvisioningError(`Failed to ${operation} Lambda network connector ${logicalIdShown(logicalId)}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, physicalId, cause);
11355
+ const build = (text) => new ProvisioningError(`Failed to ${operation} Lambda network connector ${logicalIdShown(logicalId)}: ${text}`, resourceType, logicalId, physicalId, cause);
11356
+ const failure = describeAwsFailure(error);
11357
+ if (!(error instanceof Error) || !failure.redacted) return build(failure.detail);
11358
+ this.logger.debug(build(failure.detail).message);
11359
+ return markRedactedCause(build(`${failure.summary}${relayedNameCollision(failure.detail)}`));
11321
11360
  }
11322
11361
  };
11323
11362
  var TerminalConnectorStateError = class extends Error {};
@@ -12449,7 +12488,8 @@ var DynamoDBTableProvider = class {
12449
12488
  try {
12450
12489
  observedProtectionOn = (await this.dynamoDBClient.send(new DescribeTableCommand({ TableName: physicalId }))).Table?.DeletionProtectionEnabled === true;
12451
12490
  } catch (observeError) {
12452
- this.logger.debug(`Could not read DeletionProtectionEnabled on ${physicalId} before disabling it: ${describeAwsFailure(observeError).detail}`);
12491
+ const mask = maskerOrIdentity(context?.maskSecrets);
12492
+ this.logger.debug(mask(safeMsg`Could not read DeletionProtectionEnabled on ${mask(physicalId)} before disabling it: ${mask(describeAwsFailure(observeError).detail)}`));
12453
12493
  }
12454
12494
  await this.dynamoDBClient.send(new UpdateTableCommand({
12455
12495
  TableName: physicalId,
@@ -12460,10 +12500,10 @@ var DynamoDBTableProvider = class {
12460
12500
  try {
12461
12501
  await this.waitForTableActiveAfterUpdate(physicalId, 60, budget);
12462
12502
  } catch (waitErr) {
12463
- this.logger.debug(`Could not wait for table ${physicalId} ACTIVE after disabling protection: ${describeAwsFailure(waitErr).detail}`);
12503
+ this.logger.debug(maskerOrIdentity(context?.maskSecrets)(`Could not wait for table ${physicalId} ACTIVE after disabling protection: ${describeAwsFailure(waitErr).detail}`));
12464
12504
  }
12465
12505
  } catch (flipError) {
12466
- if (!(flipError instanceof ResourceNotFoundException$1)) this.logger.debug(`Could not disable DeletionProtectionEnabled on ${physicalId}: ${describeAwsFailure(flipError).detail}`);
12506
+ if (!(flipError instanceof ResourceNotFoundException$1)) this.logger.debug(maskerOrIdentity(context?.maskSecrets)(`Could not disable DeletionProtectionEnabled on ${physicalId}: ${describeAwsFailure(flipError).detail}`));
12467
12507
  }
12468
12508
  try {
12469
12509
  const reArmPolls = () => {
@@ -13469,8 +13509,13 @@ var LogsLogGroupProvider = class {
13469
13509
  this.logsClient = awsClients.cloudWatchLogs;
13470
13510
  this.stsClient = awsClients.sts;
13471
13511
  }
13472
- wrapMaskedError(mask, error, build) {
13473
- return wrapMaskedAwsError(mask, error, build);
13512
+ wrapCaughtError(mask, error, build) {
13513
+ const failure = describeAwsFailure(error);
13514
+ if (!failure.redacted) return wrapMaskedAwsError(mask, error, build);
13515
+ this.logger.debug(mask(build(mask(failure.detail)).message));
13516
+ const relay = isAuxiliaryFailure(error) ? "" : relayedNameCollision(failure.detail);
13517
+ const wrapped = build(`${mask(failure.summary)}${relay}`);
13518
+ return error instanceof Error ? markRedactedCause(wrapped) : wrapped;
13474
13519
  }
13475
13520
  generatedCreateName(_resourceType, logicalId, properties) {
13476
13521
  if (properties["LogGroupName"]) return void 0;
@@ -13588,7 +13633,7 @@ var LogsLogGroupProvider = class {
13588
13633
  } catch (error) {
13589
13634
  const cause = error instanceof Error ? error : void 0;
13590
13635
  const mask = maskerOrIdentity(context?.maskSecrets);
13591
- const thrown = this.wrapMaskedError(mask, error, (text) => new ProvisioningError(`Failed to create log group ${logicalId}: ${text}`, resourceType, logicalId, logGroupName, cause));
13636
+ const thrown = this.wrapCaughtError(mask, error, (text) => new ProvisioningError(`Failed to create log group ${logicalId}: ${text}`, resourceType, logicalId, logGroupName, cause));
13592
13637
  if (leftBehind) markCreatedBeforeFailure(thrown, logicalId, resourceType, logGroupName);
13593
13638
  throw thrown;
13594
13639
  }
@@ -13604,7 +13649,7 @@ var LogsLogGroupProvider = class {
13604
13649
  if (error instanceof CdkdError) throw error;
13605
13650
  const cause = error instanceof Error ? error : void 0;
13606
13651
  const mask = maskerOrIdentity(context?.maskSecrets);
13607
- throw this.wrapMaskedError(mask, error, (text) => new ProvisioningError(`Failed to update log group ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
13652
+ throw this.wrapCaughtError(mask, error, (text) => new ProvisioningError(`Failed to update log group ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
13608
13653
  }
13609
13654
  }
13610
13655
  async applyUpdate(logicalId, physicalId, resourceType, properties, previousProperties, context) {
@@ -13756,6 +13801,7 @@ var LogsLogGroupProvider = class {
13756
13801
  flip,
13757
13802
  logger: this.logger,
13758
13803
  physicalId,
13804
+ mask: context?.maskSecrets,
13759
13805
  guardName: "DeletionProtectionEnabled",
13760
13806
  observe: async () => {
13761
13807
  return ((await this.logsClient.send(new DescribeLogGroupsCommand({ logGroupNamePrefix: physicalId }))).logGroups?.find((g) => g.logGroupName === physicalId))?.deletionProtectionEnabled === true;
@@ -13769,7 +13815,7 @@ var LogsLogGroupProvider = class {
13769
13815
  });
13770
13816
  this.logger.debug(`Disabled DeletionProtectionEnabled on log group ${logicalId} before delete`);
13771
13817
  } catch (flipError) {
13772
- this.logger.debug(`Could not disable DeletionProtectionEnabled on ${physicalId}: ${describeAwsFailure(flipError).detail}`);
13818
+ this.logger.debug(maskerOrIdentity(context?.maskSecrets)(`Could not disable DeletionProtectionEnabled on ${physicalId}: ${describeAwsFailure(flipError).detail}`));
13773
13819
  }
13774
13820
  try {
13775
13821
  await this.logsClient.send(new DeleteLogGroupCommand({ logGroupName: physicalId }));
@@ -13783,7 +13829,7 @@ var LogsLogGroupProvider = class {
13783
13829
  return;
13784
13830
  }
13785
13831
  const cause = error instanceof Error ? error : void 0;
13786
- throw new ProvisioningError(`Failed to delete log group ${logicalId}: ${describeAwsFailure(error).detail}`, resourceType, logicalId, physicalId, cause);
13832
+ throw this.wrapCaughtError(maskerOrIdentity(context?.maskSecrets), error, (text) => new ProvisioningError(`Failed to delete log group ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
13787
13833
  }
13788
13834
  }
13789
13835
  logGoneOnDelete(logicalId, physicalId, context) {
@@ -14792,6 +14838,17 @@ var SSMParameterProvider = class SSMParameterProvider {
14792
14838
  "Policies",
14793
14839
  "DataType"
14794
14840
  ])]]);
14841
+ removalHandledInUpdate = /* @__PURE__ */ new Map([["AWS::SSM::Parameter", /* @__PURE__ */ new Set([
14842
+ "Name",
14843
+ "Type",
14844
+ "Value",
14845
+ "Description",
14846
+ "Tags",
14847
+ "AllowedPattern",
14848
+ "Tier",
14849
+ "Policies",
14850
+ "DataType"
14851
+ ])]]);
14795
14852
  constructor() {
14796
14853
  const awsClients = getAwsClients();
14797
14854
  this.ssmClient = awsClients.ssm;
@@ -22701,6 +22758,14 @@ const CACHE_BEHAVIOR_QUANTITY_FIELDS = [
22701
22758
  var CloudFrontDistributionProvider = class {
22702
22759
  cloudFrontClient;
22703
22760
  logger = getLogger().child("CloudFrontDistributionProvider");
22761
+ wrapCaughtError(mask, error, build) {
22762
+ const m = maskerOrIdentity(mask);
22763
+ const failure = describeAwsFailure(error);
22764
+ if (!failure.redacted) return wrapMaskedAwsError(m, error, build);
22765
+ this.logger.debug(m(build(m(failure.detail)).message));
22766
+ const wrapped = build(`${m(failure.summary)}${relayedNameCollision(failure.detail)}`);
22767
+ return error instanceof Error ? markRedactedCause(wrapped) : wrapped;
22768
+ }
22704
22769
  handledProperties = /* @__PURE__ */ new Map([["AWS::CloudFront::Distribution", /* @__PURE__ */ new Set(["DistributionConfig", "Tags"])]]);
22705
22770
  constructor() {
22706
22771
  const awsClients = getAwsClients();
@@ -22745,7 +22810,7 @@ var CloudFrontDistributionProvider = class {
22745
22810
  throw markNonRetryable(new ProvisioningError(maskSecrets(`Failed to create CloudFront Distribution ${logicalId}: CloudFront refused the create because this deploy's CallerReference had been used before, which means an EARLIER attempt of this same create succeeded and cdkd never received its response. That distribution is LIVE, is not in cdkd state, and 'cdkd destroy' will not remove it — it bills until you delete it by hand. CloudFront does not return CallerReference from ListDistributions, so find it with 'aws cloudfront list-distributions' and match on ${this.orphanSearchHint(properties, maskSecrets)}; then disable and delete it (or import it with 'cdkd import') before re-running. The AWS error is on this error's cause.`), resourceType, logicalId, void 0, cause));
22746
22811
  }
22747
22812
  const cause = error instanceof Error ? error : void 0;
22748
- throw new ProvisioningError(`Failed to create CloudFront Distribution ${logicalId}: ${describeAwsFailure(error).detail}`, resourceType, logicalId, void 0, cause);
22813
+ throw this.wrapCaughtError(maskSecrets, error, (text) => new ProvisioningError(`Failed to create CloudFront Distribution ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
22749
22814
  }
22750
22815
  }
22751
22816
  orphanSearchHint(properties, maskSecrets) {
@@ -22777,7 +22842,7 @@ var CloudFrontDistributionProvider = class {
22777
22842
  const getResponse = await this.cloudFrontClient.send(new GetDistributionCommand({ Id: physicalId }));
22778
22843
  const domainName = getResponse.Distribution?.DomainName;
22779
22844
  const arn = getResponse.Distribution?.ARN;
22780
- await this.applyTagDiff(arn, previousProperties["Tags"], properties["Tags"], physicalId, logicalId, resourceType);
22845
+ await this.applyTagDiff(arn, previousProperties["Tags"], properties["Tags"], physicalId, logicalId, resourceType, context?.maskSecrets);
22781
22846
  await this.settleDistribution(logicalId, physicalId);
22782
22847
  this.logger.debug(`Updated CloudFront Distribution ${physicalId}`);
22783
22848
  return {
@@ -22792,7 +22857,7 @@ var CloudFrontDistributionProvider = class {
22792
22857
  } catch (error) {
22793
22858
  if (error instanceof CdkdError) throw error;
22794
22859
  const cause = error instanceof Error ? error : void 0;
22795
- throw new ProvisioningError(`Failed to update CloudFront Distribution ${logicalId}: ${describeAwsFailure(error).detail}`, resourceType, logicalId, physicalId, cause);
22860
+ throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to update CloudFront Distribution ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
22796
22861
  }
22797
22862
  }
22798
22863
  async delete(logicalId, physicalId, resourceType, _properties, context) {
@@ -22843,7 +22908,7 @@ var CloudFrontDistributionProvider = class {
22843
22908
  return;
22844
22909
  }
22845
22910
  const cause = error instanceof Error ? error : void 0;
22846
- const failure = new ProvisioningError(`Failed to delete CloudFront Distribution ${logicalId}: ${describeAwsFailure(error).detail}`, resourceType, logicalId, physicalId, cause);
22911
+ const failure = this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to delete CloudFront Distribution ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
22847
22912
  throw stripped ? markDeleteStarted(failure) : failure;
22848
22913
  }
22849
22914
  }
@@ -23240,7 +23305,7 @@ var CloudFrontDistributionProvider = class {
23240
23305
  upserts
23241
23306
  };
23242
23307
  }
23243
- async applyTagDiff(arn, previousTags, newTags, physicalId, logicalId, resourceType) {
23308
+ async applyTagDiff(arn, previousTags, newTags, physicalId, logicalId, resourceType, mask) {
23244
23309
  const { removed, upserts } = this.computeTagDiff(previousTags, newTags, resourceType, logicalId);
23245
23310
  if (removed.length === 0 && upserts.length === 0) return;
23246
23311
  if (!arn) throw new ProvisioningError(`CloudFront Distribution ${physicalId}: GetDistribution returned no ARN; cannot apply tag diff (removed=${removed.length}, upserts=${upserts.length}). Refusing to silently drop the tag update — retry on next deploy or check SDK version.`, resourceType, logicalId, physicalId);
@@ -23261,7 +23326,7 @@ var CloudFrontDistributionProvider = class {
23261
23326
  }
23262
23327
  } catch (err) {
23263
23328
  const cause = err instanceof Error ? err : void 0;
23264
- throw new ProvisioningError(`CloudFront Distribution ${physicalId}: tag diff failed (removed=${removed.length}, upserts=${upserts.length}): ${describeAwsFailure(err).detail}. UpdateDistribution succeeded but TagResource/UntagResource did not — state has NOT been updated so the next deploy will retry the tag-diff.`, resourceType, logicalId, physicalId, cause);
23329
+ throw this.wrapCaughtError(mask, err, (text) => new ProvisioningError(`CloudFront Distribution ${physicalId}: tag diff failed (removed=${removed.length}, upserts=${upserts.length}): ${text}${text.endsWith(".") ? "" : "."} UpdateDistribution succeeded but TagResource/UntagResource did not — state has NOT been updated so the next deploy will retry the tag-diff.`, resourceType, logicalId, physicalId, cause));
23265
23330
  }
23266
23331
  }
23267
23332
  async import(input) {
@@ -26241,6 +26306,7 @@ var ELBv2Provider = class {
26241
26306
  flip,
26242
26307
  logger: this.logger,
26243
26308
  physicalId,
26309
+ mask: context?.maskSecrets,
26244
26310
  guardName: "deletion_protection.enabled",
26245
26311
  observe: async () => {
26246
26312
  return ((await this.getClient().send(new DescribeLoadBalancerAttributesCommand({ LoadBalancerArn: physicalId }))).Attributes ?? []).some((a) => a.Key === "deletion_protection.enabled" && a.Value === "true");
@@ -26257,7 +26323,7 @@ var ELBv2Provider = class {
26257
26323
  });
26258
26324
  this.logger.debug(`Disabled deletion_protection.enabled on LoadBalancer ${logicalId} before delete`);
26259
26325
  } catch (flipError) {
26260
- if (!this.isNotFoundError(flipError)) this.logger.debug(`Could not disable deletion_protection.enabled on ${physicalId}: ${describeAwsFailure(flipError).detail}`);
26326
+ if (!this.isNotFoundError(flipError)) this.logger.debug(maskerOrIdentity(context?.maskSecrets)(`Could not disable deletion_protection.enabled on ${physicalId}: ${describeAwsFailure(flipError).detail}`));
26261
26327
  }
26262
26328
  try {
26263
26329
  await this.getClient().send(new DeleteLoadBalancerCommand({ LoadBalancerArn: physicalId }));
@@ -28183,6 +28249,14 @@ async function attachDocDBTags(client, logger, result, arn) {
28183
28249
 
28184
28250
  //#endregion
28185
28251
  //#region src/provisioning/providers/docdb-provider.ts
28252
+ function masterUserPasswordToSend(properties, previousProperties, context) {
28253
+ const desired = properties["MasterUserPassword"];
28254
+ if (desired === void 0 || desired === null) return void 0;
28255
+ const changedProperties = context?.changedProperties;
28256
+ if (changedProperties !== void 0) return changedProperties.has("MasterUserPassword") ? desired : void 0;
28257
+ const recorded = previousProperties["MasterUserPassword"];
28258
+ return typeof desired === "string" && typeof recorded === "string" && recorded === desired && dynamicReferenceTokens(recorded).length === 0 && recorded !== "***" ? void 0 : desired;
28259
+ }
28186
28260
  function clusterAttributes(cluster) {
28187
28261
  return definedAttributes({
28188
28262
  Endpoint: cluster?.Endpoint,
@@ -28207,6 +28281,8 @@ function instanceAttributes(instance) {
28207
28281
  function isDbIdentifier(id) {
28208
28282
  return id.length <= 63 && /^[A-Za-z](?:-?[A-Za-z0-9])*$/.test(id);
28209
28283
  }
28284
+ const FINAL_SNAPSHOT_SETTLE_WAIT_MS = 9e5;
28285
+ const FINAL_SNAPSHOT_COMPENSATION_MARGIN_MS = 6e4;
28210
28286
  var DocDBProvider = class {
28211
28287
  docdbClient;
28212
28288
  createClient;
@@ -28263,9 +28339,9 @@ var DocDBProvider = class {
28263
28339
  default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId);
28264
28340
  }
28265
28341
  }
28266
- async update(logicalId, physicalId, resourceType, properties, previousProperties, _context) {
28342
+ async update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
28267
28343
  switch (resourceType) {
28268
- case "AWS::DocDB::DBCluster": return this.updateDBCluster(logicalId, physicalId, resourceType, properties, previousProperties);
28344
+ case "AWS::DocDB::DBCluster": return this.updateDBCluster(logicalId, physicalId, resourceType, properties, previousProperties, context);
28269
28345
  case "AWS::DocDB::DBInstance": return this.updateDBInstance(logicalId, physicalId, resourceType, properties, previousProperties);
28270
28346
  default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId, physicalId);
28271
28347
  }
@@ -28317,7 +28393,7 @@ var DocDBProvider = class {
28317
28393
  throw thrown;
28318
28394
  }
28319
28395
  }
28320
- async updateDBCluster(logicalId, physicalId, resourceType, properties, previousProperties) {
28396
+ async updateDBCluster(logicalId, physicalId, resourceType, properties, previousProperties, context) {
28321
28397
  this.logger.debug(`Updating DocDB DBCluster ${logicalId}: ${physicalId}`);
28322
28398
  refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId, physicalId);
28323
28399
  try {
@@ -28332,12 +28408,16 @@ var DocDBProvider = class {
28332
28408
  PreferredMaintenanceWindow: properties["PreferredMaintenanceWindow"],
28333
28409
  DBClusterParameterGroupName: properties["DBClusterParameterGroupName"],
28334
28410
  ...sendVpcSgIds && { VpcSecurityGroupIds: vpcSgIds },
28335
- MasterUserPassword: properties["MasterUserPassword"],
28411
+ MasterUserPassword: masterUserPasswordToSend(properties, previousProperties, context),
28336
28412
  Port: properties["Port"] != null ? Number(properties["Port"]) : void 0,
28337
28413
  ApplyImmediately: true
28338
28414
  }));
28339
28415
  this.logger.debug(`Successfully updated DocDB DBCluster ${logicalId}`);
28340
28416
  const described = await this.describeDBCluster(physicalId);
28417
+ if (process.env["CDKD_NO_WAIT"] !== "true" && securityGroupListChanged(sendVpcSgIds ? vpcSgIds : void 0, previousProperties["VpcSecurityGroupIds"])) {
28418
+ await this.waitForSecurityGroupsApplied(physicalId, logicalId, (sendVpcSgIds ? vpcSgIds : void 0) ?? []);
28419
+ for (const member of described?.DBClusterMembers ?? []) if (member.DBInstanceIdentifier) await this.waitForMemberAfterSecurityGroupChange(member.DBInstanceIdentifier);
28420
+ }
28341
28421
  if (described?.DBClusterArn) await applyDocDBTagDiff(this.getClient(), this.logger, described.DBClusterArn, resourceType, logicalId, previousProperties["Tags"], properties["Tags"]);
28342
28422
  return {
28343
28423
  physicalId,
@@ -28385,6 +28465,7 @@ var DocDBProvider = class {
28385
28465
  flip,
28386
28466
  logger: this.logger,
28387
28467
  physicalId,
28468
+ mask: context?.maskSecrets,
28388
28469
  guardName: "DeletionProtection",
28389
28470
  observe: async () => (await this.describeDBCluster(physicalId))?.DeletionProtection === true,
28390
28471
  disable: async () => {
@@ -28397,9 +28478,10 @@ var DocDBProvider = class {
28397
28478
  });
28398
28479
  this.logger.debug(`Disabled DeletionProtection on DocDB DBCluster ${logicalId} before delete`);
28399
28480
  } catch (disableError) {
28400
- if (!isDocDBNotFoundError(disableError, "DBClusterNotFoundFault")) this.logger.debug(`Could not disable deletion protection for DocDB DBCluster ${logicalId}: ${describeAwsFailure(disableError).detail}`);
28481
+ if (!isDocDBNotFoundError(disableError, "DBClusterNotFoundFault")) this.logger.debug(maskerOrIdentity(context?.maskSecrets)(`Could not disable deletion protection for DocDB DBCluster ${logicalId}: ${describeAwsFailure(disableError).detail}`));
28401
28482
  }
28402
28483
  const finalSnapshotId = context?.finalSnapshotIdentifier;
28484
+ if (finalSnapshotId && flip.flippedOffByThisRun && !flip.deleteAccepted) await this.waitForProtectionOffBeforeFinalSnapshot(logicalId, physicalId);
28403
28485
  await this.getClient().send(new DeleteDBClusterCommand$1({
28404
28486
  DBClusterIdentifier: physicalId,
28405
28487
  ...finalSnapshotId ? {
@@ -28552,6 +28634,54 @@ var DocDBProvider = class {
28552
28634
  if (typeof found.resourceId !== "string" || found.resourceId === "") throw new Error(`${api} returned no resource id`);
28553
28635
  return found.resourceId;
28554
28636
  }
28637
+ async waitForMemberAfterSecurityGroupChange(dbInstanceIdentifier, maxWaitMs = 18e5) {
28638
+ const startTime = Date.now();
28639
+ let delay = 5e3;
28640
+ while (Date.now() - startTime < maxWaitMs) {
28641
+ let status;
28642
+ try {
28643
+ status = (await this.describeDBInstance(dbInstanceIdentifier))?.DBInstanceStatus;
28644
+ } catch (error) {
28645
+ if (isDocDBNotFoundError(error, "DBInstanceNotFoundFault")) return;
28646
+ throw error;
28647
+ }
28648
+ if (status !== "modifying") return;
28649
+ await this.sleep(delay);
28650
+ delay = Math.min(delay * 2, 1e4);
28651
+ }
28652
+ throw new Error(`Timed out waiting for a member instance of the cluster to finish applying its new VPC security groups`);
28653
+ }
28654
+ async waitForSecurityGroupsApplied(dbClusterIdentifier, logicalId, expected, maxWaitMs = 18e5) {
28655
+ const want = [...new Set(expected)].sort().join(" ");
28656
+ const startTime = Date.now();
28657
+ let delay = 5e3;
28658
+ while (Date.now() - startTime < maxWaitMs) {
28659
+ const cluster = await this.describeDBCluster(dbClusterIdentifier);
28660
+ const groups = cluster?.VpcSecurityGroups ?? [];
28661
+ const ids = groups.map((group) => group.VpcSecurityGroupId ?? "").sort().join(" ");
28662
+ if (cluster !== void 0 && cluster.Status !== "modifying" && groups.every((group) => group.Status === "active") && ids === want) return;
28663
+ this.logger.debug(safeMsg`DocDB DBCluster ${logicalId} security groups not settled yet (status ${cluster?.Status ?? "unknown"})`);
28664
+ await this.sleep(delay);
28665
+ delay = Math.min(delay * 2, 1e4);
28666
+ }
28667
+ throw new Error(`Timed out waiting for DocDB DBCluster ${logicalId} to apply its new VPC security groups`);
28668
+ }
28669
+ async waitForProtectionOffBeforeFinalSnapshot(logicalId, physicalId, maxWaitMs = FINAL_SNAPSHOT_SETTLE_WAIT_MS) {
28670
+ const budgetMs = Math.min(maxWaitMs, enclosingDeadlineRemainingMs() - FINAL_SNAPSHOT_COMPENSATION_MARGIN_MS);
28671
+ if (budgetMs <= 0) throw new Error(`--remove-protection turned DeletionProtection off, but the resource timeout leaves no time to wait for the cluster to return to 'available', which the final snapshot its DeletionPolicy asks for needs. The delete was not sent and the guard is put back; re-run the destroy with a longer --resource-timeout`);
28672
+ const startTime = Date.now();
28673
+ let delay = 5e3;
28674
+ for (;;) {
28675
+ const current = await this.describeDBCluster(physicalId);
28676
+ if (current === void 0) return;
28677
+ if (current.DeletionProtection === false && current.Status !== "modifying") return;
28678
+ if (Date.now() - startTime + delay >= budgetMs) break;
28679
+ this.logger.debug(safeMsg`DocDB DBCluster ${logicalId}: waiting for the DeletionProtection change to settle before the final snapshot (status ${current.Status ?? "unknown"})`);
28680
+ await this.sleep(delay);
28681
+ delay = Math.min(delay * 2, 1e4);
28682
+ }
28683
+ throw new Error(`--remove-protection turned DeletionProtection off, but the cluster did not return to 'available' within ${Math.max(1, Math.round(budgetMs / 6e4))} minutes, and the final snapshot its DeletionPolicy asks for needs it. The delete was not sent and the guard is put back; re-run the destroy once the cluster is 'available'`);
28684
+ }
28555
28685
  async waitForClusterAvailable(dbClusterIdentifier, maxWaitMs = 18e5) {
28556
28686
  const startTime = Date.now();
28557
28687
  let delay = 5e3;
@@ -28704,6 +28834,11 @@ var DocDBProvider = class {
28704
28834
  return null;
28705
28835
  }
28706
28836
  };
28837
+ function securityGroupListChanged(sent, previous) {
28838
+ if (sent === void 0) return false;
28839
+ const before = Array.isArray(previous) ? previous.filter((id) => typeof id === "string") : [];
28840
+ return [...sent].sort().join(" ") !== [...before].sort().join(" ");
28841
+ }
28707
28842
 
28708
28843
  //#endregion
28709
28844
  //#region src/provisioning/providers/docdb-subnet-group-provider.ts
@@ -30621,6 +30756,15 @@ var CognitoUserPoolProvider = class {
30621
30756
  protectionFlips = new ProtectionFlipRegistry();
30622
30757
  preFlipPools = /* @__PURE__ */ new WeakMap();
30623
30758
  emailOmittedFlips = /* @__PURE__ */ new WeakMap();
30759
+ wrapCaughtError(mask, error, build) {
30760
+ const failure = describeAwsFailure(error);
30761
+ const m = maskerOrIdentity(mask);
30762
+ if (!failure.redacted) return wrapMaskedAwsError(m, error, build);
30763
+ this.logger.debug(m(build(m(failure.detail)).message));
30764
+ const relay = isAuxiliaryFailure(error) ? "" : relayedNameCollision(failure.detail);
30765
+ const wrapped = build(`${m(failure.summary)}${relay}`);
30766
+ return error instanceof Error ? markRedactedCause(wrapped) : wrapped;
30767
+ }
30624
30768
  handledProperties = /* @__PURE__ */ new Map([["AWS::Cognito::UserPool", /* @__PURE__ */ new Set([
30625
30769
  "UserPoolName",
30626
30770
  "AutoVerifiedAttributes",
@@ -30771,11 +30915,13 @@ var CognitoUserPoolProvider = class {
30771
30915
  this.logger.debug(`Rolled back partially-created Cognito User Pool ${createdUserPoolId}`);
30772
30916
  } catch (rollbackError) {
30773
30917
  poolLeftBehind = true;
30774
- this.logger.warn(`Failed to roll back partially-created Cognito User Pool ${createdUserPoolId}: ${describeAwsFailure(rollbackError).detail}`);
30918
+ const rollbackFailure = describeAwsFailure(rollbackError);
30919
+ if (rollbackFailure.redacted) this.logger.debug(maskerOrIdentity(context?.maskSecrets)(`Rollback of partially-created Cognito User Pool ${createdUserPoolId} failed: ${rollbackFailure.detail}`));
30920
+ this.logger.warn(`Failed to roll back partially-created Cognito User Pool ${createdUserPoolId}: ${rollbackFailure.summary}`);
30775
30921
  }
30776
30922
  }
30777
30923
  const cause = error instanceof Error ? error : void 0;
30778
- const thrown = new ProvisioningError(`Failed to create Cognito User Pool ${logicalId}: ${describeAwsFailure(error).detail}`, resourceType, logicalId, poolName, cause);
30924
+ const thrown = this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to create Cognito User Pool ${logicalId}: ${text}`, resourceType, logicalId, poolName, cause));
30779
30925
  if (poolLeftBehind && createdUserPoolId) {
30780
30926
  markCreatedBeforeFailure(thrown, logicalId, resourceType, createdUserPoolId);
30781
30927
  markNonRetryable(thrown);
@@ -30997,7 +31143,7 @@ var CognitoUserPoolProvider = class {
30997
31143
  } catch (error) {
30998
31144
  if (error instanceof ResourceUpdateNotSupportedError || error instanceof ProvisioningError) throw error;
30999
31145
  const cause = error instanceof Error ? error : void 0;
31000
- throw new ProvisioningError(`Failed to update Cognito User Pool ${logicalId}: ${describeAwsFailure(error).detail}`, resourceType, logicalId, physicalId, cause);
31146
+ throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to update Cognito User Pool ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
31001
31147
  }
31002
31148
  }
31003
31149
  async reconcileSchemaCustomAttributes(logicalId, physicalId, resourceType, newSchema, oldSchema, deletionProtected = false) {
@@ -31095,7 +31241,8 @@ var CognitoUserPoolProvider = class {
31095
31241
  failure = bareError;
31096
31242
  }
31097
31243
  if (readOn && !(failure instanceof ResourceNotFoundException$11)) {
31098
- this.logger.debug(safeMsg`Writing DeletionProtection back on ${physicalId} failed: ${describeAwsFailure(failure).detail}`);
31244
+ const mask = maskerOrIdentity(context?.maskSecrets);
31245
+ this.logger.debug(mask(safeMsg`Writing DeletionProtection back on ${mask(physicalId)} failed: ${mask(describeAwsFailure(failure).detail)}`));
31099
31246
  return "read-on-write-failed";
31100
31247
  }
31101
31248
  throw failure;
@@ -31137,6 +31284,7 @@ var CognitoUserPoolProvider = class {
31137
31284
  flip,
31138
31285
  logger: this.logger,
31139
31286
  physicalId,
31287
+ mask: context?.maskSecrets,
31140
31288
  guardName: "DeletionProtection",
31141
31289
  observe: async () => {
31142
31290
  observedPool = (await this.getClient().send(new DescribeUserPoolCommand({ UserPoolId: physicalId })).catch((error) => {
@@ -31163,12 +31311,12 @@ var CognitoUserPoolProvider = class {
31163
31311
  return;
31164
31312
  }
31165
31313
  this.logger.debug(`Disabling DeletionProtection on Cognito User Pool ${physicalId} before deletion (--remove-protection)`);
31166
- await this.disableUserPoolDeletionProtection(physicalId, observedPool, flip);
31314
+ await this.disableUserPoolDeletionProtection(physicalId, observedPool, flip, maskerOrIdentity(context?.maskSecrets));
31167
31315
  }
31168
31316
  });
31169
31317
  } catch (flipError) {
31170
31318
  if (isTransientCognitoFailure(flipError)) throw flipError;
31171
- this.logger.debug(`Could not disable DeletionProtection for ${physicalId}: ${describeAwsFailure(flipError).detail}`);
31319
+ this.logger.debug(maskerOrIdentity(context?.maskSecrets)(`Could not disable DeletionProtection for ${physicalId}: ${describeAwsFailure(flipError).detail}`));
31172
31320
  }
31173
31321
  if (transientReadError !== void 0) throw transientReadError;
31174
31322
  }
@@ -31183,7 +31331,7 @@ var CognitoUserPoolProvider = class {
31183
31331
  return;
31184
31332
  }
31185
31333
  const cause = error instanceof Error ? error : void 0;
31186
- throw new ProvisioningError(`Failed to delete Cognito User Pool ${logicalId}: ${describeAwsFailure(error).detail}`, resourceType, logicalId, physicalId, cause);
31334
+ throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to delete Cognito User Pool ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
31187
31335
  }
31188
31336
  }
31189
31337
  async sendEchoedDeletionProtection(physicalId, pool, value, opts = {}) {
@@ -31206,7 +31354,7 @@ var CognitoUserPoolProvider = class {
31206
31354
  return "without-email";
31207
31355
  }
31208
31356
  }
31209
- async disableUserPoolDeletionProtection(physicalId, pool, flip) {
31357
+ async disableUserPoolDeletionProtection(physicalId, pool, flip, mask) {
31210
31358
  if (this.preFlipPools.get(flip)?.ambiguous) this.preFlipPools.delete(flip);
31211
31359
  const observedOn = pool.DeletionProtection === "ACTIVE";
31212
31360
  try {
@@ -31221,7 +31369,7 @@ var CognitoUserPoolProvider = class {
31221
31369
  if (observedOn && isAmbiguousWriteFailure(echoError)) flip.flippedOffByThisRun = true;
31222
31370
  if (isTransientCognitoFailure(echoError)) throw echoError;
31223
31371
  if (!isRefusedEcho(echoError)) {
31224
- this.warnGuardLeftOn(physicalId, echoError);
31372
+ this.warnGuardLeftOn(physicalId, mask, echoError);
31225
31373
  throw echoError;
31226
31374
  }
31227
31375
  try {
@@ -31242,7 +31390,7 @@ var CognitoUserPoolProvider = class {
31242
31390
  if (isAmbiguousWriteFailure(bareError)) this.logger.warn(safeMsg`Cognito User Pool ${physicalId}: UpdateUserPool with DeletionProtection alone ` + safeMsg`(the pool's own configuration was refused) answered ${describeAwsFailure(bareError).summary}; ` + safeMsg`if that write landed, the pool's self sign-up, Lambda triggers and advanced ` + safeMsg`security were reset. Retrying the delete.`);
31243
31391
  throw bareError;
31244
31392
  }
31245
- this.warnGuardLeftOn(physicalId, bareError, echoError);
31393
+ this.warnGuardLeftOn(physicalId, mask, bareError, echoError);
31246
31394
  throw bareError;
31247
31395
  }
31248
31396
  const kept = this.preFlipPools.get(flip);
@@ -31254,15 +31402,15 @@ var CognitoUserPoolProvider = class {
31254
31402
  kept.ambiguous = false;
31255
31403
  kept.echoedSince = false;
31256
31404
  }
31257
- this.logger.debug(safeMsg`UpdateUserPool refused the echoed configuration of ${physicalId}: ${describeAwsFailure(echoError).detail}`);
31405
+ this.logger.debug(mask(safeMsg`UpdateUserPool refused the echoed configuration of ${mask(physicalId)}: ${mask(describeAwsFailure(echoError).detail)}`));
31258
31406
  this.logger.warn(safeMsg`Cognito User Pool ${physicalId}: UpdateUserPool refused the pool's own configuration ` + safeMsg`echoed back (${describeAwsFailure(echoError).summary}), so DeletionProtection was ` + safeMsg`turned off alone. That write resets the settings it omits -- self sign-up, Lambda ` + safeMsg`triggers and advanced security among them -- which stays that way if the delete fails.`);
31259
31407
  }
31260
31408
  }
31261
- warnGuardLeftOn(physicalId, error, echoError) {
31409
+ warnGuardLeftOn(physicalId, mask, error, echoError) {
31262
31410
  const name = typeof error === "object" && error !== null ? String(error.name) : "";
31263
31411
  const accessHint = /AccessDenied|NotAuthorized|Unauthorized/.test(name) ? " The caller needs cognito-idp:UpdateUserPool." : "";
31264
31412
  const echoClause = echoError === void 0 ? "" : safeMsg`; the pool's own settings sent back were refused first (${describeAwsFailure(echoError).summary})`;
31265
- this.logger.debug(safeMsg`UpdateUserPool did not turn DeletionProtection off on ${physicalId}: ${describeAwsFailure(error).detail}`);
31413
+ this.logger.debug(mask(safeMsg`UpdateUserPool did not turn DeletionProtection off on ${mask(physicalId)}: ${mask(describeAwsFailure(error).detail)}`));
31266
31414
  const refused = error instanceof Error && isAwsAuthoredFailure(error);
31267
31415
  this.logger.warn(refused ? safeMsg`Cognito User Pool ${physicalId}: DeletionProtection was left on, because UpdateUserPool ` + safeMsg`refused to turn it off (${describeAwsFailure(error).summary})` + echoClause + safeMsg`. The delete will be refused while it is on.${accessHint}` : safeMsg`Cognito User Pool ${physicalId}: UpdateUserPool failed without an answer from AWS ` + safeMsg`(${describeAwsFailure(error).summary})` + echoClause + (echoError === void 0 ? typeof error === "object" && error !== null && sentWithoutEmail.has(error) ? safeMsg`, so whether DeletionProtection was turned off is unknown. Its other settings were ` + safeMsg`not reset, except the SES EmailConfiguration, which that write omitted: if it ` + safeMsg`landed, the pool's email configuration was ${EMAIL_RESET_BEFORE_DELETE_CLAUSE}` : safeMsg`, so whether DeletionProtection was turned off is unknown. Its other settings were ` + safeMsg`not reset.` : safeMsg`, so whether DeletionProtection was turned off ALONE is unknown; if it was, the ` + safeMsg`pool's self sign-up, Lambda triggers and advanced security were reset.`) + safeMsg` If the delete then fails, cdkd turns the guard back on. Check the pool with ` + safeMsg`aws cognito-idp describe-user-pool.`);
31268
31416
  }
@@ -31379,6 +31527,14 @@ var ElastiCacheProvider = class {
31379
31527
  createClient;
31380
31528
  providerRegion = ambientRegion();
31381
31529
  logger = getLogger().child("ElastiCacheProvider");
31530
+ wrapCaughtError(mask, error, build) {
31531
+ const m = maskerOrIdentity(mask);
31532
+ const failure = describeAwsFailure(error);
31533
+ if (!failure.redacted) return wrapMaskedAwsError(m, error, build);
31534
+ this.logger.debug(m(build(m(failure.detail)).message));
31535
+ const wrapped = build(`${m(failure.summary)}${relayedNameCollision(failure.detail)}`);
31536
+ return error instanceof Error ? markRedactedCause(wrapped) : wrapped;
31537
+ }
31382
31538
  handledProperties = /* @__PURE__ */ new Map([["AWS::ElastiCache::SubnetGroup", /* @__PURE__ */ new Set([
31383
31539
  "CacheSubnetGroupName",
31384
31540
  "CacheSubnetGroupDescription",
@@ -31428,17 +31584,19 @@ var ElastiCacheProvider = class {
31428
31584
  this.getClient();
31429
31585
  return this.createClient;
31430
31586
  }
31431
- async create(logicalId, resourceType, properties) {
31587
+ async create(logicalId, resourceType, properties, context) {
31588
+ const mask = context?.maskSecrets;
31432
31589
  switch (resourceType) {
31433
- case "AWS::ElastiCache::SubnetGroup": return this.createSubnetGroup(logicalId, resourceType, properties);
31434
- case "AWS::ElastiCache::CacheCluster": return this.createCacheCluster(logicalId, resourceType, properties);
31590
+ case "AWS::ElastiCache::SubnetGroup": return this.createSubnetGroup(logicalId, resourceType, properties, mask);
31591
+ case "AWS::ElastiCache::CacheCluster": return this.createCacheCluster(logicalId, resourceType, properties, mask);
31435
31592
  default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId);
31436
31593
  }
31437
31594
  }
31438
- async update(logicalId, physicalId, resourceType, properties, previousProperties, _context) {
31595
+ async update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
31596
+ const mask = context?.maskSecrets;
31439
31597
  switch (resourceType) {
31440
- case "AWS::ElastiCache::SubnetGroup": return this.updateSubnetGroup(logicalId, physicalId, resourceType, properties, previousProperties);
31441
- case "AWS::ElastiCache::CacheCluster": return this.updateCacheCluster(logicalId, physicalId, resourceType, properties, previousProperties);
31598
+ case "AWS::ElastiCache::SubnetGroup": return this.updateSubnetGroup(logicalId, physicalId, resourceType, properties, previousProperties, mask);
31599
+ case "AWS::ElastiCache::CacheCluster": return this.updateCacheCluster(logicalId, physicalId, resourceType, properties, previousProperties, mask);
31442
31600
  default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId, physicalId);
31443
31601
  }
31444
31602
  }
@@ -31449,7 +31607,7 @@ var ElastiCacheProvider = class {
31449
31607
  default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId, physicalId);
31450
31608
  }
31451
31609
  }
31452
- async createSubnetGroup(logicalId, resourceType, properties) {
31610
+ async createSubnetGroup(logicalId, resourceType, properties, mask) {
31453
31611
  this.logger.debug(`Creating CacheSubnetGroup ${logicalId}`);
31454
31612
  const tags = refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId);
31455
31613
  const cacheSubnetGroupName = properties["CacheSubnetGroupName"] || generatedNameFor("AWS::ElastiCache::SubnetGroup", logicalId);
@@ -31467,10 +31625,10 @@ var ElastiCacheProvider = class {
31467
31625
  };
31468
31626
  } catch (error) {
31469
31627
  const cause = error instanceof Error ? error : void 0;
31470
- throw new ProvisioningError(`Failed to create CacheSubnetGroup ${logicalId}: ${describeAwsFailure(error).detail}`, resourceType, logicalId, cacheSubnetGroupName, cause);
31628
+ throw this.wrapCaughtError(mask, error, (text) => new ProvisioningError(`Failed to create CacheSubnetGroup ${logicalId}: ${text}`, resourceType, logicalId, cacheSubnetGroupName, cause));
31471
31629
  }
31472
31630
  }
31473
- async updateSubnetGroup(logicalId, physicalId, resourceType, properties, previousProperties) {
31631
+ async updateSubnetGroup(logicalId, physicalId, resourceType, properties, previousProperties, mask) {
31474
31632
  this.logger.debug(`Updating CacheSubnetGroup ${logicalId}: ${physicalId}`);
31475
31633
  refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId, physicalId);
31476
31634
  try {
@@ -31494,7 +31652,7 @@ var ElastiCacheProvider = class {
31494
31652
  } catch (error) {
31495
31653
  if (error instanceof ProvisioningError) throw error;
31496
31654
  const cause = error instanceof Error ? error : void 0;
31497
- throw new ProvisioningError(`Failed to update CacheSubnetGroup ${logicalId}: ${describeAwsFailure(error).detail}`, resourceType, logicalId, physicalId, cause);
31655
+ throw this.wrapCaughtError(mask, error, (text) => new ProvisioningError(`Failed to update CacheSubnetGroup ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
31498
31656
  }
31499
31657
  }
31500
31658
  async deleteSubnetGroup(logicalId, physicalId, resourceType, context) {
@@ -31510,10 +31668,10 @@ var ElastiCacheProvider = class {
31510
31668
  return;
31511
31669
  }
31512
31670
  const cause = error instanceof Error ? error : void 0;
31513
- throw new ProvisioningError(`Failed to delete CacheSubnetGroup ${logicalId}: ${describeAwsFailure(error).detail}`, resourceType, logicalId, physicalId, cause);
31671
+ throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to delete CacheSubnetGroup ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
31514
31672
  }
31515
31673
  }
31516
- async createCacheCluster(logicalId, resourceType, properties) {
31674
+ async createCacheCluster(logicalId, resourceType, properties, mask) {
31517
31675
  this.logger.debug(`Creating CacheCluster ${logicalId}`);
31518
31676
  const tags = refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId);
31519
31677
  const cacheClusterId = properties["ClusterName"] || generatedNameFor("AWS::ElastiCache::CacheCluster", logicalId);
@@ -31564,12 +31722,12 @@ var ElastiCacheProvider = class {
31564
31722
  attributes
31565
31723
  };
31566
31724
  } catch (error) {
31567
- const thrown = error instanceof ProvisioningError ? error : new ProvisioningError(`Failed to create CacheCluster ${logicalId}: ${describeAwsFailure(error).detail}`, resourceType, logicalId, cacheClusterId, error instanceof Error ? error : void 0);
31725
+ const thrown = error instanceof ProvisioningError ? error : this.wrapCaughtError(mask, error, (text) => new ProvisioningError(`Failed to create CacheCluster ${logicalId}: ${text}`, resourceType, logicalId, cacheClusterId, error instanceof Error ? error : void 0));
31568
31726
  if (clusterCreated) markCreatedBeforeFailure(thrown, logicalId, resourceType, cacheClusterId);
31569
31727
  throw thrown;
31570
31728
  }
31571
31729
  }
31572
- async updateCacheCluster(logicalId, physicalId, resourceType, properties, previousProperties) {
31730
+ async updateCacheCluster(logicalId, physicalId, resourceType, properties, previousProperties, mask) {
31573
31731
  this.logger.debug(`Updating CacheCluster ${logicalId}: ${physicalId}`);
31574
31732
  refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId, physicalId);
31575
31733
  try {
@@ -31615,7 +31773,7 @@ var ElastiCacheProvider = class {
31615
31773
  } catch (error) {
31616
31774
  if (error instanceof ProvisioningError) throw error;
31617
31775
  const cause = error instanceof Error ? error : void 0;
31618
- throw new ProvisioningError(`Failed to update CacheCluster ${logicalId}: ${describeAwsFailure(error).detail}`, resourceType, logicalId, physicalId, cause);
31776
+ throw this.wrapCaughtError(mask, error, (text) => new ProvisioningError(`Failed to update CacheCluster ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
31619
31777
  }
31620
31778
  }
31621
31779
  async deleteCacheCluster(logicalId, physicalId, resourceType, context) {
@@ -31642,7 +31800,7 @@ var ElastiCacheProvider = class {
31642
31800
  return;
31643
31801
  }
31644
31802
  const cause = error instanceof Error ? error : void 0;
31645
- throw new ProvisioningError(`Failed to delete CacheCluster ${logicalId}: ${describeAwsFailure(error).detail}`, resourceType, logicalId, physicalId, cause);
31803
+ throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to delete CacheCluster ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
31646
31804
  }
31647
31805
  }
31648
31806
  buildLogDeliveryConfigurationsForUpdate(newConfigs, previousConfigs) {
@@ -35920,6 +36078,25 @@ function pickDefined(obj) {
35920
36078
  }
35921
36079
  return out;
35922
36080
  }
36081
+ const CRAWLER_LEFT_IN_PLACE_ON_REMOVAL = [
36082
+ "DatabaseName",
36083
+ "Description",
36084
+ "Classifiers",
36085
+ "TablePrefix",
36086
+ "Schedule",
36087
+ "SchemaChangePolicy",
36088
+ "RecrawlPolicy",
36089
+ "LineageConfiguration",
36090
+ "LakeFormationConfiguration",
36091
+ "Configuration",
36092
+ "CrawlerSecurityConfiguration"
36093
+ ];
36094
+ const crawlerLeftInPlaceWarning = (logicalId, names, caller) => {
36095
+ const one = names.length === 1;
36096
+ const subject = one ? "property" : "properties";
36097
+ const cfnKeeps = names.includes("LineageConfiguration") ? "" : `, as CloudFormation leaves ${one ? "it" : "them"}`;
36098
+ return caller === "rollback" ? safeMsg`${logicalId} (AWS::Glue::Crawler): ${subject} ${names.join(", ")} ${one ? "is" : "are"} absent from the state being restored; UpdateCrawler keeps a setting it is not sent, so the rollback leaves the value the failed deploy applied in place.` : safeMsg`${logicalId} (AWS::Glue::Crawler): ${subject} ${names.join(", ")} ${one ? "was" : "were"} removed from the template and ${one ? "keeps its" : "keep their"} current AWS value${cfnKeeps}; UpdateCrawler keeps a setting it is not sent. Declare the intended value explicitly to change it.`;
36099
+ };
35923
36100
  var GlueCrawlerProvider = class {
35924
36101
  client;
35925
36102
  createClient;
@@ -35947,6 +36124,13 @@ var GlueCrawlerProvider = class {
35947
36124
  "CrawlerSecurityConfiguration",
35948
36125
  "Tags"
35949
36126
  ])]]);
36127
+ removalHandledInUpdate = /* @__PURE__ */ new Map([["AWS::Glue::Crawler", /* @__PURE__ */ new Set([
36128
+ "Name",
36129
+ "Role",
36130
+ "Targets",
36131
+ "Tags",
36132
+ ...CRAWLER_LEFT_IN_PLACE_ON_REMOVAL
36133
+ ])]]);
35950
36134
  getClient() {
35951
36135
  if (!this.client) ({client: this.client, createClient: this.createClient} = newGlueClients(this.providerRegion));
35952
36136
  return this.client;
@@ -36012,6 +36196,12 @@ var GlueCrawlerProvider = class {
36012
36196
  } else throw err;
36013
36197
  }
36014
36198
  await applyGlueTagDiff(this.getClient(), () => this.resourceArn(physicalId), previousProperties["Tags"], properties["Tags"], resourceType, logicalId, log.warn);
36199
+ if (!context?.desiredFromAwsReadback) {
36200
+ const removed = context?.removedProperties;
36201
+ const leftInPlace = [];
36202
+ for (const key of CRAWLER_LEFT_IN_PLACE_ON_REMOVAL) if (removed !== void 0 ? removed.has(key) : properties[key] === void 0 && previousProperties?.[key] !== void 0) leftInPlace.push(key);
36203
+ if (leftInPlace.length > 0) log.warn(crawlerLeftInPlaceWarning(logicalId, leftInPlace, context?.replayingState ? "rollback" : "deploy"));
36204
+ }
36015
36205
  return {
36016
36206
  physicalId,
36017
36207
  wasReplaced: false
@@ -37264,7 +37454,14 @@ var BudgetsBudgetProvider = class {
37264
37454
  }
37265
37455
  wrapBudgetError(mask, error, verb, logicalId, resourceType, physicalId) {
37266
37456
  const cause = error instanceof Error ? error : void 0;
37267
- return wrapMaskedAwsError(mask, error, (text) => new ProvisioningError(`Failed to ${verb} budget ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
37457
+ return this.wrapMaskedError(mask, error, (text) => new ProvisioningError(`Failed to ${verb} budget ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
37458
+ }
37459
+ wrapMaskedError(mask, error, build) {
37460
+ const failure = describeAwsFailure(error);
37461
+ if (!(error instanceof Error)) return build(mask(failure.detail));
37462
+ if (!failure.redacted) return wrapMaskedAwsError(mask, error, build);
37463
+ this.logger.debug(mask(build(mask(failure.detail)).message));
37464
+ return markRedactedCause(build(`${mask(failure.summary)}${relayedNameCollision(failure.detail)}`));
37268
37465
  }
37269
37466
  getCreateClient() {
37270
37467
  this.getClient();
@@ -37427,7 +37624,8 @@ var BudgetsBudgetProvider = class {
37427
37624
  try {
37428
37625
  await this.addNotificationsOnly(accountId, physicalId, newNotifications);
37429
37626
  } catch (error) {
37430
- throw new ProvisioningError(`Failed to update budget ${logicalId}: adding ${newNotifications.length} desired notification(s) beside every notification the budget already holds (the recorded NotificationsWithSubscribers is not a list cdkd can read, so none was deleted; a budget allows at most 5 notifications and 10 email subscribers each): ${describeAwsFailure(error).detail}`, resourceType, logicalId, physicalId, error instanceof Error ? error : void 0);
37627
+ const cause = error instanceof Error ? error : void 0;
37628
+ throw this.wrapMaskedError(mask, error, (text) => new ProvisioningError(`Failed to update budget ${logicalId}: adding ${newNotifications.length} desired notification(s) beside every notification the budget already holds (the recorded NotificationsWithSubscribers is not a list cdkd can read, so none was deleted; a budget allows at most 5 notifications and 10 email subscribers each): ${text}`, resourceType, logicalId, physicalId, cause));
37431
37629
  }
37432
37630
  this.logger.warn(safeMsg`The recorded NotificationsWithSubscribers of budget ${logicalId} is not a list cdkd can read, so cdkd deleted no notification or subscriber and only added the desired ones. Delete any the template no longer names yourself.`);
37433
37631
  }
@@ -37605,7 +37803,7 @@ var BudgetsBudgetProvider = class {
37605
37803
  return;
37606
37804
  }
37607
37805
  const cause = error instanceof Error ? error : void 0;
37608
- throw new ProvisioningError(`Failed to delete budget ${logicalId}: ${describeAwsFailure(error).detail}`, resourceType, logicalId, physicalId, cause);
37806
+ throw this.wrapMaskedError(maskerOrIdentity(context?.maskSecrets), error, (text) => new ProvisioningError(`Failed to delete budget ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
37609
37807
  }
37610
37808
  }
37611
37809
  async getAttribute(physicalId, resourceType, attributeName, logicalId) {
@@ -37619,7 +37817,7 @@ var BudgetsBudgetProvider = class {
37619
37817
  return await this.budgetArn(accountId, physicalId);
37620
37818
  } catch (error) {
37621
37819
  const cause = error instanceof Error ? error : void 0;
37622
- throw new ProvisioningError(`Failed to resolve Arn for budget ${physicalId}: ${cause?.message ?? safeStringify(error)}`, resourceType, logicalId, physicalId, cause);
37820
+ throw this.wrapMaskedError(maskerOrIdentity(void 0), error, (text) => new ProvisioningError(`Failed to resolve Arn for budget ${physicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
37623
37821
  }
37624
37822
  }
37625
37823
  async import(input) {
@@ -38480,6 +38678,14 @@ var SchedulerScheduleProvider = class {
38480
38678
  client;
38481
38679
  providerRegion = ambientRegion();
38482
38680
  logger = getLogger().child("SchedulerScheduleProvider");
38681
+ wrapCaughtError(mask, error, build) {
38682
+ const m = maskerOrIdentity(mask);
38683
+ const failure = describeAwsFailure(error);
38684
+ if (!failure.redacted) return wrapMaskedAwsError(m, error, build);
38685
+ this.logger.debug(m(build(m(failure.detail)).message));
38686
+ const wrapped = build(`${m(failure.summary)}${relayedNameCollision(failure.detail)}`);
38687
+ return error instanceof Error ? markRedactedCause(wrapped) : wrapped;
38688
+ }
38483
38689
  handledProperties = /* @__PURE__ */ new Map([["AWS::Scheduler::Schedule", /* @__PURE__ */ new Set([
38484
38690
  "Name",
38485
38691
  "GroupName",
@@ -38575,7 +38781,7 @@ var SchedulerScheduleProvider = class {
38575
38781
  }
38576
38782
  return result;
38577
38783
  }
38578
- async create(logicalId, resourceType, properties) {
38784
+ async create(logicalId, resourceType, properties, context) {
38579
38785
  const name = properties["Name"] ?? generatedNameFor("AWS::Scheduler::Schedule", logicalId);
38580
38786
  const groupName = this.groupNameOf(properties);
38581
38787
  this.logger.debug(`Creating Schedule ${logicalId}: ${name}${groupName ? ` (group: ${groupName})` : ""}`);
@@ -38595,7 +38801,7 @@ var SchedulerScheduleProvider = class {
38595
38801
  };
38596
38802
  } catch (error) {
38597
38803
  const cause = error instanceof Error ? error : void 0;
38598
- throw new ProvisioningError(`Failed to create Schedule ${logicalId}: ${cause?.message ?? safeStringify(error)}`, resourceType, logicalId, void 0, cause);
38804
+ throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to create Schedule ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
38599
38805
  }
38600
38806
  }
38601
38807
  async readIdentity(name, groupName) {
@@ -38699,7 +38905,7 @@ var SchedulerScheduleProvider = class {
38699
38905
  } catch (error) {
38700
38906
  if (error instanceof ResourceUpdateNotSupportedError) throw error;
38701
38907
  const cause = error instanceof Error ? error : void 0;
38702
- throw new ProvisioningError(`Failed to update Schedule ${logicalId}: ${cause?.message ?? safeStringify(error)}`, resourceType, logicalId, physicalId, cause);
38908
+ throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to update Schedule ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
38703
38909
  }
38704
38910
  }
38705
38911
  async deleteByRecordedIdentity(logicalId, physicalId, resourceType, recorded, context) {
@@ -38810,7 +39016,7 @@ var SchedulerScheduleProvider = class {
38810
39016
  return;
38811
39017
  }
38812
39018
  const cause = error instanceof Error ? error : void 0;
38813
- throw new ProvisioningError(`Failed to delete Schedule ${logicalId}: ${cause?.message ?? safeStringify(error)}`, resourceType, logicalId, physicalId, cause);
39019
+ throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to delete Schedule ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
38814
39020
  }
38815
39021
  }
38816
39022
  async getAttribute(physicalId, resourceType, attributeName, logicalId) {
@@ -38820,7 +39026,7 @@ var SchedulerScheduleProvider = class {
38820
39026
  } catch (error) {
38821
39027
  const cause = error instanceof Error ? error : void 0;
38822
39028
  const customGroupHint = error instanceof ResourceNotFoundException$13 ? " Schedules in a custom group cannot be looked up by bare name; the Arn is normally served from cdkd state attributes." : "";
38823
- throw new ProvisioningError(`Failed to resolve Arn for Schedule ${physicalId}: ${cause?.message ?? safeStringify(error)}.${customGroupHint}`, resourceType, logicalId, physicalId, cause);
39029
+ throw this.wrapCaughtError(void 0, error, (text) => new ProvisioningError(`Failed to resolve Arn for Schedule ${physicalId}: ${text}${text.endsWith(".") ? "" : "."}${customGroupHint}`, resourceType, logicalId, physicalId, cause));
38824
39030
  }
38825
39031
  }
38826
39032
  async readCurrentState(physicalId, _logicalId, _resourceType, properties) {
@@ -39068,6 +39274,14 @@ var PipesPipeProvider = class {
39068
39274
  createClient;
39069
39275
  providerRegion = ambientRegion();
39070
39276
  logger = getLogger().child("PipesPipeProvider");
39277
+ wrapCaughtError(mask, error, build) {
39278
+ const m = maskerOrIdentity(mask);
39279
+ const failure = describeAwsFailure(error);
39280
+ if (!failure.redacted) return wrapMaskedAwsError(m, error, build);
39281
+ this.logger.debug(m(build(m(failure.detail)).message));
39282
+ const wrapped = build(`${m(failure.summary)}${relayedNameCollision(failure.detail)}`);
39283
+ return error instanceof Error ? markRedactedCause(wrapped) : wrapped;
39284
+ }
39071
39285
  options;
39072
39286
  sleep = (ms) => this.options.sleep ? this.options.sleep(ms) : new Promise((r) => setTimeout(r, ms));
39073
39287
  now = () => this.options.now ? this.options.now() : Date.now();
@@ -39139,7 +39353,7 @@ var PipesPipeProvider = class {
39139
39353
  createdIdentity = pipeIdentityToken(name, created?.Arn, created?.CreationTime);
39140
39354
  } catch (error) {
39141
39355
  const cause = error instanceof Error ? error : void 0;
39142
- throw new ProvisioningError(`Failed to create Pipe ${logicalId}: ${mask(cause?.message ?? safeStringify(error))}`, resourceType, logicalId, void 0, cause);
39356
+ throw this.wrapCaughtError(mask, error, (text) => new ProvisioningError(`Failed to create Pipe ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
39143
39357
  }
39144
39358
  let settled;
39145
39359
  try {
@@ -39211,7 +39425,7 @@ var PipesPipeProvider = class {
39211
39425
  if (error instanceof ProvisioningError) throw error;
39212
39426
  if (error instanceof NotFoundException$6) assertRegionMatch(await this.getClient().config.region(), context?.expectedRegion, resourceType, logicalId, physicalId);
39213
39427
  const cause = error instanceof Error ? error : void 0;
39214
- throw new ProvisioningError(`Failed to update Pipe ${logicalId}: ${mask(cause?.message ?? safeStringify(error))}`, resourceType, logicalId, physicalId, cause);
39428
+ throw this.wrapCaughtError(mask, error, (text) => new ProvisioningError(`Failed to update Pipe ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
39215
39429
  }
39216
39430
  return {
39217
39431
  physicalId,
@@ -39232,7 +39446,7 @@ var PipesPipeProvider = class {
39232
39446
  return;
39233
39447
  }
39234
39448
  const cause = error instanceof Error ? error : void 0;
39235
- throw new ProvisioningError(`Failed to delete Pipe ${logicalId}: ${cause?.message ?? safeStringify(error)}`, resourceType, logicalId, physicalId, cause);
39449
+ throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to delete Pipe ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
39236
39450
  }
39237
39451
  await waitForGoneAfterDelete({
39238
39452
  what: `Pipe ${physicalId}`,
@@ -39283,13 +39497,14 @@ var PipesPipeProvider = class {
39283
39497
  throw error;
39284
39498
  }
39285
39499
  }
39286
- async getAttribute(physicalId, _resourceType, attributeName, _logicalId) {
39500
+ async getAttribute(physicalId, resourceType, attributeName, logicalId) {
39287
39501
  let response;
39288
39502
  try {
39289
39503
  response = await this.describe(physicalId);
39290
39504
  } catch (error) {
39291
39505
  if (error instanceof NotFoundException$6) return void 0;
39292
- throw error;
39506
+ if (!describeAwsFailure(error).redacted) throw error;
39507
+ throw this.wrapCaughtError(void 0, error, (text) => new ProvisioningError(`Failed to read ${attributeName} of Pipe ${physicalId}: ${text}`, resourceType, logicalId, physicalId, error instanceof Error ? error : void 0));
39293
39508
  }
39294
39509
  return this.attributesOf(response)[attributeName];
39295
39510
  }
@@ -39385,8 +39600,11 @@ var PipesPipeProvider = class {
39385
39600
  if (settled && (!needsEvidence || sawUnsettled || this.now() - startedAt >= PIPE_POLL_INTERVAL_MS)) return response;
39386
39601
  if (!settled) sawUnsettled = true;
39387
39602
  if (state !== void 0 && state.endsWith("_FAILED") && !stale) {
39388
- const reason = response.StateReason ? `: ${mask(response.StateReason)}` : "";
39389
- throw markNonRetryable(new ProvisioningError(`Pipe ${logicalId} ${phase} failed: AWS reports ${state}${reason}`, resourceType, logicalId, name));
39603
+ const reason = describeAwsStatusReason({ message: response.StateReason }, "");
39604
+ const build = (text, cause) => new ProvisioningError(`Pipe ${logicalId} ${phase} failed: AWS reports ${state}${text}`, resourceType, logicalId, name, cause);
39605
+ if (!reason.redacted) throw markNonRetryable(build(""));
39606
+ this.logger.debug(mask(build(`: ${mask(reason.detail)}`).message));
39607
+ throw markNonRetryable(markRedactedCause(build(`. ${reason.summary}`, new Error(reason.detail))));
39390
39608
  }
39391
39609
  this.logger.debug(mask(`Pipe ${name} state: ${state ?? "unknown"}, waiting to settle`));
39392
39610
  } catch (error) {
@@ -39403,7 +39621,7 @@ var PipesPipeProvider = class {
39403
39621
  }
39404
39622
  }
39405
39623
  async retireFailedCreate(name, logicalId, resourceType, error, mask, createdIdentity) {
39406
- const original = error instanceof Error ? error : new Error(String(error));
39624
+ const original = describeAwsFailure(error).redacted ? this.wrapCaughtError(mask, error, (text) => new ProvisioningError(`Failed to create Pipe ${logicalId}: ${text}`, resourceType, logicalId, name, error instanceof Error ? error : void 0)) : error;
39407
39625
  const leftBehind = () => markNonRetryable(markCreatedBeforeFailure(original, logicalId, resourceType, name, createdIdentity));
39408
39626
  const orphaned = async (why) => {
39409
39627
  const aws = pasteableAwsCommand(mask);
@@ -41783,6 +42001,7 @@ var EMRClusterProvider = class {
41783
42001
  flip,
41784
42002
  logger: this.logger,
41785
42003
  physicalId,
42004
+ mask: context?.maskSecrets,
41786
42005
  guardName: "TerminationProtected",
41787
42006
  observe: () => Promise.resolve(current?.TerminationProtected === true),
41788
42007
  disable: async () => {
@@ -42837,7 +43056,8 @@ var FirehoseProvider = class {
42837
43056
  ProcessingConfiguration: httpConfig["ProcessingConfiguration"],
42838
43057
  RetryOptions: httpConfig["RetryOptions"],
42839
43058
  S3BackupMode: httpConfig["S3BackupMode"],
42840
- S3Configuration: httpConfig["S3Configuration"] ? this.mapS3DestinationConfiguration(httpConfig["S3Configuration"]) : void 0
43059
+ S3Configuration: httpConfig["S3Configuration"] ? this.mapS3DestinationConfiguration(httpConfig["S3Configuration"]) : void 0,
43060
+ SecretsManagerConfiguration: httpConfig["SecretsManagerConfiguration"]
42841
43061
  };
42842
43062
  }
42843
43063
  if (properties["RedshiftDestinationConfiguration"]) {
@@ -42850,7 +43070,11 @@ var FirehoseProvider = class {
42850
43070
  Password: rsConfig["Password"],
42851
43071
  S3Configuration: rsConfig["S3Configuration"] ? this.mapS3DestinationConfiguration(rsConfig["S3Configuration"]) : void 0,
42852
43072
  CloudWatchLoggingOptions: rsConfig["CloudWatchLoggingOptions"],
42853
- ProcessingConfiguration: rsConfig["ProcessingConfiguration"]
43073
+ ProcessingConfiguration: rsConfig["ProcessingConfiguration"],
43074
+ RetryOptions: rsConfig["RetryOptions"],
43075
+ S3BackupMode: rsConfig["S3BackupMode"],
43076
+ S3BackupConfiguration: rsConfig["S3BackupConfiguration"] ? this.mapS3DestinationConfiguration(rsConfig["S3BackupConfiguration"]) : void 0,
43077
+ SecretsManagerConfiguration: rsConfig["SecretsManagerConfiguration"]
42854
43078
  };
42855
43079
  }
42856
43080
  if (properties["ElasticsearchDestinationConfiguration"]) {
@@ -42867,7 +43091,9 @@ var FirehoseProvider = class {
42867
43091
  S3BackupMode: esConfig["S3BackupMode"],
42868
43092
  S3Configuration: esConfig["S3Configuration"] ? this.mapS3DestinationConfiguration(esConfig["S3Configuration"]) : void 0,
42869
43093
  CloudWatchLoggingOptions: esConfig["CloudWatchLoggingOptions"],
42870
- ProcessingConfiguration: esConfig["ProcessingConfiguration"]
43094
+ ProcessingConfiguration: esConfig["ProcessingConfiguration"],
43095
+ VpcConfiguration: esConfig["VpcConfiguration"],
43096
+ DocumentIdOptions: esConfig["DocumentIdOptions"]
42871
43097
  };
42872
43098
  }
42873
43099
  if (properties["AmazonopensearchserviceDestinationConfiguration"]) {
@@ -42884,7 +43110,9 @@ var FirehoseProvider = class {
42884
43110
  S3BackupMode: aosConfig["S3BackupMode"],
42885
43111
  S3Configuration: aosConfig["S3Configuration"] ? this.mapS3DestinationConfiguration(aosConfig["S3Configuration"]) : void 0,
42886
43112
  CloudWatchLoggingOptions: aosConfig["CloudWatchLoggingOptions"],
42887
- ProcessingConfiguration: aosConfig["ProcessingConfiguration"]
43113
+ ProcessingConfiguration: aosConfig["ProcessingConfiguration"],
43114
+ VpcConfiguration: aosConfig["VpcConfiguration"],
43115
+ DocumentIdOptions: aosConfig["DocumentIdOptions"]
42888
43116
  };
42889
43117
  }
42890
43118
  if (properties["SplunkDestinationConfiguration"]) {
@@ -42898,7 +43126,9 @@ var FirehoseProvider = class {
42898
43126
  S3Configuration: splunkConfig["S3Configuration"] ? this.mapS3DestinationConfiguration(splunkConfig["S3Configuration"]) : void 0,
42899
43127
  RetryOptions: splunkConfig["RetryOptions"],
42900
43128
  CloudWatchLoggingOptions: splunkConfig["CloudWatchLoggingOptions"],
42901
- ProcessingConfiguration: splunkConfig["ProcessingConfiguration"]
43129
+ ProcessingConfiguration: splunkConfig["ProcessingConfiguration"],
43130
+ BufferingHints: splunkConfig["BufferingHints"],
43131
+ SecretsManagerConfiguration: splunkConfig["SecretsManagerConfiguration"]
42902
43132
  };
42903
43133
  }
42904
43134
  if (properties["AmazonOpenSearchServerlessDestinationConfiguration"]) {
@@ -42912,7 +43142,8 @@ var FirehoseProvider = class {
42912
43142
  S3BackupMode: aossConfig["S3BackupMode"],
42913
43143
  S3Configuration: aossConfig["S3Configuration"] ? this.mapS3DestinationConfiguration(aossConfig["S3Configuration"]) : void 0,
42914
43144
  CloudWatchLoggingOptions: aossConfig["CloudWatchLoggingOptions"],
42915
- ProcessingConfiguration: aossConfig["ProcessingConfiguration"]
43145
+ ProcessingConfiguration: aossConfig["ProcessingConfiguration"],
43146
+ VpcConfiguration: aossConfig["VpcConfiguration"]
42916
43147
  };
42917
43148
  }
42918
43149
  if (properties["DeliveryStreamEncryptionConfigurationInput"]) {
@@ -43153,6 +43384,9 @@ var FirehoseProvider = class {
43153
43384
  result.S3BackupConfiguration = this.mapS3DestinationConfiguration(backupConfig);
43154
43385
  }
43155
43386
  if (config["DataFormatConversionConfiguration"] !== void 0) result.DataFormatConversionConfiguration = config["DataFormatConversionConfiguration"];
43387
+ if (config["DynamicPartitioningConfiguration"] !== void 0) result.DynamicPartitioningConfiguration = config["DynamicPartitioningConfiguration"];
43388
+ if (config["FileExtension"] !== void 0) result.FileExtension = config["FileExtension"];
43389
+ if (config["CustomTimeZone"] !== void 0) result.CustomTimeZone = config["CustomTimeZone"];
43156
43390
  return result;
43157
43391
  }
43158
43392
  mapExtendedS3ConfigToUpdate(config) {
@@ -43177,6 +43411,9 @@ var FirehoseProvider = class {
43177
43411
  if (config["S3BackupMode"] !== void 0) result.S3BackupMode = config["S3BackupMode"];
43178
43412
  if (config["S3BackupConfiguration"] !== void 0) result.S3BackupUpdate = this.mapS3ConfigToUpdate(config["S3BackupConfiguration"]);
43179
43413
  if (config["DataFormatConversionConfiguration"] !== void 0) result.DataFormatConversionConfiguration = config["DataFormatConversionConfiguration"];
43414
+ if (config["DynamicPartitioningConfiguration"] !== void 0) result.DynamicPartitioningConfiguration = config["DynamicPartitioningConfiguration"];
43415
+ if (config["FileExtension"] !== void 0) result.FileExtension = config["FileExtension"];
43416
+ if (config["CustomTimeZone"] !== void 0) result.CustomTimeZone = config["CustomTimeZone"];
43180
43417
  return result;
43181
43418
  }
43182
43419
  async applyRedshiftDestinationUpdate(logicalId, physicalId, nextConfig) {
@@ -43542,6 +43779,8 @@ function mapExtendedS3DescriptionToCfn(desc) {
43542
43779
  out["ProcessingConfiguration"] = pickDefinedDeep(desc["ProcessingConfiguration"]) ?? {};
43543
43780
  out["DataFormatConversionConfiguration"] = pickDefinedDeep(desc["DataFormatConversionConfiguration"]) ?? {};
43544
43781
  out["DynamicPartitioningConfiguration"] = pickDefinedDeep(desc["DynamicPartitioningConfiguration"]) ?? {};
43782
+ if (desc["FileExtension"] !== void 0) out["FileExtension"] = desc["FileExtension"];
43783
+ if (desc["CustomTimeZone"] !== void 0) out["CustomTimeZone"] = desc["CustomTimeZone"];
43545
43784
  if (desc["S3BackupDescription"]) out["S3BackupConfiguration"] = mapS3DescriptionToCfn(desc["S3BackupDescription"]);
43546
43785
  else out["S3BackupConfiguration"] = {};
43547
43786
  return out;
@@ -43642,6 +43881,14 @@ var CloudTrailProvider = class {
43642
43881
  createClient;
43643
43882
  providerRegion = ambientRegion();
43644
43883
  logger = getLogger().child("CloudTrailProvider");
43884
+ wrapCaughtError(mask, error, build) {
43885
+ const m = maskerOrIdentity(mask);
43886
+ const failure = describeAwsFailure(error);
43887
+ if (!failure.redacted) return wrapMaskedAwsError(m, error, build);
43888
+ this.logger.debug(m(build(m(failure.detail)).message));
43889
+ const wrapped = build(`${m(failure.summary)}${relayedNameCollision(failure.detail)}`);
43890
+ return error instanceof Error ? markRedactedCause(wrapped) : wrapped;
43891
+ }
43645
43892
  removalDefaults = /* @__PURE__ */ new Map([["AWS::CloudTrail::Trail", /* @__PURE__ */ new Map([["IsMultiRegionTrail", false], ["EnableLogFileValidation", false]])]]);
43646
43893
  handledProperties = /* @__PURE__ */ new Map([["AWS::CloudTrail::Trail", /* @__PURE__ */ new Set([
43647
43894
  "S3BucketName",
@@ -43677,7 +43924,7 @@ var CloudTrailProvider = class {
43677
43924
  this.getClient();
43678
43925
  return this.createClient;
43679
43926
  }
43680
- async create(logicalId, resourceType, properties) {
43927
+ async create(logicalId, resourceType, properties, context) {
43681
43928
  this.logger.debug(`Creating CloudTrail Trail ${logicalId}`);
43682
43929
  const desiredTags = refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId);
43683
43930
  const s3BucketName = properties["S3BucketName"];
@@ -43744,7 +43991,7 @@ var CloudTrailProvider = class {
43744
43991
  } catch (error) {
43745
43992
  if (trailCreated) markAuxiliaryFailure(error, logicalId);
43746
43993
  const cause = error instanceof Error ? error : void 0;
43747
- const thrown = new ProvisioningError(`Failed to create CloudTrail Trail ${logicalId}: ${describeAwsFailure(error).detail}`, resourceType, logicalId, void 0, cause);
43994
+ const thrown = this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to create CloudTrail Trail ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
43748
43995
  if (createdTrailArn) markCreatedBeforeFailure(thrown, logicalId, resourceType, createdTrailArn);
43749
43996
  throw thrown;
43750
43997
  }
@@ -43832,7 +44079,7 @@ var CloudTrailProvider = class {
43832
44079
  };
43833
44080
  } catch (error) {
43834
44081
  const cause = error instanceof Error ? error : void 0;
43835
- throw new ProvisioningError(`Failed to update CloudTrail Trail ${logicalId}: ${describeAwsFailure(error).detail}`, resourceType, logicalId, physicalId, cause);
44082
+ throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to update CloudTrail Trail ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
43836
44083
  }
43837
44084
  }
43838
44085
  async delete(logicalId, physicalId, resourceType, properties, context) {
@@ -43857,7 +44104,7 @@ var CloudTrailProvider = class {
43857
44104
  return;
43858
44105
  }
43859
44106
  const cause = error instanceof Error ? error : void 0;
43860
- const failure = new ProvisioningError(`Failed to delete CloudTrail Trail ${logicalId}: ${describeAwsFailure(error).detail}`, resourceType, logicalId, physicalId, cause);
44107
+ const failure = this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to delete CloudTrail Trail ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
43861
44108
  throw stripped ? markDeleteStarted(failure) : failure;
43862
44109
  }
43863
44110
  }
@@ -44938,6 +45185,14 @@ var DLMLifecyclePolicyProvider = class {
44938
45185
  createClient;
44939
45186
  providerRegion = ambientRegion();
44940
45187
  logger = getLogger().child("DLMLifecyclePolicyProvider");
45188
+ wrapCaughtError(mask, error, build) {
45189
+ const m = maskerOrIdentity(mask);
45190
+ const failure = describeAwsFailure(error);
45191
+ if (!failure.redacted) return wrapMaskedAwsError(m, error, build);
45192
+ this.logger.debug(m(build(m(failure.detail)).message));
45193
+ const wrapped = build(`${m(failure.summary)}${relayedNameCollision(failure.detail)}`);
45194
+ return error instanceof Error ? markRedactedCause(wrapped) : wrapped;
45195
+ }
44941
45196
  handledProperties = /* @__PURE__ */ new Map([["AWS::DLM::LifecyclePolicy", /* @__PURE__ */ new Set([
44942
45197
  "Description",
44943
45198
  "ExecutionRoleArn",
@@ -45061,7 +45316,7 @@ var DLMLifecyclePolicyProvider = class {
45061
45316
  };
45062
45317
  } catch (error) {
45063
45318
  const cause = error instanceof Error ? error : void 0;
45064
- throw new ProvisioningError(`Failed to create DLM Lifecycle Policy ${logicalId}: ${cause?.message ?? safeStringify(error)}`, resourceType, logicalId, void 0, cause);
45319
+ throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to create DLM Lifecycle Policy ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
45065
45320
  }
45066
45321
  }
45067
45322
  async update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
@@ -45108,7 +45363,7 @@ var DLMLifecyclePolicyProvider = class {
45108
45363
  } catch (error) {
45109
45364
  if (error instanceof ResourceUpdateNotSupportedError) throw error;
45110
45365
  const cause = error instanceof Error ? error : void 0;
45111
- throw new ProvisioningError(`Failed to update DLM Lifecycle Policy ${logicalId}: ${cause?.message ?? safeStringify(error)}`, resourceType, logicalId, physicalId, cause);
45366
+ throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to update DLM Lifecycle Policy ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
45112
45367
  }
45113
45368
  }
45114
45369
  async delete(logicalId, physicalId, resourceType, _properties, context) {
@@ -45124,7 +45379,7 @@ var DLMLifecyclePolicyProvider = class {
45124
45379
  return;
45125
45380
  }
45126
45381
  const cause = error instanceof Error ? error : void 0;
45127
- throw new ProvisioningError(`Failed to delete DLM Lifecycle Policy ${logicalId}: ${cause?.message ?? safeStringify(error)}`, resourceType, logicalId, physicalId, cause);
45382
+ throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to delete DLM Lifecycle Policy ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
45128
45383
  }
45129
45384
  }
45130
45385
  async getAttribute(physicalId, resourceType, attributeName, logicalId) {
@@ -45134,7 +45389,7 @@ var DLMLifecyclePolicyProvider = class {
45134
45389
  return await this.fetchPolicyArn(physicalId);
45135
45390
  } catch (error) {
45136
45391
  const cause = error instanceof Error ? error : void 0;
45137
- throw new ProvisioningError(`Failed to resolve Arn for DLM Lifecycle Policy ${physicalId}: ${cause?.message ?? safeStringify(error)}`, resourceType, logicalId, physicalId, cause);
45392
+ throw this.wrapCaughtError(void 0, error, (text) => new ProvisioningError(`Failed to resolve Arn for DLM Lifecycle Policy ${physicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
45138
45393
  }
45139
45394
  }
45140
45395
  async readCurrentState(physicalId, _logicalId, _resourceType) {
@@ -47410,4 +47665,4 @@ var ACMCertificateProvider = class {
47410
47665
 
47411
47666
  //#endregion
47412
47667
  export { ACMCertificateProvider, ASGProvider, AgentCoreBrowserProvider, AgentCoreCodeInterpreterProvider, AgentCoreEvaluatorProvider, AgentCoreRuntimeProvider, ApiGatewayProvider, ApiGatewayV2Provider, AppSyncProvider, BudgetsBudgetProvider, CloudFrontDistributionProvider, CloudFrontOACProvider, CloudFrontOAIProvider, CloudTrailProvider, CloudWatchAlarmProvider, CloudWatchAnomalyDetectorProvider, CodeBuildProvider, CodeCommitRepositoryProvider, CognitoUserPoolProvider, DLMLifecyclePolicyProvider, DocDBProvider, DocDBSubnetGroupProvider, DynamoDBGlobalTableProvider, DynamoDBTableProvider, EC2Provider, ECRProvider, ECSProvider, EFSProvider, ELBv2Provider, EMRClusterProvider, EMRInstanceFleetConfigProvider, EMRInstanceGroupConfigProvider, ElastiCacheProvider, EventBridgeBusProvider, EventBridgeRuleProvider, FSxFileSystemProvider, FirehoseProvider, GlueConnectionProvider, GlueCrawlerProvider, GlueJobProvider, GlueProvider, GlueSecurityConfigurationProvider, GlueTriggerProvider, GlueWorkflowProvider, IAMAccessKeyProvider, IAMInstanceProfileProvider, IAMManagedPolicyProvider, IAMPolicyProvider, IAMRoleProvider, IAMUserGroupProvider, KMSProvider, KinesisStreamConsumerProvider, KinesisStreamProvider, LambdaEventInvokeConfigProvider, LambdaEventSourceMappingProvider, LambdaFunctionProvider, LambdaLayerVersionProvider, LambdaMicrovmImageProvider, LambdaNetworkConnectorProvider, LambdaPermissionProvider, LambdaUrlProvider, LambdaWebFunctionEndpointProvider, LambdaWebFunctionRevisionProvider, LogsLogGroupProvider, NeptuneProvider, NestedStackProvider, PipesPipeProvider, RDSDBProxyEndpointProvider, RDSDBProxyProvider, RDSDBProxyTargetGroupProvider, RDSProvider, Route53Provider, S3BucketPolicyProvider, S3BucketProvider, S3DirectoryBucketProvider, S3TablesProvider, S3VectorsProvider, SNSSubscriptionProvider, SNSTopicPolicyProvider, SNSTopicProvider, SQSQueuePolicyProvider, SQSQueueProvider, SSMParameterProvider, SchedulerScheduleProvider, SecretsManagerSecretProvider, ServiceDiscoveryProvider, StepFunctionsProvider, WAFv2WebACLProvider, WaitConditionHandleProvider };
47413
- //# sourceMappingURL=provider-classes-B2_u4Fg0.js.map
47668
+ //# sourceMappingURL=provider-classes-CUKmyCQ8.js.map