@go-to-k/cdkd 0.303.2 → 0.304.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.
- package/dist/{asg-provider-DjjvjFYr.js → asg-provider-CpubivcT.js} +3 -3
- package/dist/{asg-provider-DjjvjFYr.js.map → asg-provider-CpubivcT.js.map} +1 -1
- package/dist/{aws-clients-BJ7dmM_T.js → aws-clients-WQOzP1x4.js} +11 -1
- package/dist/aws-clients-WQOzP1x4.js.map +1 -0
- package/dist/cli.js +2 -2
- package/dist/{db-instance-modify-retry-f79-MmD9.js → db-instance-modify-retry-9kYr_0bT.js} +2 -2
- package/dist/{db-instance-modify-retry-f79-MmD9.js.map → db-instance-modify-retry-9kYr_0bT.js.map} +1 -1
- package/dist/{deploy-engine-CtYh3jvF.js → deploy-engine-DDrfjG42.js} +13 -8
- package/dist/deploy-engine-DDrfjG42.js.map +1 -0
- package/dist/{iam-policy-targets-NZn9Idzv.js → iam-policy-targets-BjIucCAN.js} +2 -2
- package/dist/{iam-policy-targets-NZn9Idzv.js.map → iam-policy-targets-BjIucCAN.js.map} +1 -1
- package/dist/{iam-role-provider-Cq-se0CG.js → iam-role-provider-CGCxsMm1.js} +4 -4
- package/dist/{iam-role-provider-Cq-se0CG.js.map → iam-role-provider-CGCxsMm1.js.map} +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/{neptune-provider-C9ykAqsz.js → neptune-provider-DMyUUOlw.js} +4 -4
- package/dist/{neptune-provider-C9ykAqsz.js.map → neptune-provider-DMyUUOlw.js.map} +1 -1
- package/dist/{program-BAkfEK0b.js → program-CfVIS2Wq.js} +23 -7
- package/dist/program-CfVIS2Wq.js.map +1 -0
- package/dist/{provider-classes-CBZ7XNOZ.js → provider-classes-BFBQvibT.js} +96 -31
- package/dist/provider-classes-BFBQvibT.js.map +1 -0
- package/dist/{rds-provider-B5LZSDOE.js → rds-provider-A9nRiwdN.js} +4 -4
- package/dist/{rds-provider-B5LZSDOE.js.map → rds-provider-A9nRiwdN.js.map} +1 -1
- package/dist/{version-YRURjQXD.js → version-BeqyCcHQ.js} +2 -2
- package/dist/{version-YRURjQXD.js.map → version-BeqyCcHQ.js.map} +1 -1
- package/package.json +2 -2
- package/dist/aws-clients-BJ7dmM_T.js.map +0 -1
- package/dist/deploy-engine-CtYh3jvF.js.map +0 -1
- package/dist/program-BAkfEK0b.js.map +0 -1
- package/dist/provider-classes-CBZ7XNOZ.js.map +0 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { r as getAwsClients } from "./aws-clients-
|
|
1
|
+
import { r as getAwsClients } from "./aws-clients-WQOzP1x4.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-w5_iao51.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-
|
|
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-BjIucCAN.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-
|
|
6
|
-
import { n as collectInlinePolicyNamesManagedBySiblings, r as IamCreateClientCache, t as IAMRoleProvider } from "./iam-role-provider-
|
|
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-
|
|
8
|
-
import { t as modifyDbInstanceWhenAvailable } from "./db-instance-modify-retry-
|
|
9
|
-
import { RDSProvider } from "./rds-provider-
|
|
10
|
-
import { NeptuneProvider } from "./neptune-provider-
|
|
11
|
-
import { ASGProvider } from "./asg-provider-
|
|
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-DDrfjG42.js";
|
|
6
|
+
import { n as collectInlinePolicyNamesManagedBySiblings, r as IamCreateClientCache, t as IAMRoleProvider } from "./iam-role-provider-CGCxsMm1.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-CfVIS2Wq.js";
|
|
8
|
+
import { t as modifyDbInstanceWhenAvailable } from "./db-instance-modify-retry-9kYr_0bT.js";
|
|
9
|
+
import { RDSProvider } from "./rds-provider-A9nRiwdN.js";
|
|
10
|
+
import { NeptuneProvider } from "./neptune-provider-DMyUUOlw.js";
|
|
11
|
+
import { ASGProvider } from "./asg-provider-CpubivcT.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
|
-
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";
|
|
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";
|
|
15
15
|
import { CreateQueueCommand, DeleteQueueCommand, GetQueueAttributesCommand, GetQueueUrlCommand, ListQueueTagsCommand, QueueDoesNotExist, SQSClient, SetQueueAttributesCommand, TagQueueCommand, UntagQueueCommand } from "@aws-sdk/client-sqs";
|
|
16
16
|
import { CreateTopicCommand, DeleteTopicCommand, GetSubscriptionAttributesCommand, GetTopicAttributesCommand, InvalidParameterException, ListSubscriptionsByTopicCommand, ListTagsForResourceCommand, ListTopicsCommand, NotFoundException, SNSClient, SetSubscriptionAttributesCommand, SetTopicAttributesCommand, SubscribeCommand, TagResourceCommand, UnsubscribeCommand, UntagResourceCommand } from "@aws-sdk/client-sns";
|
|
17
17
|
import { AddPermissionCommand, CreateEventSourceMappingCommand, CreateFunctionCommand, CreateFunctionUrlConfigCommand, DeleteEventSourceMappingCommand, DeleteFunctionCodeSigningConfigCommand, DeleteFunctionCommand, DeleteFunctionConcurrencyCommand, DeleteFunctionEventInvokeConfigCommand, DeleteFunctionUrlConfigCommand, DeleteLayerVersionCommand, GetEventSourceMappingCommand, GetFunctionCodeSigningConfigCommand, GetFunctionCommand, GetFunctionConcurrencyCommand, GetFunctionEventInvokeConfigCommand, GetFunctionRecursionConfigCommand, GetFunctionUrlConfigCommand, GetLayerVersionByArnCommand, GetPolicyCommand as GetPolicyCommand$1, GetRuntimeManagementConfigCommand, LambdaClient, ListEventSourceMappingsCommand, ListLayerVersionsCommand, ListTagsCommand, PublishLayerVersionCommand, PutFunctionCodeSigningConfigCommand, PutFunctionConcurrencyCommand, PutFunctionEventInvokeConfigCommand, PutFunctionRecursionConfigCommand, PutRuntimeManagementConfigCommand, RemovePermissionCommand, ResourceNotFoundException, TagResourceCommand as TagResourceCommand$1, UntagResourceCommand as UntagResourceCommand$1, UpdateEventSourceMappingCommand, UpdateFunctionCodeCommand, UpdateFunctionConfigurationCommand, UpdateFunctionUrlConfigCommand, waitUntilFunctionActiveV2, waitUntilFunctionUpdatedV2 } from "@aws-sdk/client-lambda";
|
|
@@ -28,12 +28,12 @@ import { AssociateKmsKeyCommand, CloudWatchLogsClient, CreateLogGroupCommand, De
|
|
|
28
28
|
import { BedrockAgentCoreControlClient, CreateAgentRuntimeCommand, CreateEvaluatorCommand, DeleteAgentRuntimeCommand, DeleteEvaluatorCommand, GetAgentRuntimeCommand, GetBrowserCommand, GetCodeInterpreterCommand, GetEvaluatorCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$6, ResourceNotFoundException as ResourceNotFoundException$6, TagResourceCommand as TagResourceCommand$9, UntagResourceCommand as UntagResourceCommand$9, UpdateAgentRuntimeCommand, UpdateEvaluatorCommand } from "@aws-sdk/client-bedrock-agentcore-control";
|
|
29
29
|
import { AddTagsToResourceCommand as AddTagsToResourceCommand$1, CreateCacheClusterCommand, CreateCacheSubnetGroupCommand, DeleteCacheClusterCommand, DeleteCacheSubnetGroupCommand, DescribeCacheClustersCommand, DescribeCacheSubnetGroupsCommand, ElastiCacheClient, ListTagsForResourceCommand as ListTagsForResourceCommand$7, ModifyCacheClusterCommand, ModifyCacheSubnetGroupCommand, RemoveTagsFromResourceCommand as RemoveTagsFromResourceCommand$1 } from "@aws-sdk/client-elasticache";
|
|
30
30
|
import { ACMClient, AddTagsToCertificateCommand, DeleteCertificateCommand, DescribeCertificateCommand, ListTagsForCertificateCommand, RemoveTagsFromCertificateCommand, RequestCertificateCommand, ResourceNotFoundException as ResourceNotFoundException$7, UpdateCertificateOptionsCommand } from "@aws-sdk/client-acm";
|
|
31
|
+
import { AssociateVPCWithHostedZoneCommand, ChangeResourceRecordSetsCommand, ChangeTagsForResourceCommand, CreateHostedZoneCommand, CreateQueryLoggingConfigCommand, DeleteHostedZoneCommand, DeleteQueryLoggingConfigCommand, DisassociateVPCFromHostedZoneCommand, GetHostedZoneCommand, HostedZoneAlreadyExists, ListHostedZonesByNameCommand, ListQueryLoggingConfigsCommand, ListResourceRecordSetsCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$8, Route53Client, UpdateHostedZoneCommentCommand, UpdateHostedZoneFeaturesCommand } from "@aws-sdk/client-route-53";
|
|
31
32
|
import { CreateMicrovmImageCommand, DeleteMicrovmImageCommand, GetMicrovmImageCommand, LambdaMicrovmsClient, ListTagsCommand as ListTagsCommand$1, ResourceNotFoundException as ResourceNotFoundException$8, TagResourceCommand as TagResourceCommand$10, UntagResourceCommand as UntagResourceCommand$10, UpdateMicrovmImageCommand } from "@aws-sdk/client-lambda-microvms";
|
|
32
33
|
import { CreateWebFunctionEndpointCommand, CreateWebFunctionRevisionCommand, DeleteWebFunctionEndpointCommand, DeleteWebFunctionRevisionCommand, GetWebFunctionEndpointCommand, GetWebFunctionRevisionCommand, LambdaWebClient, ListWebFunctionRevisionsCommand, ResourceNotFoundException as ResourceNotFoundException$9, UpdateWebFunctionEndpointCommand } from "@aws-sdk/client-lambda-web";
|
|
33
34
|
import { CreateNetworkConnectorCommand, DeleteNetworkConnectorCommand, GetNetworkConnectorCommand, LambdaCoreClient, ResourceNotFoundException as ResourceNotFoundException$10, UpdateNetworkConnectorCommand } from "@aws-sdk/client-lambda-core";
|
|
34
35
|
import * as fs from "node:fs";
|
|
35
36
|
import * as path from "node:path";
|
|
36
|
-
import { AssociateVPCWithHostedZoneCommand, ChangeResourceRecordSetsCommand, ChangeTagsForResourceCommand, CreateHostedZoneCommand, CreateQueryLoggingConfigCommand, DeleteHostedZoneCommand, DeleteQueryLoggingConfigCommand, DisassociateVPCFromHostedZoneCommand, GetHostedZoneCommand, HostedZoneAlreadyExists, ListHostedZonesByNameCommand, ListQueryLoggingConfigsCommand, ListResourceRecordSetsCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$8, Route53Client, UpdateHostedZoneCommentCommand, UpdateHostedZoneFeaturesCommand } from "@aws-sdk/client-route-53";
|
|
37
37
|
import { AddTagsCommand, CreateListenerCommand, CreateLoadBalancerCommand, CreateTargetGroupCommand, DeleteListenerCommand, DeleteLoadBalancerCommand, DeleteTargetGroupCommand, DeregisterTargetsCommand, DescribeCapacityReservationCommand, DescribeListenerAttributesCommand, DescribeListenersCommand, DescribeLoadBalancerAttributesCommand, DescribeLoadBalancersCommand, DescribeTagsCommand, DescribeTargetGroupAttributesCommand, DescribeTargetGroupsCommand, DescribeTargetHealthCommand, ElasticLoadBalancingV2Client, ModifyCapacityReservationCommand, ModifyIpPoolsCommand, ModifyListenerAttributesCommand, ModifyListenerCommand, ModifyLoadBalancerAttributesCommand, ModifyTargetGroupAttributesCommand, ModifyTargetGroupCommand, RegisterTargetsCommand, RemoveTagsCommand, SetIpAddressTypeCommand, SetSecurityGroupsCommand, SetSubnetsCommand, waitUntilLoadBalancerAvailable } from "@aws-sdk/client-elastic-load-balancing-v2";
|
|
38
38
|
import { CreateAliasCommand, CreateKeyCommand, DeleteAliasCommand, DescribeKeyCommand, DisableKeyCommand, DisableKeyRotationCommand, DisabledException, EnableKeyCommand, EnableKeyRotationCommand, GetKeyPolicyCommand, GetKeyRotationStatusCommand, KMSClient, ListAliasesCommand, ListKeysCommand, ListResourceTagsCommand, NotFoundException as NotFoundException$2, PutKeyPolicyCommand, ScheduleKeyDeletionCommand, TagResourceCommand as TagResourceCommand$11, UntagResourceCommand as UntagResourceCommand$11, UpdateAliasCommand, UpdateKeyDescriptionCommand } from "@aws-sdk/client-kms";
|
|
39
39
|
import { CreateRepositoryCommand, DeleteLifecyclePolicyCommand, DeleteRepositoryCommand, DeleteRepositoryPolicyCommand, DescribeRepositoriesCommand, ECRClient, GetLifecyclePolicyCommand, LifecyclePolicyNotFoundException, ListTagsForResourceCommand as ListTagsForResourceCommand$9, PutImageScanningConfigurationCommand, PutImageTagMutabilityCommand, PutLifecyclePolicyCommand, RepositoryNotEmptyException, RepositoryNotFoundException, SetRepositoryPolicyCommand, TagResourceCommand as TagResourceCommand$12, UntagResourceCommand as UntagResourceCommand$12 } from "@aws-sdk/client-ecr";
|
|
@@ -1836,6 +1836,9 @@ async function readPrincipalSides(opts) {
|
|
|
1836
1836
|
const DEPLOY_SKIP_CAVEAT$2 = "NOTE this arm is ALSO reached from cdkd deploy. Since issue 1762 the DELETE of a resource removed from the template behaves like destroy — the record is KEPT and the next deploy re-attempts it — but a REPLACEMENT / rollback delete FAILS the resource instead (https://github.com/go-to-k/cdkd/issues/1762), leaving the old one untracked; there, remove the memberships by hand.";
|
|
1837
1837
|
const USER_NAME_MAX_LENGTH = 64;
|
|
1838
1838
|
const GROUP_NAME_MAX_LENGTH = 128;
|
|
1839
|
+
function iamPathOf(value) {
|
|
1840
|
+
return value || "/";
|
|
1841
|
+
}
|
|
1839
1842
|
function derivedNamePairs(resourceType, logicalId, properties) {
|
|
1840
1843
|
const spec = resourceType === "AWS::IAM::User" ? {
|
|
1841
1844
|
key: "UserName",
|
|
@@ -2037,6 +2040,14 @@ var IAMUserGroupProvider = class {
|
|
|
2037
2040
|
});
|
|
2038
2041
|
if (groups.unmatchedKinds.length > 0) log.warn(`The recorded Groups of IAM user ${logicalId} is secret-derived, and IAM lists memberships the template does not name: cdkd removes the user from none of them, since IAM's list includes memberships made elsewhere. Remove the user by hand from any that this list used to name.`);
|
|
2039
2042
|
try {
|
|
2043
|
+
const newPath = iamPathOf(properties["Path"]);
|
|
2044
|
+
if (newPath !== iamPathOf(previousProperties["Path"])) {
|
|
2045
|
+
await this.iamClient.send(new UpdateUserCommand({
|
|
2046
|
+
UserName: physicalId,
|
|
2047
|
+
NewPath: newPath
|
|
2048
|
+
}));
|
|
2049
|
+
log.debug(`Moved user ${v(physicalId)} to path ${v(newPath)}`);
|
|
2050
|
+
}
|
|
2040
2051
|
await this.applyUserTagDiff(physicalId, resourceType, logicalId, previousProperties["Tags"], properties["Tags"], log);
|
|
2041
2052
|
const newPermBoundary = properties["PermissionsBoundary"];
|
|
2042
2053
|
const oldPermBoundary = previousProperties["PermissionsBoundary"];
|
|
@@ -2375,6 +2386,14 @@ var IAMUserGroupProvider = class {
|
|
|
2375
2386
|
const { value: v } = log;
|
|
2376
2387
|
log.debug(`Updating IAM group ${logicalId}: ${v(physicalId)}`);
|
|
2377
2388
|
try {
|
|
2389
|
+
const newPath = iamPathOf(properties["Path"]);
|
|
2390
|
+
if (newPath !== iamPathOf(previousProperties["Path"])) {
|
|
2391
|
+
await this.iamClient.send(new UpdateGroupCommand({
|
|
2392
|
+
GroupName: physicalId,
|
|
2393
|
+
NewPath: newPath
|
|
2394
|
+
}));
|
|
2395
|
+
log.debug(`Moved group ${v(physicalId)} to path ${v(newPath)}`);
|
|
2396
|
+
}
|
|
2378
2397
|
await this.updateGroupManagedPolicies(physicalId, properties["ManagedPolicyArns"], previousProperties["ManagedPolicyArns"], log);
|
|
2379
2398
|
await this.updateGroupInlinePolicies(physicalId, properties["Policies"], previousProperties["Policies"], log, claimed);
|
|
2380
2399
|
const getGroupResponse = await this.iamClient.send(new GetGroupCommand({ GroupName: physicalId }));
|
|
@@ -7938,6 +7957,7 @@ var LambdaFunctionProvider = class {
|
|
|
7938
7957
|
eniInitialSleepMs = 1e4;
|
|
7939
7958
|
eniDeleteRetryBudgetMs = 18e5;
|
|
7940
7959
|
eniDeleteRetryIntervalMs = 15e3;
|
|
7960
|
+
eniDeadlineMarginMs = 12e4;
|
|
7941
7961
|
constructor() {
|
|
7942
7962
|
const awsClients = getAwsClients();
|
|
7943
7963
|
this.lambdaClient = awsClients.lambda;
|
|
@@ -8283,7 +8303,7 @@ var LambdaFunctionProvider = class {
|
|
|
8283
8303
|
const failure = error instanceof Error && error.name.includes("NotFound") ? markNotGone(wrapped) : wrapped;
|
|
8284
8304
|
throw stripped ? markDeleteStarted(failure) : failure;
|
|
8285
8305
|
}
|
|
8286
|
-
if (hasVpcConfig) await this.cleanupLambdaEnis(physicalId);
|
|
8306
|
+
if (hasVpcConfig) await this.cleanupLambdaEnis(physicalId, Date.now() + enclosingDeadlineRemainingMs() - this.eniDeadlineMarginMs);
|
|
8287
8307
|
}
|
|
8288
8308
|
buildVpcConfig(raw) {
|
|
8289
8309
|
if (raw === void 0 || raw === null) return;
|
|
@@ -8374,7 +8394,7 @@ var LambdaFunctionProvider = class {
|
|
|
8374
8394
|
delay = Math.min(delay * 2, this.eniWaitMaxDelayMs);
|
|
8375
8395
|
}
|
|
8376
8396
|
}
|
|
8377
|
-
async cleanupLambdaEnis(functionName) {
|
|
8397
|
+
async cleanupLambdaEnis(functionName, deadline) {
|
|
8378
8398
|
this.logger.debug(`Cleaning up Lambda VPC ENIs for function ${functionName}`);
|
|
8379
8399
|
await this.sleep(this.eniInitialSleepMs);
|
|
8380
8400
|
let enis = [];
|
|
@@ -8388,10 +8408,11 @@ var LambdaFunctionProvider = class {
|
|
|
8388
8408
|
this.logger.debug(`No Lambda ENIs found for ${functionName} after initial sleep`);
|
|
8389
8409
|
return;
|
|
8390
8410
|
}
|
|
8391
|
-
await Promise.all(enis.map((eni) => this.deleteEniWithRetry(eni.id, functionName)));
|
|
8411
|
+
await Promise.all(enis.map((eni) => this.deleteEniWithRetry(eni.id, functionName, deadline)));
|
|
8392
8412
|
}
|
|
8393
|
-
async deleteEniWithRetry(eniId, functionName) {
|
|
8413
|
+
async deleteEniWithRetry(eniId, functionName, deadline) {
|
|
8394
8414
|
const start = Date.now();
|
|
8415
|
+
const giveUpAt = Math.min(start + this.eniDeleteRetryBudgetMs, deadline);
|
|
8395
8416
|
for (;;) try {
|
|
8396
8417
|
await this.ec2Client.send(new DeleteNetworkInterfaceCommand({ NetworkInterfaceId: eniId }));
|
|
8397
8418
|
this.logger.debug(`Deleted Lambda ENI ${eniId} for ${functionName}`);
|
|
@@ -8399,12 +8420,12 @@ var LambdaFunctionProvider = class {
|
|
|
8399
8420
|
} catch (error) {
|
|
8400
8421
|
const msg = describeAwsFailure(error).detail;
|
|
8401
8422
|
if (msg.includes("InvalidNetworkInterfaceID.NotFound") || msg.includes("does not exist")) return;
|
|
8402
|
-
const
|
|
8403
|
-
if (
|
|
8404
|
-
this.logger.warn(`Gave up deleting ENI ${eniId} for ${functionName} after ${
|
|
8423
|
+
const now = Date.now();
|
|
8424
|
+
if (now >= giveUpAt) {
|
|
8425
|
+
this.logger.warn(`Gave up deleting ENI ${eniId} for ${functionName} after ${now - start}ms: ${msg} — downstream Subnet/SG deletion will retry`);
|
|
8405
8426
|
return;
|
|
8406
8427
|
}
|
|
8407
|
-
await this.sleep(this.eniDeleteRetryIntervalMs);
|
|
8428
|
+
await this.sleep(Math.min(this.eniDeleteRetryIntervalMs, giveUpAt - now));
|
|
8408
8429
|
}
|
|
8409
8430
|
}
|
|
8410
8431
|
async listLambdaEnis(functionName) {
|
|
@@ -11228,7 +11249,7 @@ var LambdaNetworkConnectorProvider = class {
|
|
|
11228
11249
|
}
|
|
11229
11250
|
async create(logicalId, resourceType, properties, context) {
|
|
11230
11251
|
this.logger.debug(safeMsg`Creating Lambda network connector ${logicalId}`);
|
|
11231
|
-
const tagList = refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId);
|
|
11252
|
+
const tagList = refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId, void 0, "Tags", DBPROXY_TAGS_WHAT, DBPROXY_TAG_OPTIONS);
|
|
11232
11253
|
const name = typeof properties["Name"] === "string" && properties["Name"] !== "" ? properties["Name"] : generatedNameFor("AWS::Lambda::NetworkConnector", logicalId);
|
|
11233
11254
|
const vpc = this.readVpcEgress(properties, logicalId, resourceType, void 0);
|
|
11234
11255
|
const createToken = acquireIdempotencyToken({
|
|
@@ -11267,7 +11288,7 @@ var LambdaNetworkConnectorProvider = class {
|
|
|
11267
11288
|
}
|
|
11268
11289
|
async update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
|
|
11269
11290
|
assertRegionMatch(context?.expectedRegion ? await this.client.config.region() : void 0, context?.expectedRegion, resourceType, logicalId, physicalId, "pre-update");
|
|
11270
|
-
refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId, physicalId);
|
|
11291
|
+
refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId, physicalId, "Tags", DBPROXY_TAGS_WHAT, DBPROXY_TAG_OPTIONS);
|
|
11271
11292
|
const vpc = this.readVpcEgress(properties, logicalId, resourceType, physicalId);
|
|
11272
11293
|
const updateRole = this.readOperatorRole(properties, logicalId, resourceType, physicalId, context);
|
|
11273
11294
|
if (typeof previousProperties["OperatorRole"] === "string" && properties["OperatorRole"] === void 0 && context?.replayingState !== true && context?.desiredFromAwsReadback !== true) throw new ProvisioningError(`OperatorRole cannot be removed in place for Lambda network connector ${logicalIdShown(logicalId)}: cdkd sends no role when the template declares none, so the current one would stay attached. Set it to another role, or replace the connector (change its Name).`, resourceType, logicalId, physicalId);
|
|
@@ -11405,7 +11426,7 @@ var LambdaNetworkConnectorProvider = class {
|
|
|
11405
11426
|
throw new ProvisioningError(message, resourceType, logicalId, physicalId);
|
|
11406
11427
|
}
|
|
11407
11428
|
async reconcileTags(physicalId, resourceType, logicalId, newTags, oldTags) {
|
|
11408
|
-
const plan = planTagDiff(oldTags, newTags);
|
|
11429
|
+
const plan = planTagDiff(oldTags, newTags, DBPROXY_TAG_OPTIONS);
|
|
11409
11430
|
const tagWarning = tagPlanWarning(plan, resourceType, logicalId);
|
|
11410
11431
|
if (tagWarning !== void 0) this.logger.warn(tagWarning);
|
|
11411
11432
|
if (plan.remove.length > 0) await this.lambda.send(new UntagResourceCommand$1({
|
|
@@ -48547,6 +48568,18 @@ function isCertificateInUseError(error) {
|
|
|
48547
48568
|
const message = describeAwsFailure(error).detail;
|
|
48548
48569
|
return /ResourceInUseException|in use/i.test(message);
|
|
48549
48570
|
}
|
|
48571
|
+
const VALIDATION_RECORD_TTL = 300;
|
|
48572
|
+
function dnsValidationZones(properties) {
|
|
48573
|
+
const zones = /* @__PURE__ */ new Map();
|
|
48574
|
+
const options = properties["DomainValidationOptions"];
|
|
48575
|
+
if (properties["ValidationMethod"] !== "DNS" || !Array.isArray(options)) return zones;
|
|
48576
|
+
for (const option of options) {
|
|
48577
|
+
const domain = option["DomainName"];
|
|
48578
|
+
const zone = option["HostedZoneId"];
|
|
48579
|
+
if (typeof domain === "string" && domain && typeof zone === "string" && zone) zones.set(domain, zone);
|
|
48580
|
+
}
|
|
48581
|
+
return zones;
|
|
48582
|
+
}
|
|
48550
48583
|
var ACMCertificateProvider = class {
|
|
48551
48584
|
acmClient;
|
|
48552
48585
|
logger = getLogger().child("ACMCertificateProvider");
|
|
@@ -48592,11 +48625,13 @@ var ACMCertificateProvider = class {
|
|
|
48592
48625
|
const input = { DomainName: domainName };
|
|
48593
48626
|
if (properties["ValidationMethod"]) input["ValidationMethod"] = properties["ValidationMethod"];
|
|
48594
48627
|
if (Array.isArray(properties["SubjectAlternativeNames"])) input["SubjectAlternativeNames"] = properties["SubjectAlternativeNames"];
|
|
48595
|
-
if (Array.isArray(properties["DomainValidationOptions"]))
|
|
48596
|
-
const
|
|
48597
|
-
|
|
48598
|
-
|
|
48599
|
-
|
|
48628
|
+
if (Array.isArray(properties["DomainValidationOptions"])) {
|
|
48629
|
+
const options = properties["DomainValidationOptions"].filter((opt) => opt["DomainName"] && opt["ValidationDomain"]).map((opt) => ({
|
|
48630
|
+
DomainName: opt["DomainName"],
|
|
48631
|
+
ValidationDomain: opt["ValidationDomain"]
|
|
48632
|
+
}));
|
|
48633
|
+
if (options.length > 0) input["DomainValidationOptions"] = options;
|
|
48634
|
+
}
|
|
48600
48635
|
if (properties["CertificateAuthorityArn"]) input["CertificateAuthorityArn"] = properties["CertificateAuthorityArn"];
|
|
48601
48636
|
if (properties["KeyAlgorithm"]) input["KeyAlgorithm"] = properties["KeyAlgorithm"];
|
|
48602
48637
|
const options = {};
|
|
@@ -48617,7 +48652,7 @@ var ACMCertificateProvider = class {
|
|
|
48617
48652
|
if (!certificateArn) throw new ProvisioningError(`RequestCertificate succeeded but no CertificateArn returned for ${logicalId}`, resourceType, logicalId);
|
|
48618
48653
|
requestedArn = certificateArn;
|
|
48619
48654
|
this.logger.debug(`Requested ACM certificate: ${certificateArn}`);
|
|
48620
|
-
if (!(process.env["CDKD_NO_WAIT"] === "true")) await this.waitForCertificateIssued(certificateArn, logicalId, resourceType);
|
|
48655
|
+
if (!(process.env["CDKD_NO_WAIT"] === "true")) await this.waitForCertificateIssued(certificateArn, logicalId, resourceType, dnsValidationZones(properties));
|
|
48621
48656
|
else this.logger.warn(`Skipping wait for ACM certificate ${logicalId} (CDKD_NO_WAIT=true). Downstream consumers (CloudFront / ALB) will fail until the cert reaches ISSUED.`);
|
|
48622
48657
|
idempotencyToken.release();
|
|
48623
48658
|
return {
|
|
@@ -48818,8 +48853,9 @@ var ACMCertificateProvider = class {
|
|
|
48818
48853
|
}
|
|
48819
48854
|
return null;
|
|
48820
48855
|
}
|
|
48821
|
-
async waitForCertificateIssued(certificateArn, logicalId, resourceType) {
|
|
48856
|
+
async waitForCertificateIssued(certificateArn, logicalId, resourceType, zones = /* @__PURE__ */ new Map()) {
|
|
48822
48857
|
this.logger.debug(`Waiting for ACM certificate ${certificateArn} to reach ISSUED status...`);
|
|
48858
|
+
const written = /* @__PURE__ */ new Map();
|
|
48823
48859
|
let interrupted = false;
|
|
48824
48860
|
let lastValidationOptions;
|
|
48825
48861
|
const sigintHandler = () => {
|
|
@@ -48841,7 +48877,8 @@ var ACMCertificateProvider = class {
|
|
|
48841
48877
|
}
|
|
48842
48878
|
if (status === "FAILED" || status === "VALIDATION_TIMED_OUT" || status === "INACTIVE" || status === "REVOKED" || status === "EXPIRED") throw new ProvisioningError(`ACM certificate ${logicalIdShown(logicalId)} ${isPlainImportValue(certificateArn) ? `(${certificateArn})` : VALUE_NOT_SHOWN} entered terminal status ${status} during validation. Check ACM console / DNS records to diagnose.`, resourceType, logicalId, certificateArn);
|
|
48843
48879
|
if (status === "PENDING_VALIDATION") {
|
|
48844
|
-
|
|
48880
|
+
await this.writeValidationRecords(validations, zones, written, certificateArn, logicalId, resourceType);
|
|
48881
|
+
const rendered = this.renderValidationOptions(validations.filter((v) => !(v.DomainName && zones.has(v.DomainName))));
|
|
48845
48882
|
if (rendered !== void 0 && rendered !== lastValidationOptions) {
|
|
48846
48883
|
this.logger.info(rendered);
|
|
48847
48884
|
lastValidationOptions = rendered;
|
|
@@ -48857,6 +48894,34 @@ var ACMCertificateProvider = class {
|
|
|
48857
48894
|
process.removeListener("SIGINT", sigintHandler);
|
|
48858
48895
|
}
|
|
48859
48896
|
}
|
|
48897
|
+
async writeValidationRecords(validations, zones, written, certificateArn, logicalId, resourceType) {
|
|
48898
|
+
for (const validation of validations) {
|
|
48899
|
+
const zone = validation.DomainName ? zones.get(validation.DomainName) : void 0;
|
|
48900
|
+
const record = validation.ResourceRecord;
|
|
48901
|
+
if (!zone || !record?.Name || !record.Value) continue;
|
|
48902
|
+
if (written.get(zone)?.has(record.Name)) continue;
|
|
48903
|
+
try {
|
|
48904
|
+
await getAwsClients().route53.send(new ChangeResourceRecordSetsCommand({
|
|
48905
|
+
HostedZoneId: zone,
|
|
48906
|
+
ChangeBatch: { Changes: [{
|
|
48907
|
+
Action: "UPSERT",
|
|
48908
|
+
ResourceRecordSet: {
|
|
48909
|
+
Name: record.Name,
|
|
48910
|
+
Type: "CNAME",
|
|
48911
|
+
TTL: VALIDATION_RECORD_TTL,
|
|
48912
|
+
ResourceRecords: [{ Value: record.Value }]
|
|
48913
|
+
}
|
|
48914
|
+
}] }
|
|
48915
|
+
}));
|
|
48916
|
+
} catch (error) {
|
|
48917
|
+
throw new ProvisioningError(safeMsg`ACM certificate ${displayIdent(logicalId)} could not get its DNS validation record ${displayIdent(record.Name)} written to hosted zone ${displayIdent(zone)}: ${describeAwsFailure(error).summary}. The caller needs route53:ChangeResourceRecordSets on that zone.`, resourceType, logicalId, certificateArn, error instanceof Error ? error : void 0);
|
|
48918
|
+
}
|
|
48919
|
+
const inZone = written.get(zone) ?? /* @__PURE__ */ new Set();
|
|
48920
|
+
inZone.add(record.Name);
|
|
48921
|
+
written.set(zone, inZone);
|
|
48922
|
+
this.logger.info(safeMsg`Wrote DNS validation record ${displayIdent(record.Name)} to hosted zone ${displayIdent(zone)} for ${displayIdent(validation.DomainName)}`);
|
|
48923
|
+
}
|
|
48924
|
+
}
|
|
48860
48925
|
renderValidationOptions(validations) {
|
|
48861
48926
|
const lines = ["ACM certificate is PENDING_VALIDATION. Add the following DNS records to validate:"];
|
|
48862
48927
|
for (const v of validations) if (v.ValidationMethod === "DNS" && v.ResourceRecord) {
|
|
@@ -48887,4 +48952,4 @@ var ACMCertificateProvider = class {
|
|
|
48887
48952
|
|
|
48888
48953
|
//#endregion
|
|
48889
48954
|
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 };
|
|
48890
|
-
//# sourceMappingURL=provider-classes-
|
|
48955
|
+
//# sourceMappingURL=provider-classes-BFBQvibT.js.map
|