@cdkd/cli 0.355.0 → 0.356.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/{ambient-client-defaults-BJiN5aTn.js → ambient-client-defaults-DdMbK4P9.js} +3 -3
- package/dist/{ambient-client-defaults-BJiN5aTn.js.map → ambient-client-defaults-DdMbK4P9.js.map} +1 -1
- package/dist/{asg-provider-CGorVUPJ.js → asg-provider-CNU0xa47.js} +6 -6
- package/dist/{asg-provider-CGorVUPJ.js.map → asg-provider-CNU0xa47.js.map} +1 -1
- package/dist/cli.js +3 -3
- package/dist/{custom-resource-runtime-BdDMjfLC.js → custom-resource-runtime-I0NaCnMw.js} +6 -6
- package/dist/{custom-resource-runtime-BdDMjfLC.js.map → custom-resource-runtime-I0NaCnMw.js.map} +1 -1
- package/dist/{db-associated-roles-BqVpMI0m.js → db-associated-roles-DksJGXc2.js} +2 -2
- package/dist/{db-associated-roles-BqVpMI0m.js.map → db-associated-roles-DksJGXc2.js.map} +1 -1
- package/dist/{delete-started-C19J5kNj.js → delete-started-CJaeCjUv.js} +4 -4
- package/dist/{delete-started-C19J5kNj.js.map → delete-started-CJaeCjUv.js.map} +1 -1
- package/dist/{deploy-engine-BOKcCf9R.js → deploy-engine-OG-CIQp9.js} +131 -24
- package/dist/deploy-engine-OG-CIQp9.js.map +1 -0
- package/dist/{diff-calculator-STmKp2mr.js → diff-calculator-Cs9j467-.js} +72 -59
- package/dist/diff-calculator-Cs9j467-.js.map +1 -0
- package/dist/{ec2-termination-protection-CcXbTL4N.js → ec2-termination-protection-DbyJ2q10.js} +8 -7
- package/dist/ec2-termination-protection-DbyJ2q10.js.map +1 -0
- package/dist/{ecr-uri-DkYBMkSf.js → ecr-uri-tlBeIkdd.js} +2 -2
- package/dist/{ecr-uri-DkYBMkSf.js.map → ecr-uri-tlBeIkdd.js.map} +1 -1
- package/dist/{expected-bucket-owner-iWIC_uzK.js → expected-bucket-owner-JY3hiATN.js} +2 -2
- package/dist/{expected-bucket-owner-iWIC_uzK.js.map → expected-bucket-owner-JY3hiATN.js.map} +1 -1
- package/dist/{iam-role-provider-DvIPwNAz.js → iam-role-provider-Dqv_R3ru.js} +8 -8
- package/dist/{iam-role-provider-DvIPwNAz.js.map → iam-role-provider-Dqv_R3ru.js.map} +1 -1
- package/dist/{image-plan-B_MsB6uj.js → image-plan-DGVKU8RB.js} +8 -8
- package/dist/{image-plan-B_MsB6uj.js.map → image-plan-DGVKU8RB.js.map} +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -5
- package/dist/{logger-CRTakAJI.js → logger-DIGYs-yu.js} +2 -2
- package/dist/{logger-CRTakAJI.js.map → logger-DIGYs-yu.js.map} +1 -1
- package/dist/{neptune-provider-7DAE0TN7.js → neptune-provider-BMraChKs.js} +7 -7
- package/dist/{neptune-provider-7DAE0TN7.js.map → neptune-provider-BMraChKs.js.map} +1 -1
- package/dist/{program-CWUDb373.js → program-BikjBQ6T.js} +16 -35
- package/dist/program-BikjBQ6T.js.map +1 -0
- package/dist/{provider-classes-C8Pm3Ay1.js → provider-classes-CzitNbPu.js} +745 -118
- package/dist/provider-classes-CzitNbPu.js.map +1 -0
- package/dist/{rds-provider-CGsB4Wp0.js → rds-provider-MhOObj_3.js} +10 -10
- package/dist/{rds-provider-CGsB4Wp0.js.map → rds-provider-MhOObj_3.js.map} +1 -1
- package/dist/{read-replica-DsWNg8kx.js → read-replica-Cefn8iv7.js} +3 -3
- package/dist/{read-replica-DsWNg8kx.js.map → read-replica-Cefn8iv7.js.map} +1 -1
- package/dist/{replacement-rules-QZUAl8ah.js → replacement-rules-CCuQt7l9.js} +58 -3
- package/dist/{replacement-rules-QZUAl8ah.js.map → replacement-rules-CCuQt7l9.js.map} +1 -1
- package/dist/{resource-deadline-CXP2TUVz.js → resource-deadline-CzLso0NJ.js} +4 -4
- package/dist/{resource-deadline-CXP2TUVz.js.map → resource-deadline-CzLso0NJ.js.map} +1 -1
- package/dist/{restore-source-guard-BRT1OlJ2.js → restore-source-guard-qc_YrJ4H.js} +4 -4
- package/dist/{restore-source-guard-BRT1OlJ2.js.map → restore-source-guard-qc_YrJ4H.js.map} +1 -1
- package/dist/{run-cli-9IvHor5O.js → run-cli-DdhQMWgv.js} +2 -2
- package/dist/{run-cli-9IvHor5O.js.map → run-cli-DdhQMWgv.js.map} +1 -1
- package/dist/{version-DyK3ezVd.js → version-Bm3FPycJ.js} +2 -2
- package/dist/{version-DyK3ezVd.js.map → version-Bm3FPycJ.js.map} +1 -1
- package/package.json +1 -1
- package/dist/deploy-engine-BOKcCf9R.js.map +0 -1
- package/dist/diff-calculator-STmKp2mr.js.map +0 -1
- package/dist/ec2-termination-protection-CcXbTL4N.js.map +0 -1
- package/dist/program-CWUDb373.js.map +0 -1
- package/dist/provider-classes-C8Pm3Ay1.js.map +0 -1
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { a as IamCreateClientCache, i as isEntityAlreadyExists, n as collectInlinePolicyNamesManagedBySiblings, r as iamEntityLeftByThisCreate, t as IAMRoleProvider } from "./iam-role-provider-
|
|
2
|
-
import { A as configStringRefusal, B as generateResourceName, D as coerceCfnInteger, E as coerceCfnBoolean, F as requireConfigString, J as getCurrentStackName, M as replayWarn, N as requireConfigArray, O as configBooleanRefusal, P as requireConfigObject, U as recordedGeneratedNameKept, V as generateResourceNameWithFallback, Y as isBeforeStateRead, c as VERBOSE_POINTER, d as describeAwsStatusReason, f as isAwsAuthoredFailure, g as verbosePointerTail, h as verbosePointerSentence, j as readConfigString, k as configIntegerRefusal, n as getLogger, p as safeStringify, q as getCurrentStackInstanceId, u as describeAwsFailure, w as generatedNameFor } from "./logger-
|
|
1
|
+
import { a as IamCreateClientCache, i as isEntityAlreadyExists, n as collectInlinePolicyNamesManagedBySiblings, r as iamEntityLeftByThisCreate, t as IAMRoleProvider } from "./iam-role-provider-Dqv_R3ru.js";
|
|
2
|
+
import { A as configStringRefusal, B as generateResourceName, D as coerceCfnInteger, E as coerceCfnBoolean, F as requireConfigString, J as getCurrentStackName, M as replayWarn, N as requireConfigArray, O as configBooleanRefusal, P as requireConfigObject, U as recordedGeneratedNameKept, V as generateResourceNameWithFallback, Y as isBeforeStateRead, c as VERBOSE_POINTER, d as describeAwsStatusReason, f as isAwsAuthoredFailure, g as verbosePointerTail, h as verbosePointerSentence, j as readConfigString, k as configIntegerRefusal, n as getLogger, p as safeStringify, q as getCurrentStackInstanceId, u as describeAwsFailure, w as generatedNameFor } from "./logger-DIGYs-yu.js";
|
|
3
3
|
import { d as withApiGatewayPacing, l as s3ClientDefaults, r as getAwsClients } from "./aws-clients-DOkPjjAW.js";
|
|
4
|
-
import { D as markReplayMayCollide, E as markNameCollision, F as isAmbiguousOutcomeError, G as markRedactedCause, H as isMarkedNonRetryable, I as isExplicitDenyError, K as wrapMaskedAwsError, M as explicitDenyPolicyKind, O as relayedNameCollision, Q as AccountIdUnavailableError, R as isRetryableTransientError, U as isThrottlingError, V as THROTTLING_ERROR_NAMES, W as markNonRetryable, _ as ResourceUpdateNotSupportedError, at as ProvisioningError, et as CdkdError, i as credentialFingerprint, n as ambientCredentialConfig, r as clientDefaultsFor, t as ambientClientDefaults, z as isTransientServerError } from "./ambient-client-defaults-
|
|
5
|
-
import { $ as logGroupProtectionSite, $t as markCreatedBeforeFailure, A as ambiguousAttemptLead, At as compositeIdFormatMessage, B as isPlainImportValue, Bt as isSecretDerivedValue, Ct as renderDisableCommand, D as AmbiguousCreateLatch, Dt as isInterruptedWaitError, E as AMBIGUOUS_LATCH_TTL_MS, F as setBounded, G as remedyLogicalId, H as normalizeAwsTagsToCfn, Ht as maskerOrIdentity, I as withoutServerErrorRetries, It as segmentAfterAnchor, J as assertRegionMatch, K as resolveExplicitPhysicalId, Kt as clearCreatedBeforeFailure, L as VALUE_NOT_SHOWN, Lt as stateOrphanRecordRemedy, M as isInsideWindow, Mt as compositeIdSkipResult, N as replayFollowedAmbiguousAttempt, Nt as logicalIdShown, O as CREATION_DATE_SKEW_MARGIN_MS, Ot as startInterruptWatch, P as replayedSendWindow, Pt as packCompositeId, Q as deleteWithProtectionCompensation, Qt as markAuxiliaryFailure, R as importRemedyCommand, Rt as createMaskedLogSinks, S as readPrincipalLists, St as protectedReplacementAdvice, U as quotedRemedyLogicalId, Ut as withDerivedNameMasks, V as isQuotableImportValue, Vt as maskDeep, W as refusalTypeShown, X as markNotGone, Xt as isAuxiliaryFailure, _n as injectiveKeyPrefix, a as clearOnUpdateRemoval, at as deleteAfterProtectionFlipWithFinalSnapshot, b as holdsSecretDerivedEntry, bt as isAwsCliLiteral, c as removedTemplateKeys, ct as isTerminalDbWaitStatus, dt as isTerminalDeleteFailure, en as markSupersedesEarlierCreate, et as observeThenDisableProtection, ft as protectionFlipKey, g as retractCreatedResource, gn as injectiveKey, hn as withPasteableAwsProfile, ht as ElapsedBudgetRegistry, it as PROTECTION_FLIP_RETRY_WAIT_MS, j as createAttemptKey, jt as compositeIdSeparatorRefusal, k as RecentIdSet, kt as canonicalizeRoute53QueryName, l as withRemovalDefaults, m as reportCreatedResource, mt as ElapsedBudget, n as enclosingDeadlineRemainingMs, q as RESOURCE_NOT_FOUND, rt as userPoolProtectionSite, st as isProceedDbStatus, t as enclosingDeadlineExpired, tt as rdsFamilyProtectionSite, ut as ProtectionFlipRegistry, vt as UNNAMEABLE_ID_CLAUSE, w as recordedPrincipalsRepair, x as onlySecretDerived, xt as pasteableAwsCommand, y as SECRET_DERIVED_READ_LIVE, yt as WITHHELD_AWS_COMMAND, z as isPlainImportJson, zt as createMaskedRetryLogger } from "./resource-deadline-
|
|
6
|
-
import { A as displayStackName, N as plainIdentOr, O as displayIdent, P as safeMsg, S as SECRET_REF_MAX_CODE_POINTS, T as asIsMessage, _ as shellQuote, c as deployReplaceCommand, d as pasteableCommand, j as isPasteableIdent, k as displaySafe, l as hasClauseBreak, m as proseQuoted, o as cdkdRemedy, p as plainOrDescribed, s as commandHole, u as isInertUnquoted, v as withheldTargetClause } from "./version-
|
|
7
|
-
import { gt as slowCcOperationTimeoutMs, n as isRefusedByName, r as markDeleteStarted } from "./delete-started-
|
|
8
|
-
import { a as resolveSecretDerivedPrincipals, i as isResolvableSecretPrincipalList, n as runDestroyForStack, r as holdsUnprovenSecretPrincipalToken, t as canonicalizeIpv4Cidr } from "./program-
|
|
9
|
-
import { $ as planVectorIndexUpdates,
|
|
10
|
-
import { _ as isUsableAttemptedName, c as planTagDiff, d as tagMapAsList, f as tagPlanWarning, g as stringifyIfAssigned, h as definedAttributes, i as refuseRestoreFromItself, l as readTagList, m as modifyDbInstanceWhenAvailable, o as DBPROXY_TAGS_WHAT, p as isModifyNotAvailableRefusal, s as DBPROXY_TAG_OPTIONS, u as refuseMalformedDesiredTags } from "./restore-source-guard-
|
|
11
|
-
import { A as withRetry, U as timePhase, _ as unchangedBehindSecretReference, a as reDisableInstanceApiTermination, d as markRefusedBeforeApplying, g as onlySecretReferencesDiffer, i as observeThenDisableInstanceApiTermination, l as getPriorAttempts, n as ec2InstanceProtectionSite, o as reEnableInstanceApiTermination, r as isTerminationProtectionPropagationError, s as resolvedResourceTimeoutMs } from "./ec2-termination-protection-
|
|
4
|
+
import { D as markReplayMayCollide, E as markNameCollision, F as isAmbiguousOutcomeError, G as markRedactedCause, H as isMarkedNonRetryable, I as isExplicitDenyError, K as wrapMaskedAwsError, M as explicitDenyPolicyKind, O as relayedNameCollision, Q as AccountIdUnavailableError, R as isRetryableTransientError, U as isThrottlingError, V as THROTTLING_ERROR_NAMES, W as markNonRetryable, _ as ResourceUpdateNotSupportedError, at as ProvisioningError, et as CdkdError, i as credentialFingerprint, n as ambientCredentialConfig, r as clientDefaultsFor, t as ambientClientDefaults, x as hasReplayMayCollide, z as isTransientServerError } from "./ambient-client-defaults-DdMbK4P9.js";
|
|
5
|
+
import { $ as logGroupProtectionSite, $t as markCreatedBeforeFailure, A as ambiguousAttemptLead, At as compositeIdFormatMessage, B as isPlainImportValue, Bt as isSecretDerivedValue, Ct as renderDisableCommand, D as AmbiguousCreateLatch, Dt as isInterruptedWaitError, E as AMBIGUOUS_LATCH_TTL_MS, F as setBounded, G as remedyLogicalId, H as normalizeAwsTagsToCfn, Ht as maskerOrIdentity, I as withoutServerErrorRetries, It as segmentAfterAnchor, J as assertRegionMatch, K as resolveExplicitPhysicalId, Kt as clearCreatedBeforeFailure, L as VALUE_NOT_SHOWN, Lt as stateOrphanRecordRemedy, M as isInsideWindow, Mt as compositeIdSkipResult, N as replayFollowedAmbiguousAttempt, Nt as logicalIdShown, O as CREATION_DATE_SKEW_MARGIN_MS, Ot as startInterruptWatch, P as replayedSendWindow, Pt as packCompositeId, Q as deleteWithProtectionCompensation, Qt as markAuxiliaryFailure, R as importRemedyCommand, Rt as createMaskedLogSinks, S as readPrincipalLists, St as protectedReplacementAdvice, U as quotedRemedyLogicalId, Ut as withDerivedNameMasks, V as isQuotableImportValue, Vt as maskDeep, W as refusalTypeShown, X as markNotGone, Xt as isAuxiliaryFailure, _n as injectiveKeyPrefix, a as clearOnUpdateRemoval, at as deleteAfterProtectionFlipWithFinalSnapshot, b as holdsSecretDerivedEntry, bt as isAwsCliLiteral, c as removedTemplateKeys, ct as isTerminalDbWaitStatus, dt as isTerminalDeleteFailure, en as markSupersedesEarlierCreate, et as observeThenDisableProtection, ft as protectionFlipKey, g as retractCreatedResource, gn as injectiveKey, hn as withPasteableAwsProfile, ht as ElapsedBudgetRegistry, it as PROTECTION_FLIP_RETRY_WAIT_MS, j as createAttemptKey, jt as compositeIdSeparatorRefusal, k as RecentIdSet, kt as canonicalizeRoute53QueryName, l as withRemovalDefaults, m as reportCreatedResource, mt as ElapsedBudget, n as enclosingDeadlineRemainingMs, q as RESOURCE_NOT_FOUND, rt as userPoolProtectionSite, st as isProceedDbStatus, t as enclosingDeadlineExpired, tt as rdsFamilyProtectionSite, ut as ProtectionFlipRegistry, vt as UNNAMEABLE_ID_CLAUSE, w as recordedPrincipalsRepair, x as onlySecretDerived, xt as pasteableAwsCommand, y as SECRET_DERIVED_READ_LIVE, yt as WITHHELD_AWS_COMMAND, z as isPlainImportJson, zt as createMaskedRetryLogger } from "./resource-deadline-CzLso0NJ.js";
|
|
6
|
+
import { A as displayStackName, N as plainIdentOr, O as displayIdent, P as safeMsg, S as SECRET_REF_MAX_CODE_POINTS, T as asIsMessage, _ as shellQuote, c as deployReplaceCommand, d as pasteableCommand, j as isPasteableIdent, k as displaySafe, l as hasClauseBreak, m as proseQuoted, o as cdkdRemedy, p as plainOrDescribed, s as commandHole, u as isInertUnquoted, v as withheldTargetClause } from "./version-Bm3FPycJ.js";
|
|
7
|
+
import { gt as slowCcOperationTimeoutMs, n as isRefusedByName, r as markDeleteStarted } from "./delete-started-CJaeCjUv.js";
|
|
8
|
+
import { a as resolveSecretDerivedPrincipals, i as isResolvableSecretPrincipalList, n as runDestroyForStack, r as holdsUnprovenSecretPrincipalToken, t as canonicalizeIpv4Cidr } from "./program-BikjBQ6T.js";
|
|
9
|
+
import { $ as planVectorIndexUpdates, At as hasCdkAutoDeleteTag, B as declaredStreamTagsMember, Ba as waitForGoneAfterDelete, Cc as refuseMalformedNestedChildOutputs, Cl as listNestedTemplateRows, Ct as TABLE_INDEX_NOUN, Do as s3BucketDualStackDomainName, Dt as waitForIndexesSettled, Eo as s3BucketDomainName, Et as relayedIndexBusyDelete, Fr as redactedDeleteAddressFields, G as streamMemberRefusals, Ga as deleteSkipReason, Gt as isAccessDeniedError, H as reverseMapStreamPolicy, I as DynamoDBGlobalTableProvider, Ir as redactedDeleteAddressSkip, J as isTtlAlreadyDisabled, K as streamPolicyMatchesDeclared, Ka as withIndeterminateGuard, Kt as lookupEachName, L as STREAM_POLICY_KEY, Nc as refuseMalformedResourcesForDestroy, Nr as REDACTED_DELETE_ADDRESS_SKIP_REASON, Oa as getCurrentResourceSecrets, Oo as s3BucketRegionalDomainName, Os as passedParameterClassesOf, Ot as ECR_AUTO_DELETE_IMAGES_TAG, Pr as isRedactedRecordedValue, Q as sendTtlWaitingOutRateLimit, Qn as canonicalizeIpProtocolValue, R as STREAM_TAGS_KEY, Ra as waitForLambdaFunctionActive, Rc as accountArgs, Sl as isAbsoluteAssetPath, St as INDEX_SETTLE_POLL_INTERVAL_MS, To as s3BucketArn, Tt as maskedLogger, U as streamDeclaresPolicy, Ul as rewriteTemplateAssetReferences, Uo as outputReferenceProvenanceOf, V as planStreamMemberOps, W as streamDeclaresTags, Wt as chunks, X as planTimeToLive, Xc as withoutSdkUnwiredProperties, Xn as cfnIngressPortValue, Y as isTtlRateLimited, Ya as markWaitAbandoned, Yi as secretNamedAttributeNamesOf, Yn as withoutSiblingOwnedSgRules, Yo as getAccountInfo, Z as readTtlSpec, Zn as sgProtocolKey, _i as awaitInFlightSibling, _s as isWarmThroughputDecrease, _t as compensateRemovedDeletionProtection, _u as describeFileReadFailure, at as contributorInsightsRefusals, bt as resolveDynamoDbDeleteBudgetMs, bu as renderAssemblyPathEscape, cn as withNestedStackContext, ct as planIndexContributorInsightsOps, da as collectManagedPolicyArnsAttachedBySiblings, dt as reverseMapTableContributorInsights, en as getNestedRevertRun, et as readbackVectorIndexes, fa as collectPrincipalsAttachingPolicy, ft as stripIndexContributorInsights, gr as reserveStackCreateToken, gs as coerceWarmThroughput$1, gt as beginDeleteWait, ha as withoutSiblingOwned, hs as WARM_THROUGHPUT_MEMBERS, ht as DYNAMODB_DELETE_POLL_COST_MS, it as CONTRIBUTOR_INSIGHTS_KEY, jl as decodeListingKey, jt as isTruthyCfnBoolean, ko as s3BucketWebsiteUrl, kt as S3_AUTO_DELETE_OBJECTS_TAG, lt as readContributorInsightsSpec, ma as withoutSiblingAttachedArns, mr as earliestDefined, mt as DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS, no as APPSYNC_APIKEY_ARN_RESOURCE_PATH, nt as vectorIndexesSettled, ot as indexDeclaresContributorInsights, pt as DYNAMODB_DELETE_DEADLINE_MARGIN_MS, q as streamTagsMatchDeclared, qc as findSdkUnwiredProperties, qn as siblingOwnedSgRuleIdentities, qr as getCurrentProducerRegions, qt as withApiLimit, rn as revertNestedChildFromJournal, ro as maskedSecretSegment, rt as vectorIndexesShapeDetail, sn as getCurrentNestedStackContext, st as planContributorInsightsOp, t as DeployEngine, to as isSettledInstanceState, tt as vectorIndexesForCreate, ua as collectGroupsAddedBySiblings, ut as reverseMapIndexContributorInsights, vr as acquireIdempotencyToken, vs as toCfnInteger, vt as deleteBudgetKey, vu as displayAssemblyPath, wl as renderNestedTemplateTreeDefect, wt as deleteTableWithIndexBusyRetry, xi as replacedDeleteFailureVerdict, xl as findNestedTemplateTreeDefect, xt as DELETE_INDEX_WAIT_PROCEED_NOTE, xu as resolveAssemblyPath, yi as getStackRecords, yl as stringifyValue, ys as toFiniteNumber, yt as resolveDynamoDbDeleteBudgetClock, z as declaredStreamPolicyMember, zc as withheldAccountClause, zo as parseWebACLArn } from "./deploy-engine-OG-CIQp9.js";
|
|
10
|
+
import { _ as isUsableAttemptedName, c as planTagDiff, d as tagMapAsList, f as tagPlanWarning, g as stringifyIfAssigned, h as definedAttributes, i as refuseRestoreFromItself, l as readTagList, m as modifyDbInstanceWhenAvailable, o as DBPROXY_TAGS_WHAT, p as isModifyNotAvailableRefusal, s as DBPROXY_TAG_OPTIONS, u as refuseMalformedDesiredTags } from "./restore-source-guard-qc_YrJ4H.js";
|
|
11
|
+
import { A as withRetry, U as timePhase, _ as unchangedBehindSecretReference, a as reDisableInstanceApiTermination, d as markRefusedBeforeApplying, g as onlySecretReferencesDiffer, i as observeThenDisableInstanceApiTermination, l as getPriorAttempts, n as ec2InstanceProtectionSite, o as reEnableInstanceApiTermination, r as isTerminationProtectionPropagationError, s as resolvedResourceTimeoutMs } from "./ec2-termination-protection-DbyJ2q10.js";
|
|
12
12
|
import { n as canonicalizeRegion, r as derivePartitionAndUrlSuffix } from "./aws-partition-DA0r2sr-.js";
|
|
13
13
|
import { f as ambientRegion } from "./aws-client-defaults-DAebi99J.js";
|
|
14
|
-
import { n as planSubscriptionAttributes } from "./diff-calculator-
|
|
15
|
-
import { $ as snapshotPassProvenance, At as withoutPhysicalNameCopies, C as passedNoEchoParametersOf, I as markSameGenerationBag, Nt as dynamicReferenceTokens, W as redactForState, Z as recordReferenceProvenanceEntry, a as emrClusterInstancesReplaced, cn as recordAttributeIdCopy, i as ecsServiceLaunchTypeSetOrChanged, it as hasMaskableValues, l as sameLambdaFunctionAddress, mn as carriesSecretMask, n as blockDeviceMappingsDifferOnlyInDeleteOnTermination, o as canonicalLambdaFunctionName, on as recoverMaskedOutput, s as lambdaFunctionNameForMask, sn as physicalNameCopiesOf } from "./replacement-rules-
|
|
16
|
-
import { RDSProvider } from "./rds-provider-
|
|
17
|
-
import { NeptuneProvider } from "./neptune-provider-
|
|
18
|
-
import { ASGProvider } from "./asg-provider-
|
|
14
|
+
import { n as planSubscriptionAttributes } from "./diff-calculator-Cs9j467-.js";
|
|
15
|
+
import { $ as snapshotPassProvenance, At as withoutPhysicalNameCopies, C as passedNoEchoParametersOf, I as markSameGenerationBag, Nt as dynamicReferenceTokens, W as redactForState, Z as recordReferenceProvenanceEntry, a as emrClusterInstancesReplaced, cn as recordAttributeIdCopy, i as ecsServiceLaunchTypeSetOrChanged, it as hasMaskableValues, l as sameLambdaFunctionAddress, mn as carriesSecretMask, n as blockDeviceMappingsDifferOnlyInDeleteOnTermination, o as canonicalLambdaFunctionName, on as recoverMaskedOutput, s as lambdaFunctionNameForMask, sn as physicalNameCopiesOf } from "./replacement-rules-CCuQt7l9.js";
|
|
16
|
+
import { RDSProvider } from "./rds-provider-MhOObj_3.js";
|
|
17
|
+
import { NeptuneProvider } from "./neptune-provider-BMraChKs.js";
|
|
18
|
+
import { ASGProvider } from "./asg-provider-CNU0xa47.js";
|
|
19
19
|
import { createHash, randomUUID } from "node:crypto";
|
|
20
20
|
import { CreateBucketCommand, CreateBucketMetadataConfigurationCommand, DeleteBucketAnalyticsConfigurationCommand, DeleteBucketCommand, DeleteBucketCorsCommand, DeleteBucketEncryptionCommand, DeleteBucketIntelligentTieringConfigurationCommand, DeleteBucketInventoryConfigurationCommand, DeleteBucketLifecycleCommand, DeleteBucketMetadataConfigurationCommand, DeleteBucketMetricsConfigurationCommand, DeleteBucketOwnershipControlsCommand, DeleteBucketPolicyCommand, DeleteBucketReplicationCommand, DeleteBucketTaggingCommand, DeleteBucketWebsiteCommand, DeleteObjectsCommand, GetBucketAbacCommand, GetBucketAccelerateConfigurationCommand, GetBucketCorsCommand, GetBucketEncryptionCommand, GetBucketLifecycleConfigurationCommand, GetBucketLocationCommand, GetBucketLoggingCommand, GetBucketMetadataConfigurationCommand, GetBucketNotificationConfigurationCommand, GetBucketOwnershipControlsCommand, GetBucketPolicyCommand, GetBucketReplicationCommand, GetBucketTaggingCommand, GetBucketVersioningCommand, GetBucketWebsiteCommand, GetObjectCommand, GetObjectLockConfigurationCommand, GetPublicAccessBlockCommand, HeadBucketCommand, ListBucketAnalyticsConfigurationsCommand, ListBucketIntelligentTieringConfigurationsCommand, ListBucketInventoryConfigurationsCommand, ListBucketMetricsConfigurationsCommand, ListBucketsCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchBucket, PutBucketAbacCommand, PutBucketAccelerateConfigurationCommand, PutBucketAnalyticsConfigurationCommand, PutBucketCorsCommand, PutBucketEncryptionCommand, PutBucketIntelligentTieringConfigurationCommand, PutBucketInventoryConfigurationCommand, PutBucketLifecycleConfigurationCommand, PutBucketLoggingCommand, PutBucketMetricsConfigurationCommand, PutBucketNotificationConfigurationCommand, PutBucketOwnershipControlsCommand, PutBucketPolicyCommand, PutBucketReplicationCommand, PutBucketTaggingCommand, PutBucketVersioningCommand, PutBucketWebsiteCommand, PutObjectLockConfigurationCommand, PutPublicAccessBlockCommand, S3Client, UpdateBucketMetadataAnnotationTableConfigurationCommand, UpdateBucketMetadataInventoryTableConfigurationCommand, UpdateBucketMetadataJournalTableConfigurationCommand } from "@aws-sdk/client-s3";
|
|
21
21
|
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";
|
|
@@ -2048,7 +2048,7 @@ async function readPrincipalSides(opts) {
|
|
|
2048
2048
|
}
|
|
2049
2049
|
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.";
|
|
2050
2050
|
const USER_NAME_MAX_LENGTH = 64;
|
|
2051
|
-
const GROUP_NAME_MAX_LENGTH = 128;
|
|
2051
|
+
const GROUP_NAME_MAX_LENGTH$1 = 128;
|
|
2052
2052
|
function iamPathOf(value) {
|
|
2053
2053
|
return value || "/";
|
|
2054
2054
|
}
|
|
@@ -13148,7 +13148,7 @@ function buildAttributes$3(resp) {
|
|
|
13148
13148
|
}
|
|
13149
13149
|
|
|
13150
13150
|
// src/provisioning/providers/lambda-network-connector-provider.ts
|
|
13151
|
-
const POLL_INTERVAL_MS$
|
|
13151
|
+
const POLL_INTERVAL_MS$1 = 1e3;
|
|
13152
13152
|
const MAX_POLL_ATTEMPTS = 1200;
|
|
13153
13153
|
var LambdaNetworkConnectorProvider = class {
|
|
13154
13154
|
client;
|
|
@@ -13172,7 +13172,7 @@ var LambdaNetworkConnectorProvider = class {
|
|
|
13172
13172
|
["LatestVersion", "AWS-managed read-only attribute"]
|
|
13173
13173
|
])]]);
|
|
13174
13174
|
getMinResourceTimeoutMs() {
|
|
13175
|
-
return MAX_POLL_ATTEMPTS * POLL_INTERVAL_MS$
|
|
13175
|
+
return MAX_POLL_ATTEMPTS * POLL_INTERVAL_MS$1;
|
|
13176
13176
|
}
|
|
13177
13177
|
async create(logicalId, resourceType, properties, context) {
|
|
13178
13178
|
this.logger.debug(safeMsg`Creating Lambda network connector ${logicalId}`);
|
|
@@ -13390,9 +13390,9 @@ var LambdaNetworkConnectorProvider = class {
|
|
|
13390
13390
|
message: resp.LastUpdateStatusReason
|
|
13391
13391
|
}, (message, options) => new Error(message, options));
|
|
13392
13392
|
if (resp.State === "ACTIVE" && resp.LastUpdateStatus !== "InProgress") return resp;
|
|
13393
|
-
await sleep$4(POLL_INTERVAL_MS$
|
|
13393
|
+
await sleep$4(POLL_INTERVAL_MS$1);
|
|
13394
13394
|
}
|
|
13395
|
-
throw new Error(`Lambda network connector ${logicalIdShown(logicalId)} did not finish ${operation} within ${MAX_POLL_ATTEMPTS * POLL_INTERVAL_MS$
|
|
13395
|
+
throw new Error(`Lambda network connector ${logicalIdShown(logicalId)} did not finish ${operation} within ${MAX_POLL_ATTEMPTS * POLL_INTERVAL_MS$1 / 1e3}s.`);
|
|
13396
13396
|
}
|
|
13397
13397
|
async waitForGone(arn, logicalId) {
|
|
13398
13398
|
for (let attempt = 1; attempt <= MAX_POLL_ATTEMPTS; attempt++) {
|
|
@@ -13407,9 +13407,9 @@ var LambdaNetworkConnectorProvider = class {
|
|
|
13407
13407
|
code: resp.StateReasonCode,
|
|
13408
13408
|
message: resp.StateReason
|
|
13409
13409
|
}, (message, options) => new Error(message, options));
|
|
13410
|
-
await sleep$4(POLL_INTERVAL_MS$
|
|
13410
|
+
await sleep$4(POLL_INTERVAL_MS$1);
|
|
13411
13411
|
}
|
|
13412
|
-
throw new Error(`Lambda network connector ${logicalIdShown(logicalId)} was not fully deleted within ${MAX_POLL_ATTEMPTS * POLL_INTERVAL_MS$
|
|
13412
|
+
throw new Error(`Lambda network connector ${logicalIdShown(logicalId)} was not fully deleted within ${MAX_POLL_ATTEMPTS * POLL_INTERVAL_MS$1 / 1e3}s.`);
|
|
13413
13413
|
}
|
|
13414
13414
|
wrapStatusReasonError(prefix, reason, build) {
|
|
13415
13415
|
const text = describeAwsStatusReason(reason, reason.code || "no reason given");
|
|
@@ -35497,8 +35497,52 @@ var ELBv2Provider = class {
|
|
|
35497
35497
|
};
|
|
35498
35498
|
|
|
35499
35499
|
// src/provisioning/providers/rds-dbproxy/shared.ts
|
|
35500
|
-
const POLL_INTERVAL_MS
|
|
35501
|
-
const POLL_TIMEOUT_MS
|
|
35500
|
+
const POLL_INTERVAL_MS = 5e3;
|
|
35501
|
+
const POLL_TIMEOUT_MS = 18e5;
|
|
35502
|
+
const DEADLINE_MARGIN_MS$1 = 3e4;
|
|
35503
|
+
async function pauseBeforeNextPoll(deadline, watch) {
|
|
35504
|
+
if (watch.isInterrupted()) throw watch.onInterrupted();
|
|
35505
|
+
const left = Math.min(deadline - Date.now(), enclosingDeadlineRemainingMs() - DEADLINE_MARGIN_MS$1);
|
|
35506
|
+
if (left <= 0) return false;
|
|
35507
|
+
let remaining = Math.min(POLL_INTERVAL_MS, left);
|
|
35508
|
+
while (remaining > 0) {
|
|
35509
|
+
const step = Math.min(1e3, remaining);
|
|
35510
|
+
await new Promise((resolve) => setTimeout(resolve, step));
|
|
35511
|
+
remaining -= step;
|
|
35512
|
+
if (watch.isInterrupted()) throw watch.onInterrupted();
|
|
35513
|
+
}
|
|
35514
|
+
return true;
|
|
35515
|
+
}
|
|
35516
|
+
async function waitForDBProxyDeleteGone(opts) {
|
|
35517
|
+
const what = opts.mask(opts.what);
|
|
35518
|
+
let sawDeleting = false;
|
|
35519
|
+
let gone = false;
|
|
35520
|
+
let lastStatus;
|
|
35521
|
+
const wrapRecordKeptError = (text) => markWaitAbandoned(new ProvisioningError(opts.mask(`${opts.what} ${text}. The state record is kept: check it, then re-run once it is gone or settled.`), opts.resourceType, opts.logicalId, opts.physicalId));
|
|
35522
|
+
await waitForGoneAfterDelete({
|
|
35523
|
+
what,
|
|
35524
|
+
resourceType: opts.resourceType,
|
|
35525
|
+
describe: async () => {
|
|
35526
|
+
const status = await opts.readStatus();
|
|
35527
|
+
if (status === void 0) gone = true;
|
|
35528
|
+
else if (status !== "unknown") lastStatus = status;
|
|
35529
|
+
return status;
|
|
35530
|
+
},
|
|
35531
|
+
consequence: "Until AWS finishes the delete, a create of the same name can be refused, and the subnets and security groups it uses stay in use.",
|
|
35532
|
+
failedStatus: (status) => {
|
|
35533
|
+
if (status === "deleting") {
|
|
35534
|
+
sawDeleting = true;
|
|
35535
|
+
return;
|
|
35536
|
+
}
|
|
35537
|
+
if (!sawDeleting || status === "unknown") return void 0;
|
|
35538
|
+
return wrapRecordKeptError(`left the deleting state for ${status} after its delete was accepted, so AWS is not removing it`);
|
|
35539
|
+
},
|
|
35540
|
+
logger: createMaskedLogSinks(opts.logger, opts.mask),
|
|
35541
|
+
pollIntervalMs: POLL_INTERVAL_MS,
|
|
35542
|
+
maxWaitMs: Math.max(0, Math.min(POLL_TIMEOUT_MS, enclosingDeadlineRemainingMs() - DEADLINE_MARGIN_MS$1))
|
|
35543
|
+
});
|
|
35544
|
+
if (!gone && !sawDeleting && lastStatus !== void 0) throw wrapRecordKeptError(`still read ${lastStatus}, never deleting, when cdkd stopped waiting after its delete was accepted, so AWS may not be removing it`);
|
|
35545
|
+
}
|
|
35502
35546
|
const RETAINED_ON_REMOVAL = [
|
|
35503
35547
|
"Auth",
|
|
35504
35548
|
"DefaultAuthScheme",
|
|
@@ -35563,10 +35607,12 @@ async function create$24(logicalId, resourceType, properties, context) {
|
|
|
35563
35607
|
let endpoint;
|
|
35564
35608
|
let dbProxyArn;
|
|
35565
35609
|
let vpcId;
|
|
35566
|
-
const deadline = Date.now() + POLL_TIMEOUT_MS
|
|
35610
|
+
const deadline = Date.now() + POLL_TIMEOUT_MS;
|
|
35567
35611
|
let status;
|
|
35612
|
+
const watch = startInterruptWatch(mask(`DBProxy ${dbProxyName} wait for available`));
|
|
35568
35613
|
try {
|
|
35569
35614
|
while (Date.now() < deadline) {
|
|
35615
|
+
if (watch.isInterrupted()) throw watch.onInterrupted();
|
|
35570
35616
|
try {
|
|
35571
35617
|
const proxy = (await client.send(new DescribeDBProxiesCommand({ DBProxyName: dbProxyName }))).DBProxies?.[0];
|
|
35572
35618
|
status = proxy?.Status;
|
|
@@ -35581,12 +35627,14 @@ async function create$24(logicalId, resourceType, properties, context) {
|
|
|
35581
35627
|
if (error instanceof DBProxyNotFoundFault) {} else if (error instanceof ProvisioningError) throw error;
|
|
35582
35628
|
else throw this.wrapCaughtError(error, "CREATE (poll)", resourceType, logicalId, dbProxyName, mask);
|
|
35583
35629
|
}
|
|
35584
|
-
|
|
35630
|
+
if (!await pauseBeforeNextPoll(deadline, watch)) break;
|
|
35585
35631
|
}
|
|
35586
35632
|
if (!endpoint || !dbProxyArn) throw new ProvisioningError(mask(`Timed out waiting for DBProxy ${dbProxyName} to become available (last status: ${status ?? "unknown"})`), resourceType, logicalId, dbProxyName);
|
|
35587
35633
|
} catch (error) {
|
|
35588
35634
|
markCreatedBeforeFailure(error, logicalId, resourceType, dbProxyName);
|
|
35589
35635
|
throw error;
|
|
35636
|
+
} finally {
|
|
35637
|
+
watch.dispose();
|
|
35590
35638
|
}
|
|
35591
35639
|
return {
|
|
35592
35640
|
physicalId: dbProxyName,
|
|
@@ -35656,20 +35704,26 @@ async function update$24(logicalId, physicalId, resourceType, properties, previo
|
|
|
35656
35704
|
}
|
|
35657
35705
|
async function waitForAvailableAfterModify(physicalId, resourceType, logicalId, mask) {
|
|
35658
35706
|
const client = this.getClient();
|
|
35659
|
-
const deadline = Date.now() + POLL_TIMEOUT_MS
|
|
35707
|
+
const deadline = Date.now() + POLL_TIMEOUT_MS;
|
|
35660
35708
|
let status;
|
|
35661
|
-
|
|
35662
|
-
|
|
35663
|
-
|
|
35664
|
-
if (
|
|
35665
|
-
|
|
35666
|
-
|
|
35667
|
-
|
|
35668
|
-
|
|
35709
|
+
const watch = startInterruptWatch(mask(`DBProxy ${physicalId} wait after modify`));
|
|
35710
|
+
try {
|
|
35711
|
+
while (Date.now() < deadline) {
|
|
35712
|
+
if (watch.isInterrupted()) throw watch.onInterrupted();
|
|
35713
|
+
try {
|
|
35714
|
+
const proxy = (await client.send(new DescribeDBProxiesCommand({ DBProxyName: physicalId }))).DBProxies?.[0];
|
|
35715
|
+
if (!proxy) throw new ProvisioningError(mask(`DBProxy ${physicalId} was not found while waiting for it after modify`), resourceType, logicalId, physicalId);
|
|
35716
|
+
status = proxy.Status;
|
|
35717
|
+
} catch (error) {
|
|
35718
|
+
if (error instanceof ProvisioningError) throw error;
|
|
35719
|
+
throw this.wrapCaughtError(error, "UPDATE (poll)", resourceType, logicalId, physicalId, mask);
|
|
35720
|
+
}
|
|
35721
|
+
if (status === "available") return;
|
|
35722
|
+
if (status === "incompatible-network" || status === "insufficient-resource-limits") throw new ProvisioningError(mask(`DBProxy ${physicalId} entered terminal failure state after modify: ${status}`), resourceType, logicalId, physicalId);
|
|
35723
|
+
if (!await pauseBeforeNextPoll(deadline, watch)) break;
|
|
35669
35724
|
}
|
|
35670
|
-
|
|
35671
|
-
|
|
35672
|
-
await new Promise((resolve) => setTimeout(resolve, POLL_INTERVAL_MS$1));
|
|
35725
|
+
} finally {
|
|
35726
|
+
watch.dispose();
|
|
35673
35727
|
}
|
|
35674
35728
|
throw new ProvisioningError(mask(`Timed out waiting for DBProxy ${physicalId} to become available after modify (last status: ${status ?? "unknown"})`), resourceType, logicalId, physicalId);
|
|
35675
35729
|
}
|
|
@@ -35729,32 +35783,34 @@ async function applyTagDiff$9(physicalId, oldTags, newTags, resourceType, logica
|
|
|
35729
35783
|
async function deleteImpl$24(logicalId, physicalId, resourceType, _properties, context) {
|
|
35730
35784
|
const client = this.getClient();
|
|
35731
35785
|
const mask = maskerOrIdentity(context?.maskSecrets);
|
|
35732
|
-
this.logger.debug(`Deleting DBProxy ${physicalId}`);
|
|
35786
|
+
this.logger.debug(mask(`Deleting DBProxy ${physicalId}`));
|
|
35733
35787
|
try {
|
|
35734
35788
|
await client.send(new DeleteDBProxyCommand({ DBProxyName: physicalId }));
|
|
35735
35789
|
} catch (error) {
|
|
35736
35790
|
if (error instanceof DBProxyNotFoundFault) {
|
|
35737
35791
|
const clientRegion = await client.config.region();
|
|
35738
35792
|
assertRegionMatch(clientRegion, context?.expectedRegion, resourceType, logicalId, physicalId);
|
|
35739
|
-
this.logger.debug(`DBProxy ${physicalId} already gone, treating as success`);
|
|
35793
|
+
this.logger.debug(mask(`DBProxy ${physicalId} already gone, treating as success`));
|
|
35740
35794
|
return;
|
|
35741
35795
|
}
|
|
35742
35796
|
throw this.wrapDeleteError(error, "DELETE", resourceType, logicalId, physicalId, mask);
|
|
35743
35797
|
}
|
|
35744
|
-
|
|
35745
|
-
|
|
35746
|
-
|
|
35747
|
-
|
|
35748
|
-
|
|
35749
|
-
|
|
35750
|
-
|
|
35751
|
-
return;
|
|
35798
|
+
await waitForDBProxyDeleteGone({
|
|
35799
|
+
what: `DBProxy ${physicalId}`,
|
|
35800
|
+
resourceType,
|
|
35801
|
+
logicalId,
|
|
35802
|
+
physicalId,
|
|
35803
|
+
readStatus: async () => {
|
|
35804
|
+
try {
|
|
35805
|
+
return (await client.send(new DescribeDBProxiesCommand({ DBProxyName: physicalId }))).DBProxies?.[0]?.Status ?? "unknown";
|
|
35806
|
+
} catch (error) {
|
|
35807
|
+
if (error instanceof DBProxyNotFoundFault) return void 0;
|
|
35808
|
+
throw error;
|
|
35752
35809
|
}
|
|
35753
|
-
|
|
35754
|
-
|
|
35755
|
-
|
|
35756
|
-
}
|
|
35757
|
-
throw new ProvisioningError(`Timed out waiting for DBProxy ${physicalId} to fully delete`, resourceType, logicalId, physicalId);
|
|
35810
|
+
},
|
|
35811
|
+
logger: this.logger,
|
|
35812
|
+
mask
|
|
35813
|
+
});
|
|
35758
35814
|
}
|
|
35759
35815
|
|
|
35760
35816
|
// src/provisioning/providers/rds-dbproxy/read-state.ts
|
|
@@ -35939,8 +35995,6 @@ var RDSDBProxyProvider = class {
|
|
|
35939
35995
|
};
|
|
35940
35996
|
|
|
35941
35997
|
// src/provisioning/providers/rds-dbproxy-endpoint-provider.ts
|
|
35942
|
-
const POLL_INTERVAL_MS = 5e3;
|
|
35943
|
-
const POLL_TIMEOUT_MS = 18e5;
|
|
35944
35998
|
var RDSDBProxyEndpointProvider = class {
|
|
35945
35999
|
rdsClient;
|
|
35946
36000
|
createClient;
|
|
@@ -36003,8 +36057,10 @@ var RDSDBProxyEndpointProvider = class {
|
|
|
36003
36057
|
let vpcId;
|
|
36004
36058
|
const deadline = Date.now() + POLL_TIMEOUT_MS;
|
|
36005
36059
|
let status;
|
|
36060
|
+
const watch = startInterruptWatch(mask(`DBProxyEndpoint ${dbProxyEndpointName} wait for available`));
|
|
36006
36061
|
try {
|
|
36007
36062
|
while (Date.now() < deadline) {
|
|
36063
|
+
if (watch.isInterrupted()) throw watch.onInterrupted();
|
|
36008
36064
|
try {
|
|
36009
36065
|
const ep = (await client.send(new DescribeDBProxyEndpointsCommand({ DBProxyEndpointName: dbProxyEndpointName }))).DBProxyEndpoints?.[0];
|
|
36010
36066
|
status = ep?.Status;
|
|
@@ -36016,17 +36072,19 @@ var RDSDBProxyEndpointProvider = class {
|
|
|
36016
36072
|
vpcId = ep?.VpcId;
|
|
36017
36073
|
break;
|
|
36018
36074
|
}
|
|
36019
|
-
if (status === "incompatible-network" || status === "insufficient-resource-limits") throw new ProvisioningError(`DBProxyEndpoint ${dbProxyEndpointName} entered terminal failure state: ${status}
|
|
36075
|
+
if (status === "incompatible-network" || status === "insufficient-resource-limits") throw new ProvisioningError(mask(`DBProxyEndpoint ${dbProxyEndpointName} entered terminal failure state: ${status}`), resourceType, logicalId, dbProxyEndpointName);
|
|
36020
36076
|
} catch (error) {
|
|
36021
36077
|
if (error instanceof DBProxyEndpointNotFoundFault || error instanceof DBProxyNotFoundFault) {} else if (error instanceof ProvisioningError) throw error;
|
|
36022
36078
|
else throw this.wrapCaughtError(error, "CREATE (poll)", resourceType, logicalId, dbProxyEndpointName, mask);
|
|
36023
36079
|
}
|
|
36024
|
-
|
|
36080
|
+
if (!await pauseBeforeNextPoll(deadline, watch)) break;
|
|
36025
36081
|
}
|
|
36026
|
-
if (!endpoint || !arn) throw new ProvisioningError(`Timed out waiting for DBProxyEndpoint ${dbProxyEndpointName} to become available (last status: ${status ?? "unknown"})
|
|
36082
|
+
if (!endpoint || !arn) throw new ProvisioningError(mask(`Timed out waiting for DBProxyEndpoint ${dbProxyEndpointName} to become available (last status: ${status ?? "unknown"})`), resourceType, logicalId, dbProxyEndpointName);
|
|
36027
36083
|
} catch (error) {
|
|
36028
36084
|
markCreatedBeforeFailure(error, logicalId, resourceType, dbProxyEndpointName);
|
|
36029
36085
|
throw error;
|
|
36086
|
+
} finally {
|
|
36087
|
+
watch.dispose();
|
|
36030
36088
|
}
|
|
36031
36089
|
return {
|
|
36032
36090
|
physicalId: dbProxyEndpointName,
|
|
@@ -36081,50 +36139,58 @@ var RDSDBProxyEndpointProvider = class {
|
|
|
36081
36139
|
const client = this.getClient();
|
|
36082
36140
|
const deadline = Date.now() + POLL_TIMEOUT_MS;
|
|
36083
36141
|
let status;
|
|
36084
|
-
|
|
36085
|
-
|
|
36086
|
-
|
|
36087
|
-
if (
|
|
36088
|
-
|
|
36089
|
-
|
|
36090
|
-
|
|
36091
|
-
|
|
36142
|
+
const watch = startInterruptWatch(mask(`DBProxyEndpoint ${physicalId} wait after modify`));
|
|
36143
|
+
try {
|
|
36144
|
+
while (Date.now() < deadline) {
|
|
36145
|
+
if (watch.isInterrupted()) throw watch.onInterrupted();
|
|
36146
|
+
try {
|
|
36147
|
+
const ep = (await client.send(new DescribeDBProxyEndpointsCommand({ DBProxyEndpointName: physicalId }))).DBProxyEndpoints?.[0];
|
|
36148
|
+
if (!ep) throw new ProvisioningError(mask(`DBProxyEndpoint ${physicalId} was not found while waiting for it after modify`), resourceType, logicalId, physicalId);
|
|
36149
|
+
status = ep.Status;
|
|
36150
|
+
} catch (error) {
|
|
36151
|
+
if (error instanceof ProvisioningError) throw error;
|
|
36152
|
+
throw this.wrapCaughtError(error, "UPDATE (poll)", resourceType, logicalId, physicalId, mask);
|
|
36153
|
+
}
|
|
36154
|
+
if (status === "available") return;
|
|
36155
|
+
if (status === "incompatible-network" || status === "insufficient-resource-limits") throw new ProvisioningError(mask(`DBProxyEndpoint ${physicalId} entered terminal failure state after modify: ${status}`), resourceType, logicalId, physicalId);
|
|
36156
|
+
if (!await pauseBeforeNextPoll(deadline, watch)) break;
|
|
36092
36157
|
}
|
|
36093
|
-
|
|
36094
|
-
|
|
36095
|
-
await new Promise((resolve) => setTimeout(resolve, POLL_INTERVAL_MS));
|
|
36158
|
+
} finally {
|
|
36159
|
+
watch.dispose();
|
|
36096
36160
|
}
|
|
36097
36161
|
throw new ProvisioningError(mask(`Timed out waiting for DBProxyEndpoint ${physicalId} to become available after modify (last status: ${status ?? "unknown"})`), resourceType, logicalId, physicalId);
|
|
36098
36162
|
}
|
|
36099
36163
|
async delete(logicalId, physicalId, resourceType, _properties, context) {
|
|
36100
36164
|
const client = this.getClient();
|
|
36101
36165
|
const mask = maskerOrIdentity(context?.maskSecrets);
|
|
36102
|
-
this.logger.debug(`Deleting DBProxyEndpoint ${physicalId}`);
|
|
36166
|
+
this.logger.debug(mask(`Deleting DBProxyEndpoint ${physicalId}`));
|
|
36103
36167
|
try {
|
|
36104
36168
|
await client.send(new DeleteDBProxyEndpointCommand({ DBProxyEndpointName: physicalId }));
|
|
36105
36169
|
} catch (error) {
|
|
36106
36170
|
if (error instanceof DBProxyEndpointNotFoundFault || error instanceof DBProxyNotFoundFault) {
|
|
36107
36171
|
const clientRegion = await client.config.region();
|
|
36108
36172
|
assertRegionMatch(clientRegion, context?.expectedRegion, resourceType, logicalId, physicalId);
|
|
36109
|
-
this.logger.debug(`DBProxyEndpoint ${physicalId} or parent already gone, treating as success`);
|
|
36173
|
+
this.logger.debug(mask(`DBProxyEndpoint ${physicalId} or parent already gone, treating as success`));
|
|
36110
36174
|
return;
|
|
36111
36175
|
}
|
|
36112
36176
|
throw this.wrapDeleteError(error, "DELETE", resourceType, logicalId, physicalId, mask);
|
|
36113
36177
|
}
|
|
36114
|
-
|
|
36115
|
-
|
|
36116
|
-
|
|
36117
|
-
|
|
36118
|
-
|
|
36119
|
-
|
|
36120
|
-
|
|
36121
|
-
return;
|
|
36178
|
+
await waitForDBProxyDeleteGone({
|
|
36179
|
+
what: `DBProxyEndpoint ${physicalId}`,
|
|
36180
|
+
resourceType,
|
|
36181
|
+
logicalId,
|
|
36182
|
+
physicalId,
|
|
36183
|
+
readStatus: async () => {
|
|
36184
|
+
try {
|
|
36185
|
+
return (await client.send(new DescribeDBProxyEndpointsCommand({ DBProxyEndpointName: physicalId }))).DBProxyEndpoints?.[0]?.Status ?? "unknown";
|
|
36186
|
+
} catch (error) {
|
|
36187
|
+
if (error instanceof DBProxyEndpointNotFoundFault || error instanceof DBProxyNotFoundFault) return;
|
|
36188
|
+
throw error;
|
|
36122
36189
|
}
|
|
36123
|
-
|
|
36124
|
-
|
|
36125
|
-
|
|
36126
|
-
}
|
|
36127
|
-
throw new ProvisioningError(`Timed out waiting for DBProxyEndpoint ${physicalId} to fully delete`, resourceType, logicalId, physicalId);
|
|
36190
|
+
},
|
|
36191
|
+
logger: this.logger,
|
|
36192
|
+
mask
|
|
36193
|
+
});
|
|
36128
36194
|
}
|
|
36129
36195
|
async getAttribute(physicalId, _resourceType, attributeName) {
|
|
36130
36196
|
const cacheKey = injectiveKey(physicalId, attributeName);
|
|
@@ -38829,7 +38895,8 @@ function getClient$8() {
|
|
|
38829
38895
|
async function create$21(logicalId, resourceType, properties, context) {
|
|
38830
38896
|
switch (resourceType) {
|
|
38831
38897
|
case "AWS::Route53::HostedZone": return this.createHostedZone(logicalId, resourceType, properties, context?.maskSecrets, context);
|
|
38832
|
-
case "AWS::Route53::RecordSet": return this.createRecordSet(logicalId, resourceType, properties, context?.maskSecrets);
|
|
38898
|
+
case "AWS::Route53::RecordSet": return this.createRecordSet(logicalId, resourceType, properties, context?.maskSecrets, context?.replayingState === true);
|
|
38899
|
+
case "AWS::Route53::RecordSetGroup": return this.createRecordSetGroup(logicalId, resourceType, properties, context?.maskSecrets, context?.replayingState === true);
|
|
38833
38900
|
default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId);
|
|
38834
38901
|
}
|
|
38835
38902
|
}
|
|
@@ -38837,6 +38904,7 @@ async function update$21(logicalId, physicalId, resourceType, properties, previo
|
|
|
38837
38904
|
switch (resourceType) {
|
|
38838
38905
|
case "AWS::Route53::HostedZone": return this.updateHostedZone(logicalId, physicalId, resourceType, properties, previousProperties, context?.maskSecrets, context);
|
|
38839
38906
|
case "AWS::Route53::RecordSet": return this.updateRecordSet(logicalId, physicalId, resourceType, properties, previousProperties, context);
|
|
38907
|
+
case "AWS::Route53::RecordSetGroup": return this.updateRecordSetGroup(logicalId, physicalId, resourceType, properties, previousProperties, context);
|
|
38840
38908
|
default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId, physicalId);
|
|
38841
38909
|
}
|
|
38842
38910
|
}
|
|
@@ -38844,6 +38912,7 @@ async function deleteImpl$21(logicalId, physicalId, resourceType, properties, co
|
|
|
38844
38912
|
switch (resourceType) {
|
|
38845
38913
|
case "AWS::Route53::HostedZone": return this.deleteHostedZone(logicalId, physicalId, resourceType, context);
|
|
38846
38914
|
case "AWS::Route53::RecordSet": return this.deleteRecordSet(logicalId, physicalId, resourceType, properties, context);
|
|
38915
|
+
case "AWS::Route53::RecordSetGroup": return this.deleteRecordSetGroup(logicalId, physicalId, resourceType, properties, context);
|
|
38847
38916
|
default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId, physicalId);
|
|
38848
38917
|
}
|
|
38849
38918
|
}
|
|
@@ -38957,6 +39026,31 @@ function recordIdentityChanged(previous, desired) {
|
|
|
38957
39026
|
function zoneNameShown(name) {
|
|
38958
39027
|
return isPlainImportValue(name.replace(/\\[0-7]{3}/g, "x")) ? `"${name}"` : VALUE_NOT_SHOWN;
|
|
38959
39028
|
}
|
|
39029
|
+
function bareHostedZoneId(id) {
|
|
39030
|
+
return id.replace(/^\/hostedzone\//, "");
|
|
39031
|
+
}
|
|
39032
|
+
function zoneReferenceChanged(previous, desired) {
|
|
39033
|
+
return JSON.stringify([previous["HostedZoneId"] ?? null, previous["HostedZoneName"] ?? null]) !== JSON.stringify([desired["HostedZoneId"] ?? null, desired["HostedZoneName"] ?? null]);
|
|
39034
|
+
}
|
|
39035
|
+
async function recordedZoneForSwitch(provider, recordedZone, logicalId, resourceType, physicalId, noun) {
|
|
39036
|
+
const zoneSwitchRefusalError = (why, cause) => new ProvisioningError(`${noun} ${logicalId}: the template changes its hosted zone reference, and cdkd cannot confirm the new reference names the zone the record was recorded in (${why}). Keep the zone key the record already uses.`, resourceType, logicalId, physicalId, cause);
|
|
39037
|
+
if (isRedactedRecordedValue(recordedZone["HostedZoneId"]) || isRedactedRecordedValue(recordedZone["HostedZoneName"])) throw zoneSwitchRefusalError("the recorded zone is redacted");
|
|
39038
|
+
try {
|
|
39039
|
+
return await provider.resolveHostedZoneId(recordedZone, logicalId, resourceType, physicalId, { requireUnambiguousZoneName: true });
|
|
39040
|
+
} catch (error) {
|
|
39041
|
+
throw zoneSwitchRefusalError("the recorded zone could not be resolved", error instanceof Error ? error : void 0);
|
|
39042
|
+
}
|
|
39043
|
+
}
|
|
39044
|
+
function refuseCfnUnresolvableZoneName(provider, value, noun, logicalId, resourceType, physicalId, stateBorne) {
|
|
39045
|
+
if (typeof value !== "string" || value === "") return;
|
|
39046
|
+
if (value.endsWith(".") && value === value.toLowerCase()) return;
|
|
39047
|
+
const message = `${noun} ${logicalId}: HostedZoneName ${zoneNameShown(value)} is not the zone's exact name; CloudFormation resolves only the zone's lower-case name with its trailing dot, and fails this one`;
|
|
39048
|
+
if (stateBorne) {
|
|
39049
|
+
provider.logger.warn(safeMsg`${message}. Resolving it anyway for this state replay.`);
|
|
39050
|
+
return;
|
|
39051
|
+
}
|
|
39052
|
+
throw new ProvisioningError(message, resourceType, logicalId, physicalId);
|
|
39053
|
+
}
|
|
38960
39054
|
|
|
38961
39055
|
// src/provisioning/providers/route53/hosted-zone.ts
|
|
38962
39056
|
async function createHostedZone(logicalId, resourceType, properties, mask, context) {
|
|
@@ -39260,9 +39354,10 @@ async function waitForAcceleratedRecoveryMutable(zoneId, logicalId, resourceType
|
|
|
39260
39354
|
}
|
|
39261
39355
|
|
|
39262
39356
|
// src/provisioning/providers/route53/record-set.ts
|
|
39263
|
-
async function createRecordSet(logicalId, resourceType, properties, mask) {
|
|
39357
|
+
async function createRecordSet(logicalId, resourceType, properties, mask, replayingState = false) {
|
|
39264
39358
|
this.logger.debug(`Creating Route 53 record set ${logicalId}`);
|
|
39265
|
-
|
|
39359
|
+
refuseCfnUnresolvableZoneName(this, properties["HostedZoneName"], "Record set", logicalId, resourceType, void 0, replayingState);
|
|
39360
|
+
const hostedZoneId = await this.resolveHostedZoneId(properties, logicalId, resourceType, void 0, { requireUnambiguousZoneName: true });
|
|
39266
39361
|
const recordName = properties["Name"];
|
|
39267
39362
|
const recordType = properties["Type"];
|
|
39268
39363
|
const compositeId = recordSetCompositeId(hostedZoneId, recordName, recordType);
|
|
@@ -39294,7 +39389,15 @@ async function createRecordSet(logicalId, resourceType, properties, mask) {
|
|
|
39294
39389
|
}
|
|
39295
39390
|
async function updateRecordSet(logicalId, physicalId, resourceType, properties, previousProperties, context) {
|
|
39296
39391
|
this.logger.debug(`Updating Route 53 record set ${logicalId}: ${physicalId}`);
|
|
39297
|
-
const
|
|
39392
|
+
const stateBorne = context?.replayingState === true || context?.desiredFromAwsReadback === true;
|
|
39393
|
+
refuseCfnUnresolvableZoneName(this, properties["HostedZoneName"], "Record set", logicalId, resourceType, physicalId, stateBorne);
|
|
39394
|
+
const recordedComposite = parseRecordSetCompositeId(physicalId);
|
|
39395
|
+
const hostedZoneId = stateBorne && recordedComposite && !zoneReferenceChanged(previousProperties, properties) && this.compositeAgreesWithTemplate(recordedComposite, previousProperties) ? recordedComposite.hostedZoneId : await this.resolveHostedZoneId(properties, logicalId, resourceType, physicalId, { requireUnambiguousZoneName: true });
|
|
39396
|
+
if (zoneReferenceChanged(previousProperties, properties)) {
|
|
39397
|
+
const parsed = parseRecordSetCompositeId(physicalId);
|
|
39398
|
+
const recordedZone = parsed && this.compositeAgreesWithTemplate(parsed, previousProperties) ? parsed.hostedZoneId : await recordedZoneForSwitch(this, previousProperties, logicalId, resourceType, physicalId, "Record set");
|
|
39399
|
+
if (bareHostedZoneId(recordedZone) !== bareHostedZoneId(hostedZoneId)) throw new ProvisioningError(`Record set ${logicalId}: the template's hosted zone (${hostedZoneId}) is not the one the record is in (${recordedZone}). Moving a record to another zone replaces it: name the new zone with the key the record already uses (HostedZoneId or HostedZoneName) so cdkd plans the replacement.`, resourceType, logicalId, physicalId);
|
|
39400
|
+
}
|
|
39298
39401
|
const recordName = properties["Name"];
|
|
39299
39402
|
const recordType = properties["Type"];
|
|
39300
39403
|
const compositeId = recordSetCompositeId(hostedZoneId, recordName, recordType);
|
|
@@ -39485,6 +39588,504 @@ function buildResourceRecordSet(properties) {
|
|
|
39485
39588
|
return recordSet;
|
|
39486
39589
|
}
|
|
39487
39590
|
|
|
39591
|
+
// src/provisioning/providers/route53/record-set-group-shape.ts
|
|
39592
|
+
const RECORD_SET_GROUP_TYPE = "AWS::Route53::RecordSetGroup";
|
|
39593
|
+
const RECORD_IDENTITY_FIELDS = [
|
|
39594
|
+
"Name",
|
|
39595
|
+
"Type",
|
|
39596
|
+
"SetIdentifier"
|
|
39597
|
+
];
|
|
39598
|
+
const RECORD_VALUE_FIELDS = [
|
|
39599
|
+
"TTL",
|
|
39600
|
+
"ResourceRecords",
|
|
39601
|
+
"AliasTarget",
|
|
39602
|
+
"Weight",
|
|
39603
|
+
"Region",
|
|
39604
|
+
"Failover",
|
|
39605
|
+
"MultiValueAnswer",
|
|
39606
|
+
"HealthCheckId",
|
|
39607
|
+
"GeoLocation",
|
|
39608
|
+
"GeoProximityLocation",
|
|
39609
|
+
"CidrRoutingConfig"
|
|
39610
|
+
];
|
|
39611
|
+
function recordSetGroupCompositeId(hostedZoneId, groupName) {
|
|
39612
|
+
return `${hostedZoneId}|${groupName}`;
|
|
39613
|
+
}
|
|
39614
|
+
const GROUP_NAME_MAX_LENGTH = 255;
|
|
39615
|
+
function generatedGroupName(logicalId) {
|
|
39616
|
+
return generateResourceName(logicalId, { maxLength: 255 });
|
|
39617
|
+
}
|
|
39618
|
+
function namesThisGroup(name, logicalId) {
|
|
39619
|
+
return name === logicalId || name.split("-").includes(logicalId);
|
|
39620
|
+
}
|
|
39621
|
+
function parseRecordSetGroupCompositeId(physicalId, logicalId) {
|
|
39622
|
+
const parts = physicalId.split("|");
|
|
39623
|
+
if (parts.length !== 2) return void 0;
|
|
39624
|
+
const [hostedZoneId, groupName] = parts;
|
|
39625
|
+
if (!hostedZoneId || !groupName || !namesThisGroup(groupName, logicalId)) return void 0;
|
|
39626
|
+
return {
|
|
39627
|
+
hostedZoneId,
|
|
39628
|
+
groupName
|
|
39629
|
+
};
|
|
39630
|
+
}
|
|
39631
|
+
function existingGroupName(physicalId, logicalId) {
|
|
39632
|
+
const parsed = parseRecordSetGroupCompositeId(physicalId, logicalId);
|
|
39633
|
+
if (parsed) return parsed.groupName;
|
|
39634
|
+
if (!physicalId.includes("|")) return physicalId;
|
|
39635
|
+
const parts = physicalId.split("|");
|
|
39636
|
+
return parts.length === 2 && parts[1] ? parts[1] : logicalId;
|
|
39637
|
+
}
|
|
39638
|
+
function groupRecordSets(properties) {
|
|
39639
|
+
const raw = properties?.["RecordSets"];
|
|
39640
|
+
if (raw === void 0 || raw === null) return { records: [] };
|
|
39641
|
+
if (!Array.isArray(raw)) return { refusal: "RecordSets is not a list" };
|
|
39642
|
+
const records = [];
|
|
39643
|
+
for (const [index, entry] of raw.entries()) {
|
|
39644
|
+
if (typeof entry !== "object" || entry === null || Array.isArray(entry)) return { refusal: `RecordSets[${index}] is not an object` };
|
|
39645
|
+
records.push(entry);
|
|
39646
|
+
}
|
|
39647
|
+
return { records };
|
|
39648
|
+
}
|
|
39649
|
+
function recordSetKey(record) {
|
|
39650
|
+
const comparable = (value) => typeof value === "string" && value !== "" && !value.includes("{{resolve:") && !isRedactedRecordedValue(value);
|
|
39651
|
+
const name = record["Name"];
|
|
39652
|
+
const type = record["Type"];
|
|
39653
|
+
const setIdentifier = record["SetIdentifier"];
|
|
39654
|
+
if (!comparable(name) || !comparable(type)) return void 0;
|
|
39655
|
+
if (setIdentifier !== void 0 && !comparable(setIdentifier)) return void 0;
|
|
39656
|
+
return JSON.stringify([
|
|
39657
|
+
normalizeRecordName(name),
|
|
39658
|
+
type,
|
|
39659
|
+
setIdentifier ?? ""
|
|
39660
|
+
]);
|
|
39661
|
+
}
|
|
39662
|
+
function groupZoneProperties(properties, records) {
|
|
39663
|
+
const zone = {};
|
|
39664
|
+
for (const key of ["HostedZoneId", "HostedZoneName"]) {
|
|
39665
|
+
let value = properties[key];
|
|
39666
|
+
for (const [index, record] of records.entries()) {
|
|
39667
|
+
const recordValue = record[key];
|
|
39668
|
+
if (recordValue === void 0) continue;
|
|
39669
|
+
if (value === void 0) {
|
|
39670
|
+
value = recordValue;
|
|
39671
|
+
continue;
|
|
39672
|
+
}
|
|
39673
|
+
if (JSON.stringify(recordValue) !== JSON.stringify(value)) return { refusal: `RecordSets[${index}].${key} differs from the ${key} the rest of the group uses; every record of a RecordSetGroup must be in one hosted zone` };
|
|
39674
|
+
}
|
|
39675
|
+
if (value !== void 0) zone[key] = value;
|
|
39676
|
+
}
|
|
39677
|
+
return { zone };
|
|
39678
|
+
}
|
|
39679
|
+
function recordBag(record) {
|
|
39680
|
+
const { HostedZoneId: _zoneId, HostedZoneName: _zoneName, ...rest } = record;
|
|
39681
|
+
return rest;
|
|
39682
|
+
}
|
|
39683
|
+
function groupRefusalError(message, logicalId, physicalId) {
|
|
39684
|
+
return new ProvisioningError(message, RECORD_SET_GROUP_TYPE, logicalId, physicalId);
|
|
39685
|
+
}
|
|
39686
|
+
function sameRecordSet(a, b) {
|
|
39687
|
+
const canonical = (value) => {
|
|
39688
|
+
if (Array.isArray(value)) return value.map(canonical);
|
|
39689
|
+
if (value === null || typeof value !== "object") return value;
|
|
39690
|
+
return Object.fromEntries(Object.keys(value).sort().map((k) => [k, canonical(value[k])]));
|
|
39691
|
+
};
|
|
39692
|
+
const spell = (r) => JSON.stringify(canonical({
|
|
39693
|
+
...r,
|
|
39694
|
+
Name: normalizeRecordName(r.Name ?? ""),
|
|
39695
|
+
...r.AliasTarget && { AliasTarget: {
|
|
39696
|
+
...r.AliasTarget,
|
|
39697
|
+
DNSName: normalizeRecordName(r.AliasTarget.DNSName ?? "")
|
|
39698
|
+
} }
|
|
39699
|
+
}));
|
|
39700
|
+
return spell(a) === spell(b);
|
|
39701
|
+
}
|
|
39702
|
+
const updateBatchClients = /* @__PURE__ */ new WeakMap();
|
|
39703
|
+
function updateBatchClient(provider) {
|
|
39704
|
+
let client = updateBatchClients.get(provider);
|
|
39705
|
+
if (!client) {
|
|
39706
|
+
client = withoutServerErrorRetries(new Route53Client({
|
|
39707
|
+
...ambientClientDefaults(),
|
|
39708
|
+
...provider.providerRegion ? { region: provider.providerRegion } : {}
|
|
39709
|
+
}));
|
|
39710
|
+
updateBatchClients.set(provider, client);
|
|
39711
|
+
}
|
|
39712
|
+
return client;
|
|
39713
|
+
}
|
|
39714
|
+
function isUnambiguousClientRefusal(error) {
|
|
39715
|
+
if (!(error instanceof Error)) return false;
|
|
39716
|
+
if (error.$fault !== "client") return false;
|
|
39717
|
+
return !hasReplayMayCollide(error);
|
|
39718
|
+
}
|
|
39719
|
+
function isRecordNotFoundRefusal(error) {
|
|
39720
|
+
return error instanceof Error && error.name === "InvalidChangeBatch" && /but it was not found/i.test(error.message);
|
|
39721
|
+
}
|
|
39722
|
+
|
|
39723
|
+
// src/provisioning/providers/route53/record-set-group.ts
|
|
39724
|
+
function listedRecords(properties) {
|
|
39725
|
+
const parsed = groupRecordSets(properties);
|
|
39726
|
+
return "refusal" in parsed ? [] : parsed.records;
|
|
39727
|
+
}
|
|
39728
|
+
function refuseCfnGroupZoneShape(provider, properties, records, logicalId, resourceType, physicalId, stateBorne) {
|
|
39729
|
+
const refuse = (message) => {
|
|
39730
|
+
if (stateBorne) provider.logger.warn(safeMsg`${message}. Proceeding for this state replay.`);
|
|
39731
|
+
else throw groupRefusalError(message, logicalId, physicalId);
|
|
39732
|
+
};
|
|
39733
|
+
const index = records.findIndex((record) => record["HostedZoneName"] !== void 0 || record["HostedZoneId"] !== void 0);
|
|
39734
|
+
if (index >= 0) refuse(`Record set group ${logicalId}: RecordSets[${index}] declares a hosted zone, which CloudFormation refuses as an unsupported property of a group's record; name the zone on the group`);
|
|
39735
|
+
const zoneKeys = ["HostedZoneId", "HostedZoneName"].filter((k) => properties[k] !== void 0);
|
|
39736
|
+
if (zoneKeys.length !== 1) refuse(`Record set group ${logicalId}: exactly one of HostedZoneId and HostedZoneName must be specified (the group names ${zoneKeys.length === 0 ? "neither" : "both"})`);
|
|
39737
|
+
const listed = properties["RecordSets"];
|
|
39738
|
+
if (listed === void 0 || listed === null || Array.isArray(listed) && listed.length === 0) refuse(`Record set group ${logicalId}: RecordSets cannot be empty`);
|
|
39739
|
+
refuseCfnUnresolvableZoneName(provider, properties["HostedZoneName"], "Record set group", logicalId, resourceType, physicalId, stateBorne);
|
|
39740
|
+
}
|
|
39741
|
+
function desiredGroup(properties, logicalId, physicalId) {
|
|
39742
|
+
const parsed = groupRecordSets(properties);
|
|
39743
|
+
if ("refusal" in parsed) throw groupRefusalError(`Record set group ${logicalId}: ${parsed.refusal}`, logicalId, physicalId);
|
|
39744
|
+
for (const [index, record] of parsed.records.entries()) if (recordSetKey(record) === void 0) throw groupRefusalError(`Record set group ${logicalId}: RecordSets[${index}] needs a plain string Name and Type (and SetIdentifier, when set) to be written`, logicalId, physicalId);
|
|
39745
|
+
const zone = groupZoneProperties(properties, parsed.records);
|
|
39746
|
+
if ("refusal" in zone) throw groupRefusalError(`Record set group ${logicalId}: ${zone.refusal}`, logicalId, physicalId);
|
|
39747
|
+
return {
|
|
39748
|
+
records: parsed.records,
|
|
39749
|
+
zone: zone.zone
|
|
39750
|
+
};
|
|
39751
|
+
}
|
|
39752
|
+
const groupSubject = {
|
|
39753
|
+
noun: "record set group",
|
|
39754
|
+
remedy: "set HostedZoneId explicitly"
|
|
39755
|
+
};
|
|
39756
|
+
async function createRecordSetGroup(logicalId, resourceType, properties, mask, replayingState = false) {
|
|
39757
|
+
this.logger.debug(safeMsg`Creating Route 53 record set group ${logicalId}`);
|
|
39758
|
+
refuseCfnGroupZoneShape(this, properties, listedRecords(properties), logicalId, resourceType, void 0, replayingState);
|
|
39759
|
+
const { records, zone } = desiredGroup(properties, logicalId, void 0);
|
|
39760
|
+
const hostedZoneId = await this.resolveHostedZoneId(zone, logicalId, resourceType, void 0, {
|
|
39761
|
+
requireUnambiguousZoneName: true,
|
|
39762
|
+
subject: groupSubject
|
|
39763
|
+
});
|
|
39764
|
+
const compositeId = recordSetGroupCompositeId(hostedZoneId, generatedGroupName(logicalId));
|
|
39765
|
+
if (records.length === 0) {
|
|
39766
|
+
this.logger.debug(safeMsg`Record set group ${logicalId} declares no records; nothing to create`);
|
|
39767
|
+
return {
|
|
39768
|
+
physicalId: compositeId,
|
|
39769
|
+
attributes: {}
|
|
39770
|
+
};
|
|
39771
|
+
}
|
|
39772
|
+
try {
|
|
39773
|
+
const comment = properties["Comment"];
|
|
39774
|
+
await this.getClient().send(new ChangeResourceRecordSetsCommand({
|
|
39775
|
+
HostedZoneId: hostedZoneId,
|
|
39776
|
+
ChangeBatch: {
|
|
39777
|
+
...typeof comment === "string" && comment ? { Comment: comment } : {},
|
|
39778
|
+
Changes: records.map((record) => ({
|
|
39779
|
+
Action: "CREATE",
|
|
39780
|
+
ResourceRecordSet: this.buildResourceRecordSet(recordBag(record))
|
|
39781
|
+
}))
|
|
39782
|
+
}
|
|
39783
|
+
}));
|
|
39784
|
+
this.logger.debug(safeMsg`Successfully created record set group ${logicalId}: ${compositeId}`);
|
|
39785
|
+
return {
|
|
39786
|
+
physicalId: compositeId,
|
|
39787
|
+
attributes: {}
|
|
39788
|
+
};
|
|
39789
|
+
} catch (error) {
|
|
39790
|
+
if (error instanceof ProvisioningError) throw error;
|
|
39791
|
+
const cause = error instanceof Error ? error : void 0;
|
|
39792
|
+
const cnameConflict = isCnameConflictRefusal(error);
|
|
39793
|
+
const wrapped = this.wrapCaughtError(mask, error, (text) => new ProvisioningError(`Failed to create record set group ${logicalId}${cnameConflict ? CNAME_CONFLICT_COLLISION_NOTE : ""}: ${text}`, resourceType, logicalId, void 0, cause));
|
|
39794
|
+
throw cnameConflict ? markNameCollision(wrapped) : wrapped;
|
|
39795
|
+
}
|
|
39796
|
+
}
|
|
39797
|
+
async function existingGroupZone(physicalId, zone, logicalId, resourceType) {
|
|
39798
|
+
const parsed = parseRecordSetGroupCompositeId(physicalId, logicalId);
|
|
39799
|
+
if (parsed) return parsed.hostedZoneId;
|
|
39800
|
+
return this.resolveHostedZoneId(zone, logicalId, resourceType, physicalId, {
|
|
39801
|
+
requireUnambiguousZoneName: true,
|
|
39802
|
+
subject: groupSubject
|
|
39803
|
+
});
|
|
39804
|
+
}
|
|
39805
|
+
async function updateRecordSetGroup(logicalId, physicalId, resourceType, properties, previousProperties, context) {
|
|
39806
|
+
const progress = {
|
|
39807
|
+
sent: false,
|
|
39808
|
+
clientRefused: false
|
|
39809
|
+
};
|
|
39810
|
+
try {
|
|
39811
|
+
return await applyRecordSetGroupUpdate.call(this, logicalId, physicalId, resourceType, properties, previousProperties, context, progress);
|
|
39812
|
+
} catch (error) {
|
|
39813
|
+
const wroteNothing = !progress.sent || progress.clientRefused;
|
|
39814
|
+
if (error instanceof Error && wroteNothing && getPriorAttempts(logicalId)?.possiblyLanded() !== true) throw markRefusedBeforeApplying(error);
|
|
39815
|
+
throw error;
|
|
39816
|
+
}
|
|
39817
|
+
}
|
|
39818
|
+
async function applyRecordSetGroupUpdate(logicalId, physicalId, resourceType, properties, previousProperties, context, progress) {
|
|
39819
|
+
this.logger.debug(safeMsg`Updating Route 53 record set group ${logicalId}: ${physicalId}`);
|
|
39820
|
+
refuseCfnGroupZoneShape(this, properties, listedRecords(properties), logicalId, resourceType, physicalId, context?.replayingState === true || context?.desiredFromAwsReadback === true);
|
|
39821
|
+
const { records, zone } = desiredGroup(properties, logicalId, physicalId);
|
|
39822
|
+
const previous = groupRecordSets(previousProperties);
|
|
39823
|
+
if ("refusal" in previous) throw groupRefusalError(`Record set group ${logicalId}: the recorded ${previous.refusal}, so cdkd cannot tell which records to remove`, logicalId, physicalId);
|
|
39824
|
+
const previousByKey = /* @__PURE__ */ new Map();
|
|
39825
|
+
for (const [index, record] of previous.records.entries()) {
|
|
39826
|
+
const key = recordSetKey(record);
|
|
39827
|
+
if (key === void 0) throw groupRefusalError(`Record set group ${logicalId}: recorded RecordSets[${index}] has no readable Name / Type / SetIdentifier, so cdkd cannot tell which live record it is`, logicalId, physicalId);
|
|
39828
|
+
previousByKey.set(key, record);
|
|
39829
|
+
}
|
|
39830
|
+
const hostedZoneId = await existingGroupZone.call(this, physicalId, zone, logicalId, resourceType);
|
|
39831
|
+
const compositeId = recordSetGroupCompositeId(hostedZoneId, existingGroupName(physicalId, logicalId));
|
|
39832
|
+
const desiredZoneId = zone["HostedZoneId"];
|
|
39833
|
+
let desiredZone = typeof desiredZoneId === "string" ? desiredZoneId : void 0;
|
|
39834
|
+
const previousZone = groupZoneProperties(previousProperties, "refusal" in previous ? [] : previous.records);
|
|
39835
|
+
if (desiredZone === void 0 && typeof zone["HostedZoneName"] === "string" && !("refusal" in previousZone) && zoneReferenceChanged(previousZone.zone, zone)) desiredZone = await this.resolveHostedZoneId(zone, logicalId, resourceType, physicalId, {
|
|
39836
|
+
requireUnambiguousZoneName: true,
|
|
39837
|
+
subject: groupSubject
|
|
39838
|
+
});
|
|
39839
|
+
let recordedZone = hostedZoneId;
|
|
39840
|
+
if (!parseRecordSetGroupCompositeId(physicalId, logicalId) && !("refusal" in previousZone) && zoneReferenceChanged(previousZone.zone, zone)) recordedZone = await recordedZoneForSwitch(this, previousZone.zone, logicalId, resourceType, physicalId, "Record set group");
|
|
39841
|
+
if (desiredZone !== void 0 && bareHostedZoneId(desiredZone) !== bareHostedZoneId(recordedZone)) throw groupRefusalError(`Record set group ${logicalId}: the template's hosted zone differs from the one its records are in (${recordedZone}). Moving a group to another zone replaces it: name the new zone with the key the group already uses (HostedZoneId or HostedZoneName) so cdkd plans the replacement`, logicalId, physicalId);
|
|
39842
|
+
try {
|
|
39843
|
+
const desiredKeys = /* @__PURE__ */ new Set();
|
|
39844
|
+
const changes = [];
|
|
39845
|
+
for (const record of records) {
|
|
39846
|
+
const key = recordSetKey(record);
|
|
39847
|
+
desiredKeys.add(key);
|
|
39848
|
+
const desired = this.buildResourceRecordSet(recordBag(record));
|
|
39849
|
+
const recorded = previousByKey.get(key);
|
|
39850
|
+
if (recorded === void 0) {
|
|
39851
|
+
const live = await ownEarlierWriteMayHold(logicalId, key, desired, this) ? await this.findLiveRecordSet(hostedZoneId, recordBag(record)) : void 0;
|
|
39852
|
+
if (live && sameRecordSet(live, desired)) {
|
|
39853
|
+
this.logger.debug(safeMsg`Record set group ${logicalId}: an added record is already live with the desired values; not creating it again`);
|
|
39854
|
+
continue;
|
|
39855
|
+
}
|
|
39856
|
+
changes.push({
|
|
39857
|
+
Action: "CREATE",
|
|
39858
|
+
ResourceRecordSet: desired
|
|
39859
|
+
});
|
|
39860
|
+
continue;
|
|
39861
|
+
}
|
|
39862
|
+
const before = this.buildResourceRecordSet(recordBag(recorded));
|
|
39863
|
+
if (JSON.stringify(before) !== JSON.stringify(desired)) changes.push({
|
|
39864
|
+
Action: "UPSERT",
|
|
39865
|
+
ResourceRecordSet: desired
|
|
39866
|
+
});
|
|
39867
|
+
}
|
|
39868
|
+
for (const [key, recorded] of previousByKey) {
|
|
39869
|
+
if (desiredKeys.has(key)) continue;
|
|
39870
|
+
const live = await this.findLiveRecordSet(hostedZoneId, recordBag(recorded));
|
|
39871
|
+
if (live) changes.push({
|
|
39872
|
+
Action: "DELETE",
|
|
39873
|
+
ResourceRecordSet: live
|
|
39874
|
+
});
|
|
39875
|
+
else this.logger.warn(safeMsg`Record set group ${logicalId}: a record removed from the template was not found in ${hostedZoneId}; nothing was deleted for it`);
|
|
39876
|
+
}
|
|
39877
|
+
if (changes.length > 0) {
|
|
39878
|
+
const comment = properties["Comment"];
|
|
39879
|
+
progress.sent = true;
|
|
39880
|
+
await updateBatchClient(this).send(new ChangeResourceRecordSetsCommand({
|
|
39881
|
+
HostedZoneId: hostedZoneId,
|
|
39882
|
+
ChangeBatch: {
|
|
39883
|
+
...typeof comment === "string" && comment ? { Comment: comment } : {},
|
|
39884
|
+
Changes: [...changes.filter((c) => c.Action === "DELETE"), ...changes.filter((c) => c.Action !== "DELETE")]
|
|
39885
|
+
}
|
|
39886
|
+
}));
|
|
39887
|
+
}
|
|
39888
|
+
this.logger.debug(safeMsg`Successfully updated record set group ${logicalId}`);
|
|
39889
|
+
return {
|
|
39890
|
+
physicalId: compositeId,
|
|
39891
|
+
wasReplaced: false,
|
|
39892
|
+
attributes: {}
|
|
39893
|
+
};
|
|
39894
|
+
} catch (error) {
|
|
39895
|
+
if (error instanceof ProvisioningError) throw error;
|
|
39896
|
+
if (progress.sent) {
|
|
39897
|
+
if (isUnambiguousClientRefusal(error)) progress.clientRefused = true;
|
|
39898
|
+
else getPriorAttempts(logicalId)?.notePossiblyLanded();
|
|
39899
|
+
}
|
|
39900
|
+
const cause = error instanceof Error ? error : void 0;
|
|
39901
|
+
throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to update record set group ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
39902
|
+
}
|
|
39903
|
+
}
|
|
39904
|
+
async function ownEarlierWriteMayHold(logicalId, key, desired, provider) {
|
|
39905
|
+
const lookup = getPriorAttempts(logicalId);
|
|
39906
|
+
if (!lookup) return false;
|
|
39907
|
+
if (lookup.possiblyLanded()) return true;
|
|
39908
|
+
let bags;
|
|
39909
|
+
try {
|
|
39910
|
+
bags = await lookup.attempts();
|
|
39911
|
+
} catch {
|
|
39912
|
+
return false;
|
|
39913
|
+
}
|
|
39914
|
+
return bags.some((bag) => {
|
|
39915
|
+
const parsed = groupRecordSets(bag);
|
|
39916
|
+
if ("refusal" in parsed) return false;
|
|
39917
|
+
return parsed.records.some((r) => recordSetKey(r) === key && sameRecordSet(provider.buildResourceRecordSet(recordBag(r)), desired));
|
|
39918
|
+
});
|
|
39919
|
+
}
|
|
39920
|
+
async function deleteRecordSetGroup(logicalId, physicalId, resourceType, properties, context) {
|
|
39921
|
+
this.logger.debug(safeMsg`Deleting Route 53 record set group ${logicalId}: ${physicalId}`);
|
|
39922
|
+
if (!properties) throw groupRefusalError(`Properties required to delete record set group ${logicalId}`, logicalId, physicalId);
|
|
39923
|
+
const parsed = groupRecordSets(properties);
|
|
39924
|
+
if ("refusal" in parsed) throw groupRefusalError(`Record set group ${logicalId}: the recorded ${parsed.refusal}, so cdkd cannot tell which records to delete`, logicalId, physicalId);
|
|
39925
|
+
const records = parsed.records;
|
|
39926
|
+
for (const [index, record] of records.entries()) {
|
|
39927
|
+
if (recordSetKey(record) !== void 0) continue;
|
|
39928
|
+
const redactedSkip = redactedDeleteAddressSkip(this.logger, logicalId, "Route 53 record set group", redactedDeleteAddressFields(Object.fromEntries(RECORD_IDENTITY_FIELDS.map((f) => [f, record[f]]))));
|
|
39929
|
+
if (redactedSkip) return redactedSkip;
|
|
39930
|
+
throw groupRefusalError(`Record set group ${logicalId}: recorded RecordSets[${index}] has no readable Name / Type / SetIdentifier, so cdkd cannot tell which live record to delete`, logicalId, physicalId);
|
|
39931
|
+
}
|
|
39932
|
+
const zoneProps = groupZoneProperties(properties, records);
|
|
39933
|
+
if ("refusal" in zoneProps) throw groupRefusalError(`Record set group ${logicalId}: ${zoneProps.refusal}`, logicalId, physicalId);
|
|
39934
|
+
const alreadyGone = async () => {
|
|
39935
|
+
const clientRegion = await this.getClient().config.region();
|
|
39936
|
+
assertRegionMatch(clientRegion, context?.expectedRegion, resourceType, logicalId, physicalId);
|
|
39937
|
+
};
|
|
39938
|
+
let hostedZoneId;
|
|
39939
|
+
const composite = parseRecordSetGroupCompositeId(physicalId, logicalId);
|
|
39940
|
+
if (composite) hostedZoneId = composite.hostedZoneId;
|
|
39941
|
+
else {
|
|
39942
|
+
const redactedZoneSkip = redactedDeleteAddressSkip(this.logger, logicalId, "Route 53 record set group", redactedDeleteAddressFields({
|
|
39943
|
+
HostedZoneId: zoneProps.zone["HostedZoneId"],
|
|
39944
|
+
HostedZoneName: zoneProps.zone["HostedZoneName"]
|
|
39945
|
+
}));
|
|
39946
|
+
if (redactedZoneSkip) return redactedZoneSkip;
|
|
39947
|
+
try {
|
|
39948
|
+
hostedZoneId = await existingGroupZone.call(this, physicalId, zoneProps.zone, logicalId, resourceType);
|
|
39949
|
+
} catch (error) {
|
|
39950
|
+
if (error instanceof HostedZoneNameNotFoundError) {
|
|
39951
|
+
await alreadyGone();
|
|
39952
|
+
this.logger.warn(safeMsg`Hosted zone "${String(zoneProps.zone["HostedZoneName"])}" for record set group ${logicalId} (${physicalId}) no longer exists; treating its records as already deleted and dropping the group from state.`);
|
|
39953
|
+
return;
|
|
39954
|
+
}
|
|
39955
|
+
throw error;
|
|
39956
|
+
}
|
|
39957
|
+
}
|
|
39958
|
+
if (records.length === 0) return;
|
|
39959
|
+
try {
|
|
39960
|
+
const deletes = [];
|
|
39961
|
+
for (const record of records) {
|
|
39962
|
+
const bag = recordBag(record);
|
|
39963
|
+
const live = await this.findLiveRecordSet(hostedZoneId, bag);
|
|
39964
|
+
if (!live) {
|
|
39965
|
+
const redactedSkip = redactedDeleteAddressSkip(this.logger, logicalId, "Route 53 record set group", redactedDeleteAddressFields(Object.fromEntries(RECORD_VALUE_FIELDS.map((f) => [f, record[f]]))));
|
|
39966
|
+
if (redactedSkip) return redactedSkip;
|
|
39967
|
+
}
|
|
39968
|
+
deletes.push({
|
|
39969
|
+
record,
|
|
39970
|
+
set: live ?? this.buildResourceRecordSet(bag)
|
|
39971
|
+
});
|
|
39972
|
+
}
|
|
39973
|
+
const send = (sets) => this.getClient().send(new ChangeResourceRecordSetsCommand({
|
|
39974
|
+
HostedZoneId: hostedZoneId,
|
|
39975
|
+
ChangeBatch: { Changes: sets.map((set) => ({
|
|
39976
|
+
Action: "DELETE",
|
|
39977
|
+
ResourceRecordSet: set
|
|
39978
|
+
})) }
|
|
39979
|
+
}));
|
|
39980
|
+
const sendSettled = async (sets) => {
|
|
39981
|
+
try {
|
|
39982
|
+
await send(sets);
|
|
39983
|
+
} catch (error) {
|
|
39984
|
+
if (!isZoneDisabledForMutationError(error)) throw error;
|
|
39985
|
+
this.logger.info(safeMsg`Hosted zone ${hostedZoneId} is mid AcceleratedRecovery transition (marked disabled for mutation); waiting for it to settle before retrying delete of record set group ${logicalId}`);
|
|
39986
|
+
await this.waitForAcceleratedRecoveryMutable(hostedZoneId, logicalId, resourceType);
|
|
39987
|
+
await send(sets);
|
|
39988
|
+
}
|
|
39989
|
+
};
|
|
39990
|
+
try {
|
|
39991
|
+
await sendSettled(deletes.map((d) => d.set));
|
|
39992
|
+
} catch (error) {
|
|
39993
|
+
if (!isRecordNotFoundRefusal(error)) throw error;
|
|
39994
|
+
this.logger.debug(safeMsg`Record set group ${logicalId}: the batch delete named a record that is gone; deleting record by record`);
|
|
39995
|
+
for (const { set } of deletes) try {
|
|
39996
|
+
await sendSettled([set]);
|
|
39997
|
+
} catch (perRecordError) {
|
|
39998
|
+
if (!isRecordNotFoundRefusal(perRecordError)) throw perRecordError;
|
|
39999
|
+
await alreadyGone();
|
|
40000
|
+
}
|
|
40001
|
+
}
|
|
40002
|
+
this.logger.debug(safeMsg`Successfully deleted record set group ${logicalId}`);
|
|
40003
|
+
} catch (error) {
|
|
40004
|
+
if (error instanceof Error && error.name === "NoSuchHostedZone") {
|
|
40005
|
+
await alreadyGone();
|
|
40006
|
+
this.logger.debug(safeMsg`Hosted zone for record set group ${physicalId} does not exist, skipping deletion`);
|
|
40007
|
+
return;
|
|
40008
|
+
}
|
|
40009
|
+
if (error instanceof ProvisioningError) throw error;
|
|
40010
|
+
const cause = error instanceof Error ? error : void 0;
|
|
40011
|
+
throw this.wrapDeleteError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to delete record set group ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
40012
|
+
}
|
|
40013
|
+
}
|
|
40014
|
+
async function readRecordSetGroup(physicalId, logicalId, properties) {
|
|
40015
|
+
const parsed = groupRecordSets(properties);
|
|
40016
|
+
if ("refusal" in parsed) return void 0;
|
|
40017
|
+
const zoneProps = groupZoneProperties(properties ?? {}, parsed.records);
|
|
40018
|
+
if ("refusal" in zoneProps) return void 0;
|
|
40019
|
+
let hostedZoneId;
|
|
40020
|
+
try {
|
|
40021
|
+
hostedZoneId = await existingGroupZone.call(this, physicalId, zoneProps.zone, logicalId, RECORD_SET_GROUP_TYPE);
|
|
40022
|
+
} catch {
|
|
40023
|
+
return;
|
|
40024
|
+
}
|
|
40025
|
+
const observed = [];
|
|
40026
|
+
for (const record of parsed.records) {
|
|
40027
|
+
const name = record["Name"];
|
|
40028
|
+
const type = record["Type"];
|
|
40029
|
+
if (typeof name !== "string" || typeof type !== "string") return void 0;
|
|
40030
|
+
const live = await this.readRecordSetAt({
|
|
40031
|
+
hostedZoneId,
|
|
40032
|
+
name,
|
|
40033
|
+
type
|
|
40034
|
+
}, recordBag(record));
|
|
40035
|
+
if (live === void 0 || live === RESOURCE_NOT_FOUND) return live;
|
|
40036
|
+
const { HostedZoneId: _zoneId, ...rest } = live;
|
|
40037
|
+
observed.push({
|
|
40038
|
+
...rest,
|
|
40039
|
+
...record["HostedZoneId"] !== void 0 ? { HostedZoneId: record["HostedZoneId"] } : {},
|
|
40040
|
+
...record["HostedZoneName"] !== void 0 ? { HostedZoneName: record["HostedZoneName"] } : {}
|
|
40041
|
+
});
|
|
40042
|
+
}
|
|
40043
|
+
return { RecordSets: observed };
|
|
40044
|
+
}
|
|
40045
|
+
async function importRecordSetGroup(input) {
|
|
40046
|
+
const known = input.knownPhysicalId;
|
|
40047
|
+
if (!known) return null;
|
|
40048
|
+
const adoptVerbatim = (reason) => {
|
|
40049
|
+
this.logger.warn(safeMsg`Record set group ${input.logicalId}: could not verify physical id '${known}' (${reason}). Adopting it as-is.`);
|
|
40050
|
+
return {
|
|
40051
|
+
physicalId: known,
|
|
40052
|
+
attributes: {}
|
|
40053
|
+
};
|
|
40054
|
+
};
|
|
40055
|
+
const knownComposite = parseRecordSetGroupCompositeId(known, input.logicalId);
|
|
40056
|
+
const decline = (reason) => {
|
|
40057
|
+
this.logger.warn(safeMsg`Record set group ${input.logicalId}: could not verify physical id '${known}' (${reason}). Not importing it.`);
|
|
40058
|
+
return null;
|
|
40059
|
+
};
|
|
40060
|
+
const unverified = (reason) => knownComposite ? decline(reason) : adoptVerbatim(reason);
|
|
40061
|
+
const parsed = groupRecordSets(input.properties);
|
|
40062
|
+
if ("refusal" in parsed) return unverified(parsed.refusal);
|
|
40063
|
+
const zoneProps = groupZoneProperties(input.properties, parsed.records);
|
|
40064
|
+
if ("refusal" in zoneProps) return unverified(zoneProps.refusal);
|
|
40065
|
+
let hostedZoneId;
|
|
40066
|
+
if (knownComposite) hostedZoneId = knownComposite.hostedZoneId;
|
|
40067
|
+
else try {
|
|
40068
|
+
hostedZoneId = await this.resolveHostedZoneId(zoneProps.zone, input.logicalId, input.resourceType, known, {
|
|
40069
|
+
requireUnambiguousZoneName: true,
|
|
40070
|
+
subject: groupSubject
|
|
40071
|
+
});
|
|
40072
|
+
} catch {
|
|
40073
|
+
return adoptVerbatim("the template does not unambiguously resolve to a hosted zone");
|
|
40074
|
+
}
|
|
40075
|
+
let observed;
|
|
40076
|
+
try {
|
|
40077
|
+
observed = await readRecordSetGroup.call(this, recordSetGroupCompositeId(hostedZoneId, existingGroupName(known, input.logicalId)), input.logicalId, input.properties);
|
|
40078
|
+
} catch (err) {
|
|
40079
|
+
const head = `Record set group ${input.logicalId}: verification of '${known}' failed: `;
|
|
40080
|
+
return unverified(`verification failed: ${this.warnFailureText(head, err, void 0).replace(/\.$/, "")}`);
|
|
40081
|
+
}
|
|
40082
|
+
if (!observed || observed === RESOURCE_NOT_FOUND) return unverified("not every record was found under the resolved hosted zone");
|
|
40083
|
+
return {
|
|
40084
|
+
physicalId: recordSetGroupCompositeId(hostedZoneId, existingGroupName(known, input.logicalId)),
|
|
40085
|
+
attributes: {}
|
|
40086
|
+
};
|
|
40087
|
+
}
|
|
40088
|
+
|
|
39488
40089
|
// src/provisioning/providers/route53/zone-config.ts
|
|
39489
40090
|
async function applyHostedZoneTags(zoneId, properties, logicalId, previousProperties, mask) {
|
|
39490
40091
|
const desiredRaw = properties["HostedZoneTags"];
|
|
@@ -39717,6 +40318,7 @@ async function readCurrentState$18(physicalId, _logicalId, resourceType, propert
|
|
|
39717
40318
|
switch (resourceType) {
|
|
39718
40319
|
case "AWS::Route53::HostedZone": return this.readHostedZone(physicalId, properties);
|
|
39719
40320
|
case "AWS::Route53::RecordSet": return this.readRecordSet(physicalId, properties);
|
|
40321
|
+
case "AWS::Route53::RecordSetGroup": return this.readRecordSetGroup(physicalId, _logicalId, properties);
|
|
39720
40322
|
default: return;
|
|
39721
40323
|
}
|
|
39722
40324
|
}
|
|
@@ -39871,6 +40473,7 @@ async function importImpl$20(input) {
|
|
|
39871
40473
|
switch (input.resourceType) {
|
|
39872
40474
|
case "AWS::Route53::HostedZone": return this.importHostedZone(input);
|
|
39873
40475
|
case "AWS::Route53::RecordSet": return this.importRecordSet(input);
|
|
40476
|
+
case "AWS::Route53::RecordSetGroup": return this.importRecordSetGroup(input);
|
|
39874
40477
|
default: return null;
|
|
39875
40478
|
}
|
|
39876
40479
|
}
|
|
@@ -39987,33 +40590,42 @@ var Route53Provider = class {
|
|
|
39987
40590
|
warnFailureText(head, error, mask) {
|
|
39988
40591
|
return warnFailureText.call(this, head, error, mask);
|
|
39989
40592
|
}
|
|
39990
|
-
handledProperties = /* @__PURE__ */ new Map([
|
|
39991
|
-
"
|
|
39992
|
-
|
|
39993
|
-
|
|
39994
|
-
|
|
39995
|
-
|
|
39996
|
-
|
|
39997
|
-
|
|
39998
|
-
|
|
39999
|
-
|
|
40000
|
-
"
|
|
40001
|
-
|
|
40002
|
-
|
|
40003
|
-
|
|
40004
|
-
|
|
40005
|
-
|
|
40006
|
-
|
|
40007
|
-
|
|
40008
|
-
|
|
40009
|
-
|
|
40010
|
-
|
|
40011
|
-
|
|
40012
|
-
|
|
40013
|
-
|
|
40014
|
-
|
|
40015
|
-
|
|
40016
|
-
|
|
40593
|
+
handledProperties = /* @__PURE__ */ new Map([
|
|
40594
|
+
["AWS::Route53::HostedZone", /* @__PURE__ */ new Set([
|
|
40595
|
+
"Name",
|
|
40596
|
+
"HostedZoneConfig",
|
|
40597
|
+
"HostedZoneTags",
|
|
40598
|
+
"VPCs",
|
|
40599
|
+
"QueryLoggingConfig",
|
|
40600
|
+
"HostedZoneFeatures",
|
|
40601
|
+
"DelegationSetId"
|
|
40602
|
+
])],
|
|
40603
|
+
["AWS::Route53::RecordSet", /* @__PURE__ */ new Set([
|
|
40604
|
+
"HostedZoneId",
|
|
40605
|
+
"HostedZoneName",
|
|
40606
|
+
"Name",
|
|
40607
|
+
"Type",
|
|
40608
|
+
"TTL",
|
|
40609
|
+
"ResourceRecords",
|
|
40610
|
+
"AliasTarget",
|
|
40611
|
+
"SetIdentifier",
|
|
40612
|
+
"Weight",
|
|
40613
|
+
"Region",
|
|
40614
|
+
"Failover",
|
|
40615
|
+
"MultiValueAnswer",
|
|
40616
|
+
"HealthCheckId",
|
|
40617
|
+
"Comment",
|
|
40618
|
+
"GeoLocation",
|
|
40619
|
+
"GeoProximityLocation",
|
|
40620
|
+
"CidrRoutingConfig"
|
|
40621
|
+
])],
|
|
40622
|
+
["AWS::Route53::RecordSetGroup", /* @__PURE__ */ new Set([
|
|
40623
|
+
"HostedZoneId",
|
|
40624
|
+
"HostedZoneName",
|
|
40625
|
+
"Comment",
|
|
40626
|
+
"RecordSets"
|
|
40627
|
+
])]
|
|
40628
|
+
]);
|
|
40017
40629
|
getClient() {
|
|
40018
40630
|
return getClient$8.call(this);
|
|
40019
40631
|
}
|
|
@@ -40050,8 +40662,8 @@ var Route53Provider = class {
|
|
|
40050
40662
|
getHostedZoneAttribute(physicalId, attributeName) {
|
|
40051
40663
|
return getHostedZoneAttribute.call(this, physicalId, attributeName);
|
|
40052
40664
|
}
|
|
40053
|
-
createRecordSet(logicalId, resourceType, properties, mask) {
|
|
40054
|
-
return createRecordSet.call(this, logicalId, resourceType, properties, mask);
|
|
40665
|
+
createRecordSet(logicalId, resourceType, properties, mask, replayingState) {
|
|
40666
|
+
return createRecordSet.call(this, logicalId, resourceType, properties, mask, replayingState);
|
|
40055
40667
|
}
|
|
40056
40668
|
updateRecordSet(logicalId, physicalId, resourceType, properties, previousProperties, context) {
|
|
40057
40669
|
return updateRecordSet.call(this, logicalId, physicalId, resourceType, properties, previousProperties, context);
|
|
@@ -40062,6 +40674,21 @@ var Route53Provider = class {
|
|
|
40062
40674
|
deleteRecordSet(logicalId, physicalId, resourceType, properties, context) {
|
|
40063
40675
|
return deleteRecordSet.call(this, logicalId, physicalId, resourceType, properties, context);
|
|
40064
40676
|
}
|
|
40677
|
+
createRecordSetGroup(logicalId, resourceType, properties, mask, replayingState) {
|
|
40678
|
+
return createRecordSetGroup.call(this, logicalId, resourceType, properties, mask, replayingState);
|
|
40679
|
+
}
|
|
40680
|
+
updateRecordSetGroup(logicalId, physicalId, resourceType, properties, previousProperties, context) {
|
|
40681
|
+
return updateRecordSetGroup.call(this, logicalId, physicalId, resourceType, properties, previousProperties, context);
|
|
40682
|
+
}
|
|
40683
|
+
deleteRecordSetGroup(logicalId, physicalId, resourceType, properties, context) {
|
|
40684
|
+
return deleteRecordSetGroup.call(this, logicalId, physicalId, resourceType, properties, context);
|
|
40685
|
+
}
|
|
40686
|
+
readRecordSetGroup(physicalId, logicalId, properties) {
|
|
40687
|
+
return readRecordSetGroup.call(this, physicalId, logicalId, properties);
|
|
40688
|
+
}
|
|
40689
|
+
importRecordSetGroup(input) {
|
|
40690
|
+
return importRecordSetGroup.call(this, input);
|
|
40691
|
+
}
|
|
40065
40692
|
waitForAcceleratedRecoveryFeatureSettled(zoneId, logicalId, resourceType, enabled, freshZone) {
|
|
40066
40693
|
return waitForAcceleratedRecoveryFeatureSettled.call(this, zoneId, logicalId, resourceType, enabled, freshZone);
|
|
40067
40694
|
}
|
|
@@ -63678,4 +64305,4 @@ var ACMCertificateProvider = class {
|
|
|
63678
64305
|
};
|
|
63679
64306
|
|
|
63680
64307
|
export { ACMCertificateProvider, ASGProvider, AgentCoreBrowserProvider, AgentCoreCodeInterpreterProvider, AgentCoreEvaluatorProvider, AgentCoreRuntimeProvider, ApiGatewayProvider, ApiGatewayV2Provider, AppConfigEnvironmentProvider, 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 };
|
|
63681
|
-
//# sourceMappingURL=provider-classes-
|
|
64308
|
+
//# sourceMappingURL=provider-classes-CzitNbPu.js.map
|