@go-to-k/cdkd 0.302.2 → 0.302.4

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 (28) hide show
  1. package/dist/{asg-provider-B5RKfCs2.js → asg-provider-CGqU-6sj.js} +3 -3
  2. package/dist/{asg-provider-B5RKfCs2.js.map → asg-provider-CGqU-6sj.js.map} +1 -1
  3. package/dist/cli.js +2 -2
  4. package/dist/db-instance-modify-retry-D0e5Ryd_.js +38 -0
  5. package/dist/db-instance-modify-retry-D0e5Ryd_.js.map +1 -0
  6. package/dist/{deploy-engine-B_xWnZ4Q.js → deploy-engine-CN2w5GAK.js} +23 -6
  7. package/dist/deploy-engine-CN2w5GAK.js.map +1 -0
  8. package/dist/{iam-policy-targets-OtGPguLH.js → iam-policy-targets-DBAi38y_.js} +85 -2
  9. package/dist/{iam-policy-targets-OtGPguLH.js.map → iam-policy-targets-DBAi38y_.js.map} +1 -1
  10. package/dist/{iam-role-provider-TdX7t0Ac.js → iam-role-provider-Cv7YzUwO.js} +3 -3
  11. package/dist/{iam-role-provider-TdX7t0Ac.js.map → iam-role-provider-Cv7YzUwO.js.map} +1 -1
  12. package/dist/index.js +3 -3
  13. package/dist/{neptune-provider-CUoBJ6Ys.js → neptune-provider-BcENx6g8.js} +42 -31
  14. package/dist/neptune-provider-BcENx6g8.js.map +1 -0
  15. package/dist/{program-DDJHp1K3.js → program-CAibYjpk.js} +556 -306
  16. package/dist/program-CAibYjpk.js.map +1 -0
  17. package/dist/{provider-classes-CUKmyCQ8.js → provider-classes-B52ogqNj.js} +413 -81
  18. package/dist/provider-classes-B52ogqNj.js.map +1 -0
  19. package/dist/{rds-provider-Bxh9YW5y.js → rds-provider-C6jYh60H.js} +74 -59
  20. package/dist/rds-provider-C6jYh60H.js.map +1 -0
  21. package/dist/{version-CZS6bEuG.js → version-CNK8U3qj.js} +2 -2
  22. package/dist/{version-CZS6bEuG.js.map → version-CNK8U3qj.js.map} +1 -1
  23. package/package.json +2 -2
  24. package/dist/deploy-engine-B_xWnZ4Q.js.map +0 -1
  25. package/dist/neptune-provider-CUoBJ6Ys.js.map +0 -1
  26. package/dist/program-DDJHp1K3.js.map +0 -1
  27. package/dist/provider-classes-CUKmyCQ8.js.map +0 -1
  28. package/dist/rds-provider-Bxh9YW5y.js.map +0 -1
@@ -1,14 +1,15 @@
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, 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";
3
+ import { $ as UNNAMEABLE_ID_CLAUSE, $n as isNameCollisionError, A as isQuotableImportValue, B as deleteWithProtectionCompensation, Bn as hasClauseBreak, C as setBounded, Cn as ProvisioningError, Cr as markRedactedCause, Ct as isSecretDerivedValue, D as VALUE_NOT_SHOWN, E as assertRegionMatch, Et as withDerivedNameMasks, F as resolveExplicitPhysicalId, Ft as markAuxiliaryFailure, G as logGroupProtectionSite, Hn as pasteableCommand, It as markCreatedBeforeFailure, J as rdsFamilyProtectionSite, Jn as withheldTargetClause, K as observeThenDisableProtection, L as ProtectionFlipRegistry, Lt as markSupersedesEarlierCreate, M as quotedRemedyLogicalId, N as refusalTypeShown, Nt as isAuxiliaryFailure, O as isPlainImportJson, P as remedyLogicalId, S as replayedSendWindow, Sr as markNonRetryable, St as createMaskedRetryLogger, T as RESOURCE_NOT_FOUND, Tn as ResourceUpdateNotSupportedError, Tt as maskerOrIdentity, Vn as isInertUnquoted, W as isTerminalDeleteFailure, Wn as plainOrDescribed, Xt as injectiveKey, Z as userPoolProtectionSite, Zt as injectiveKeyPrefix, _ as RecentIdSet, _r as isTransientServerError, _t as packCompositeId, a as onlySecretDerived, an as credentialFingerprint, ar as markReplayMayCollide, b as isInsideWindow, br as isMarkedNonRetryable, bt as stateOrphanRecordRemedy, c as recordedPrincipalsRepair, cn as CdkdError, ct as isInterruptedWaitError, et as WITHHELD_AWS_COMMAND, ft as canonicalizeRoute53QueryName, g as AmbiguousCreateLatch, gr as isRetryableTransientError, gt as logicalIdShown, h as AMBIGUOUS_LATCH_TTL_MS, ht as compositeIdSkipResult, i as holdsSecretDerivedEntry, in as clientDefaultsFor, ir as markNameCollision, it as renderDisableCommand, j as normalizeAwsTagsToCfn, k as isPlainImportValue, kt as clearCreatedBeforeFailure, lt as startInterruptWatch, mr as isExplicitDenyError, mt as compositeIdSeparatorRefusal, nn as ambientClientDefaults, nt as pasteableAwsCommand, o as readPrincipalLists, on as AccountIdUnavailableError, or as relayedNameCollision, p as withRemovalDefaults, pr as isAmbiguousOutcomeError, pt as compositeIdFormatMessage, q as protectionFlipKey, qn as shellQuote, r as SECRET_DERIVED_READ_LIVE, rn as ambientCredentialConfig, rt as protectedReplacementAdvice, tn as withPasteableAwsProfile, tt as isAwsCliLiteral, u as clearOnUpdateRemoval, ur as explicitDenyPolicyKind, ut as ElapsedBudgetRegistry, v as ambiguousAttemptLead, w as withoutServerErrorRetries, wr as wrapMaskedAwsError, wt as maskDeep, x as replayFollowedAmbiguousAttempt, xr as isThrottlingError, xt as createMaskedLogSinks, y as createAttemptKey, yr as THROTTLING_ERROR_NAMES, yt as segmentAfterAnchor, z as deleteAfterProtectionFlipWithFinalSnapshot, zn as commandHole } from "./iam-policy-targets-DBAi38y_.js";
4
4
  import { s as ambientRegion } from "./aws-client-defaults-DBXBcg0J.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";
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-CN2w5GAK.js";
6
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";
7
+ import { n as collectInlinePolicyNamesManagedBySiblings, r as IamCreateClientCache, t as IAMRoleProvider } from "./iam-role-provider-Cv7YzUwO.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-CAibYjpk.js";
9
+ import { t as modifyDbInstanceWhenAvailable } from "./db-instance-modify-retry-D0e5Ryd_.js";
10
+ import { RDSProvider } from "./rds-provider-C6jYh60H.js";
11
+ import { NeptuneProvider } from "./neptune-provider-BcENx6g8.js";
12
+ import { ASGProvider } from "./asg-provider-CGqU-6sj.js";
12
13
  import { createHash, randomUUID } from "node:crypto";
13
14
  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";
14
15
  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";
@@ -49,8 +50,8 @@ import { AddCustomAttributesCommand, CognitoIdentityProviderClient, CreateUserPo
49
50
  import { CreateHttpNamespaceCommand, CreatePrivateDnsNamespaceCommand, CreatePublicDnsNamespaceCommand, CreateServiceCommand as CreateServiceCommand$1, DeleteNamespaceCommand, DeleteServiceAttributesCommand, DeleteServiceCommand as DeleteServiceCommand$1, GetNamespaceCommand, GetOperationCommand, GetServiceAttributesCommand, GetServiceCommand, ListNamespacesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$14, NamespaceNotFound, ResourceInUse, ServiceDiscoveryClient, ServiceNotFound, TagResourceCommand as TagResourceCommand$16, UntagResourceCommand as UntagResourceCommand$16, UpdateHttpNamespaceCommand, UpdatePrivateDnsNamespaceCommand, UpdatePublicDnsNamespaceCommand, UpdateServiceAttributesCommand, UpdateServiceCommand as UpdateServiceCommand$1 } from "@aws-sdk/client-servicediscovery";
50
51
  import { AppSyncClient, CreateApiKeyCommand, CreateDataSourceCommand, CreateGraphqlApiCommand, CreateResolverCommand, DeleteApiKeyCommand, DeleteDataSourceCommand, DeleteGraphqlApiCommand, DeleteResolverCommand, GetDataSourceCommand, GetGraphqlApiCommand, GetGraphqlApiEnvironmentVariablesCommand, GetIntrospectionSchemaCommand, GetResolverCommand, ListApiKeysCommand, ListGraphqlApisCommand, NotFoundException as NotFoundException$4, PutGraphqlApiEnvironmentVariablesCommand, StartSchemaCreationCommand, TagResourceCommand as TagResourceCommand$17, UntagResourceCommand as UntagResourceCommand$17, UpdateApiKeyCommand, UpdateDataSourceCommand, UpdateGraphqlApiCommand, UpdateResolverCommand } from "@aws-sdk/client-appsync";
51
52
  import { ConcurrentModificationException, CrawlerRunningException, CreateConnectionCommand, CreateCrawlerCommand, CreateDatabaseCommand, CreateJobCommand, CreateSecurityConfigurationCommand, CreateTableCommand as CreateTableCommand$1, CreateTriggerCommand, CreateWorkflowCommand, DeleteConnectionCommand, DeleteCrawlerCommand, DeleteDatabaseCommand, DeleteJobCommand, DeleteSecurityConfigurationCommand, DeleteTableCommand as DeleteTableCommand$1, DeleteTriggerCommand, DeleteWorkflowCommand, EntityNotFoundException, GetConnectionCommand, GetCrawlerCommand, GetDatabaseCommand, GetJobCommand, GetSecurityConfigurationCommand, GetTableCommand, GetTagsCommand, GetTriggerCommand, GetWorkflowCommand, GlueClient, StartCrawlerScheduleCommand, StartTriggerCommand, StopCrawlerCommand, StopCrawlerScheduleCommand, StopTriggerCommand, TagResourceCommand as TagResourceCommand$18, UntagResourceCommand as UntagResourceCommand$18, UpdateConnectionCommand, UpdateCrawlerCommand, UpdateDatabaseCommand, UpdateJobCommand, UpdateTableCommand as UpdateTableCommand$1, UpdateTriggerCommand, UpdateWorkflowCommand } from "@aws-sdk/client-glue";
52
- import { BudgetsClient, CreateBudgetCommand, CreateNotificationCommand, CreateSubscriberCommand, DeleteBudgetCommand, DeleteNotificationCommand, DeleteSubscriberCommand, DescribeBudgetCommand, DuplicateRecordException, NotFoundException as NotFoundException$5, TagResourceCommand as TagResourceCommand$19, UntagResourceCommand as UntagResourceCommand$19, UpdateBudgetCommand } from "@aws-sdk/client-budgets";
53
- import { AddTagsToStreamCommand, CreateStreamCommand, DecreaseStreamRetentionPeriodCommand, DeleteStreamCommand, DeregisterStreamConsumerCommand, DescribeStreamCommand, DescribeStreamConsumerCommand, DescribeStreamSummaryCommand, DisableEnhancedMonitoringCommand, EnableEnhancedMonitoringCommand, IncreaseStreamRetentionPeriodCommand, KinesisClient, ListTagsForResourceCommand as ListTagsForResourceCommand$15, ListTagsForStreamCommand, RegisterStreamConsumerCommand, RemoveTagsFromStreamCommand, ResourceNotFoundException as ResourceNotFoundException$12, StartStreamEncryptionCommand, StopStreamEncryptionCommand, TagResourceCommand as TagResourceCommand$20, UntagResourceCommand as UntagResourceCommand$20, UpdateMaxRecordSizeCommand, UpdateShardCountCommand, UpdateStreamModeCommand } from "@aws-sdk/client-kinesis";
53
+ import { BudgetsClient, CreateBudgetCommand, CreateNotificationCommand, CreateSubscriberCommand, DeleteBudgetCommand, DeleteNotificationCommand, DeleteSubscriberCommand, DescribeBudgetCommand, DescribeNotificationsForBudgetCommand, DescribeSubscribersForNotificationCommand, DuplicateRecordException, ListTagsForResourceCommand as ListTagsForResourceCommand$15, NotFoundException as NotFoundException$5, TagResourceCommand as TagResourceCommand$19, UntagResourceCommand as UntagResourceCommand$19, UpdateBudgetCommand } from "@aws-sdk/client-budgets";
54
+ import { AddTagsToStreamCommand, CreateStreamCommand, DecreaseStreamRetentionPeriodCommand, DeleteStreamCommand, DeregisterStreamConsumerCommand, DescribeStreamCommand, DescribeStreamConsumerCommand, DescribeStreamSummaryCommand, DisableEnhancedMonitoringCommand, EnableEnhancedMonitoringCommand, IncreaseStreamRetentionPeriodCommand, KinesisClient, ListTagsForResourceCommand as ListTagsForResourceCommand$16, ListTagsForStreamCommand, RegisterStreamConsumerCommand, RemoveTagsFromStreamCommand, ResourceNotFoundException as ResourceNotFoundException$12, StartStreamEncryptionCommand, StopStreamEncryptionCommand, TagResourceCommand as TagResourceCommand$20, UntagResourceCommand as UntagResourceCommand$20, UpdateMaxRecordSizeCommand, UpdateShardCountCommand, UpdateStreamModeCommand } from "@aws-sdk/client-kinesis";
54
55
  import { CreateScheduleCommand, DeleteScheduleCommand, GetScheduleCommand, ListSchedulesCommand, ResourceNotFoundException as ResourceNotFoundException$13, SchedulerClient, UpdateScheduleCommand } from "@aws-sdk/client-scheduler";
55
56
  import { CreatePipeCommand, DeletePipeCommand, DescribePipeCommand, NotFoundException as NotFoundException$6, PipesClient, TagResourceCommand as TagResourceCommand$21, UntagResourceCommand as UntagResourceCommand$21, UpdatePipeCommand } from "@aws-sdk/client-pipes";
56
57
  import { AccessPointAlreadyExists, AccessPointNotFound, CreateAccessPointCommand, CreateFileSystemCommand, CreateMountTargetCommand, DeleteAccessPointCommand, DeleteFileSystemCommand, DeleteMountTargetCommand, DescribeAccessPointsCommand, DescribeBackupPolicyCommand, DescribeFileSystemPolicyCommand, DescribeFileSystemsCommand, DescribeLifecycleConfigurationCommand, DescribeMountTargetSecurityGroupsCommand, DescribeMountTargetsCommand, EFSClient, FileSystemAlreadyExists, FileSystemNotFound, ModifyMountTargetSecurityGroupsCommand, MountTargetNotFound, PutBackupPolicyCommand, PutFileSystemPolicyCommand, PutLifecycleConfigurationCommand, UpdateFileSystemCommand, UpdateFileSystemProtectionCommand } from "@aws-sdk/client-efs";
@@ -59,11 +60,11 @@ import { AddInstanceFleetCommand, AddInstanceGroupsCommand, AddTagsCommand as Ad
59
60
  import { CreateDeliveryStreamCommand, DeleteDeliveryStreamCommand, DescribeDeliveryStreamCommand, FirehoseClient, ListTagsForDeliveryStreamCommand, ResourceNotFoundException as ResourceNotFoundException$14, TagDeliveryStreamCommand, UntagDeliveryStreamCommand, UpdateDestinationCommand } from "@aws-sdk/client-firehose";
60
61
  import { AddTagsCommand as AddTagsCommand$2, CloudTrailClient, CreateTrailCommand, DeleteTrailCommand, GetEventSelectorsCommand, GetInsightSelectorsCommand, GetTrailCommand, GetTrailStatusCommand, ListTagsCommand as ListTagsCommand$2, PutEventSelectorsCommand, PutInsightSelectorsCommand, RemoveTagsCommand as RemoveTagsCommand$2, StartLoggingCommand, StopLoggingCommand, TrailNotFoundException, UpdateTrailCommand } from "@aws-sdk/client-cloudtrail";
61
62
  import { BatchGetProjectsCommand, CodeBuildClient, CreateProjectCommand, DeleteProjectCommand, ResourceNotFoundException as ResourceNotFoundException$15, UpdateProjectCommand } from "@aws-sdk/client-codebuild";
62
- import { CodeCommitClient, CreateCommitCommand, CreateRepositoryCommand as CreateRepositoryCommand$1, DeleteRepositoryCommand as DeleteRepositoryCommand$1, GetRepositoryCommand, GetRepositoryTriggersCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$16, PutRepositoryTriggersCommand, RepositoryDoesNotExistException, TagResourceCommand as TagResourceCommand$23, UntagResourceCommand as UntagResourceCommand$23, UpdateRepositoryDescriptionCommand, UpdateRepositoryEncryptionKeyCommand, UpdateRepositoryNameCommand } from "@aws-sdk/client-codecommit";
63
+ import { CodeCommitClient, CreateCommitCommand, CreateRepositoryCommand as CreateRepositoryCommand$1, DeleteRepositoryCommand as DeleteRepositoryCommand$1, GetRepositoryCommand, GetRepositoryTriggersCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$17, PutRepositoryTriggersCommand, RepositoryDoesNotExistException, TagResourceCommand as TagResourceCommand$23, UntagResourceCommand as UntagResourceCommand$23, UpdateRepositoryDescriptionCommand, UpdateRepositoryEncryptionKeyCommand, UpdateRepositoryNameCommand } from "@aws-sdk/client-codecommit";
63
64
  import { CreateLifecyclePolicyCommand, DLMClient, DeleteLifecyclePolicyCommand as DeleteLifecyclePolicyCommand$1, GetLifecyclePoliciesCommand, GetLifecyclePolicyCommand as GetLifecyclePolicyCommand$1, ResourceNotFoundException as ResourceNotFoundException$16, TagResourceCommand as TagResourceCommand$24, UntagResourceCommand as UntagResourceCommand$24, UpdateLifecyclePolicyCommand } from "@aws-sdk/client-dlm";
64
- import { CreateVectorBucketCommand, DeleteIndexCommand, DeleteVectorBucketCommand, GetVectorBucketCommand, ListIndexesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$17, S3VectorsClient, TagResourceCommand as TagResourceCommand$25, UntagResourceCommand as UntagResourceCommand$25 } from "@aws-sdk/client-s3vectors";
65
- import { ListTagsForResourceCommand as ListTagsForResourceCommand$18, S3ControlClient, TagResourceCommand as TagResourceCommand$26, UntagResourceCommand as UntagResourceCommand$26 } from "@aws-sdk/client-s3-control";
66
- import { CreateNamespaceCommand, CreateTableBucketCommand, CreateTableCommand as CreateTableCommand$2, DeleteNamespaceCommand as DeleteNamespaceCommand$1, DeleteTableBucketCommand, DeleteTableCommand as DeleteTableCommand$2, GetNamespaceCommand as GetNamespaceCommand$1, GetTableBucketCommand, GetTableCommand as GetTableCommand$1, ListNamespacesCommand as ListNamespacesCommand$1, ListTableBucketsCommand, ListTablesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$19, NotFoundException as NotFoundException$7, S3TablesClient, TagResourceCommand as TagResourceCommand$27, UntagResourceCommand as UntagResourceCommand$27 } from "@aws-sdk/client-s3tables";
65
+ import { CreateVectorBucketCommand, DeleteIndexCommand, DeleteVectorBucketCommand, GetVectorBucketCommand, ListIndexesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$18, S3VectorsClient, TagResourceCommand as TagResourceCommand$25, UntagResourceCommand as UntagResourceCommand$25 } from "@aws-sdk/client-s3vectors";
66
+ import { ListTagsForResourceCommand as ListTagsForResourceCommand$19, S3ControlClient, TagResourceCommand as TagResourceCommand$26, UntagResourceCommand as UntagResourceCommand$26 } from "@aws-sdk/client-s3-control";
67
+ import { CreateNamespaceCommand, CreateTableBucketCommand, CreateTableCommand as CreateTableCommand$2, DeleteNamespaceCommand as DeleteNamespaceCommand$1, DeleteTableBucketCommand, DeleteTableCommand as DeleteTableCommand$2, GetNamespaceCommand as GetNamespaceCommand$1, GetTableBucketCommand, GetTableCommand as GetTableCommand$1, ListNamespacesCommand as ListNamespacesCommand$1, ListTableBucketsCommand, ListTablesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$20, NotFoundException as NotFoundException$7, S3TablesClient, TagResourceCommand as TagResourceCommand$27, UntagResourceCommand as UntagResourceCommand$27 } from "@aws-sdk/client-s3tables";
67
68
 
68
69
  //#region src/provisioning/providers/iam-policy-provider.ts
69
70
  const POLICY_NAME_SKIP_REASON = "no policy name in state — no delete issued";
@@ -117,7 +118,11 @@ var IAMPolicyProvider = class {
117
118
  iamClient;
118
119
  logger = getLogger().child("IAMPolicyProvider");
119
120
  wrapMaskedError(mask, error, build) {
120
- return wrapMaskedAwsError(mask, error, build);
121
+ const failure = describeAwsFailure(error);
122
+ if (!(error instanceof Error)) return build(mask(failure.detail));
123
+ if (!failure.redacted) return wrapMaskedAwsError(mask, error, build);
124
+ this.logger.debug(mask(build(mask(failure.detail)).message));
125
+ return markRedactedCause(build(`${mask(failure.summary)}${relayedNameCollision(failure.detail)}`));
121
126
  }
122
127
  handledProperties = /* @__PURE__ */ new Map([["AWS::IAM::Policy", /* @__PURE__ */ new Set([
123
128
  "PolicyName",
@@ -516,7 +521,8 @@ var IAMPolicyProvider = class {
516
521
  this.logger.debug(`Successfully deleted IAM policy ${logicalId}`);
517
522
  } catch (error) {
518
523
  const cause = error instanceof Error ? error : void 0;
519
- const failure = new ProvisioningError(`Failed to delete IAM policy ${logicalId}: ${mask(describeAwsFailure(error).detail)}`, resourceType, logicalId, physicalId, cause);
524
+ const opMask = createMaskedLogSinks(this.logger, context?.maskSecrets).mask;
525
+ const failure = this.wrapMaskedError((text) => mask(opMask(text)), error, (text) => new ProvisioningError(`Failed to delete IAM policy ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
520
526
  throw maskError(removedAny ? markDeleteStarted(failure) : failure);
521
527
  }
522
528
  }
@@ -1213,7 +1219,11 @@ var IAMInstanceProfileProvider = class {
1213
1219
  createClient = new IamCreateClientCache(() => this.iamClient);
1214
1220
  logger = getLogger().child("IAMInstanceProfileProvider");
1215
1221
  wrapMaskedError(mask, error, build) {
1216
- return wrapMaskedAwsError(mask, error, build);
1222
+ const failure = describeAwsFailure(error);
1223
+ if (!(error instanceof Error)) return build(mask(failure.detail));
1224
+ if (!failure.redacted) return wrapMaskedAwsError(mask, error, build);
1225
+ this.logger.debug(mask(build(mask(failure.detail)).message));
1226
+ return markRedactedCause(build(`${mask(failure.summary)}${relayedNameCollision(failure.detail)}`));
1217
1227
  }
1218
1228
  handledProperties = /* @__PURE__ */ new Map([["AWS::IAM::InstanceProfile", /* @__PURE__ */ new Set([
1219
1229
  "InstanceProfileName",
@@ -1346,7 +1356,8 @@ var IAMInstanceProfileProvider = class {
1346
1356
  }
1347
1357
  }
1348
1358
  async delete(logicalId, physicalId, resourceType, _properties, context) {
1349
- this.logger.debug(`Deleting IAM instance profile ${logicalId}: ${physicalId}`);
1359
+ const log = createMaskedLogSinks(this.logger, context?.maskSecrets);
1360
+ log.debug(`Deleting IAM instance profile ${logicalId}: ${physicalId}`);
1350
1361
  let stripped = false;
1351
1362
  try {
1352
1363
  let roles = [];
@@ -1356,7 +1367,7 @@ var IAMInstanceProfileProvider = class {
1356
1367
  if (error instanceof NoSuchEntityException) {
1357
1368
  const clientRegion = await this.iamClient.config.region();
1358
1369
  assertRegionMatch(clientRegion, context?.expectedRegion, resourceType, logicalId, physicalId);
1359
- this.logGoneOnDelete(logicalId, physicalId, context);
1370
+ this.logGoneOnDelete(logicalId, physicalId, context, log);
1360
1371
  return;
1361
1372
  }
1362
1373
  throw error;
@@ -1367,27 +1378,28 @@ var IAMInstanceProfileProvider = class {
1367
1378
  RoleName: roleName
1368
1379
  }));
1369
1380
  stripped = true;
1370
- this.logger.debug(`Removed role ${roleName} from instance profile ${physicalId}`);
1381
+ log.debug(`Removed role ${roleName} from instance profile ${physicalId}`);
1371
1382
  } catch (error) {
1372
1383
  if (!(error instanceof NoSuchEntityException)) throw error;
1373
1384
  }
1374
1385
  await this.iamClient.send(new DeleteInstanceProfileCommand({ InstanceProfileName: physicalId }));
1375
- this.logger.debug(`Successfully deleted IAM instance profile ${logicalId}`);
1386
+ log.debug(`Successfully deleted IAM instance profile ${logicalId}`);
1376
1387
  } catch (error) {
1377
1388
  if (error instanceof NoSuchEntityException) {
1378
1389
  const clientRegion = await this.iamClient.config.region();
1379
1390
  assertRegionMatch(clientRegion, context?.expectedRegion, resourceType, logicalId, physicalId);
1380
- this.logGoneOnDelete(logicalId, physicalId, context);
1391
+ this.logGoneOnDelete(logicalId, physicalId, context, log);
1381
1392
  return;
1382
1393
  }
1383
1394
  const cause = error instanceof Error ? error : void 0;
1384
- const failure = new ProvisioningError(`Failed to delete IAM instance profile ${logicalId}: ${describeAwsFailure(error).detail}`, resourceType, logicalId, physicalId, cause);
1395
+ const { mask } = log;
1396
+ const failure = this.wrapMaskedError(mask, error, (text) => new ProvisioningError(mask(`Failed to delete IAM instance profile ${logicalId}: ${text}`), resourceType, logicalId, physicalId, cause));
1385
1397
  throw stripped ? markDeleteStarted(failure) : failure;
1386
1398
  }
1387
1399
  }
1388
- logGoneOnDelete(logicalId, physicalId, context) {
1400
+ logGoneOnDelete(logicalId, physicalId, context, log) {
1389
1401
  if (context?.failedCreateOrphan === true) this.logger.info(safeMsg` IAM instance profile ${physicalId} (${logicalId}), which a failed deploy created, is already gone; nothing to delete`);
1390
- else this.logger.debug(`Instance profile ${physicalId} does not exist, skipping deletion`);
1402
+ else log.debug(`Instance profile ${log.value(physicalId)} does not exist, skipping deletion`);
1391
1403
  }
1392
1404
  async isSameResource(journaledPhysicalId, record, resourceType, context) {
1393
1405
  if (resourceType !== INSTANCE_PROFILE_TYPE) return "unknown";
@@ -1825,7 +1837,11 @@ var IAMUserGroupProvider = class {
1825
1837
  createClient = new IamCreateClientCache(() => this.iamClient);
1826
1838
  logger = getLogger().child("IAMUserGroupProvider");
1827
1839
  wrapMaskedError(mask, error, build) {
1828
- return wrapMaskedAwsError(mask, error, build);
1840
+ const failure = describeAwsFailure(error);
1841
+ if (!(error instanceof Error)) return build(mask(failure.detail));
1842
+ if (!failure.redacted) return wrapMaskedAwsError(mask, error, build);
1843
+ this.logger.debug(mask(build(mask(failure.detail)).message));
1844
+ return markRedactedCause(build(`${mask(failure.summary)}${relayedNameCollision(failure.detail)}`));
1829
1845
  }
1830
1846
  handledProperties = /* @__PURE__ */ new Map([
1831
1847
  ["AWS::IAM::User", /* @__PURE__ */ new Set([
@@ -2086,7 +2102,7 @@ var IAMUserGroupProvider = class {
2086
2102
  log.debug(`Successfully deleted IAM user ${logicalId}`);
2087
2103
  } catch (error) {
2088
2104
  const cause = error instanceof Error ? error : void 0;
2089
- const failure = new ProvisioningError(log.mask(`Failed to delete IAM user ${logicalId}: ${describeAwsFailure(error).detail}`), resourceType, logicalId, physicalId, cause);
2105
+ const failure = this.wrapMaskedError(log.mask, error, (text) => new ProvisioningError(log.mask(`Failed to delete IAM user ${logicalId}: ${text}`), resourceType, logicalId, physicalId, cause));
2090
2106
  throw progress.stripped ? markDeleteStarted(failure) : failure;
2091
2107
  }
2092
2108
  }
@@ -2367,7 +2383,7 @@ var IAMUserGroupProvider = class {
2367
2383
  return;
2368
2384
  }
2369
2385
  const cause = error instanceof Error ? error : void 0;
2370
- const failure = new ProvisioningError(log.mask(`Failed to delete IAM group ${logicalId}: ${describeAwsFailure(error).detail}`), resourceType, logicalId, physicalId, cause);
2386
+ const failure = this.wrapMaskedError(log.mask, error, (text) => new ProvisioningError(log.mask(`Failed to delete IAM group ${logicalId}: ${text}`), resourceType, logicalId, physicalId, cause));
2371
2387
  throw progress.stripped ? markDeleteStarted(failure) : failure;
2372
2388
  }
2373
2389
  }
@@ -2651,7 +2667,8 @@ var IAMUserGroupProvider = class {
2651
2667
  this.logger.debug(`Successfully deleted IAM UserToGroupAddition ${logicalId}`);
2652
2668
  } catch (error) {
2653
2669
  const cause = error instanceof Error ? error : void 0;
2654
- const failure = new ProvisioningError(`Failed to delete IAM UserToGroupAddition ${logicalId}: ${mask(describeAwsFailure(error).detail)}`, resourceType, logicalId, physicalId, cause);
2670
+ const opMask = createMaskedLogSinks(this.logger, context?.maskSecrets).mask;
2671
+ const failure = this.wrapMaskedError((text) => mask(opMask(text)), error, (text) => new ProvisioningError(`Failed to delete IAM UserToGroupAddition ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
2655
2672
  throw maskError(removedAny ? markDeleteStarted(failure) : failure);
2656
2673
  }
2657
2674
  }
@@ -24788,7 +24805,7 @@ var ECSProvider = class {
24788
24805
  const serviceConnectConfigurationInput = JSON.stringify(previousProperties["ServiceConnectConfiguration"] ?? null) !== JSON.stringify(properties["ServiceConnectConfiguration"] ?? null) ? clearOnUpdateRemoval(this.convertServiceConnectConfiguration(properties["ServiceConnectConfiguration"]), previousProperties["ServiceConnectConfiguration"], { enabled: false }) : void 0;
24789
24806
  const volumeConfigurationsInput = JSON.stringify(previousProperties["VolumeConfigurations"] ?? null) !== JSON.stringify(properties["VolumeConfigurations"] ?? null) ? clearOnUpdateRemoval(this.convertServiceVolumeConfigurations(properties["VolumeConfigurations"]), previousProperties["VolumeConfigurations"], []) : void 0;
24790
24807
  const vpcLatticeConfigurationsInput = JSON.stringify(previousProperties["VpcLatticeConfigurations"] ?? null) !== JSON.stringify(properties["VpcLatticeConfigurations"] ?? null) ? clearOnUpdateRemoval(this.convertVpcLatticeConfigurations(properties["VpcLatticeConfigurations"]), previousProperties["VpcLatticeConfigurations"], []) : void 0;
24791
- const monitoringInput = JSON.stringify(previousProperties["Monitoring"] ?? null) !== JSON.stringify(properties["Monitoring"] ?? null) && properties["Monitoring"] != null ? this.convertMonitoringConfiguration(properties["Monitoring"]) : void 0;
24808
+ const monitoringInput = JSON.stringify(previousProperties["Monitoring"] ?? null) !== JSON.stringify(properties["Monitoring"] ?? null) ? clearOnUpdateRemoval(this.convertMonitoringConfiguration(properties["Monitoring"]), previousProperties["Monitoring"], { metricConfigurations: [] }) : void 0;
24792
24809
  const forceNewDeploymentInput = this.resolveForceNewDeployment(properties, previousProperties, log);
24793
24810
  const deploymentConfigurationInput = this.resolveDeploymentConfiguration(properties, previousProperties);
24794
24811
  try {
@@ -27094,6 +27111,16 @@ const RETAINED_ON_REMOVAL = [
27094
27111
  "DebugLogging",
27095
27112
  "VpcSecurityGroupIds"
27096
27113
  ];
27114
+ const CFN_KEEPS_ON_REMOVAL$1 = /* @__PURE__ */ new Set([
27115
+ "RequireTLS",
27116
+ "IdleClientTimeout",
27117
+ "DebugLogging",
27118
+ "VpcSecurityGroupIds"
27119
+ ]);
27120
+ const authRemovalRefused = (properties) => {
27121
+ const scheme = properties["DefaultAuthScheme"];
27122
+ return scheme === void 0 || scheme === "NONE";
27123
+ };
27097
27124
  var RDSDBProxyProvider = class {
27098
27125
  rdsClient;
27099
27126
  createClient;
@@ -27197,6 +27224,7 @@ var RDSDBProxyProvider = class {
27197
27224
  }
27198
27225
  async update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
27199
27226
  refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId, physicalId, "Tags", DBPROXY_TAGS_WHAT, DBPROXY_TAG_OPTIONS);
27227
+ if (context?.replayingState !== true && context?.desiredFromAwsReadback !== true && this.removedRetained(properties, previousProperties, context).includes("Auth") && authRemovalRefused(properties)) throw markNonRetryable(new ProvisioningError(safeMsg`${logicalId} (${resourceType}): Auth was removed from the template, but AWS requires Auth while DefaultAuthScheme is NONE or unset, and CloudFormation's update fails on the same change. Declare Auth again; nothing was changed.`, resourceType, logicalId, physicalId));
27200
27228
  const client = this.getClient();
27201
27229
  const { mask } = withDerivedNameMasks(this.logger, createMaskedLogSinks(this.logger, context?.maskSecrets), [[previousProperties["DBProxyName"], physicalId]]);
27202
27230
  for (const field of [
@@ -27245,13 +27273,17 @@ var RDSDBProxyProvider = class {
27245
27273
  };
27246
27274
  }
27247
27275
  warnOnRetainedRemovals(logicalId, resourceType, properties, previousProperties, context) {
27248
- const removed = context?.removedProperties;
27249
- const retained = [];
27250
- for (const key of RETAINED_ON_REMOVAL) if (removed !== void 0 ? removed.has(key) : previousProperties[key] !== void 0 && properties[key] === void 0) retained.push(key);
27276
+ const retained = this.removedRetained(properties, previousProperties, context);
27251
27277
  if (retained.length === 0) return;
27252
27278
  const one = retained.length === 1;
27253
27279
  const names = `${one ? "property" : "properties"} ${retained.join(", ")}`;
27254
- this.logger.warn(context?.replayingState === true ? safeMsg`${logicalId} (${resourceType}): ${names} ${one ? "is" : "are"} absent from the state being restored; ModifyDBProxy keeps a setting it is not sent, so the rollback leaves any value the failed deploy applied in place.` : safeMsg`${logicalId} (${resourceType}): ${names} ${one ? "was" : "were"} removed from the template; ModifyDBProxy keeps a setting it is not sent, so the proxy keeps its current value. Declare the property with the value you want to change it.`);
27280
+ this.logger.warn(context?.replayingState === true ? safeMsg`${logicalId} (${resourceType}): ${names} ${one ? "is" : "are"} absent from the state being restored; ModifyDBProxy keeps a setting it is not sent, so the rollback leaves any value the failed deploy applied in place.` : retained.every((key) => CFN_KEEPS_ON_REMOVAL$1.has(key)) ? safeMsg`${logicalId} (${resourceType}): ${names} ${one ? "was" : "were"} removed from the template and ${one ? "keeps its" : "keep their"} current AWS value, as CloudFormation leaves ${one ? "it" : "them"}; ModifyDBProxy keeps a setting it is not sent. Declare the property with the value you want to change it.` : safeMsg`${logicalId} (${resourceType}): ${names} ${one ? "was" : "were"} removed from the template; ModifyDBProxy keeps a setting it is not sent, so the proxy keeps its current value. Declare the property with the value you want to change it.`);
27281
+ }
27282
+ removedRetained(properties, previousProperties, context) {
27283
+ const removed = context?.removedProperties;
27284
+ const retained = [];
27285
+ for (const key of RETAINED_ON_REMOVAL) if (removed !== void 0 ? removed.has(key) : previousProperties[key] !== void 0 && properties[key] === void 0) retained.push(key);
27286
+ return retained;
27255
27287
  }
27256
27288
  async delete(logicalId, physicalId, resourceType, _properties, context) {
27257
27289
  const client = this.getClient();
@@ -27794,7 +27826,7 @@ var RDSDBProxyTargetGroupProvider = class {
27794
27826
  ConnectionPoolConfig: connectionPoolConfig
27795
27827
  }));
27796
27828
  } catch (error) {
27797
- throw markAuxiliaryFailure(this.wrapError(error, "CREATE (pool config)", resourceType, logicalId, void 0), logicalId);
27829
+ throw markAuxiliaryFailure(this.wrapError(error, "CREATE (pool config)", resourceType, logicalId, void 0, mask), logicalId);
27798
27830
  }
27799
27831
  }
27800
27832
  if (dbClusterIdentifiers.length > 0 || dbInstanceIdentifiers.length > 0) {
@@ -27807,7 +27839,7 @@ var RDSDBProxyTargetGroupProvider = class {
27807
27839
  DBInstanceIdentifiers: dbInstanceIdentifiers.length > 0 ? dbInstanceIdentifiers : void 0
27808
27840
  }));
27809
27841
  } catch (error) {
27810
- throw this.wrapError(error, "CREATE (register targets)", resourceType, logicalId, void 0);
27842
+ throw this.wrapError(error, "CREATE (register targets)", resourceType, logicalId, void 0, mask);
27811
27843
  }
27812
27844
  }
27813
27845
  let targetGroupArn;
@@ -27817,7 +27849,7 @@ var RDSDBProxyTargetGroupProvider = class {
27817
27849
  TargetGroupName: targetGroupName
27818
27850
  }))).TargetGroups?.[0]?.TargetGroupArn;
27819
27851
  } catch (error) {
27820
- throw await this.retireRegistrationAfterFailedCreate(this.wrapError(error, "CREATE (describe)", resourceType, logicalId, void 0), dbProxyName, targetGroupName, dbClusterIdentifiers, dbInstanceIdentifiers, context?.maskSecrets);
27852
+ throw await this.retireRegistrationAfterFailedCreate(this.wrapError(error, "CREATE (describe)", resourceType, logicalId, void 0, mask), dbProxyName, targetGroupName, dbClusterIdentifiers, dbInstanceIdentifiers, context?.maskSecrets);
27821
27853
  }
27822
27854
  if (!targetGroupArn) throw await this.retireRegistrationAfterFailedCreate(new ProvisioningError(`Failed to recover TargetGroupArn for ${dbProxyName}/${targetGroupName} after create`, resourceType, logicalId), dbProxyName, targetGroupName, dbClusterIdentifiers, dbInstanceIdentifiers, context?.maskSecrets);
27823
27855
  if (tags.length > 0) try {
@@ -27826,7 +27858,7 @@ var RDSDBProxyTargetGroupProvider = class {
27826
27858
  Tags: tags
27827
27859
  }));
27828
27860
  } catch (error) {
27829
- throw await this.retireRegistrationAfterFailedCreate(this.wrapError(error, "CREATE (add tags)", resourceType, logicalId, void 0), dbProxyName, targetGroupName, dbClusterIdentifiers, dbInstanceIdentifiers, context?.maskSecrets, {
27861
+ throw await this.retireRegistrationAfterFailedCreate(this.wrapError(error, "CREATE (add tags)", resourceType, logicalId, void 0, mask), dbProxyName, targetGroupName, dbClusterIdentifiers, dbInstanceIdentifiers, context?.maskSecrets, {
27830
27862
  logicalId,
27831
27863
  resourceType,
27832
27864
  physicalId: targetGroupArn
@@ -27941,7 +27973,7 @@ var RDSDBProxyTargetGroupProvider = class {
27941
27973
  ConnectionPoolConfig: newPool ?? {}
27942
27974
  }));
27943
27975
  } catch (error) {
27944
- throw this.wrapError(error, "UPDATE (pool config)", resourceType, logicalId, physicalId);
27976
+ throw this.wrapError(error, "UPDATE (pool config)", resourceType, logicalId, physicalId, mask);
27945
27977
  }
27946
27978
  }
27947
27979
  const clustersToRemove = missingIdentifiers(prev.lists.DBClusterIdentifiers, next.lists.DBClusterIdentifiers);
@@ -27958,7 +27990,7 @@ var RDSDBProxyTargetGroupProvider = class {
27958
27990
  DBInstanceIdentifiers: instancesToRemove.length > 0 ? instancesToRemove : void 0
27959
27991
  }));
27960
27992
  } catch (error) {
27961
- if (!(error instanceof DBProxyTargetNotFoundFault)) throw this.wrapError(error, "UPDATE (deregister)", resourceType, logicalId, physicalId);
27993
+ if (!(error instanceof DBProxyTargetNotFoundFault)) throw this.wrapError(error, "UPDATE (deregister)", resourceType, logicalId, physicalId, mask);
27962
27994
  }
27963
27995
  }
27964
27996
  if (clustersToAdd.length > 0 || instancesToAdd.length > 0) {
@@ -27971,7 +28003,7 @@ var RDSDBProxyTargetGroupProvider = class {
27971
28003
  DBInstanceIdentifiers: instancesToAdd.length > 0 ? instancesToAdd : void 0
27972
28004
  }));
27973
28005
  } catch (error) {
27974
- throw this.wrapError(error, "UPDATE (register)", resourceType, logicalId, physicalId);
28006
+ throw this.wrapError(error, "UPDATE (register)", resourceType, logicalId, physicalId, mask);
27975
28007
  }
27976
28008
  }
27977
28009
  const tagsToRemove = tagPlan.remove;
@@ -27985,7 +28017,7 @@ var RDSDBProxyTargetGroupProvider = class {
27985
28017
  TagKeys: tagsToRemove
27986
28018
  }));
27987
28019
  } catch (error) {
27988
- throw this.wrapError(error, "UPDATE (remove tags)", resourceType, logicalId, physicalId);
28020
+ throw this.wrapError(error, "UPDATE (remove tags)", resourceType, logicalId, physicalId, mask);
27989
28021
  }
27990
28022
  if (tagsToAdd.length > 0) try {
27991
28023
  await client.send(new AddTagsToResourceCommand$2({
@@ -27993,7 +28025,7 @@ var RDSDBProxyTargetGroupProvider = class {
27993
28025
  Tags: tagsToAdd
27994
28026
  }));
27995
28027
  } catch (error) {
27996
- throw this.wrapError(error, "UPDATE (add tags)", resourceType, logicalId, physicalId);
28028
+ throw this.wrapError(error, "UPDATE (add tags)", resourceType, logicalId, physicalId, mask);
27997
28029
  }
27998
28030
  return {
27999
28031
  physicalId,
@@ -28057,7 +28089,7 @@ var RDSDBProxyTargetGroupProvider = class {
28057
28089
  this.logger.debug(mask(`${mask(dbProxyName)}/${mask(targetGroupName)} or its target is already gone, treating as success`));
28058
28090
  return;
28059
28091
  }
28060
- throw this.wrapError(error, "DELETE", resourceType, logicalId, physicalId);
28092
+ throw this.wrapError(error, "DELETE", resourceType, logicalId, physicalId, mask);
28061
28093
  }
28062
28094
  }
28063
28095
  async getAttribute(physicalId, _resourceType, attributeName) {
@@ -28150,7 +28182,9 @@ var RDSDBProxyTargetGroupProvider = class {
28150
28182
  targets = aws`${targets} --db-instance-identifiers`;
28151
28183
  for (const id of instances) targets = aws`${targets} ${id}`;
28152
28184
  }
28153
- original.message += ` The targets this create registered are still registered and could not be deregistered (${describeAwsFailure(cleanupError).detail}). Manual cleanup: ` + aws`aws rds deregister-db-proxy-targets --db-proxy-name ${dbProxyName} --target-group-name ${targetGroupName}${targets}`.render();
28185
+ const cleanupFailure = describeAwsFailure(cleanupError);
28186
+ if (cleanupFailure.redacted) this.logger.debug(maskerOrIdentity(maskSecrets)(`Deregistering the targets a failed create registered failed: ${cleanupFailure.detail}`));
28187
+ original.message += ` The targets this create registered are still registered and could not be deregistered (${cleanupFailure.summary.replace(/\.$/, "")}). Manual cleanup: ` + aws`aws rds deregister-db-proxy-targets --db-proxy-name ${dbProxyName} --target-group-name ${targetGroupName}${targets}`.render();
28154
28188
  if (leftBehind) markCreatedBeforeFailure(original, leftBehind.logicalId, leftBehind.resourceType, leftBehind.physicalId);
28155
28189
  return original;
28156
28190
  }
@@ -28166,7 +28200,8 @@ var RDSDBProxyTargetGroupProvider = class {
28166
28200
  if (error instanceof DBProxyNotFoundFault || targetGroupName !== void 0 && error instanceof DBProxyTargetGroupNotFoundFault) {
28167
28201
  const clientRegion = await this.getClient().config.region();
28168
28202
  assertRegionMatch(clientRegion, context?.expectedRegion, resourceType, logicalId, physicalId);
28169
- this.logger.debug(`${dbProxyName}/${targetGroupName ?? "*"} is already gone; the record needs no deregistration`);
28203
+ const mask = maskerOrIdentity(context?.maskSecrets);
28204
+ this.logger.debug(mask(`${mask(dbProxyName)}/${targetGroupName === void 0 ? "*" : mask(targetGroupName)} is already gone; the record needs no deregistration`));
28170
28205
  return true;
28171
28206
  }
28172
28207
  this.logger.debug(safeMsg`Could not confirm whether the proxy of DB proxy target group ${logicalId} still exists (${error instanceof Error ? error.name : "unknown error"}); keeping the skip`);
@@ -28195,10 +28230,13 @@ var RDSDBProxyTargetGroupProvider = class {
28195
28230
  } while (marker);
28196
28231
  return live;
28197
28232
  }
28198
- wrapError(error, op, resourceType, logicalId, physicalId) {
28199
- const message = error instanceof Error ? error.message : String(error);
28233
+ wrapError(error, op, resourceType, logicalId, physicalId, mask) {
28200
28234
  const cause = error instanceof Error ? error : void 0;
28201
- return new ProvisioningError(`${op} failed for ${logicalId}: ${message}`, resourceType, logicalId, physicalId, cause);
28235
+ const build = (text) => new ProvisioningError(`${op} failed for ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause);
28236
+ const failure = describeAwsFailure(error);
28237
+ if (!(error instanceof Error) || !failure.redacted) return build(failure.detail);
28238
+ this.logger.debug(mask(build(failure.detail).message));
28239
+ return markRedactedCause(build(`${failure.summary}${relayedNameCollision(failure.detail)}`));
28202
28240
  }
28203
28241
  };
28204
28242
  function withoutKey(bag, key) {
@@ -28281,8 +28319,6 @@ function instanceAttributes(instance) {
28281
28319
  function isDbIdentifier(id) {
28282
28320
  return id.length <= 63 && /^[A-Za-z](?:-?[A-Za-z0-9])*$/.test(id);
28283
28321
  }
28284
- const FINAL_SNAPSHOT_SETTLE_WAIT_MS = 9e5;
28285
- const FINAL_SNAPSHOT_COMPENSATION_MARGIN_MS = 6e4;
28286
28322
  var DocDBProvider = class {
28287
28323
  docdbClient;
28288
28324
  createClient;
@@ -28481,14 +28517,15 @@ var DocDBProvider = class {
28481
28517
  if (!isDocDBNotFoundError(disableError, "DBClusterNotFoundFault")) this.logger.debug(maskerOrIdentity(context?.maskSecrets)(`Could not disable deletion protection for DocDB DBCluster ${logicalId}: ${describeAwsFailure(disableError).detail}`));
28482
28518
  }
28483
28519
  const finalSnapshotId = context?.finalSnapshotIdentifier;
28484
- if (finalSnapshotId && flip.flippedOffByThisRun && !flip.deleteAccepted) await this.waitForProtectionOffBeforeFinalSnapshot(logicalId, physicalId);
28485
- await this.getClient().send(new DeleteDBClusterCommand$1({
28520
+ const sendDelete = () => this.getClient().send(new DeleteDBClusterCommand$1({
28486
28521
  DBClusterIdentifier: physicalId,
28487
28522
  ...finalSnapshotId ? {
28488
28523
  SkipFinalSnapshot: false,
28489
28524
  FinalDBSnapshotIdentifier: finalSnapshotId
28490
28525
  } : { SkipFinalSnapshot: true }
28491
28526
  }));
28527
+ if (finalSnapshotId && flip.flippedOffByThisRun && !flip.deleteAccepted) await this.deleteAfterProtectionFlip(logicalId, physicalId, sendDelete);
28528
+ else await sendDelete();
28492
28529
  flip.deleteAccepted = true;
28493
28530
  if (finalSnapshotId) this.logger.info(`Deleting DocDB DBCluster ${logicalId} with a final snapshot (DeletionPolicy: Snapshot)`);
28494
28531
  this.logger.debug(`Successfully initiated deletion of DocDB DBCluster ${logicalId}`);
@@ -28541,13 +28578,21 @@ var DocDBProvider = class {
28541
28578
  this.logger.debug(`Updating DocDB DBInstance ${logicalId}: ${physicalId}`);
28542
28579
  refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId, physicalId);
28543
28580
  try {
28544
- await this.getClient().send(new ModifyDBInstanceCommand$1({
28545
- DBInstanceIdentifier: physicalId,
28546
- DBInstanceClass: properties["DBInstanceClass"],
28547
- PreferredMaintenanceWindow: properties["PreferredMaintenanceWindow"],
28548
- AutoMinorVersionUpgrade: properties["AutoMinorVersionUpgrade"],
28549
- ApplyImmediately: true
28550
- }));
28581
+ await modifyDbInstanceWhenAvailable({
28582
+ send: () => this.getClient().send(new ModifyDBInstanceCommand$1({
28583
+ DBInstanceIdentifier: physicalId,
28584
+ DBInstanceClass: properties["DBInstanceClass"],
28585
+ PreferredMaintenanceWindow: properties["PreferredMaintenanceWindow"],
28586
+ AutoMinorVersionUpgrade: properties["AutoMinorVersionUpgrade"],
28587
+ ApplyImmediately: true
28588
+ })),
28589
+ readStatus: async () => (await this.describeDBInstance(physicalId))?.DBInstanceStatus,
28590
+ sleep: (ms) => this.sleep(ms),
28591
+ logger: this.logger,
28592
+ label: "DocDB DBInstance",
28593
+ logicalId,
28594
+ remainingMs: enclosingDeadlineRemainingMs()
28595
+ });
28551
28596
  this.logger.debug(`Successfully updated DocDB DBInstance ${logicalId}`);
28552
28597
  const described = await this.describeDBInstance(physicalId);
28553
28598
  if (described?.DBInstanceArn) await applyDocDBTagDiff(this.getClient(), this.logger, described.DBInstanceArn, resourceType, logicalId, previousProperties["Tags"], properties["Tags"]);
@@ -28666,21 +28711,24 @@ var DocDBProvider = class {
28666
28711
  }
28667
28712
  throw new Error(`Timed out waiting for DocDB DBCluster ${logicalId} to apply its new VPC security groups`);
28668
28713
  }
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'`);
28714
+ async deleteAfterProtectionFlip(logicalId, physicalId, send) {
28715
+ await deleteAfterProtectionFlipWithFinalSnapshot({
28716
+ stateFault: "InvalidDBClusterStateFault",
28717
+ send,
28718
+ noun: "cluster",
28719
+ label: "DocDB DBCluster",
28720
+ logicalId,
28721
+ read: async () => {
28722
+ const current = await this.describeDBCluster(physicalId);
28723
+ return current === void 0 ? void 0 : {
28724
+ deletionProtection: current.DeletionProtection,
28725
+ status: current.Status
28726
+ };
28727
+ },
28728
+ sleep: (ms) => this.sleep(ms),
28729
+ logger: this.logger,
28730
+ remainingMs: enclosingDeadlineRemainingMs()
28731
+ });
28684
28732
  }
28685
28733
  async waitForClusterAvailable(dbClusterIdentifier, maxWaitMs = 18e5) {
28686
28734
  const startTime = Date.now();
@@ -37428,6 +37476,117 @@ function removableRecorded(kind, items) {
37428
37476
  Subscribers: e["Subscribers"].filter((s) => !holdsSecretDerivedEntry(s["Address"]))
37429
37477
  } : e);
37430
37478
  }
37479
+ function finiteNumber(value) {
37480
+ if (typeof value === "number") return Number.isFinite(value) ? value : void 0;
37481
+ if (typeof value === "string" && value.trim() !== "") {
37482
+ const n = Number(value);
37483
+ return Number.isFinite(n) ? n : void 0;
37484
+ }
37485
+ }
37486
+ function isoDate(value) {
37487
+ let date;
37488
+ if (typeof value === "number") date = new Date(value < 0xe8d4a51000 ? value * 1e3 : value);
37489
+ else if (typeof value === "string" && /^\d+$/.test(value)) {
37490
+ const n = Number(value);
37491
+ date = new Date(n < 0xe8d4a51000 ? n * 1e3 : n);
37492
+ } else if (typeof value === "string") date = new Date(value);
37493
+ else if (value instanceof Date) date = value;
37494
+ else return void 0;
37495
+ return Number.isNaN(date.getTime()) ? void 0 : date.toISOString();
37496
+ }
37497
+ function canonicalSpend(spend) {
37498
+ if (!isPlainRecord(spend)) return spend;
37499
+ const amount = finiteNumber(spend["Amount"]);
37500
+ return amount === void 0 || amount === spend["Amount"] ? spend : {
37501
+ ...spend,
37502
+ Amount: amount
37503
+ };
37504
+ }
37505
+ function canonicalizeBudgetDriftBag(side) {
37506
+ let out = side;
37507
+ const budget = side["Budget"];
37508
+ if (isPlainRecord(budget)) {
37509
+ let nextBudget = budget;
37510
+ const set = (key, value) => {
37511
+ if (value === nextBudget[key]) return;
37512
+ if (nextBudget === budget) nextBudget = { ...budget };
37513
+ nextBudget[key] = value;
37514
+ };
37515
+ set("BudgetLimit", canonicalSpend(budget["BudgetLimit"]));
37516
+ const planned = budget["PlannedBudgetLimits"];
37517
+ if (isPlainRecord(planned)) {
37518
+ const entries = Object.entries(planned).map(([key, spend]) => [key, canonicalSpend(spend)]);
37519
+ if (entries.some(([key, spend]) => spend !== planned[key])) set("PlannedBudgetLimits", Object.fromEntries(entries));
37520
+ }
37521
+ const period = budget["TimePeriod"];
37522
+ if (isPlainRecord(period)) {
37523
+ let nextPeriod = period;
37524
+ for (const key of ["Start", "End"]) {
37525
+ if (period[key] === void 0) continue;
37526
+ const iso = isoDate(period[key]);
37527
+ if (iso === void 0 || iso === period[key]) continue;
37528
+ if (nextPeriod === period) nextPeriod = { ...period };
37529
+ nextPeriod[key] = iso;
37530
+ }
37531
+ set("TimePeriod", nextPeriod);
37532
+ }
37533
+ if (nextBudget !== budget) out = {
37534
+ ...out,
37535
+ Budget: nextBudget
37536
+ };
37537
+ }
37538
+ const list = side["NotificationsWithSubscribers"];
37539
+ if (Array.isArray(list)) {
37540
+ let changed = false;
37541
+ const nextList = list.map((entry) => {
37542
+ if (!isPlainRecord(entry) || !isPlainRecord(entry["Notification"])) return entry;
37543
+ const notification = entry["Notification"];
37544
+ const threshold = finiteNumber(notification["Threshold"]);
37545
+ const fillType = notification["ThresholdType"] == null;
37546
+ const fixThreshold = threshold !== void 0 && threshold !== notification["Threshold"];
37547
+ if (!fillType && !fixThreshold) return entry;
37548
+ changed = true;
37549
+ return {
37550
+ ...entry,
37551
+ Notification: {
37552
+ ...notification,
37553
+ ...fixThreshold && { Threshold: threshold },
37554
+ ...fillType && { ThresholdType: "PERCENTAGE" }
37555
+ }
37556
+ };
37557
+ });
37558
+ if (changed) out = {
37559
+ ...out,
37560
+ NotificationsWithSubscribers: nextList
37561
+ };
37562
+ }
37563
+ return out;
37564
+ }
37565
+ function declaresLegacyFilterShape(properties) {
37566
+ const budget = properties?.["Budget"];
37567
+ if (!isPlainRecord(budget)) return false;
37568
+ const legacy = budget["CostFilters"] != null || budget["CostTypes"] != null;
37569
+ const current = budget["FilterExpression"] != null || budget["Metrics"] != null;
37570
+ return legacy && !current;
37571
+ }
37572
+ function dropElapsedPlannedLimits(baseline, aws, nowMs) {
37573
+ const budget = baseline["Budget"];
37574
+ const awsBudget = aws["Budget"];
37575
+ if (!isPlainRecord(budget) || !isPlainRecord(awsBudget)) return baseline;
37576
+ const planned = budget["PlannedBudgetLimits"];
37577
+ if (!isPlainRecord(planned)) return baseline;
37578
+ const awsPlanned = isPlainRecord(awsBudget["PlannedBudgetLimits"]) ? awsBudget["PlannedBudgetLimits"] : {};
37579
+ const elapsed = (key) => !Object.hasOwn(awsPlanned, key) && /^\d+$/.test(key) && Number(key) * 1e3 < nowMs;
37580
+ const kept = Object.entries(planned).filter(([key]) => !elapsed(key));
37581
+ if (kept.length === Object.keys(planned).length) return baseline;
37582
+ return {
37583
+ ...baseline,
37584
+ Budget: {
37585
+ ...budget,
37586
+ PlannedBudgetLimits: Object.fromEntries(kept)
37587
+ }
37588
+ };
37589
+ }
37431
37590
  var BudgetsBudgetProvider = class {
37432
37591
  client;
37433
37592
  createClient;
@@ -37820,6 +37979,166 @@ var BudgetsBudgetProvider = class {
37820
37979
  throw this.wrapMaskedError(maskerOrIdentity(void 0), error, (text) => new ProvisioningError(`Failed to resolve Arn for budget ${physicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
37821
37980
  }
37822
37981
  }
37982
+ async readCurrentState(physicalId, _logicalId, resourceType, properties) {
37983
+ if (resourceType !== "AWS::Budgets::Budget") return void 0;
37984
+ const accountId = await this.resolveAccountId();
37985
+ const client = this.getClient();
37986
+ const describe = async () => {
37987
+ try {
37988
+ return (await client.send(new DescribeBudgetCommand({
37989
+ AccountId: accountId,
37990
+ BudgetName: physicalId,
37991
+ ShowFilterExpression: !declaresLegacyFilterShape(properties)
37992
+ }))).Budget;
37993
+ } catch (error) {
37994
+ if (error instanceof NotFoundException$5) return RESOURCE_NOT_FOUND;
37995
+ throw error;
37996
+ }
37997
+ };
37998
+ const budget = await describe();
37999
+ if (budget === RESOURCE_NOT_FOUND || budget === void 0) return budget;
38000
+ const notifications = await this.listNotifications(accountId, physicalId);
38001
+ if (notifications === void 0 && await describe() === RESOURCE_NOT_FOUND) return RESOURCE_NOT_FOUND;
38002
+ const notificationsWithSubscribers = (await Promise.all((notifications ?? []).map(async (notification) => {
38003
+ const subscribers = await this.listSubscribers(accountId, physicalId, notification);
38004
+ return subscribers === void 0 ? void 0 : {
38005
+ notification,
38006
+ subscribers
38007
+ };
38008
+ }))).filter((e) => e !== void 0).map(({ notification, subscribers }) => ({
38009
+ Notification: {
38010
+ NotificationType: notification.NotificationType,
38011
+ ComparisonOperator: notification.ComparisonOperator,
38012
+ Threshold: notification.Threshold,
38013
+ ...notification.ThresholdType !== void 0 && notification.ThresholdType !== "PERCENTAGE" && { ThresholdType: notification.ThresholdType }
38014
+ },
38015
+ Subscribers: subscribers.map((s) => ({
38016
+ SubscriptionType: s.SubscriptionType,
38017
+ Address: s.Address
38018
+ }))
38019
+ }));
38020
+ let tags;
38021
+ try {
38022
+ tags = await client.send(new ListTagsForResourceCommand$15({ ResourceARN: await this.budgetArn(accountId, physicalId) }));
38023
+ } catch (error) {
38024
+ if (error instanceof NotFoundException$5 && await describe() === RESOURCE_NOT_FOUND) return RESOURCE_NOT_FOUND;
38025
+ throw error;
38026
+ }
38027
+ return {
38028
+ Budget: this.budgetFromSdk(budget),
38029
+ NotificationsWithSubscribers: notificationsWithSubscribers,
38030
+ ResourceTags: (tags.ResourceTags ?? []).map((t) => ({
38031
+ Key: t.Key,
38032
+ Value: t.Value
38033
+ }))
38034
+ };
38035
+ }
38036
+ async listNotifications(accountId, budgetName) {
38037
+ const out = [];
38038
+ let token;
38039
+ try {
38040
+ do {
38041
+ const page = await this.getClient().send(new DescribeNotificationsForBudgetCommand({
38042
+ AccountId: accountId,
38043
+ BudgetName: budgetName,
38044
+ MaxResults: 100,
38045
+ ...token !== void 0 && { NextToken: token }
38046
+ }));
38047
+ out.push(...page.Notifications ?? []);
38048
+ token = page.NextToken;
38049
+ } while (token);
38050
+ } catch (error) {
38051
+ if (error instanceof NotFoundException$5) return void 0;
38052
+ throw error;
38053
+ }
38054
+ return out;
38055
+ }
38056
+ async listSubscribers(accountId, budgetName, notification) {
38057
+ const out = [];
38058
+ let token;
38059
+ try {
38060
+ do {
38061
+ const page = await this.getClient().send(new DescribeSubscribersForNotificationCommand({
38062
+ AccountId: accountId,
38063
+ BudgetName: budgetName,
38064
+ Notification: {
38065
+ NotificationType: notification.NotificationType,
38066
+ ComparisonOperator: notification.ComparisonOperator,
38067
+ Threshold: notification.Threshold,
38068
+ ...notification.ThresholdType !== void 0 && { ThresholdType: notification.ThresholdType }
38069
+ },
38070
+ MaxResults: 100,
38071
+ ...token !== void 0 && { NextToken: token }
38072
+ }));
38073
+ out.push(...page.Subscribers ?? []);
38074
+ token = page.NextToken;
38075
+ } while (token);
38076
+ } catch (error) {
38077
+ if (error instanceof NotFoundException$5) return void 0;
38078
+ throw error;
38079
+ }
38080
+ return out;
38081
+ }
38082
+ budgetFromSdk(budget) {
38083
+ const raw = budget;
38084
+ const spend = (s) => s === void 0 ? void 0 : {
38085
+ Amount: finiteNumber(s.Amount) ?? s.Amount,
38086
+ Unit: s.Unit
38087
+ };
38088
+ const out = {
38089
+ BudgetName: budget.BudgetName,
38090
+ BudgetType: raw["BudgetType"],
38091
+ TimeUnit: budget.TimeUnit
38092
+ };
38093
+ if (budget.BudgetLimit) out["BudgetLimit"] = spend(budget.BudgetLimit);
38094
+ if (budget.PlannedBudgetLimits && Object.keys(budget.PlannedBudgetLimits).length > 0) out["PlannedBudgetLimits"] = Object.fromEntries(Object.entries(budget.PlannedBudgetLimits).map(([key, s]) => [key, spend(s)]));
38095
+ if (budget.TimePeriod) out["TimePeriod"] = {
38096
+ ...budget.TimePeriod.Start && { Start: isoDate(budget.TimePeriod.Start) },
38097
+ ...budget.TimePeriod.End && { End: isoDate(budget.TimePeriod.End) }
38098
+ };
38099
+ if (budget.CostFilters && Object.keys(budget.CostFilters).length > 0) out["CostFilters"] = budget.CostFilters;
38100
+ if (budget.CostTypes) out["CostTypes"] = { ...budget.CostTypes };
38101
+ const autoAdjust = raw["AutoAdjustData"];
38102
+ if (isPlainRecord(autoAdjust)) {
38103
+ const historical = autoAdjust["HistoricalOptions"];
38104
+ out["AutoAdjustData"] = {
38105
+ AutoAdjustType: autoAdjust["AutoAdjustType"],
38106
+ ...isPlainRecord(historical) && { HistoricalOptions: { BudgetAdjustmentPeriod: historical["BudgetAdjustmentPeriod"] } }
38107
+ };
38108
+ }
38109
+ if (raw["FilterExpression"] !== void 0) out["FilterExpression"] = raw["FilterExpression"];
38110
+ if (Array.isArray(raw["Metrics"]) && raw["Metrics"].length > 0) out["Metrics"] = raw["Metrics"];
38111
+ if (raw["BillingViewArn"] !== void 0) out["BillingViewArn"] = raw["BillingViewArn"];
38112
+ return out;
38113
+ }
38114
+ getDriftUnorderedPaths(resourceType) {
38115
+ return resourceType === "AWS::Budgets::Budget" ? ["NotificationsWithSubscribers"] : [];
38116
+ }
38117
+ getDriftUnknownPaths(resourceType, properties) {
38118
+ if (resourceType !== "AWS::Budgets::Budget") return [];
38119
+ const budget = properties?.["Budget"];
38120
+ if (!isPlainRecord(budget)) return [];
38121
+ const paths = [];
38122
+ if (budget["AutoAdjustData"] != null || budget["PlannedBudgetLimits"] != null) paths.push("Budget.BudgetLimit");
38123
+ if (budget["FilterExpression"] != null || budget["Metrics"] != null) {
38124
+ if (budget["CostTypes"] != null) paths.push("Budget.CostTypes");
38125
+ if (budget["CostFilters"] != null) paths.push("Budget.CostFilters");
38126
+ }
38127
+ return paths;
38128
+ }
38129
+ canonicalizeDriftProperties(resourceType, side) {
38130
+ return resourceType === "AWS::Budgets::Budget" ? canonicalizeBudgetDriftBag(side) : side;
38131
+ }
38132
+ async canonicalizeDriftPair(resourceType, baseline, aws) {
38133
+ if (resourceType !== "AWS::Budgets::Budget") return {
38134
+ baseline,
38135
+ aws
38136
+ };
38137
+ return {
38138
+ baseline: dropElapsedPlannedLimits(baseline, aws, Date.now()),
38139
+ aws
38140
+ };
38141
+ }
37823
38142
  async import(input) {
37824
38143
  const rawBudget = input.properties["Budget"] ?? {};
37825
38144
  const explicit = input.knownPhysicalId ?? (typeof rawBudget["BudgetName"] === "string" && rawBudget["BudgetName"].length > 0 ? rawBudget["BudgetName"] : void 0);
@@ -38595,7 +38914,7 @@ var KinesisStreamConsumerProvider = class {
38595
38914
  if (desc.ConsumerName !== void 0) result["ConsumerName"] = desc.ConsumerName;
38596
38915
  if (desc.StreamARN !== void 0) result["StreamARN"] = desc.StreamARN;
38597
38916
  try {
38598
- const tagsResp = await this.getClient().send(new ListTagsForResourceCommand$15({ ResourceARN: physicalId }));
38917
+ const tagsResp = await this.getClient().send(new ListTagsForResourceCommand$16({ ResourceARN: physicalId }));
38599
38918
  result["Tags"] = normalizeAwsTagsToCfn(tagsResp.Tags);
38600
38919
  } catch (err) {
38601
38920
  if (err instanceof ResourceNotFoundException$12) return RESOURCE_NOT_FOUND;
@@ -40542,11 +40861,24 @@ const TOP_LEVEL_LEFT_IN_PLACE_PROPS = [
40542
40861
  "FileSystemTypeVersion",
40543
40862
  "NetworkType"
40544
40863
  ];
40864
+ const CFN_KEEPS_ON_REMOVAL = /* @__PURE__ */ new Set([
40865
+ "FileSystemTypeVersion",
40866
+ "LustreConfiguration.AutoImportPolicy",
40867
+ "LustreConfiguration.DataCompressionType",
40868
+ "LustreConfiguration.WeeklyMaintenanceStartTime",
40869
+ "OpenZFSConfiguration.AutomaticBackupRetentionDays",
40870
+ "OpenZFSConfiguration.CopyTagsToBackups",
40871
+ "OpenZFSConfiguration.CopyTagsToVolumes",
40872
+ "OpenZFSConfiguration.DailyAutomaticBackupStartTime",
40873
+ "OpenZFSConfiguration.DiskIopsConfiguration",
40874
+ "OpenZFSConfiguration.WeeklyMaintenanceStartTime"
40875
+ ]);
40545
40876
  const leftInPlaceWarning$2 = (logicalId, names, caller) => {
40546
40877
  const one = names.length === 1;
40547
40878
  const subject = one ? "property" : "properties";
40548
40879
  const verb = one ? "is" : "are";
40549
- return caller === "rollback" ? safeMsg`${logicalId} (AWS::FSx::FileSystem): ${subject} ${names.join(", ")} ${verb} absent from the state being restored; UpdateFileSystem keeps a setting it is not sent, so the rollback leaves the value the failed deploy applied in place.` : safeMsg`${logicalId} (AWS::FSx::FileSystem): ${subject} ${names.join(", ")} ${verb} no longer declared; UpdateFileSystem keeps a setting it is not sent and cdkd sends no reset, so the current AWS value stays in place. Declare the intended value explicitly to change it.`;
40880
+ if (caller === "rollback") return safeMsg`${logicalId} (AWS::FSx::FileSystem): ${subject} ${names.join(", ")} ${verb} absent from the state being restored; UpdateFileSystem keeps a setting it is not sent, so the rollback leaves the value the failed deploy applied in place.`;
40881
+ return names.every((name) => CFN_KEEPS_ON_REMOVAL.has(name)) ? safeMsg`${logicalId} (AWS::FSx::FileSystem): ${subject} ${names.join(", ")} ${verb} no longer declared and ${one ? "keeps its" : "keep their"} current AWS value, as CloudFormation leaves ${one ? "it" : "them"}; UpdateFileSystem keeps a setting it is not sent. Declare the intended value explicitly to change it.` : safeMsg`${logicalId} (AWS::FSx::FileSystem): ${subject} ${names.join(", ")} ${verb} no longer declared; UpdateFileSystem keeps a setting it is not sent and cdkd sends no reset, so the current AWS value stays in place. Declare the intended value explicitly to change it.`;
40550
40882
  };
40551
40883
  const toNumber$3 = (v) => v === void 0 ? void 0 : Number(v);
40552
40884
  const toBoolean$1 = (v) => {
@@ -45097,7 +45429,7 @@ var CodeCommitRepositoryProvider = class {
45097
45429
  if (!metadata) return void 0;
45098
45430
  let tags = [];
45099
45431
  if (metadata.Arn) try {
45100
- const tagsResp = await this.getClient().send(new ListTagsForResourceCommand$16({ resourceArn: metadata.Arn }));
45432
+ const tagsResp = await this.getClient().send(new ListTagsForResourceCommand$17({ resourceArn: metadata.Arn }));
45101
45433
  tags = normalizeAwsTagsToCfn(tagsResp.tags);
45102
45434
  } catch (err) {
45103
45435
  if (err instanceof RepositoryDoesNotExistException) return RESOURCE_NOT_FOUND;
@@ -45613,7 +45945,7 @@ var S3VectorsProvider = class {
45613
45945
  if (Object.keys(enc).length > 0) result["EncryptionConfiguration"] = enc;
45614
45946
  }
45615
45947
  if (bucket?.vectorBucketArn) try {
45616
- const tagsResp = await this.getClient().send(new ListTagsForResourceCommand$17({ resourceArn: bucket.vectorBucketArn }));
45948
+ const tagsResp = await this.getClient().send(new ListTagsForResourceCommand$18({ resourceArn: bucket.vectorBucketArn }));
45617
45949
  result["Tags"] = normalizeAwsTagsToCfn(tagsResp.tags);
45618
45950
  } catch (err) {
45619
45951
  this.logger.debug(`S3Vectors ListTagsForResource(${bucket.vectorBucketArn}) failed: ${describeAwsFailure(err).detail}`);
@@ -45885,7 +46217,7 @@ var S3DirectoryBucketProvider = class {
45885
46217
  async readTags(bucketName) {
45886
46218
  const accountId = await this.getAccountId();
45887
46219
  const resourceArn = await this.buildBucketArn(bucketName, accountId);
45888
- const resp = await this.getS3ControlClient().send(new ListTagsForResourceCommand$18({
46220
+ const resp = await this.getS3ControlClient().send(new ListTagsForResourceCommand$19({
45889
46221
  AccountId: accountId,
45890
46222
  ResourceArn: resourceArn
45891
46223
  }));
@@ -46540,7 +46872,7 @@ var S3TablesProvider = class {
46540
46872
  }
46541
46873
  async readTagsBestEffort(resourceArn) {
46542
46874
  try {
46543
- const tags = (await this.getClient().send(new ListTagsForResourceCommand$19({ resourceArn }))).tags ?? {};
46875
+ const tags = (await this.getClient().send(new ListTagsForResourceCommand$20({ resourceArn }))).tags ?? {};
46544
46876
  const out = [];
46545
46877
  for (const [Key, Value] of Object.entries(tags)) out.push({
46546
46878
  Key,
@@ -47665,4 +47997,4 @@ var ACMCertificateProvider = class {
47665
47997
 
47666
47998
  //#endregion
47667
47999
  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 };
47668
- //# sourceMappingURL=provider-classes-CUKmyCQ8.js.map
48000
+ //# sourceMappingURL=provider-classes-B52ogqNj.js.map