@go-to-k/cdkd 0.304.1 → 0.306.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/{asg-provider-BKJrVAH4.js → asg-provider-DrREeZeh.js} +3 -3
  2. package/dist/{asg-provider-BKJrVAH4.js.map → asg-provider-DrREeZeh.js.map} +1 -1
  3. package/dist/{aws-clients-WQOzP1x4.js → aws-clients-DhsLtXsN.js} +88 -3
  4. package/dist/aws-clients-DhsLtXsN.js.map +1 -0
  5. package/dist/cli.js +2 -2
  6. package/dist/{db-instance-modify-retry-DfY7rzvu.js → db-instance-modify-retry-DvidzfJp.js} +2 -2
  7. package/dist/{db-instance-modify-retry-DfY7rzvu.js.map → db-instance-modify-retry-DvidzfJp.js.map} +1 -1
  8. package/dist/{deploy-engine-Dwe6OnF_.js → deploy-engine-Bjr-FAuZ.js} +388 -42
  9. package/dist/deploy-engine-Bjr-FAuZ.js.map +1 -0
  10. package/dist/{iam-policy-targets-OyoL9Woo.js → iam-policy-targets-BbtwI9vN.js} +2 -2
  11. package/dist/{iam-policy-targets-OyoL9Woo.js.map → iam-policy-targets-BbtwI9vN.js.map} +1 -1
  12. package/dist/{iam-role-provider-bQvjvq2x.js → iam-role-provider-BJ26M4Ez.js} +4 -4
  13. package/dist/{iam-role-provider-bQvjvq2x.js.map → iam-role-provider-BJ26M4Ez.js.map} +1 -1
  14. package/dist/index.d.ts +1 -0
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +4 -4
  17. package/dist/{neptune-provider-CIAyTNad.js → neptune-provider-D_3VAhFf.js} +4 -4
  18. package/dist/{neptune-provider-CIAyTNad.js.map → neptune-provider-D_3VAhFf.js.map} +1 -1
  19. package/dist/{program-DuL51vnF.js → program-CcYD-_fU.js} +59 -16
  20. package/dist/program-CcYD-_fU.js.map +1 -0
  21. package/dist/{provider-classes-Rf-SVs3I.js → provider-classes-C_AbFNEi.js} +417 -75
  22. package/dist/provider-classes-C_AbFNEi.js.map +1 -0
  23. package/dist/{rds-provider-p_5gnXcp.js → rds-provider-Dps9UxBz.js} +39 -6
  24. package/dist/rds-provider-Dps9UxBz.js.map +1 -0
  25. package/dist/{version-EpZTW7nR.js → version-CZkNvTWF.js} +2 -2
  26. package/dist/{version-EpZTW7nR.js.map → version-CZkNvTWF.js.map} +1 -1
  27. package/package.json +2 -2
  28. package/dist/aws-clients-WQOzP1x4.js.map +0 -1
  29. package/dist/deploy-engine-Dwe6OnF_.js.map +0 -1
  30. package/dist/program-DuL51vnF.js.map +0 -1
  31. package/dist/provider-classes-Rf-SVs3I.js.map +0 -1
  32. package/dist/rds-provider-p_5gnXcp.js.map +0 -1
@@ -1,14 +1,14 @@
1
- import { r as getAwsClients } from "./aws-clients-WQOzP1x4.js";
1
+ import { r as getAwsClients, s as withApiGatewayPacing } from "./aws-clients-DhsLtXsN.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, t as VERBOSE_POINTER, w as generateResourceNameWithFallback } from "./aws-failure-text-Durl920o.js";
3
- import { $ as userPoolProtectionSite, $t as injectiveKeyPrefix, A as isPlainImportJson, C as setBounded, Cr as markNonRetryable, Ct as createMaskedLogSinks, D as markNotGone, Dn as ResourceUpdateNotSupportedError, Dt as maskerOrIdentity, Et as maskDeep, F as refusalTypeShown, Ft as isAuxiliaryFailure, H as deleteWithProtectionCompensation, Hn as hasClauseBreak, I as remedyLogicalId, J as observeThenDisableProtection, K as isTerminalDeleteFailure, Kn as plainOrDescribed, L as resolveExplicitPhysicalId, Lt as markAuxiliaryFailure, M as isQuotableImportValue, N as normalizeAwsTagsToCfn, O as assertRegionMatch, Ot as withDerivedNameMasks, P as quotedRemedyLogicalId, Qt as injectiveKey, Rt as markCreatedBeforeFailure, S as replayedSendWindow, Sr as isThrottlingError, St as stateOrphanRecordRemedy, T as RESOURCE_NOT_FOUND, Tn as ProvisioningError, Tr as wrapMaskedAwsError, Tt as isSecretDerivedValue, Un as isInertUnquoted, V as deleteAfterProtectionFlipWithFinalSnapshot, Vn as commandHole, Wn as pasteableCommand, X as rdsFamilyProtectionSite, Xn as withheldTargetClause, Y as protectionFlipKey, Yn as shellQuote, _ as RecentIdSet, _r as isRetryableTransientError, _t as compositeIdSkipResult, a as onlySecretDerived, an as ambientCredentialConfig, ar as markNameCollision, at as protectedReplacementAdvice, b as isInsideWindow, br as THROTTLING_ERROR_NAMES, c as recordedPrincipalsRepair, cn as AccountIdUnavailableError, dr as explicitDenyPolicyKind, dt as startInterruptWatch, ft as ElapsedBudgetRegistry, g as AmbiguousCreateLatch, gt as compositeIdSeparatorRefusal, h as AMBIGUOUS_LATCH_TTL_MS, hr as isExplicitDenyError, ht as compositeIdFormatMessage, i as holdsSecretDerivedEntry, in as ambientClientDefaults, it as pasteableAwsCommand, j as isPlainImportValue, jt as clearCreatedBeforeFailure, k as VALUE_NOT_SHOWN, mr as isAmbiguousOutcomeError, mt as canonicalizeRoute53QueryName, nt as WITHHELD_AWS_COMMAND, o as readPrincipalLists, on as clientDefaultsFor, or as markReplayMayCollide, ot as renderDisableCommand, p as withRemovalDefaults, q as logGroupProtectionSite, r as SECRET_DERIVED_READ_LIVE, rn as withPasteableAwsProfile, rt as isAwsCliLiteral, sn as credentialFingerprint, sr as relayedNameCollision, tt as UNNAMEABLE_ID_CLAUSE, u as clearOnUpdateRemoval, un as CdkdError, ut as isInterruptedWaitError, v as ambiguousAttemptLead, vr as isTransientServerError, vt as logicalIdShown, w as withoutServerErrorRetries, wr as markRedactedCause, wt as createMaskedRetryLogger, x as replayFollowedAmbiguousAttempt, xr as isMarkedNonRetryable, xt as segmentAfterAnchor, y as createAttemptKey, yt as packCompositeId, z as ProtectionFlipRegistry, zt as markSupersedesEarlierCreate } from "./iam-policy-targets-OyoL9Woo.js";
3
+ import { $ as userPoolProtectionSite, $t as injectiveKeyPrefix, A as isPlainImportJson, C as setBounded, Cr as markNonRetryable, Ct as createMaskedLogSinks, D as markNotGone, Dn as ResourceUpdateNotSupportedError, Dt as maskerOrIdentity, Et as maskDeep, F as refusalTypeShown, Ft as isAuxiliaryFailure, H as deleteWithProtectionCompensation, Hn as hasClauseBreak, I as remedyLogicalId, J as observeThenDisableProtection, K as isTerminalDeleteFailure, Kn as plainOrDescribed, L as resolveExplicitPhysicalId, Lt as markAuxiliaryFailure, M as isQuotableImportValue, N as normalizeAwsTagsToCfn, O as assertRegionMatch, Ot as withDerivedNameMasks, P as quotedRemedyLogicalId, Qt as injectiveKey, Rt as markCreatedBeforeFailure, S as replayedSendWindow, Sr as isThrottlingError, St as stateOrphanRecordRemedy, T as RESOURCE_NOT_FOUND, Tn as ProvisioningError, Tr as wrapMaskedAwsError, Tt as isSecretDerivedValue, Un as isInertUnquoted, V as deleteAfterProtectionFlipWithFinalSnapshot, Vn as commandHole, Wn as pasteableCommand, X as rdsFamilyProtectionSite, Xn as withheldTargetClause, Y as protectionFlipKey, Yn as shellQuote, _ as RecentIdSet, _r as isRetryableTransientError, _t as compositeIdSkipResult, a as onlySecretDerived, an as ambientCredentialConfig, ar as markNameCollision, at as protectedReplacementAdvice, b as isInsideWindow, br as THROTTLING_ERROR_NAMES, c as recordedPrincipalsRepair, cn as AccountIdUnavailableError, dr as explicitDenyPolicyKind, dt as startInterruptWatch, ft as ElapsedBudgetRegistry, g as AmbiguousCreateLatch, gt as compositeIdSeparatorRefusal, h as AMBIGUOUS_LATCH_TTL_MS, hr as isExplicitDenyError, ht as compositeIdFormatMessage, i as holdsSecretDerivedEntry, in as ambientClientDefaults, it as pasteableAwsCommand, j as isPlainImportValue, jt as clearCreatedBeforeFailure, k as VALUE_NOT_SHOWN, mr as isAmbiguousOutcomeError, mt as canonicalizeRoute53QueryName, nt as WITHHELD_AWS_COMMAND, o as readPrincipalLists, on as clientDefaultsFor, or as markReplayMayCollide, ot as renderDisableCommand, p as withRemovalDefaults, q as logGroupProtectionSite, r as SECRET_DERIVED_READ_LIVE, rn as withPasteableAwsProfile, rt as isAwsCliLiteral, sn as credentialFingerprint, sr as relayedNameCollision, tt as UNNAMEABLE_ID_CLAUSE, u as clearOnUpdateRemoval, un as CdkdError, ut as isInterruptedWaitError, v as ambiguousAttemptLead, vr as isTransientServerError, vt as logicalIdShown, w as withoutServerErrorRetries, wr as markRedactedCause, wt as createMaskedRetryLogger, x as replayFollowedAmbiguousAttempt, xr as isMarkedNonRetryable, xt as segmentAfterAnchor, y as createAttemptKey, yt as packCompositeId, z as ProtectionFlipRegistry, zt as markSupersedesEarlierCreate } from "./iam-policy-targets-BbtwI9vN.js";
4
4
  import { c as ambientRegion } from "./aws-client-defaults-BX9Y_fKp.js";
5
- import { $r as markDeleteStarted, Aa as parseWebACLArn, Ai as deleteSkipReason, Ba as accountArgs, C as hasCdkAutoDeleteTag, Ds as sameLambdaFunctionAddress, Dt as lookupEachName, E as markRefusedBeforeApplying, Es as lambdaFunctionNameForMask, Et as isAccessDeniedError, F as findNestedTemplateTreeDefect, Fi as ec2InstanceProtectionSite, Fo as refuseMalformedResourcesForDestroy, Fu as resolveAssemblyPath, Gi as s3BucketArn, Gs as markSameGenerationBag, I as isAbsoluteAssetPath, Ii as isTerminationProtectionPropagationError, Ji as s3BucketRegionalDomainName, Jr as acquireIdempotencyToken, Js as snapshotPassProvenance, Ki as s3BucketDomainName, Kr as reserveStackCreateToken, Ks as redactForState, L as listNestedTemplateRows, Li as observeThenDisableInstanceApiTermination, Mi as isWaitAbandonedError, Mu as describeFileReadFailure, Na as passedParameterClassesOf, Ni as markWaitAbandoned, Nu as displayAssemblyPath, Ot as withApiLimit, Pu as renderAssemblyPathEscape, Qn as awaitInFlightSibling, Qr as isRefusedByName, R as renderNestedTemplateTreeDefect, Ri as reDisableInstanceApiTermination, S as S3_AUTO_DELETE_OBJECTS_TAG, T as getPriorAttempts, Ti as unchangedBehindSecretReference, Ts as canonicalLambdaFunctionName, Tt as chunks, W as enclosingDeadlineRemainingMs, Wi as isSettledInstanceState, Wr as earliestDefined, Yi as s3BucketWebsiteUrl, Yo as findSilentDropProperties, Zo as withoutSilentDropProperties, Zs as hasMaskableValues, _ as deleteTableWithIndexBusyRetry, _s as replayWarn, ai as tagMapAsList, an as isRedactedRecordedValue, b as waitForIndexesSettled, ba as getAccountInfo, bc as physicalNameCopiesOf, bs as requireConfigString, c as DynamoDBGlobalTableProvider, ci as stringifyIfAssigned, cl as timePhase, cs as isWarmThroughputDecrease, d as compensateRemovedDeletionProtection, dc as withoutPhysicalNameCopies, dl as stringifyValue, ds as coerceCfnBoolean, ea as outputReferenceProvenanceOf, ei as DBPROXY_TAGS_WHAT, er as getStackRecords, f as deleteBudgetKey, fs as coerceCfnInteger, g as INDEX_SETTLE_POLL_INTERVAL_MS, gl as rewriteTemplateAssetReferences, gs as readConfigString, h as DELETE_INDEX_WAIT_PROCEED_NOTE, ho as refuseMalformedNestedChildOutputs, hs as configStringRefusal, ht as withNestedStackContext, hu as decodeListingKey, ii as refuseMalformedDesiredTags, in as REDACTED_DELETE_ADDRESS_SKIP_REASON, ji as withIndeterminateGuard, jr as secretNamedAttributeNamesOf, l as DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS, ls as toCfnInteger, m as resolveDynamoDbDeleteBudgetMs, mi as waitForLambdaFunctionActive, ms as configIntegerRefusal, mt as getCurrentNestedStackContext, ni as planTagDiff, nn as getCurrentProducerRegions, nr as replacedDeleteFailureVerdict, oi as tagPlanWarning, on as redactedDeleteAddressFields, os as WARM_THROUGHPUT_MEMBERS, p as resolveDynamoDbDeleteBudgetClock, pc as dynamicReferenceTokens, ps as configBooleanRefusal, qi as s3BucketDualStackDomainName, qo as withheldAccountClause, qs as recordReferenceProvenanceEntry, ri as readTagList, si as definedAttributes, sn as redactedDeleteAddressSkip, ss as coerceWarmThroughput$1, st as getNestedRevertRun, t as DeployEngine, ti as DBPROXY_TAG_OPTIONS, u as beginDeleteWait, us as toFiniteNumber, ut as revertNestedChildFromJournal, v as maskedLogger, vi as getCurrentResourceSecrets, vs as requireConfigArray, vu as canonicalizeRegion, w as isTruthyCfnBoolean, wc as carriesSecretMask, wi as slowCcOperationTimeoutMs, ws as withRetry, x as ECR_AUTO_DELETE_IMAGES_TAG, xc as recordAttributeIdCopy, y as relayedIndexBusyDelete, yc as recoverMaskedOutput, ys as requireConfigObject, yu as derivePartitionAndUrlSuffix, zi as reEnableInstanceApiTermination, zs as passedNoEchoParametersOf } from "./deploy-engine-Dwe6OnF_.js";
6
- import { n as collectInlinePolicyNamesManagedBySiblings, r as IamCreateClientCache, t as IAMRoleProvider } from "./iam-role-provider-bQvjvq2x.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-DuL51vnF.js";
8
- import { t as modifyDbInstanceWhenAvailable } from "./db-instance-modify-retry-DfY7rzvu.js";
9
- import { RDSProvider } from "./rds-provider-p_5gnXcp.js";
10
- import { NeptuneProvider } from "./neptune-provider-CIAyTNad.js";
11
- import { ASGProvider } from "./asg-provider-BKJrVAH4.js";
5
+ import { $r as markDeleteStarted, Ai as deleteSkipReason, Bs as passedNoEchoParametersOf, C as hasCdkAutoDeleteTag, Cc as recordAttributeIdCopy, Ds as lambdaFunctionNameForMask, Dt as lookupEachName, E as markRefusedBeforeApplying, Ec as carriesSecretMask, Es as canonicalLambdaFunctionName, Et as isAccessDeniedError, F as findNestedTemplateTreeDefect, Fi as ec2InstanceProtectionSite, Fu as displayAssemblyPath, Gi as s3BucketArn, I as isAbsoluteAssetPath, Ii as isTerminationProtectionPropagationError, Io as refuseMalformedResourcesForDestroy, Iu as renderAssemblyPathEscape, Ji as s3BucketRegionalDomainName, Jo as withheldAccountClause, Jr as acquireIdempotencyToken, Js as recordReferenceProvenanceEntry, Ki as s3BucketDomainName, Kr as reserveStackCreateToken, Ks as markSameGenerationBag, L as listNestedTemplateRows, Li as observeThenDisableInstanceApiTermination, Lu as resolveAssemblyPath, Mi as isWaitAbandonedError, Ni as markWaitAbandoned, Os as sameLambdaFunctionAddress, Ot as withApiLimit, Pa as passedParameterClassesOf, Pu as describeFileReadFailure, Qn as awaitInFlightSibling, Qo as withoutSilentDropProperties, Qr as isRefusedByName, Qs as hasMaskableValues, R as renderNestedTemplateTreeDefect, Ri as reDisableInstanceApiTermination, S as S3_AUTO_DELETE_OBJECTS_TAG, Sc as physicalNameCopiesOf, T as getPriorAttempts, Ti as unchangedBehindSecretReference, Ts as withRetry, Tt as chunks, Va as accountArgs, W as enclosingDeadlineRemainingMs, Wi as isSettledInstanceState, Wr as earliestDefined, Xo as findSilentDropProperties, Yi as s3BucketWebsiteUrl, Ys as snapshotPassProvenance, _ as deleteTableWithIndexBusyRetry, _s as readConfigString, _u as decodeListingKey, ai as tagMapAsList, an as isRedactedRecordedValue, b as waitForIndexesSettled, ba as getAccountInfo, bs as requireConfigObject, bu as canonicalizeRegion, c as DynamoDBGlobalTableProvider, ci as stringifyIfAssigned, cs as coerceWarmThroughput$1, d as compensateRemovedDeletionProtection, ds as toFiniteNumber, ea as outputReferenceProvenanceOf, ei as DBPROXY_TAGS_WHAT, er as getStackRecords, f as deleteBudgetKey, fc as withoutPhysicalNameCopies, fs as coerceCfnBoolean, g as INDEX_SETTLE_POLL_INTERVAL_MS, go as refuseMalformedNestedChildOutputs, gs as configStringRefusal, h as DELETE_INDEX_WAIT_PROCEED_NOTE, hs as configIntegerRefusal, ht as withNestedStackContext, ii as refuseMalformedDesiredTags, in as REDACTED_DELETE_ADDRESS_SKIP_REASON, ja as parseWebACLArn, ji as withIndeterminateGuard, jr as secretNamedAttributeNamesOf, l as DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS, ls as isWarmThroughputDecrease, m as resolveDynamoDbDeleteBudgetMs, mc as dynamicReferenceTokens, mi as waitForLambdaFunctionActive, ms as configBooleanRefusal, mt as getCurrentNestedStackContext, ni as planTagDiff, nn as getCurrentProducerRegions, nr as replacedDeleteFailureVerdict, oi as tagPlanWarning, on as redactedDeleteAddressFields, p as resolveDynamoDbDeleteBudgetClock, pl as stringifyValue, ps as coerceCfnInteger, qi as s3BucketDualStackDomainName, qs as redactForState, ri as readTagList, si as definedAttributes, sn as redactedDeleteAddressSkip, ss as WARM_THROUGHPUT_MEMBERS, st as getNestedRevertRun, t as DeployEngine, ti as DBPROXY_TAG_OPTIONS, u as beginDeleteWait, ul as timePhase, us as toCfnInteger, ut as revertNestedChildFromJournal, v as maskedLogger, vi as getCurrentResourceSecrets, vl as rewriteTemplateAssetReferences, vs as replayWarn, w as isTruthyCfnBoolean, wi as slowCcOperationTimeoutMs, x as ECR_AUTO_DELETE_IMAGES_TAG, xc as recoverMaskedOutput, xs as requireConfigString, xu as derivePartitionAndUrlSuffix, y as relayedIndexBusyDelete, ys as requireConfigArray, zi as reEnableInstanceApiTermination } from "./deploy-engine-Bjr-FAuZ.js";
6
+ import { n as collectInlinePolicyNamesManagedBySiblings, r as IamCreateClientCache, t as IAMRoleProvider } from "./iam-role-provider-BJ26M4Ez.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-CcYD-_fU.js";
8
+ import { t as modifyDbInstanceWhenAvailable } from "./db-instance-modify-retry-DvidzfJp.js";
9
+ import { RDSProvider } from "./rds-provider-Dps9UxBz.js";
10
+ import { NeptuneProvider } from "./neptune-provider-D_3VAhFf.js";
11
+ import { ASGProvider } from "./asg-provider-DrREeZeh.js";
12
12
  import { createHash, randomUUID } from "node:crypto";
13
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";
14
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, UpdateGroupCommand, UpdateLoginProfileCommand, UpdateUserCommand } from "@aws-sdk/client-iam";
@@ -50,7 +50,7 @@ import { CreateHttpNamespaceCommand, CreatePrivateDnsNamespaceCommand, CreatePub
50
50
  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
51
  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
52
  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";
53
- 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";
53
+ 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, UpdateStreamRecordDistributionStrategyCommand } from "@aws-sdk/client-kinesis";
54
54
  import { CreateScheduleCommand, DeleteScheduleCommand, GetScheduleCommand, ListSchedulesCommand, ResourceNotFoundException as ResourceNotFoundException$13, SchedulerClient, UpdateScheduleCommand } from "@aws-sdk/client-scheduler";
55
55
  import { CreatePipeCommand, DeletePipeCommand, DescribePipeCommand, NotFoundException as NotFoundException$6, PipesClient, TagResourceCommand as TagResourceCommand$21, UntagResourceCommand as UntagResourceCommand$21, UpdatePipeCommand } from "@aws-sdk/client-pipes";
56
56
  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";
@@ -58,12 +58,12 @@ import { CreateFileSystemCommand as CreateFileSystemCommand$1, CreateFileSystemF
58
58
  import { AddInstanceFleetCommand, AddInstanceGroupsCommand, AddTagsCommand as AddTagsCommand$1, DescribeClusterCommand, EMRClient, InvalidRequestException, ListClustersCommand, ListInstanceFleetsCommand, ListInstanceGroupsCommand, ModifyClusterCommand, ModifyInstanceFleetCommand, ModifyInstanceGroupsCommand, PutAutoScalingPolicyCommand, PutAutoTerminationPolicyCommand, PutManagedScalingPolicyCommand, RemoveAutoScalingPolicyCommand, RemoveAutoTerminationPolicyCommand, RemoveManagedScalingPolicyCommand, RemoveTagsCommand as RemoveTagsCommand$1, RunJobFlowCommand, SetTerminationProtectionCommand, SetVisibleToAllUsersCommand, TerminateJobFlowsCommand } from "@aws-sdk/client-emr";
59
59
  import { CreateDeliveryStreamCommand, DeleteDeliveryStreamCommand, DescribeDeliveryStreamCommand, FirehoseClient, ListTagsForDeliveryStreamCommand, ResourceNotFoundException as ResourceNotFoundException$14, TagDeliveryStreamCommand, UntagDeliveryStreamCommand, UpdateDestinationCommand } from "@aws-sdk/client-firehose";
60
60
  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
- import { BatchGetProjectsCommand, CodeBuildClient, CreateProjectCommand, DeleteProjectCommand, ResourceNotFoundException as ResourceNotFoundException$15, UpdateProjectCommand } from "@aws-sdk/client-codebuild";
61
+ import { BatchGetProjectsCommand, CodeBuildClient, CreateProjectCommand, DeleteProjectCommand, ResourceNotFoundException as ResourceNotFoundException$15, UpdateProjectCommand, UpdateProjectVisibilityCommand } from "@aws-sdk/client-codebuild";
62
62
  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
63
  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
64
  import { CreateVectorBucketCommand, DeleteIndexCommand, DeleteVectorBucketCommand, GetVectorBucketCommand, ListIndexesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$18, S3VectorsClient, TagResourceCommand as TagResourceCommand$25, UntagResourceCommand as UntagResourceCommand$25 } from "@aws-sdk/client-s3vectors";
65
65
  import { ListTagsForResourceCommand as ListTagsForResourceCommand$19, 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$20, NotFoundException as NotFoundException$7, S3TablesClient, TagResourceCommand as TagResourceCommand$27, UntagResourceCommand as UntagResourceCommand$27 } from "@aws-sdk/client-s3tables";
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$20, NotFoundException as NotFoundException$7, RenameTableCommand, S3TablesClient, TagResourceCommand as TagResourceCommand$27, UntagResourceCommand as UntagResourceCommand$27 } from "@aws-sdk/client-s3tables";
67
67
 
68
68
  //#region src/provisioning/providers/iam-policy-provider.ts
69
69
  const POLICY_NAME_SKIP_REASON = "no policy name in state — no delete issued";
@@ -2924,6 +2924,13 @@ var IAMUserGroupProvider = class {
2924
2924
  }
2925
2925
  };
2926
2926
 
2927
+ //#endregion
2928
+ //#region src/utils/cfn-timestamp.ts
2929
+ const OFFSETLESS_DATE_TIME = /^\d{4}-\d{2}-\d{2}[Tt ]\d{2}:\d{2}(:\d{2}(\.\d+)?)?$/;
2930
+ function parseCfnTimestamp(value) {
2931
+ return new Date(OFFSETLESS_DATE_TIME.test(value) ? `${value}Z` : value);
2932
+ }
2933
+
2927
2934
  //#endregion
2928
2935
  //#region src/provisioning/providers/s3-bucket-provider.ts
2929
2936
  function manualBucketDeletionClause(bucketName, maskSecrets, journaled) {
@@ -3136,11 +3143,14 @@ function deepSameValue(a, b) {
3136
3143
  }
3137
3144
  return false;
3138
3145
  }
3139
- const TIMEZONE_INDEPENDENT_DATE = /^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}(:\d{2}(\.\d+)?)?(Z|[+-]\d{2}:\d{2}))?$/;
3146
+ const TIMEZONE_INDEPENDENT_DATE = /^\d{4}-\d{2}-\d{2}([Tt ]\d{2}:\d{2}(:\d{2}(\.\d+)?)?(Z|[+-]\d{2}:\d{2})?)?$/;
3140
3147
  function cfnDateToIso(value) {
3141
- if (typeof value === "string" && !TIMEZONE_INDEPENDENT_DATE.test(value)) return void 0;
3142
- if (typeof value !== "string" && typeof value !== "number") return void 0;
3143
- const parsed = new Date(value);
3148
+ let parsed;
3149
+ if (typeof value === "string") {
3150
+ if (!TIMEZONE_INDEPENDENT_DATE.test(value)) return void 0;
3151
+ parsed = parseCfnTimestamp(value);
3152
+ } else if (typeof value === "number") parsed = new Date(value);
3153
+ else return;
3144
3154
  return Number.isNaN(parsed.getTime()) ? void 0 : parsed.toISOString();
3145
3155
  }
3146
3156
  const LEGACY_SINGULAR_TRANSITIONS = [["Transitions", "Transition"], ["NoncurrentVersionTransitions", "NoncurrentVersionTransition"]];
@@ -3669,12 +3679,12 @@ var S3BucketProvider = class S3BucketProvider {
3669
3679
  };
3670
3680
  const expiration = rule["ExpirationInDays"] || rule["ExpirationDate"] || rule["Expiration"];
3671
3681
  if (typeof expiration === "number") sdkRule.Expiration = { Days: expiration };
3672
- else if (typeof expiration === "string") sdkRule.Expiration = { Date: new Date(expiration) };
3682
+ else if (typeof expiration === "string") sdkRule.Expiration = { Date: parseCfnTimestamp(expiration) };
3673
3683
  else if (expiration && typeof expiration === "object") {
3674
3684
  const exp = expiration;
3675
3685
  sdkRule.Expiration = {
3676
3686
  Days: exp["Days"],
3677
- Date: exp["Date"] ? new Date(exp["Date"]) : void 0,
3687
+ Date: exp["Date"] ? parseCfnTimestamp(exp["Date"]) : void 0,
3678
3688
  ExpiredObjectDeleteMarker: exp["ExpiredObjectDeleteMarker"]
3679
3689
  };
3680
3690
  }
@@ -3701,7 +3711,7 @@ var S3BucketProvider = class S3BucketProvider {
3701
3711
  if (allNvts.length > 0) sdkRule.NoncurrentVersionTransitions = allNvts.map(toSdkNvt);
3702
3712
  const toSdkTransition = (t) => ({
3703
3713
  Days: t["TransitionInDays"] ?? t["Days"],
3704
- Date: t["TransitionDate"] ?? t["Date"] ? new Date(t["TransitionDate"] ?? t["Date"]) : void 0,
3714
+ Date: t["TransitionDate"] ?? t["Date"] ? parseCfnTimestamp(t["TransitionDate"] ?? t["Date"]) : void 0,
3705
3715
  StorageClass: t["StorageClass"]
3706
3716
  });
3707
3717
  const transitions = rule["Transitions"];
@@ -9402,7 +9412,7 @@ var LambdaEventSourceMappingProvider = class {
9402
9412
  if (properties["Topics"]) params.Topics = properties["Topics"];
9403
9413
  if (properties["StartingPositionTimestamp"] !== void 0) {
9404
9414
  const raw = properties["StartingPositionTimestamp"];
9405
- params.StartingPositionTimestamp = typeof raw === "number" ? /* @__PURE__ */ new Date(raw * 1e3) : raw instanceof Date ? raw : new Date(raw);
9415
+ params.StartingPositionTimestamp = typeof raw === "number" ? /* @__PURE__ */ new Date(raw * 1e3) : raw instanceof Date ? raw : parseCfnTimestamp(raw);
9406
9416
  }
9407
9417
  const orphanWindow = createEventSourceMappingLatch.take(logicalId);
9408
9418
  if (orphanWindow !== void 0) await this.reportPossibleMappingOrphans(logicalId, orphanWindow, log, functionName, params.EventSourceArn);
@@ -14550,7 +14560,7 @@ function buildDeleteParams(properties) {
14550
14560
  function toDate(value, mask) {
14551
14561
  if (value === void 0) return void 0;
14552
14562
  if (value instanceof Date) return value;
14553
- const parsed = typeof value === "string" || typeof value === "number" ? new Date(value) : /* @__PURE__ */ new Date(NaN);
14563
+ const parsed = typeof value === "string" ? parseCfnTimestamp(value) : typeof value === "number" ? new Date(value) : /* @__PURE__ */ new Date(NaN);
14554
14564
  if (Number.isNaN(parsed.getTime())) throw new Error(`Configuration.ExcludedTimeRanges contains an unparsable time value: ${JSON.stringify(maskDeep(value, mask))}`);
14555
14565
  return parsed;
14556
14566
  }
@@ -20182,10 +20192,11 @@ var ApiGatewayProvider = class ApiGatewayProvider {
20182
20192
  }
20183
20193
  createClient;
20184
20194
  getCreateClient() {
20185
- this.createClient ??= this.apiGatewayClient.config.region().then((region) => withoutServerErrorRetries(new APIGatewayClient({
20195
+ this.createClient ??= this.apiGatewayClient.config.region().then((region) => withoutServerErrorRetries(withApiGatewayPacing(new APIGatewayClient({
20186
20196
  ...ambientClientDefaults(),
20187
- region
20188
- })), (error) => {
20197
+ region,
20198
+ maxAttempts: 8
20199
+ }))), (error) => {
20189
20200
  this.createClient = void 0;
20190
20201
  throw error;
20191
20202
  });
@@ -20948,7 +20959,7 @@ var ApiGatewayProvider = class ApiGatewayProvider {
20948
20959
  const methodPath = maskedIds.join("/");
20949
20960
  let methodLeftBehind = false;
20950
20961
  try {
20951
- await this.apiGatewayClient.send(new PutMethodCommand({
20962
+ const putMethod = () => this.apiGatewayClient.send(new PutMethodCommand({
20952
20963
  restApiId,
20953
20964
  resourceId,
20954
20965
  httpMethod,
@@ -20961,6 +20972,22 @@ var ApiGatewayProvider = class ApiGatewayProvider {
20961
20972
  requestValidatorId,
20962
20973
  authorizationScopes
20963
20974
  }));
20975
+ try {
20976
+ await putMethod();
20977
+ } catch (putError) {
20978
+ if (!isMethodAlreadyExists(putError) || !await this.priorAttemptLeftMethod(logicalId, physicalId, log)) throw putError;
20979
+ log.warn(`Replacing API Gateway Method ${logicalId} (${methodPath}), which an earlier failed attempt of it left behind`);
20980
+ try {
20981
+ await this.apiGatewayClient.send(new DeleteMethodCommand({
20982
+ restApiId,
20983
+ resourceId,
20984
+ httpMethod
20985
+ }));
20986
+ } catch (deleteError) {
20987
+ if (!(deleteError instanceof NotFoundException$1)) throw deleteError;
20988
+ }
20989
+ await putMethod();
20990
+ }
20964
20991
  try {
20965
20992
  const integration = properties["Integration"];
20966
20993
  if (integration) await this.apiGatewayClient.send(new PutIntegrationCommand(putIntegrationInput({
@@ -20992,6 +21019,7 @@ var ApiGatewayProvider = class ApiGatewayProvider {
20992
21019
  log.debug(`Cleaned up partially-created API Gateway Method ${logicalId} (${methodPath}) after wiring failure`);
20993
21020
  } catch (cleanupError) {
20994
21021
  methodLeftBehind = true;
21022
+ getPriorAttempts(logicalId)?.notePossiblyLanded();
20995
21023
  const cleanupFailure = describeAwsFailure(cleanupError);
20996
21024
  const cleanupHead = `Failed to clean up partially-created API Gateway Method ${logicalId} (${methodPath}): `;
20997
21025
  if (cleanupFailure.redacted) log.debug(`${cleanupHead}${cleanupFailure.detail}`);
@@ -21011,6 +21039,18 @@ var ApiGatewayProvider = class ApiGatewayProvider {
21011
21039
  throw thrown;
21012
21040
  }
21013
21041
  }
21042
+ async priorAttemptLeftMethod(logicalId, physicalId, log) {
21043
+ const lookup = getPriorAttempts(logicalId);
21044
+ if (lookup === void 0) return false;
21045
+ if (lookup.possiblyLanded()) return true;
21046
+ if (lookup.provenOrphanIds === void 0) return false;
21047
+ try {
21048
+ return (await lookup.provenOrphanIds()).includes(physicalId);
21049
+ } catch (error) {
21050
+ log.debug(`API Gateway Method ${logicalId}: rollback journal read failed: ${describeAwsFailure(error).detail}`);
21051
+ return false;
21052
+ }
21053
+ }
21014
21054
  async updateMethod(logicalId, physicalId, resourceType, properties, previousProperties, log) {
21015
21055
  const parts = physicalId.split("|");
21016
21056
  const maskedId = parts.map((p) => log.value(p)).join("|");
@@ -21321,6 +21361,9 @@ var ApiGatewayProvider = class ApiGatewayProvider {
21321
21361
  return null;
21322
21362
  }
21323
21363
  };
21364
+ function isMethodAlreadyExists(error) {
21365
+ return error instanceof Error && error.name === "ConflictException" && /already exists/i.test(error.message);
21366
+ }
21324
21367
  function isPlainObjectBlock(value) {
21325
21368
  return typeof value === "object" && value !== null && !Array.isArray(value);
21326
21369
  }
@@ -24613,6 +24656,70 @@ var StepFunctionsProvider = class {
24613
24656
  throw error instanceof Error && error.name.includes("NotFound") ? markNotGone(thrown) : thrown;
24614
24657
  }
24615
24658
  }
24659
+ canonicalizeDriftProperties(_resourceType, properties) {
24660
+ if (properties["DefinitionString"] === void 0 && properties["DefinitionSubstitutions"] === void 0) return properties;
24661
+ const substitutions = properties["DefinitionSubstitutions"];
24662
+ const maskedNames = substitutions !== null && typeof substitutions === "object" && !Array.isArray(substitutions) ? Object.keys(substitutions).filter((name) => substitutions[name] === "***") : [];
24663
+ const body = inlineDefinitionBody(properties, maskedNames.length === 0 ? void 0 : {
24664
+ ...substitutions,
24665
+ ...Object.fromEntries(maskedNames.map((name) => [name, MASKED_SUBSTITUTION_SENTINEL]))
24666
+ });
24667
+ if (body === void 0) return properties;
24668
+ let definition;
24669
+ try {
24670
+ definition = JSON.parse(body);
24671
+ } catch {
24672
+ definition = body;
24673
+ }
24674
+ if (maskedNames.length > 0) definition = maskSentinelLeaves(definition);
24675
+ const folded = {
24676
+ ...properties,
24677
+ Definition: definition
24678
+ };
24679
+ delete folded["DefinitionString"];
24680
+ delete folded["DefinitionSubstitutions"];
24681
+ return folded;
24682
+ }
24683
+ async canonicalizeDriftPair(resourceType, baseline, aws) {
24684
+ return {
24685
+ baseline: this.canonicalizeDriftProperties(resourceType, baseline),
24686
+ aws
24687
+ };
24688
+ }
24689
+ getDriftSecretPathAliases(_resourceType, properties, secretPaths) {
24690
+ const substitutions = properties["DefinitionSubstitutions"];
24691
+ if (substitutions === null || typeof substitutions !== "object" || Array.isArray(substitutions)) return [];
24692
+ const secretNames = Object.keys(substitutions).filter((name) => secretPaths.has("DefinitionSubstitutions") || [...secretPaths].some((p) => p === `DefinitionSubstitutions.${name}` || p.startsWith(`DefinitionSubstitutions.${name}.`)));
24693
+ if (secretNames.length === 0) return [];
24694
+ const definitionString = properties["DefinitionString"];
24695
+ const raw = definitionString !== void 0 ? definitionString : properties["Definition"];
24696
+ let body = raw;
24697
+ if (typeof raw === "string") try {
24698
+ body = JSON.parse(raw);
24699
+ } catch {
24700
+ return ["Definition"];
24701
+ }
24702
+ if (body === void 0 || body === null || typeof body !== "object") return ["Definition"];
24703
+ const tokens = secretNames.map((name) => `\${${name}}`);
24704
+ const carries = (text) => tokens.some((t) => text.includes(t));
24705
+ const aliases = [];
24706
+ const walk = (value, path, arrayPath) => {
24707
+ if (typeof value === "string") {
24708
+ if (carries(value)) aliases.push(arrayPath ?? path);
24709
+ return;
24710
+ }
24711
+ if (Array.isArray(value)) {
24712
+ value.forEach((item, i) => walk(item, `${path}.${i}`, arrayPath ?? path));
24713
+ return;
24714
+ }
24715
+ if (value !== null && typeof value === "object") for (const [key, child] of Object.entries(value)) {
24716
+ if (carries(key)) aliases.push(arrayPath ?? path);
24717
+ walk(child, `${path}.${key}`, arrayPath);
24718
+ }
24719
+ };
24720
+ walk(body, "Definition", void 0);
24721
+ return [...new Set(aliases)];
24722
+ }
24616
24723
  async readCurrentState(physicalId, _logicalId, _resourceType) {
24617
24724
  let resp;
24618
24725
  try {
@@ -24708,21 +24815,11 @@ var StepFunctionsProvider = class {
24708
24815
  }
24709
24816
  }
24710
24817
  async buildDefinitionString(properties) {
24711
- const definitionString = properties["DefinitionString"];
24712
- const definition = properties["Definition"];
24713
- if (definitionString !== void 0) {
24714
- if (typeof definitionString === "string") return definitionString;
24715
- return JSON.stringify(definitionString);
24716
- }
24717
- if (definition !== void 0) {
24718
- if (typeof definition === "string") return definition;
24719
- return JSON.stringify(definition);
24720
- }
24818
+ const inline = inlineDefinitionBody(properties);
24819
+ if (inline !== void 0) return inline;
24820
+ const substitutions = properties["DefinitionSubstitutions"];
24721
24821
  const s3Location = properties["DefinitionS3Location"];
24722
- if (s3Location?.Bucket && s3Location.Key) {
24723
- const body = await this.fetchDefinitionFromS3(s3Location.Bucket, s3Location.Key, s3Location.Version);
24724
- return this.applyDefinitionSubstitutions(body, properties["DefinitionSubstitutions"]);
24725
- }
24822
+ if (s3Location?.Bucket && s3Location.Key) return applyDefinitionSubstitutions(await this.fetchDefinitionFromS3(s3Location.Bucket, s3Location.Key, s3Location.Version), substitutions);
24726
24823
  return "{}";
24727
24824
  }
24728
24825
  async fetchDefinitionFromS3(bucket, key, version) {
@@ -24737,16 +24834,36 @@ var StepFunctionsProvider = class {
24737
24834
  if (body.length === 0) throw new Error(`DefinitionS3Location object s3://${bucket}/${key} returned an empty body`);
24738
24835
  return body;
24739
24836
  }
24740
- applyDefinitionSubstitutions(body, substitutions) {
24741
- if (substitutions === null || typeof substitutions !== "object" || Array.isArray(substitutions)) return body;
24742
- let result = body;
24743
- for (const [name, value] of Object.entries(substitutions)) {
24744
- if (typeof value !== "string" && typeof value !== "number" && typeof value !== "boolean") continue;
24745
- result = result.split(`\${${name}}`).join(String(value));
24746
- }
24747
- return result;
24748
- }
24749
24837
  };
24838
+ function applyDefinitionSubstitutions(body, substitutions) {
24839
+ if (substitutions === null || typeof substitutions !== "object" || Array.isArray(substitutions)) return body;
24840
+ const map = substitutions;
24841
+ return body.replace(/\$\{([^{}]+)\}/g, (token, name) => {
24842
+ if (!Object.hasOwn(map, name)) return token;
24843
+ const value = map[name];
24844
+ if (typeof value !== "string" && typeof value !== "number" && typeof value !== "boolean") return token;
24845
+ return String(value);
24846
+ });
24847
+ }
24848
+ function inlineDefinitionBody(properties, substitutionsOverride) {
24849
+ const substitutions = substitutionsOverride ?? properties["DefinitionSubstitutions"];
24850
+ const definitionString = properties["DefinitionString"];
24851
+ const definition = properties["Definition"];
24852
+ const value = definitionString !== void 0 ? definitionString : definition;
24853
+ if (value === void 0) return void 0;
24854
+ return applyDefinitionSubstitutions(typeof value === "string" ? value : JSON.stringify(value), substitutions);
24855
+ }
24856
+ const MASKED_SUBSTITUTION_SENTINEL = "cdkd-masked-substitution";
24857
+ function maskSentinelLeaves(value) {
24858
+ if (typeof value === "string") return value.includes(MASKED_SUBSTITUTION_SENTINEL) ? "***" : value;
24859
+ if (Array.isArray(value)) return value.map((item) => maskSentinelLeaves(item));
24860
+ if (value !== null && typeof value === "object") {
24861
+ const entries = Object.entries(value);
24862
+ if (entries.some(([key]) => key.includes(MASKED_SUBSTITUTION_SENTINEL))) return "***";
24863
+ return Object.fromEntries(entries.map(([key, child]) => [key, maskSentinelLeaves(child)]));
24864
+ }
24865
+ return value;
24866
+ }
24750
24867
  function mapEncryptionConfiguration(value) {
24751
24868
  if (value === null || value === void 0) return void 0;
24752
24869
  if (typeof value !== "object") return void 0;
@@ -36580,7 +36697,7 @@ async function fetchGlueTags(client, stsClient, resource, name, accountId, logge
36580
36697
  const resp = await client.send(new GetTagsCommand({ ResourceArn: arn }));
36581
36698
  return normalizeAwsTagsToCfn(resp.Tags);
36582
36699
  } catch (err) {
36583
- logger.debug(`GetTags failed for ${resource}/${name}: ${describeAwsFailure(err).detail}`);
36700
+ logger.debug(`GetTags failed for a Glue ${resource}: ${describeAwsFailure(err).summary}`);
36584
36701
  return [];
36585
36702
  }
36586
36703
  }
@@ -37190,13 +37307,28 @@ function toCfnCrawlerTargets(targets) {
37190
37307
  var GlueConnectionProvider = class {
37191
37308
  client;
37192
37309
  createClient;
37310
+ stsClient;
37193
37311
  providerRegion = ambientRegion();
37194
37312
  callerAccountId = makeCallerAccountResolver(this.providerRegion);
37195
37313
  logger = getLogger().child("GlueConnectionProvider");
37196
37314
  wrapMaskedError(mask, error, build) {
37197
37315
  return wrapGlueError(mask, (message) => this.logger.debug(message), error, build);
37198
37316
  }
37199
- handledProperties = /* @__PURE__ */ new Map([["AWS::Glue::Connection", /* @__PURE__ */ new Set(["ConnectionInput", "CatalogId"])]]);
37317
+ handledProperties = /* @__PURE__ */ new Map([["AWS::Glue::Connection", /* @__PURE__ */ new Set([
37318
+ "ConnectionInput",
37319
+ "CatalogId",
37320
+ "Tags"
37321
+ ])]]);
37322
+ getStsClient() {
37323
+ if (!this.stsClient) this.stsClient = new STSClient({
37324
+ ...ambientClientDefaults(),
37325
+ ...this.providerRegion ? { region: this.providerRegion } : {}
37326
+ });
37327
+ return this.stsClient;
37328
+ }
37329
+ resourceArn(name, catalogIdValue) {
37330
+ return buildGlueResourceArn(this.getClient(), this.getStsClient(), "connection", name, catalogIdForApi(catalogIdValue));
37331
+ }
37200
37332
  getClient() {
37201
37333
  if (!this.client) ({client: this.client, createClient: this.createClient} = newGlueClients(this.providerRegion));
37202
37334
  return this.client;
@@ -37211,12 +37343,14 @@ var GlueConnectionProvider = class {
37211
37343
  log.debug(`Creating Glue Connection ${logicalId}`);
37212
37344
  const connectionInput = properties["ConnectionInput"];
37213
37345
  if (!connectionInput) throw new ProvisioningError(`ConnectionInput is required for Glue Connection ${logicalId}`, resourceType, logicalId);
37346
+ const tags = desiredGlueTags(properties["Tags"], resourceType, logicalId);
37214
37347
  const name = connectionInput["Name"] ?? generatedNameFor("AWS::Glue::Connection", logicalId);
37215
37348
  const catalogId = properties["CatalogId"];
37216
37349
  try {
37217
37350
  await this.getCreateClient().send(new CreateConnectionCommand({
37218
37351
  ...catalogId && { CatalogId: catalogId },
37219
- ConnectionInput: buildConnectionInput(connectionInput, name)
37352
+ ConnectionInput: buildConnectionInput(connectionInput, name),
37353
+ ...tags && { Tags: tags }
37220
37354
  }));
37221
37355
  log.debug(`Successfully created Glue Connection ${logicalId}: ${v(name)}`);
37222
37356
  return {
@@ -37259,6 +37393,7 @@ var GlueConnectionProvider = class {
37259
37393
  debug: log.debug,
37260
37394
  mask: log.mask
37261
37395
  });
37396
+ desiredGlueTags(properties["Tags"], resourceType, logicalId, physicalId);
37262
37397
  const catalogId = updateCatalogId(properties["CatalogId"]);
37263
37398
  try {
37264
37399
  await this.getClient().send(new UpdateConnectionCommand({
@@ -37266,6 +37401,7 @@ var GlueConnectionProvider = class {
37266
37401
  Name: physicalId,
37267
37402
  ConnectionInput: buildConnectionInput(connectionInput, physicalId)
37268
37403
  }));
37404
+ await applyGlueTagDiff(this.getClient(), () => this.resourceArn(physicalId, properties["CatalogId"]), previousProperties?.["Tags"], properties["Tags"], resourceType, logicalId, log.warn);
37269
37405
  return {
37270
37406
  physicalId,
37271
37407
  wasReplaced: false
@@ -37316,7 +37452,7 @@ var GlueConnectionProvider = class {
37316
37452
  throw err;
37317
37453
  }
37318
37454
  if (!conn) return void 0;
37319
- return withRecordedCatalogId({ ConnectionInput: {
37455
+ const ci = {
37320
37456
  Name: conn.Name ?? physicalId,
37321
37457
  ConnectionType: conn.ConnectionType ?? "",
37322
37458
  Description: conn.Description ?? "",
@@ -37326,7 +37462,12 @@ var GlueConnectionProvider = class {
37326
37462
  AthenaProperties: conn.AthenaProperties ?? {},
37327
37463
  PythonProperties: conn.PythonProperties ?? {},
37328
37464
  PhysicalConnectionRequirements: conn.PhysicalConnectionRequirements ? pickDefined(conn.PhysicalConnectionRequirements) : {}
37329
- } }, properties);
37465
+ };
37466
+ const name = conn.Name ?? physicalId;
37467
+ return withRecordedCatalogId({
37468
+ ConnectionInput: ci,
37469
+ Tags: await fetchGlueTags(this.getClient(), this.getStsClient(), "connection", name, catalogId, this.logger)
37470
+ }, properties);
37330
37471
  }
37331
37472
  async import(input) {
37332
37473
  const explicitName = input.knownPhysicalId ?? input.properties["ConnectionInput"]?.["Name"];
@@ -37673,9 +37814,9 @@ var KMSProvider = class {
37673
37814
  const keySpec = properties["KeySpec"];
37674
37815
  const keyUsage = properties["KeyUsage"];
37675
37816
  const enableKeyRotation = templateBool(properties["EnableKeyRotation"]);
37676
- const multiRegion = properties["MultiRegion"];
37817
+ const multiRegion = templateBool(properties["MultiRegion"]);
37677
37818
  const origin = properties["Origin"];
37678
- const bypassPolicyLockoutSafetyCheck = properties["BypassPolicyLockoutSafetyCheck"];
37819
+ const bypassPolicyLockoutSafetyCheck = templateBool(properties["BypassPolicyLockoutSafetyCheck"]);
37679
37820
  const input = {
37680
37821
  Description: description,
37681
37822
  KeySpec: keySpec,
@@ -37882,6 +38023,8 @@ var KMSProvider = class {
37882
38023
  const mask = context?.maskSecrets;
37883
38024
  properties = withRemovalDefaults(this.removalDefaults, resourceType, properties, previousProperties, context);
37884
38025
  refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId, physicalId);
38026
+ const immutableChanged = changedImmutableKeyProperties(properties, previousProperties);
38027
+ if (immutableChanged.length > 0 && !await this.liveKeyMatches(physicalId, properties, immutableChanged, logicalId)) throw new ResourceUpdateNotSupportedError(resourceType, logicalId, immutableKeySuggestion(immutableChanged));
37885
38028
  const newEnabled = templateBool(properties["Enabled"]);
37886
38029
  const enabledChange = newEnabled === templateBool(previousProperties["Enabled"]) ? void 0 : newEnabled === false ? "disable" : "enable";
37887
38030
  try {
@@ -37927,7 +38070,8 @@ var KMSProvider = class {
37927
38070
  await this.getClient().send(new PutKeyPolicyCommand({
37928
38071
  KeyId: physicalId,
37929
38072
  PolicyName: "default",
37930
- Policy: newPolicyStr
38073
+ Policy: newPolicyStr,
38074
+ ...templateBool(properties["BypassPolicyLockoutSafetyCheck"]) === true && { BypassPolicyLockoutSafetyCheck: true }
37931
38075
  }));
37932
38076
  } else if (policyRemoved && newKeyPolicy === void 0) {
37933
38077
  this.logger.debug(safeMsg`Resetting key policy for KMS Key ${logicalId} to the default`);
@@ -37948,6 +38092,20 @@ var KMSProvider = class {
37948
38092
  throw this.wrapCaughtError(mask, error, (text) => new ProvisioningError(`Failed to update KMS Key ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
37949
38093
  }
37950
38094
  }
38095
+ async liveKeyMatches(physicalId, properties, changed, logicalId) {
38096
+ let md;
38097
+ try {
38098
+ md = (await this.getClient().send(new DescribeKeyCommand({ KeyId: physicalId }))).KeyMetadata;
38099
+ } catch {
38100
+ return false;
38101
+ }
38102
+ if (!md) return false;
38103
+ const live = immutableKeyShape(md);
38104
+ const desired = immutableKeyShape(properties);
38105
+ const matches = changed.every((name) => isDeepStrictEqual(desired[name], live[name]));
38106
+ if (matches) this.logger.debug(safeMsg`KMS Key ${logicalId}: the live key already holds the desired ${changed.join(", ")}; the record differed`);
38107
+ return matches;
38108
+ }
37951
38109
  async sendRotation(send, justEnabled, resourceType, logicalId, physicalId) {
37952
38110
  try {
37953
38111
  await send();
@@ -38178,6 +38336,23 @@ var KMSProvider = class {
38178
38336
  return null;
38179
38337
  }
38180
38338
  };
38339
+ function immutableKeyShape(properties) {
38340
+ return {
38341
+ KeySpec: properties["KeySpec"] ?? "SYMMETRIC_DEFAULT",
38342
+ KeyUsage: properties["KeyUsage"] ?? "ENCRYPT_DECRYPT",
38343
+ MultiRegion: templateBool(properties["MultiRegion"]) === true,
38344
+ Origin: properties["Origin"] ?? "AWS_KMS"
38345
+ };
38346
+ }
38347
+ function changedImmutableKeyProperties(properties, previousProperties) {
38348
+ const desired = immutableKeyShape(properties);
38349
+ const previous = immutableKeyShape(previousProperties);
38350
+ return Object.keys(desired).filter((name) => !isDeepStrictEqual(desired[name], previous[name]));
38351
+ }
38352
+ function immutableKeySuggestion(changed) {
38353
+ const one = changed.length === 1;
38354
+ return `${changed.join(", ")} changed, and KMS fixes ${one ? "it" : "them"} when the key is created (CloudFormation fails this update too). To keep the key, restore the previous ${one ? "value" : "values"}. To replace it, re-deploy with --replace, plus --force-stateful-recreation unless the key's UpdateReplacePolicy is Retain; without Retain the old key is scheduled for deletion, and data encrypted under it cannot be decrypted once that deletion completes`;
38355
+ }
38181
38356
  function templateBool(value) {
38182
38357
  if (value === void 0 || value === null) return void 0;
38183
38358
  if (typeof value === "string") return value.toLowerCase() === "true";
@@ -38248,7 +38423,7 @@ function isoDate(value) {
38248
38423
  else if (typeof value === "string" && /^\d+$/.test(value)) {
38249
38424
  const n = Number(value);
38250
38425
  date = new Date(n < 0xe8d4a51000 ? n * 1e3 : n);
38251
- } else if (typeof value === "string") date = new Date(value);
38426
+ } else if (typeof value === "string") date = parseCfnTimestamp(value);
38252
38427
  else if (value instanceof Date) date = value;
38253
38428
  else return void 0;
38254
38429
  return Number.isNaN(date.getTime()) ? void 0 : date.toISOString();
@@ -38418,7 +38593,7 @@ var BudgetsBudgetProvider = class {
38418
38593
  else if (typeof raw === "string" && /^\d+$/.test(raw)) {
38419
38594
  const num = Number(raw);
38420
38595
  date = new Date(num < 0xe8d4a51000 ? num * 1e3 : num);
38421
- } else if (typeof raw === "string") date = new Date(raw);
38596
+ } else if (typeof raw === "string") date = parseCfnTimestamp(raw);
38422
38597
  else throw new ProvisioningError(`Invalid TimePeriod.${field} for budget ${logicalId}: expected a date string or epoch timestamp, got ${JSON.stringify(maskDeep(raw, mask))}`, resourceType, logicalId);
38423
38598
  if (Number.isNaN(date.getTime())) throw new ProvisioningError(`Invalid TimePeriod.${field} for budget ${logicalId}: ${JSON.stringify(maskDeep(raw, mask))} is not a parseable date`, resourceType, logicalId);
38424
38599
  return date;
@@ -39067,6 +39242,18 @@ function comparableRecordSize(value, mask) {
39067
39242
  const read = readMaxRecordSize(value, mask);
39068
39243
  return read.kind === "usable" ? read.size : void 0;
39069
39244
  }
39245
+ const DEFAULT_RECORD_DISTRIBUTION_STRATEGY = "USER_PARTITION_KEY";
39246
+ function readDistributionStrategy(value, mask) {
39247
+ if (value == null) return { kind: "absent" };
39248
+ if (typeof value === "string" && value.trim() !== "") return {
39249
+ kind: "usable",
39250
+ strategy: value
39251
+ };
39252
+ return {
39253
+ kind: "unusable",
39254
+ reason: `AWS::Kinesis::Stream RecordDistributionStrategy must be a non-empty string, got ${JSON.stringify(maskDeep(value, mask))}`
39255
+ };
39256
+ }
39070
39257
  const KINESIS_DELETE_POLL_INTERVAL_MS = 2e3;
39071
39258
  const KINESIS_DELETE_MAX_WAIT_MS = 3e5;
39072
39259
  function isStreamName(id) {
@@ -39085,8 +39272,10 @@ var KinesisStreamProvider = class {
39085
39272
  "RetentionPeriodHours",
39086
39273
  "StreamEncryption",
39087
39274
  "DesiredShardLevelMetrics",
39088
- "MaxRecordSizeInKiB"
39275
+ "MaxRecordSizeInKiB",
39276
+ "RecordDistributionStrategy"
39089
39277
  ])]]);
39278
+ unhandledByDesign = /* @__PURE__ */ new Map([["AWS::Kinesis::Stream", /* @__PURE__ */ new Map([["WarmThroughputMiBps", "AWS accepts it only on an account enrolled in the Kinesis minimum throughput billing commitment, so the SDK path is not wired (go-to-k/cdkd#1695); Cloud Control forwards it."]])]]);
39090
39279
  getClient() {
39091
39280
  if (!this.client) this.client = new KinesisClient({
39092
39281
  ...ambientClientDefaults(),
@@ -39124,6 +39313,11 @@ var KinesisStreamProvider = class {
39124
39313
  }
39125
39314
  const encryptionRead = readEncryptionKeyId(properties["StreamEncryption"], mask);
39126
39315
  if (encryptionRead.kind === "unusable") throw new ProvisioningError(encryptionRead.reason, resourceType, logicalId, streamName);
39316
+ const strategyRead = readDistributionStrategy(properties["RecordDistributionStrategy"], mask);
39317
+ if (strategyRead.kind === "unusable") {
39318
+ if (context?.replayingState !== true) throw new ProvisioningError(strategyRead.reason, resourceType, logicalId, streamName);
39319
+ warn(`${strategyRead.reason}. Replaying a state record, so ${streamName} is created with AWS's default record distribution strategy rather than refusing the restore`);
39320
+ }
39127
39321
  let streamCreated = false;
39128
39322
  try {
39129
39323
  const streamModeDetails = properties["StreamModeDetails"];
@@ -39137,6 +39331,7 @@ var KinesisStreamProvider = class {
39137
39331
  ...shardCount !== void 0 && { ShardCount: shardCount },
39138
39332
  StreamModeDetails: { StreamMode: streamMode },
39139
39333
  ...maxRecordSizeInKiB !== void 0 && { MaxRecordSizeInKiB: maxRecordSizeInKiB },
39334
+ ...strategyRead.kind === "usable" && { RecordDistributionStrategy: strategyRead.strategy },
39140
39335
  ...Object.keys(tags).length > 0 && { Tags: tags }
39141
39336
  }));
39142
39337
  streamCreated = true;
@@ -39276,6 +39471,7 @@ var KinesisStreamProvider = class {
39276
39471
  }));
39277
39472
  await this.waitForStreamActive(physicalId);
39278
39473
  }
39474
+ await this.reconcileDistributionStrategy(physicalId, streamMode, properties, previousProperties, mask, warn);
39279
39475
  const desiredRead = readShardLevelMetrics(properties["DesiredShardLevelMetrics"], mask);
39280
39476
  let desiredMetrics;
39281
39477
  if (desiredRead.kind === "unusable") warn(`${desiredRead.reason}. Leaving the shard-level metrics on ${physicalId} unchanged rather than disabling the live ones; the same value is REFUSED on a template-path create`);
@@ -39396,6 +39592,30 @@ var KinesisStreamProvider = class {
39396
39592
  throw error;
39397
39593
  }
39398
39594
  }
39595
+ async reconcileDistributionStrategy(physicalId, streamMode, properties, previousProperties, mask, warn) {
39596
+ const desired = readDistributionStrategy(properties["RecordDistributionStrategy"], mask);
39597
+ if (desired.kind === "unusable") {
39598
+ warn(`${desired.reason}. Leaving the record distribution strategy on ${physicalId} unchanged; the same value is REFUSED on a template-path create`);
39599
+ return;
39600
+ }
39601
+ const previous = readDistributionStrategy(previousProperties["RecordDistributionStrategy"], mask);
39602
+ const recorded = previous.kind === "usable" ? previous.strategy : void 0;
39603
+ let target;
39604
+ if (desired.kind === "usable") {
39605
+ if (desired.strategy === recorded) return;
39606
+ target = desired.strategy;
39607
+ } else {
39608
+ if (recorded === void 0 || recorded === DEFAULT_RECORD_DISTRIBUTION_STRATEGY) return;
39609
+ if (streamMode !== "ON_DEMAND") return;
39610
+ target = DEFAULT_RECORD_DISTRIBUTION_STRATEGY;
39611
+ }
39612
+ this.logger.debug(mask(safeMsg`Updating record distribution strategy for ${physicalId}: from ${recorded ?? "no value"} to ${target}`));
39613
+ await this.getClient().send(new UpdateStreamRecordDistributionStrategyCommand({
39614
+ StreamARN: await this.resolveStreamArn(physicalId),
39615
+ RecordDistributionStrategy: target
39616
+ }));
39617
+ await this.waitForStreamActive(physicalId);
39618
+ }
39399
39619
  effectiveMetricsProperties(properties, expanded) {
39400
39620
  if (expanded === void 0) return {};
39401
39621
  if (expanded === properties["DesiredShardLevelMetrics"]) return {};
@@ -39462,8 +39682,11 @@ var KinesisStreamProvider = class {
39462
39682
  }
39463
39683
  result["DesiredShardLevelMetrics"] = (stream.EnhancedMonitoring ?? []).flatMap((entry) => entry.ShardLevelMetrics ?? []);
39464
39684
  try {
39465
- const maxRecordSize = (await this.getClient().send(new DescribeStreamSummaryCommand({ StreamName: physicalId }))).StreamDescriptionSummary?.MaxRecordSizeInKiB;
39685
+ const summaryResp = await this.getClient().send(new DescribeStreamSummaryCommand({ StreamName: physicalId }));
39686
+ const maxRecordSize = summaryResp.StreamDescriptionSummary?.MaxRecordSizeInKiB;
39466
39687
  if (maxRecordSize !== void 0) result["MaxRecordSizeInKiB"] = maxRecordSize;
39688
+ const strategy = summaryResp.StreamDescriptionSummary?.RecordDistributionStrategy;
39689
+ if (strategy !== void 0) result["RecordDistributionStrategy"] = strategy;
39467
39690
  } catch (err) {
39468
39691
  if (err instanceof ResourceNotFoundException$12) return RESOURCE_NOT_FOUND;
39469
39692
  throw err;
@@ -39809,8 +40032,8 @@ var SchedulerScheduleProvider = class {
39809
40032
  Target: this.toSdkTarget(properties["Target"]),
39810
40033
  ...properties["Description"] !== void 0 && { Description: properties["Description"] },
39811
40034
  ...properties["ScheduleExpressionTimezone"] !== void 0 && { ScheduleExpressionTimezone: properties["ScheduleExpressionTimezone"] },
39812
- ...properties["StartDate"] !== void 0 && { StartDate: new Date(properties["StartDate"]) },
39813
- ...properties["EndDate"] !== void 0 && { EndDate: new Date(properties["EndDate"]) },
40035
+ ...properties["StartDate"] !== void 0 && { StartDate: parseCfnTimestamp(properties["StartDate"]) },
40036
+ ...properties["EndDate"] !== void 0 && { EndDate: parseCfnTimestamp(properties["EndDate"]) },
39814
40037
  ...properties["State"] !== void 0 && { State: properties["State"] },
39815
40038
  ...properties["KmsKeyArn"] !== void 0 && { KmsKeyArn: properties["KmsKeyArn"] }
39816
40039
  };
@@ -40323,7 +40546,7 @@ function toSdkSourceParameters(value) {
40323
40546
  ...source,
40324
40547
  KinesisStreamParameters: {
40325
40548
  ...kinesis,
40326
- StartingPositionTimestamp: new Date(kinesis["StartingPositionTimestamp"])
40549
+ StartingPositionTimestamp: parseCfnTimestamp(kinesis["StartingPositionTimestamp"])
40327
40550
  }
40328
40551
  };
40329
40552
  }
@@ -45422,6 +45645,22 @@ var CloudTrailProvider = class {
45422
45645
 
45423
45646
  //#endregion
45424
45647
  //#region src/provisioning/providers/codebuild-provider.ts
45648
+ const DEFAULT_PROJECT_VISIBILITY = "PRIVATE";
45649
+ function readVisibility(properties, mask) {
45650
+ const visibility = properties["Visibility"];
45651
+ const role = properties["ResourceAccessRole"];
45652
+ const refuse = (key, value) => ({
45653
+ kind: "unusable",
45654
+ reason: `AWS::CodeBuild::Project ${key} must be a non-empty string, got ${JSON.stringify(maskDeep(value, mask))}`
45655
+ });
45656
+ if (visibility != null && (typeof visibility !== "string" || visibility.trim() === "")) return refuse("Visibility", visibility);
45657
+ if (role != null && (typeof role !== "string" || role !== "" && role.trim() === "")) return refuse("ResourceAccessRole", role);
45658
+ return {
45659
+ kind: "usable",
45660
+ visibility: visibility ?? DEFAULT_PROJECT_VISIBILITY,
45661
+ ...typeof role === "string" && role !== "" && { resourceAccessRole: role }
45662
+ };
45663
+ }
45425
45664
  var CodeBuildProvider = class {
45426
45665
  client;
45427
45666
  createClient;
@@ -45450,7 +45689,9 @@ var CodeBuildProvider = class {
45450
45689
  "BuildBatchConfig",
45451
45690
  "BadgeEnabled",
45452
45691
  "SourceVersion",
45453
- "AutoRetryLimit"
45692
+ "AutoRetryLimit",
45693
+ "Visibility",
45694
+ "ResourceAccessRole"
45454
45695
  ])]]);
45455
45696
  getClient() {
45456
45697
  if (!this.client) {
@@ -45641,29 +45882,59 @@ var CodeBuildProvider = class {
45641
45882
  }
45642
45883
  async create(logicalId, resourceType, properties, context) {
45643
45884
  this.logger.debug(`Creating CodeBuild Project ${logicalId}`);
45885
+ const mask = maskerOrIdentity(context?.maskSecrets);
45886
+ const visibilityRead = readVisibility(properties, mask);
45887
+ if (visibilityRead.kind === "unusable") {
45888
+ if (context?.replayingState !== true) throw new ProvisioningError(visibilityRead.reason, resourceType, logicalId);
45889
+ this.logger.warn(mask(`${visibilityRead.reason}. Replaying a state record, so CodeBuild Project ${logicalId} is left ${DEFAULT_PROJECT_VISIBILITY} with no resource access role rather than refusing the restore`));
45890
+ }
45891
+ let createdName;
45644
45892
  try {
45645
45893
  const input = this.mapProperties(() => generatedNameFor("AWS::CodeBuild::Project", logicalId), properties);
45646
45894
  const result = await this.getCreateClient().send(new CreateProjectCommand(input));
45647
45895
  const projectName = result.project.name;
45648
45896
  const projectArn = result.project.arn;
45897
+ createdName = projectName;
45898
+ if (visibilityRead.kind === "usable" && (visibilityRead.visibility !== DEFAULT_PROJECT_VISIBILITY || visibilityRead.resourceAccessRole !== void 0)) await this.applyVisibility(projectArn, visibilityRead);
45649
45899
  this.logger.debug(`Successfully created CodeBuild Project ${logicalId}: ${projectName}`);
45650
45900
  return {
45651
45901
  physicalId: projectName,
45652
45902
  attributes: { Arn: projectArn }
45653
45903
  };
45654
45904
  } catch (error) {
45905
+ if (createdName !== void 0) markAuxiliaryFailure(error, logicalId);
45655
45906
  const cause = error instanceof Error ? error : void 0;
45656
- throw this.wrapCaughtError(maskerOrIdentity(context?.maskSecrets), error, (text) => new ProvisioningError(`Failed to create CodeBuild Project ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
45907
+ const thrown = this.wrapCaughtError(mask, error, (text) => new ProvisioningError(`Failed to create CodeBuild Project ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
45908
+ if (createdName !== void 0) markCreatedBeforeFailure(thrown, logicalId, resourceType, createdName);
45909
+ throw thrown;
45657
45910
  }
45658
45911
  }
45912
+ async applyVisibility(projectArn, read) {
45913
+ await this.getClient().send(new UpdateProjectVisibilityCommand({
45914
+ projectArn,
45915
+ projectVisibility: read.visibility,
45916
+ ...read.resourceAccessRole !== void 0 && { resourceAccessRole: read.resourceAccessRole }
45917
+ }));
45918
+ }
45659
45919
  async update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
45660
45920
  this.logger.debug(`Updating CodeBuild Project ${logicalId}: ${physicalId}`);
45921
+ const mask = maskerOrIdentity(context?.maskSecrets);
45661
45922
  assertRegionMatch(context?.expectedRegion ? await this.getClient().config.region() : void 0, context?.expectedRegion, resourceType, logicalId, physicalId, "pre-update");
45662
45923
  try {
45663
45924
  const input = this.mapProperties(() => physicalId, properties);
45664
45925
  input.name = physicalId;
45665
45926
  if (properties["BuildBatchConfig"] == null && previousProperties["BuildBatchConfig"] != null) input.buildBatchConfig = {};
45666
- await this.getClient().send(new UpdateProjectCommand(input));
45927
+ const updated = await this.getClient().send(new UpdateProjectCommand(input));
45928
+ const desiredVisibility = readVisibility(properties, mask);
45929
+ const recorded = readVisibility(previousProperties, mask);
45930
+ if (desiredVisibility.kind === "unusable") {
45931
+ const kept = recorded.kind === "usable" ? ` (recorded ${recorded.visibility})` : "";
45932
+ this.logger.warn(mask(`${desiredVisibility.reason}. Leaving the visibility of CodeBuild Project ${physicalId} unchanged${kept}; the same value is REFUSED on a template-path create`));
45933
+ } else if (recorded.kind !== "usable" || recorded.visibility !== desiredVisibility.visibility || recorded.resourceAccessRole !== desiredVisibility.resourceAccessRole) {
45934
+ const projectArn = updated.project?.arn;
45935
+ if (projectArn === void 0) throw new Error("UpdateProject returned no project ARN for the visibility update");
45936
+ await this.applyVisibility(projectArn, desiredVisibility);
45937
+ }
45667
45938
  this.logger.debug(`Successfully updated CodeBuild Project ${logicalId}`);
45668
45939
  return {
45669
45940
  physicalId,
@@ -45671,7 +45942,7 @@ var CodeBuildProvider = class {
45671
45942
  };
45672
45943
  } catch (error) {
45673
45944
  const cause = error instanceof Error ? error : void 0;
45674
- throw this.wrapCaughtError(maskerOrIdentity(context?.maskSecrets), error, (text) => new ProvisioningError(`Failed to update CodeBuild Project ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
45945
+ throw this.wrapCaughtError(mask, error, (text) => new ProvisioningError(`Failed to update CodeBuild Project ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
45675
45946
  }
45676
45947
  }
45677
45948
  wrapCaughtError(mask, error, build) {
@@ -45868,6 +46139,7 @@ var CodeBuildProvider = class {
45868
46139
  result["BuildBatchConfig"] = bbc;
45869
46140
  } else result["BuildBatchConfig"] = {};
45870
46141
  result["ResourceAccessRole"] = project.resourceAccessRole ?? "";
46142
+ if (project.projectVisibility !== void 0) result["Visibility"] = project.projectVisibility;
45871
46143
  result["Tags"] = normalizeAwsTagsToCfn(project.tags);
45872
46144
  return result;
45873
46145
  }
@@ -47014,7 +47286,7 @@ var S3DirectoryBucketProvider = class {
47014
47286
  },
47015
47287
  Location: {
47016
47288
  Name: azId,
47017
- Type: "AvailabilityZone"
47289
+ Type: dataRedundancy === "SingleLocalZone" ? "LocalZone" : "AvailabilityZone"
47018
47290
  },
47019
47291
  ...includeTags ? { Tags: tags } : {}
47020
47292
  }
@@ -47128,15 +47400,16 @@ var S3DirectoryBucketProvider = class {
47128
47400
  } while (continuationToken);
47129
47401
  }
47130
47402
  async readCurrentState(physicalId, _logicalId, _resourceType) {
47403
+ let locationType;
47131
47404
  try {
47132
- await this.s3Client.send(new HeadBucketCommand({ Bucket: physicalId }));
47405
+ locationType = (await this.s3Client.send(new HeadBucketCommand({ Bucket: physicalId })))?.BucketLocationType;
47133
47406
  } catch (err) {
47134
47407
  const e = err;
47135
47408
  if (e.name === "NotFound" || e.name === "NoSuchBucket" || e.name === "BucketNotFound") return RESOURCE_NOT_FOUND;
47136
47409
  throw err;
47137
47410
  }
47138
47411
  const result = { BucketName: physicalId };
47139
- if (physicalId.endsWith("--x-s3")) result["DataRedundancy"] = "SingleAvailabilityZone";
47412
+ if (physicalId.endsWith("--x-s3")) result["DataRedundancy"] = locationType === "LocalZone" ? "SingleLocalZone" : "SingleAvailabilityZone";
47140
47413
  result["Tags"] = await this.readTags(physicalId);
47141
47414
  return result;
47142
47415
  }
@@ -47275,16 +47548,32 @@ var S3TablesProvider = class {
47275
47548
  assertRegionMatch(context?.expectedRegion ? await this.getClient().config.region() : void 0, context?.expectedRegion, resourceType, logicalId, physicalId, "pre-update");
47276
47549
  if (resourceType === "AWS::S3Tables::Table" || resourceType === "AWS::S3Tables::TableBucket") refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId, physicalId);
47277
47550
  try {
47278
- return await this.applyUpdate(logicalId, physicalId, resourceType, properties, previousProperties, context?.maskSecrets);
47551
+ return await this.applyUpdate(logicalId, physicalId, resourceType, properties, previousProperties, context?.maskSecrets, context?.recordedAttributes);
47279
47552
  } catch (error) {
47280
47553
  if (error instanceof CdkdError) throw error;
47281
47554
  const cause = error instanceof Error ? error : void 0;
47282
47555
  throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to update S3 Tables resource ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
47283
47556
  }
47284
47557
  }
47285
- async applyUpdate(logicalId, physicalId, resourceType, properties, previousProperties, mask) {
47286
- if (resourceType === "AWS::S3Tables::Table") await this.applyTableTagsDiff(logicalId, physicalId, resourceType, previousProperties["Tags"], properties["Tags"], mask);
47287
- else if (resourceType === "AWS::S3Tables::TableBucket") await this.applyTableBucketTagsDiff(logicalId, physicalId, resourceType, previousProperties["Tags"], properties["Tags"], mask);
47558
+ async applyUpdate(logicalId, physicalId, resourceType, properties, previousProperties, mask, recordedAttributes) {
47559
+ if (resourceType === "AWS::S3Tables::Table") {
47560
+ const rename = await this.planTableRename(logicalId, physicalId, resourceType, properties, mask);
47561
+ await this.applyTableTagsDiff(logicalId, physicalId, resourceType, previousProperties["Tags"], properties["Tags"], mask);
47562
+ if (rename === void 0) return {
47563
+ physicalId,
47564
+ wasReplaced: false
47565
+ };
47566
+ try {
47567
+ await this.getClient().send(rename.command);
47568
+ } catch (error) {
47569
+ if (!(error instanceof NotFoundException$7) || !await this.renameAlreadyApplied(rename.target, recordedAttributes)) throw error;
47570
+ }
47571
+ this.logger.debug(safeMsg`Renamed S3 Tables Table ${logicalId}: ${physicalId} -> ${rename.physicalId}`);
47572
+ return {
47573
+ physicalId: rename.physicalId,
47574
+ wasReplaced: false
47575
+ };
47576
+ } else if (resourceType === "AWS::S3Tables::TableBucket") await this.applyTableBucketTagsDiff(logicalId, physicalId, resourceType, previousProperties["Tags"], properties["Tags"], mask);
47288
47577
  else this.logger.debug(`Update is no-op for ${resourceType} ${logicalId}`);
47289
47578
  return {
47290
47579
  physicalId,
@@ -47787,6 +48076,59 @@ var S3TablesProvider = class {
47787
48076
  for (const t of tags) map[t.Key] = t.Value;
47788
48077
  return map;
47789
48078
  }
48079
+ async planTableRename(logicalId, physicalId, resourceType, properties, mask) {
48080
+ const desiredString = (key, value) => {
48081
+ if (value === void 0) return void 0;
48082
+ if (typeof value === "string" && value.length > 0) return value;
48083
+ throw new ProvisioningError(safeMsg`${key} for S3 Tables Table ${logicalId} must be a non-empty string; refusing the update`, resourceType, logicalId, physicalId);
48084
+ };
48085
+ const desiredNamespace = desiredString("Namespace", properties["Namespace"]);
48086
+ const desiredName = desiredString("TableName", properties["TableName"] ?? properties["Name"]);
48087
+ if (desiredNamespace === void 0 && desiredName === void 0) return void 0;
48088
+ const current = await this.resolveTableParts(physicalId);
48089
+ if (current === "not-found" || current === "unparseable") throw new ProvisioningError(current === "not-found" ? safeMsg`S3 Tables Table '${physicalId}' no longer exists (state is out of sync); ` + `refusing to record a rename that did not happen` : compositeIdFormatMessage(S3_TABLES_TABLE_ID_FORMAT, logicalId, physicalId), resourceType, logicalId, physicalId);
48090
+ const newNamespace = desiredNamespace ?? current.namespace;
48091
+ const newName = desiredName ?? current.name;
48092
+ if (newNamespace === current.namespace && newName === current.name) return void 0;
48093
+ return {
48094
+ physicalId: physicalId.includes("|") ? packCompositeId(resourceType, logicalId, [
48095
+ {
48096
+ name: "tableBucketARN",
48097
+ value: current.tableBucketARN
48098
+ },
48099
+ {
48100
+ name: "namespace",
48101
+ value: newNamespace
48102
+ },
48103
+ {
48104
+ name: "name",
48105
+ value: newName
48106
+ }
48107
+ ], { maskSecrets: mask }) : physicalId,
48108
+ target: {
48109
+ tableBucketARN: current.tableBucketARN,
48110
+ namespace: newNamespace,
48111
+ name: newName
48112
+ },
48113
+ command: new RenameTableCommand({
48114
+ tableBucketARN: current.tableBucketARN,
48115
+ namespace: current.namespace,
48116
+ name: current.name,
48117
+ ...newNamespace !== current.namespace && { newNamespaceName: newNamespace },
48118
+ ...newName !== current.name && { newName }
48119
+ })
48120
+ };
48121
+ }
48122
+ async renameAlreadyApplied(target, recordedAttributes) {
48123
+ const recordedArn = recordedAttributes?.["TableARN"];
48124
+ if (typeof recordedArn !== "string" || recordedArn.length === 0) return false;
48125
+ try {
48126
+ return await this.lookupTableArn(target.tableBucketARN, target.namespace, target.name) === recordedArn;
48127
+ } catch (lookupError) {
48128
+ this.logger.debug(safeMsg`Could not check whether the rename of ${target.name} was already applied: ${describeAwsFailure(lookupError).summary}`);
48129
+ return false;
48130
+ }
48131
+ }
47790
48132
  async lookupTableArn(tableBucketARN, namespace, name) {
47791
48133
  try {
47792
48134
  return (await this.getClient().send(new GetTableCommand$1({
@@ -48983,4 +49325,4 @@ var ACMCertificateProvider = class {
48983
49325
 
48984
49326
  //#endregion
48985
49327
  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 };
48986
- //# sourceMappingURL=provider-classes-Rf-SVs3I.js.map
49328
+ //# sourceMappingURL=provider-classes-C_AbFNEi.js.map