@cdkd/cli 0.365.0 → 0.366.1
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-AnEvWPy0.js → ambient-client-defaults-CvOlhm1d.js} +16 -3
- package/dist/ambient-client-defaults-CvOlhm1d.js.map +1 -0
- package/dist/{asg-provider-BzCU3XtA.js → asg-provider-CBS6w9nU.js} +6 -6
- package/dist/{asg-provider-BzCU3XtA.js.map → asg-provider-CBS6w9nU.js.map} +1 -1
- package/dist/cli.js +3 -3
- package/dist/{custom-resource-runtime-SB_NsQMH.js → custom-resource-runtime-nKBSJ8xg.js} +6 -6
- package/dist/{custom-resource-runtime-SB_NsQMH.js.map → custom-resource-runtime-nKBSJ8xg.js.map} +1 -1
- package/dist/{db-associated-roles-D1wmFO_Y.js → db-associated-roles-B1qNCxK9.js} +2 -2
- package/dist/{db-associated-roles-D1wmFO_Y.js.map → db-associated-roles-B1qNCxK9.js.map} +1 -1
- package/dist/{delete-started-BJNrzLUk.js → delete-started-BdH7k4V-.js} +6 -6
- package/dist/{delete-started-BJNrzLUk.js.map → delete-started-BdH7k4V-.js.map} +1 -1
- package/dist/{deploy-engine-BSqVfcSN.js → deploy-engine-BrbeNr1n.js} +370 -120
- package/dist/deploy-engine-BrbeNr1n.js.map +1 -0
- package/dist/{ec2-termination-protection-ekOvhSp9.js → ec2-termination-protection-C-QH13lG.js} +11 -6
- package/dist/ec2-termination-protection-C-QH13lG.js.map +1 -0
- package/dist/{ecr-uri-VpDi19pi.js → ecr-uri-7-3D0mhp.js} +2 -2
- package/dist/{ecr-uri-VpDi19pi.js.map → ecr-uri-7-3D0mhp.js.map} +1 -1
- package/dist/{expected-bucket-owner-CmPtCsrQ.js → expected-bucket-owner-C9e1dPk6.js} +2 -2
- package/dist/{expected-bucket-owner-CmPtCsrQ.js.map → expected-bucket-owner-C9e1dPk6.js.map} +1 -1
- package/dist/{iam-role-provider-Ct6UbKFo.js → iam-role-provider-ChwJY8pn.js} +11 -10
- package/dist/iam-role-provider-ChwJY8pn.js.map +1 -0
- package/dist/{image-plan-gTOaUUbI.js → image-plan-B1aW8zVe.js} +8 -8
- package/dist/{image-plan-gTOaUUbI.js.map → image-plan-B1aW8zVe.js.map} +1 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -5
- package/dist/{logger-IBUeRw1z.js → logger-0WCzMnXc.js} +6 -2
- package/dist/logger-0WCzMnXc.js.map +1 -0
- package/dist/{neptune-provider-QgaV_sKy.js → neptune-provider-BEkpYrGj.js} +7 -7
- package/dist/{neptune-provider-QgaV_sKy.js.map → neptune-provider-BEkpYrGj.js.map} +1 -1
- package/dist/{program-tHhew1Z5.js → program-73k0SoOP.js} +368 -55
- package/dist/program-73k0SoOP.js.map +1 -0
- package/dist/{provider-classes-DTMnDVMz.js → provider-classes-COU3GAT5.js} +310 -27
- package/dist/provider-classes-COU3GAT5.js.map +1 -0
- package/dist/{rds-provider-D2dkhl8m.js → rds-provider-D_ypFjdI.js} +10 -10
- package/dist/{rds-provider-D2dkhl8m.js.map → rds-provider-D_ypFjdI.js.map} +1 -1
- package/dist/{read-replica-CfbVMoYV.js → read-replica-D012SPdT.js} +3 -3
- package/dist/{read-replica-CfbVMoYV.js.map → read-replica-D012SPdT.js.map} +1 -1
- package/dist/{replacement-rules-BiIOJMA-.js → replacement-rules-S9fm3-4G.js} +3 -3
- package/dist/{replacement-rules-BiIOJMA-.js.map → replacement-rules-S9fm3-4G.js.map} +1 -1
- package/dist/{resource-deadline-BSpNiiNd.js → resource-deadline-BiWaN52w.js} +9 -5
- package/dist/{resource-deadline-BSpNiiNd.js.map → resource-deadline-BiWaN52w.js.map} +1 -1
- package/dist/{restore-source-guard-Be6A_rNB.js → restore-source-guard-BeTKRtrT.js} +4 -4
- package/dist/{restore-source-guard-Be6A_rNB.js.map → restore-source-guard-BeTKRtrT.js.map} +1 -1
- package/dist/{run-cli-BkrNHPD5.js → run-cli-CF35Yn-t.js} +2 -2
- package/dist/{run-cli-BkrNHPD5.js.map → run-cli-CF35Yn-t.js.map} +1 -1
- package/dist/{settle-own-write-members-BqAKt1e7.js → settle-own-write-members-B4QcneiO.js} +12 -12
- package/dist/{settle-own-write-members-BqAKt1e7.js.map → settle-own-write-members-B4QcneiO.js.map} +1 -1
- package/dist/{version-0AMFL2lR.js → version-Df9DK8jT.js} +2 -2
- package/dist/{version-0AMFL2lR.js.map → version-Df9DK8jT.js.map} +1 -1
- package/package.json +2 -1
- package/dist/ambient-client-defaults-AnEvWPy0.js.map +0 -1
- package/dist/deploy-engine-BSqVfcSN.js.map +0 -1
- package/dist/ec2-termination-protection-ekOvhSp9.js.map +0 -1
- package/dist/iam-role-provider-Ct6UbKFo.js.map +0 -1
- package/dist/logger-IBUeRw1z.js.map +0 -1
- package/dist/program-tHhew1Z5.js.map +0 -1
- package/dist/provider-classes-DTMnDVMz.js.map +0 -1
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { _ as isEntityAlreadyExists, a as stackOwnHolders, c as restoreOwnWriteRemovals, d as MANAGED_POLICY_OWNER, f as assertInlinePolicyAttachTargets, g as iamEntityLeftByThisCreate, h as verifyOwnIdentityBeforeUpdate, i as isStackOwnHolder, l as takeOwnWriteRemovals, m as verifyInlinePolicyPrincipals, n as collectInlinePolicyNamesManagedBySiblings, o as clearOwnWriteRemovals, p as compareMembershipWrites, r as heldText, s as recordOwnWriteRemoval, t as IAMRoleProvider, u as InlinePolicyPrincipalMismatchError, v as IamCreateClientCache } 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 { _ as isEntityAlreadyExists, a as stackOwnHolders, c as restoreOwnWriteRemovals, d as MANAGED_POLICY_OWNER, f as assertInlinePolicyAttachTargets, g as iamEntityLeftByThisCreate, h as verifyOwnIdentityBeforeUpdate, i as isStackOwnHolder, l as takeOwnWriteRemovals, m as verifyInlinePolicyPrincipals, n as collectInlinePolicyNamesManagedBySiblings, o as clearOwnWriteRemovals, p as compareMembershipWrites, r as heldText, s as recordOwnWriteRemoval, t as IAMRoleProvider, u as InlinePolicyPrincipalMismatchError, v as IamCreateClientCache } from "./iam-role-provider-ChwJY8pn.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-0WCzMnXc.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, I as isExplicitDenyError, K as wrapMaskedAwsError, M as explicitDenyPolicyKind, O as relayedNameCollision, Q as AccountIdUnavailableError, R as isRetryableTransientError, U as isThrottlingError, 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-
|
|
5
|
-
import { $
|
|
6
|
-
import { A as displayStackName, L as truncateCodePoints, 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 { Ct as RecordedIdentityMismatchError, Mt as identityTimestamp, Ot as recordedIdentityId, Rt as isoTimestampAttribute, St as RecordedIdentityError, bt as lookupEachName, gt as deniedIdentityReadRefusal, kt as slowCcOperationTimeoutMs, n as isRefusedByName, r as markDeleteStarted, vt as chunks, wt as assertRecordedIdentity, xt as withApiLimit, yt as isAccessDeniedError } from "./delete-started-
|
|
8
|
-
import { $ as effectiveInventoryItem, A as tagListsMatch, B as LIFECYCLE_DEFAULT_STATUS, C as reconcileSgRules, D as singleSecurityGroupRuleId, E as sgRuleKey, F as clearLifecycleWritesOf, G as canonicalizeItemList, H as LIFECYCLE_RULE_PATH, I as lifecycleSettleTarget, J as lifecycleUsesFilterForm, K as effectiveLifecycleConfiguration, L as recordLifecycleWrite, M as sgRemovalRuleKey, N as sgRuleListMember, O as stackIngressRuleHolder, P as LIFECYCLE_BASELINE_REREAD_DELAYS_MS, Q as effectiveIntelligentTieringItem, R as settleLifecycleRead, S as narrowIngressIpProtocol, T as securityGroupRuleMatchesCfnIngress, U as LIFECYCLE_TAG_FILTERS_PATH, V as LIFECYCLE_FILTER_PATH, W as canonicalizeBlock, X as EVENTBRIDGE_CONFIG_PATH, Y as parseCfnTimestamp, Z as effectiveAnalyticsItem, _ as flattenIpPermissions, a as resolveSecretDerivedPrincipals, at as declaresBucketObjectLock, b as isDefaultEgressRule, c as readSgIngressById, ct as isPlainObject$5, d as SG_RULE_PAGE_SIZE, dt as shownLifecycleRuleId, et as effectiveNotificationConfiguration, f as authorizeDefinitelyNotApplied, g as descriptionKey, h as comparableIngressIdentity, i as isResolvableSecretPrincipalList, it as configItemId, j as markCopiesAgreed, k as survivingRecordOfRuleId, l as siblingIdOwnedSgRules, lt as manualBucketDeletionClause, m as canonicalizeSgRuleProtocol, n as runDestroyForStack, nt as caughtErrorName, o as refuseRevertRevokingSiblingRules, ot as declaresNestedObjectLock, p as canonicalizeSgInlineRuleProtocols, q as lifecycleRuleScope, r as holdsUnprovenSecretPrincipalToken, rt as coerceCfnNumber, s as sgRuleDiffKey, st as describeValue$1, t as canonicalizeIpv4Cidr, tt as eventBridgeEnabledOf, u as SG_READBACK_RETRY_DELAY_MS, ut as mergeLegacySingular, v as ingressRuleIdentity, w as securityGroupReadbackDelays, x as isResendableSocketFailure, y as isConnectTimeout, z as takeLifecycleWrite } from "./program-
|
|
9
|
-
import { $ as recordTagWrite, $a as
|
|
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 { W as timePhase, _ as onlySecretReferencesDiffer, a as reDisableInstanceApiTermination, c as resolvedResourceTimeoutMs, f as markRefusedBeforeApplying, i as observeThenDisableInstanceApiTermination, j as withRetry, n as ec2InstanceProtectionSite, o as reEnableInstanceApiTermination, r as isTerminationProtectionPropagationError, s as resolvedPerTypeResourceTimeoutMs, u as getPriorAttempts, v as unchangedBehindSecretReference } from "./ec2-termination-protection-
|
|
12
|
-
import { a as principalOwnWriteMembers, c as stringListMember, n as declaredStringList, o as settleOwnWriteMembers } from "./settle-own-write-members-
|
|
4
|
+
import { D as markReplayMayCollide, E as markNameCollision, F as isAmbiguousOutcomeError, G as markRedactedCause, I as isExplicitDenyError, K as wrapMaskedAwsError, M as explicitDenyPolicyKind, O as relayedNameCollision, Q as AccountIdUnavailableError, R as isRetryableTransientError, U as isThrottlingError, 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-CvOlhm1d.js";
|
|
5
|
+
import { $ as deleteAfterProtectionFlipWithFinalSnapshot, A as assertRegionMatch, B as refusalTypeShown, Bt as segmentAfterAnchor, C as isInsideWindow, D as withoutServerErrorRetries, Dt as holdsSecretDerivedEntry, E as setBounded, Et as diffPrincipalNames, F as isPlainImportJson, Ft as compositeIdSeparatorRefusal, Gt as maskDeep, H as resolveExplicitPhysicalId, Ht as createMaskedLogSinks, I as isPlainImportValue, It as compositeIdSkipResult, J as observeThenDisableProtection, K as deleteWithProtectionCompensation, Kt as maskerOrIdentity, L as isQuotableImportValue, Lt as logicalIdShown, M as holderRefusalRun, N as VALUE_NOT_SHOWN, Nt as canonicalizeRoute53QueryName, O as DriftReadRefusedError, Ot as onlySecretDerived, P as importRemedyCommand, Pt as compositeIdFormatMessage, Q as PROTECTION_FLIP_RETRY_WAIT_MS, R as normalizeAwsTagsToCfn, Rt as packCompositeId, S as createAttemptKey, Sn as injectiveKeyPrefix, St as startInterruptWatch, T as replayedSendWindow, Tt as SECRET_DERIVED_READ_LIVE, Ut as createMaskedRetryLogger, V as remedyLogicalId, Vt as stateOrphanRecordRemedy, W as markNotGone, Wt as isSecretDerivedValue, Xt as clearCreatedBeforeFailure, Y as rdsFamilyProtectionSite, Z as userPoolProtectionSite, _ as AMBIGUOUS_LATCH_TTL_MS, _t as renderDisableCommand, a as clearOnUpdateRemoval, at as isTerminalDeleteFailure, b as RecentIdSet, bn as withPasteableAwsProfile, c as removedTemplateKeys, ct as ElapsedBudget, en as isAuxiliaryFailure, ft as UNNAMEABLE_ID_CLAUSE, g as retractCreatedResource, gt as protectedReplacementAdvice, ht as pasteableAwsCommand, in as markSupersedesEarlierCreate, it as ProtectionFlipRegistry, j as holderRefusalMask, jt as recordedPrincipalsRepair, k as RESOURCE_NOT_FOUND, kt as readPrincipalLists, l as withRemovalDefaults, lt as ElapsedBudgetRegistry, m as reportCreatedResource, mt as isAwsCliLiteral, n as enclosingDeadlineRemainingMs, nn as markAuxiliaryFailure, nt as isTerminalDbWaitStatus, ot as protectionFlipKey, pt as WITHHELD_AWS_COMMAND, q as logGroupProtectionSite, qt as withDerivedNameMasks, rn as markCreatedBeforeFailure, t as enclosingDeadlineExpired, tt as isProceedDbStatus, v as AmbiguousCreateLatch, w as replayFollowedAmbiguousAttempt, x as ambiguousAttemptLead, xn as injectiveKey, xt as isInterruptedWaitError, y as CREATION_DATE_SKEW_MARGIN_MS, z as quotedRemedyLogicalId } from "./resource-deadline-BiWaN52w.js";
|
|
6
|
+
import { A as displayStackName, L as truncateCodePoints, 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-Df9DK8jT.js";
|
|
7
|
+
import { Ct as RecordedIdentityMismatchError, Mt as identityTimestamp, Ot as recordedIdentityId, Rt as isoTimestampAttribute, St as RecordedIdentityError, bt as lookupEachName, gt as deniedIdentityReadRefusal, kt as slowCcOperationTimeoutMs, n as isRefusedByName, r as markDeleteStarted, vt as chunks, wt as assertRecordedIdentity, xt as withApiLimit, yt as isAccessDeniedError } from "./delete-started-BdH7k4V-.js";
|
|
8
|
+
import { $ as effectiveInventoryItem, A as tagListsMatch, B as LIFECYCLE_DEFAULT_STATUS, C as reconcileSgRules, D as singleSecurityGroupRuleId, E as sgRuleKey, F as clearLifecycleWritesOf, G as canonicalizeItemList, H as LIFECYCLE_RULE_PATH, I as lifecycleSettleTarget, J as lifecycleUsesFilterForm, K as effectiveLifecycleConfiguration, L as recordLifecycleWrite, M as sgRemovalRuleKey, N as sgRuleListMember, O as stackIngressRuleHolder, P as LIFECYCLE_BASELINE_REREAD_DELAYS_MS, Q as effectiveIntelligentTieringItem, R as settleLifecycleRead, S as narrowIngressIpProtocol, T as securityGroupRuleMatchesCfnIngress, U as LIFECYCLE_TAG_FILTERS_PATH, V as LIFECYCLE_FILTER_PATH, W as canonicalizeBlock, X as EVENTBRIDGE_CONFIG_PATH, Y as parseCfnTimestamp, Z as effectiveAnalyticsItem, _ as flattenIpPermissions, a as resolveSecretDerivedPrincipals, at as declaresBucketObjectLock, b as isDefaultEgressRule, c as readSgIngressById, ct as isPlainObject$5, d as SG_RULE_PAGE_SIZE, dt as shownLifecycleRuleId, et as effectiveNotificationConfiguration, f as authorizeDefinitelyNotApplied, g as descriptionKey, h as comparableIngressIdentity, i as isResolvableSecretPrincipalList, it as configItemId, j as markCopiesAgreed, k as survivingRecordOfRuleId, l as siblingIdOwnedSgRules, lt as manualBucketDeletionClause, m as canonicalizeSgRuleProtocol, n as runDestroyForStack, nt as caughtErrorName, o as refuseRevertRevokingSiblingRules, ot as declaresNestedObjectLock, p as canonicalizeSgInlineRuleProtocols, q as lifecycleRuleScope, r as holdsUnprovenSecretPrincipalToken, rt as coerceCfnNumber, s as sgRuleDiffKey, st as describeValue$1, t as canonicalizeIpv4Cidr, tt as eventBridgeEnabledOf, u as SG_READBACK_RETRY_DELAY_MS, ut as mergeLegacySingular, v as ingressRuleIdentity, w as securityGroupReadbackDelays, x as isResendableSocketFailure, y as isConnectTimeout, z as takeLifecycleWrite } from "./program-73k0SoOP.js";
|
|
9
|
+
import { $ as recordTagWrite, $a as policyDocumentMatchesDeclared, $r as REDACTED_DELETE_ADDRESS_SKIP_REASON, $s as LEGACY_HANDLE_ID_PREFIX, At as resolveDynamoDbDeleteBudgetMs, B as declaredStreamTagsMember, Ba as getStackRecords, Bo as withIndeterminateGuard, Bs as getAccountInfo, Bt as hasCdkAutoDeleteTag, Cd as displayAssemblyPath, Ct as DYNAMODB_DELETE_DEADLINE_MARGIN_MS, Dc as passedParameterClassesOf, Dr as calculateResourceDrift, Dt as compensateRemovedDeletionProtection, Du as isAbsoluteAssetPath, Ed as resolveAssemblyPath, Et as beginDeleteWait, Eu as findNestedTemplateTreeDefect, Fa as isStoredExpression, Fr as earliestDefined, Ft as maskedLogger, G as streamDeclaresTags, I as DynamoDBGlobalTableProvider, Ia as withoutSiblingAttachedArns, It as relayedIndexBusyDelete, Iu as decodeListingKey, J as streamTagsMatchDeclared, Ja as declaredMemberDocument, Ju as rewriteTemplateAssetReferences, K as streamMemberRefusals, Ka as OWN_WRITE_REREAD_DELAYS_MS, Ki as replacedDeleteFailureVerdict, Kl as findSdkUnwiredProperties, L as STREAM_POLICY_KEY, La as withoutSiblingOwned, Ll as accountArgs, Lr as reserveStackCreateToken, Lt as waitForIndexesSettled, Ma as collectGroupsAddedBySiblings, Ml as refuseMalformedResourcesForDestroy, Mo as waitForLambdaFunctionActive, Mt as INDEX_SETTLE_POLL_INTERVAL_MS, Na as collectManagedPolicyArnsAttachedBySiblings, Ns as outputReferenceProvenanceOf, Nt as TABLE_INDEX_NOUN, Ot as deleteBudgetKey, Ou as listNestedTemplateRows, Pa as collectPrincipalsAttachingPolicy, Po as waitForGoneAfterDelete, Pt as deleteTableWithIndexBusyRetry, Q as isDynamoDBTableArnIn, Qa as memberReadFailure, R as STREAM_TAGS_KEY, Ra as awaitInFlightSibling, Rl as withheldAccountClause, Rt as ECR_AUTO_DELETE_IMAGES_TAG, Sd as describeFileReadFailure, Sl as refuseMalformedNestedChildOutputs, So as getCurrentResourceSecrets, St as stripIndexContributorInsights, Td as renderAssemblyPathEscape, Tt as DYNAMODB_DELETE_POLL_COST_MS, U as reverseMapStreamPolicy, Uo as markWaitAbandoned, V as planStreamMemberOps, Vt as isTruthyCfnBoolean, W as streamDeclaresPolicy, Wa as KMS_DEFAULT_KEY_POLICY_ID, X as clearTagWrites, Xa as efsPolicyMatchesDeclared, Y as TAGS_BASELINE_REREAD_DELAYS_MS, Ya as declaredPolicyDocument, Yl as withoutSdkUnwiredProperties, Yo as isSettledInstanceState, Za as lambdaPermissionMatchesDeclared, _n as getCurrentNestedStackContext, _s as s3BucketDualStackDomainName, _t as planContributorInsightsOp, ao as policyContentKey, at as planTimeToLive, au as wireAttributeValue, bt as reverseMapIndexContributorInsights, cc as WARM_THROUGHPUT_MEMBERS, ct as planVectorIndexUpdates, dc as toCfnInteger, do as WaitConditionSignalStore, dr as withoutSiblingOwnedSgRules, dt as vectorIndexesSettled, ec as isLegacyHandleId, ei as isRedactedRecordedValue, eo as reReadUntilSettled, et as settleWrittenTags, fc as toFiniteNumber, fo as classifyHandleUrl, fr as SG_RULE_ID_PATTERN, ft as vectorIndexesShapeDetail, ga as secretNamedAttributeNamesOf, gs as s3BucketDomainName, gt as indexDeclaresContributorInsights, hc as maskedSecretSegment, hr as sgProtocolKey, hs as s3BucketArn, ht as contributorInsightsRefusals, io as attemptedPolicyDocument, it as isTtlRateLimited, iu as planSubscriptionAttributes, jt as DELETE_INDEX_WAIT_PROCEED_NOTE, ks as parseWebACLArn, kt as resolveDynamoDbDeleteBudgetClock, ku as renderNestedTemplateTreeDefect, lc as coerceWarmThroughput$1, lr as siblingOwnedSgRuleIdentities, lt as readbackVectorIndexes, mr as recordedSgRuleId, mt as completeTableContributorInsightsBaseline, ni as redactedDeleteAddressSkip, nn as licensedNameHolder, no as warnUnsettledMember, nt as takeTagWrite, ot as readTtlSpec, pc as APPSYNC_APIKEY_ARN_RESOURCE_PATH, pi as getCurrentProducerRegions, pn as revertNestedChildFromJournal, po as evaluateSignals, pr as cfnIngressPortValue, pt as CONTRIBUTOR_INSIGHTS_KEY, q as streamPolicyMatchesDeclared, qa as SNS_DEFAULT_POLICY_ID, ro as verbatimEchoDriftKeys, rt as isTtlAlreadyDisabled, ru as normalizeRecordName, st as sendTtlWaitingOutRateLimit, t as DeployEngine, ti as redactedDeleteAddressFields, to as settleDeclaredMember, uc as isWarmThroughputDecrease, un as getNestedRevertRun, ut as vectorIndexesForCreate, vn as withNestedStackContext, vs as s3BucketRegionalDomainName, vt as planIndexContributorInsightsOps, wt as DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS, wu as stringifyValue, xt as reverseMapTableContributorInsights, ys as s3BucketWebsiteUrl, yt as readContributorInsightsSpec, z as declaredStreamPolicyMember, zo as deleteSkipReason, zr as acquireIdempotencyToken, zt as S3_AUTO_DELETE_OBJECTS_TAG } from "./deploy-engine-BrbeNr1n.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-BeTKRtrT.js";
|
|
11
|
+
import { W as timePhase, _ as onlySecretReferencesDiffer, a as reDisableInstanceApiTermination, c as resolvedResourceTimeoutMs, f as markRefusedBeforeApplying, i as observeThenDisableInstanceApiTermination, j as withRetry, n as ec2InstanceProtectionSite, o as reEnableInstanceApiTermination, r as isTerminationProtectionPropagationError, s as resolvedPerTypeResourceTimeoutMs, u as getPriorAttempts, v as unchangedBehindSecretReference } from "./ec2-termination-protection-C-QH13lG.js";
|
|
12
|
+
import { a as principalOwnWriteMembers, c as stringListMember, n as declaredStringList, o as settleOwnWriteMembers } from "./settle-own-write-members-B4QcneiO.js";
|
|
13
13
|
import { n as canonicalizeRegion, r as derivePartitionAndUrlSuffix } from "./aws-partition-DA0r2sr-.js";
|
|
14
14
|
import { f as ambientRegion, r as awsEndpointOverrideActive } from "./aws-client-defaults-DAebi99J.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-
|
|
16
|
-
import { RDSProvider } from "./rds-provider-
|
|
17
|
-
import { NeptuneProvider } from "./neptune-provider-
|
|
18
|
-
import { ASGProvider } from "./asg-provider-
|
|
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-S9fm3-4G.js";
|
|
16
|
+
import { RDSProvider } from "./rds-provider-D_ypFjdI.js";
|
|
17
|
+
import { NeptuneProvider } from "./neptune-provider-BEkpYrGj.js";
|
|
18
|
+
import { ASGProvider } from "./asg-provider-CBS6w9nU.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, DeleteConflictException, DeleteGroupCommand, DeleteGroupPolicyCommand, DeleteInstanceProfileCommand, DeleteLoginProfileCommand, DeletePolicyCommand, DeletePolicyVersionCommand, DeleteRolePolicyCommand, DeleteUserCommand, DeleteUserPermissionsBoundaryCommand, DeleteUserPolicyCommand, DetachGroupPolicyCommand, DetachRolePolicyCommand, DetachUserPolicyCommand, GetAccessKeyLastUsedCommand, GetGroupCommand, GetGroupPolicyCommand, GetInstanceProfileCommand, GetLoginProfileCommand, 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";
|
|
@@ -49,6 +49,7 @@ import { AddTagsToResourceCommand as AddTagsToResourceCommand$2, CreateDBProxyCo
|
|
|
49
49
|
import { isIPv6 } from "node:net";
|
|
50
50
|
import { ListTagsForResourceCommand as ListTagsForResourceCommand$11, S3ControlClient, TagResourceCommand as TagResourceCommand$13, UntagResourceCommand as UntagResourceCommand$13 } from "@aws-sdk/client-s3-control";
|
|
51
51
|
import * as zlib from "node:zlib";
|
|
52
|
+
import { DeleteAlarmCommand, GetAlarmsCommand, LightsailClient, PutAlarmCommand } from "@aws-sdk/client-lightsail";
|
|
52
53
|
import { ApiGatewayV2Client, CreateApiCommand, CreateAuthorizerCommand as CreateAuthorizerCommand$1, CreateIntegrationCommand, CreateRouteCommand as CreateRouteCommand$1, CreateStageCommand as CreateStageCommand$1, DeleteAccessLogSettingsCommand, DeleteApiCommand, DeleteAuthorizerCommand as DeleteAuthorizerCommand$1, DeleteCorsConfigurationCommand, DeleteIntegrationCommand as DeleteIntegrationCommand$1, DeleteRouteCommand as DeleteRouteCommand$1, DeleteRouteRequestParameterCommand, DeleteRouteSettingsCommand, DeleteStageCommand as DeleteStageCommand$1, GetApiCommand, GetApisCommand, GetAuthorizerCommand as GetAuthorizerCommand$1, GetAuthorizersCommand as GetAuthorizersCommand$1, GetIntegrationCommand, GetIntegrationsCommand, GetRouteCommand, GetStageCommand as GetStageCommand$1, NotFoundException as NotFoundException$3, TagResourceCommand as TagResourceCommand$14, UntagResourceCommand as UntagResourceCommand$14, UpdateApiCommand, UpdateAuthorizerCommand as UpdateAuthorizerCommand$1, UpdateIntegrationCommand, UpdateRouteCommand, UpdateStageCommand as UpdateStageCommand$1 } from "@aws-sdk/client-apigatewayv2";
|
|
53
54
|
import { CreateStateMachineCommand, DeleteStateMachineCommand, DescribeStateMachineCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$12, SFNClient, StateMachineDoesNotExist, TagResourceCommand as TagResourceCommand$15, UntagResourceCommand as UntagResourceCommand$15, UpdateStateMachineCommand } from "@aws-sdk/client-sfn";
|
|
54
55
|
import { CreateClusterCommand, CreateServiceCommand, DeleteClusterCommand, DeleteServiceCommand, DeregisterTaskDefinitionCommand, DescribeClustersCommand, DescribeServicesCommand, DescribeTaskDefinitionCommand, ECSClient, ListTaskDefinitionsCommand, PutClusterCapacityProvidersCommand, RegisterTaskDefinitionCommand, TagResourceCommand as TagResourceCommand$16, UntagResourceCommand as UntagResourceCommand$16, UpdateClusterCommand, UpdateServiceCommand, waitUntilServicesStable } from "@aws-sdk/client-ecs";
|
|
@@ -789,12 +790,52 @@ function decodePolicyDocument(raw) {
|
|
|
789
790
|
}
|
|
790
791
|
}
|
|
791
792
|
async function importImpl$40(input) {
|
|
792
|
-
if (input.knownPhysicalId)
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
793
|
+
if (input.knownPhysicalId) {
|
|
794
|
+
const policyName = input.properties["PolicyName"];
|
|
795
|
+
if (input.knownPhysicalIdFromCloudFormation === true && typeof policyName === "string" && IAM_POLICY_NAME.test(policyName) && policyName !== input.knownPhysicalId) {
|
|
796
|
+
if (input.cloudFormationDeployedProperties?.["PolicyName"] === policyName && await inlinePolicyIsAttached.call(this, policyName, input.properties)) {
|
|
797
|
+
this.logger.debug(safeMsg`Import of ${input.logicalId}: recording the template's PolicyName as the physical id ` + `(an inline policy is addressed by its name; the id handed to the import is not it)`);
|
|
798
|
+
return {
|
|
799
|
+
physicalId: policyName,
|
|
800
|
+
attributes: {}
|
|
801
|
+
};
|
|
802
|
+
}
|
|
803
|
+
this.logger.warn(safeMsg`Import of ${logicalIdShown(input.logicalId)}: the template's PolicyName could not be ` + "confirmed as the inline policy CloudFormation deployed (its deployed template names another or none, or none of the policy's roles, groups or users holds it), so the id CloudFormation supplied is recorded as it is; 'cdkd drift' may report it missing until the next 'cdkd deploy' writes the policy.");
|
|
804
|
+
}
|
|
805
|
+
return {
|
|
806
|
+
physicalId: input.knownPhysicalId,
|
|
807
|
+
attributes: {}
|
|
808
|
+
};
|
|
809
|
+
}
|
|
796
810
|
return null;
|
|
797
811
|
}
|
|
812
|
+
async function inlinePolicyIsAttached(policyName, properties) {
|
|
813
|
+
const targets = readPolicyTargetLists(properties);
|
|
814
|
+
if ("malformed" in targets) return false;
|
|
815
|
+
const all = [
|
|
816
|
+
...(targets.roles ?? []).map((name) => ({
|
|
817
|
+
kind: "role",
|
|
818
|
+
name
|
|
819
|
+
})),
|
|
820
|
+
...(targets.groups ?? []).map((name) => ({
|
|
821
|
+
kind: "group",
|
|
822
|
+
name
|
|
823
|
+
})),
|
|
824
|
+
...(targets.users ?? []).map((name) => ({
|
|
825
|
+
kind: "user",
|
|
826
|
+
name
|
|
827
|
+
}))
|
|
828
|
+
];
|
|
829
|
+
for (const target of all) try {
|
|
830
|
+
await getTargetPolicyDocument.call(this, target, policyName);
|
|
831
|
+
return true;
|
|
832
|
+
} catch (err) {
|
|
833
|
+
if (err instanceof NoSuchEntityException) continue;
|
|
834
|
+
this.logger.debug(safeMsg`Inline policy lookup on a ${target.kind} failed (${err instanceof Error ? err.name : typeof err}).`);
|
|
835
|
+
return false;
|
|
836
|
+
}
|
|
837
|
+
return false;
|
|
838
|
+
}
|
|
798
839
|
|
|
799
840
|
// src/provisioning/providers/iam-policy-provider.ts
|
|
800
841
|
var IAMPolicyProvider = class {
|
|
@@ -3240,7 +3281,7 @@ async function deleteGroup(logicalId, physicalId, resourceType, context) {
|
|
|
3240
3281
|
};
|
|
3241
3282
|
const refuseHeld = (held, cause) => {
|
|
3242
3283
|
const run = holderRefusalRun(context);
|
|
3243
|
-
const refusal = markNonRetryable(new ProvisioningError(log.mask(`Failed to delete IAM group ${logicalId}: group ${physicalId} still has user(s) ${heldText(held)}, whose membership this ${run.noun} did not remove (a user added outside the stack, one retained by a DeletionPolicy, or a stack user whose own delete has not finished yet). Matching CloudFormation (DeleteConflict), cdkd does not remove them from the group. If a named user is one of this stack's users, ${run.rerun} once its delete finishes. Otherwise, if they no longer need the group, remove them (aws iam remove-user-from-group --group-name <group> --user-name <user>), then ${run.again}.`), resourceType, logicalId, physicalId, cause));
|
|
3284
|
+
const refusal = markNonRetryable(new ProvisioningError(holderRefusalMask(context, log.mask)(`Failed to delete IAM group ${logicalId}: group ${physicalId} still has user(s) ${heldText(held)}, whose membership this ${run.noun} did not remove (a user added outside the stack, one retained by a DeletionPolicy, or a stack user whose own delete has not finished yet). Matching CloudFormation (DeleteConflict), cdkd does not remove them from the group. If a named user is one of this stack's users, ${run.rerun} once its delete finishes. Otherwise, if they no longer need the group, remove them (aws iam remove-user-from-group --group-name <group> --user-name <user>), then ${run.again}.`), resourceType, logicalId, physicalId, cause));
|
|
3244
3285
|
MEMBER_REFUSALS.add(refusal);
|
|
3245
3286
|
throw refusal;
|
|
3246
3287
|
};
|
|
@@ -9142,7 +9183,7 @@ var SNSSubscriptionProvider = class {
|
|
|
9142
9183
|
await this.snsClient.send(new SetSubscriptionAttributesCommand({
|
|
9143
9184
|
SubscriptionArn: physicalId,
|
|
9144
9185
|
AttributeName: name,
|
|
9145
|
-
AttributeValue: value
|
|
9186
|
+
AttributeValue: wireAttributeValue(name, value)
|
|
9146
9187
|
}));
|
|
9147
9188
|
} catch (error) {
|
|
9148
9189
|
throw this.wrapMaskedAwsCallError(mask, error, `Failed to update SNS subscription ${logicalId} (attribute ${name})`, resourceType, logicalId, physicalId);
|
|
@@ -18538,6 +18579,246 @@ var CloudWatchAlarmProvider = class {
|
|
|
18538
18579
|
}
|
|
18539
18580
|
};
|
|
18540
18581
|
|
|
18582
|
+
// src/provisioning/providers/lightsail-alarm-provider.ts
|
|
18583
|
+
const AWS_BUCKETS = {
|
|
18584
|
+
PutAlarm: {
|
|
18585
|
+
size: 3,
|
|
18586
|
+
refillPerSecond: 1
|
|
18587
|
+
},
|
|
18588
|
+
DeleteAlarm: {
|
|
18589
|
+
size: 3,
|
|
18590
|
+
refillPerSecond: 1
|
|
18591
|
+
},
|
|
18592
|
+
GetAlarms: {
|
|
18593
|
+
size: 5,
|
|
18594
|
+
refillPerSecond: 1
|
|
18595
|
+
}
|
|
18596
|
+
};
|
|
18597
|
+
var LightsailTokenBucket = class {
|
|
18598
|
+
tokens;
|
|
18599
|
+
last;
|
|
18600
|
+
size;
|
|
18601
|
+
refillPerSecond;
|
|
18602
|
+
now;
|
|
18603
|
+
sleep;
|
|
18604
|
+
constructor(size, refillPerSecond, now = () => Date.now(), sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms))) {
|
|
18605
|
+
this.size = size;
|
|
18606
|
+
this.refillPerSecond = refillPerSecond;
|
|
18607
|
+
this.now = now;
|
|
18608
|
+
this.sleep = sleep;
|
|
18609
|
+
this.tokens = size;
|
|
18610
|
+
this.last = now();
|
|
18611
|
+
}
|
|
18612
|
+
async take() {
|
|
18613
|
+
for (;;) {
|
|
18614
|
+
const now = this.now();
|
|
18615
|
+
this.tokens = Math.min(this.size, this.tokens + (now - this.last) / 1e3 * this.refillPerSecond);
|
|
18616
|
+
this.last = now;
|
|
18617
|
+
if (this.tokens >= 1) {
|
|
18618
|
+
this.tokens -= 1;
|
|
18619
|
+
return;
|
|
18620
|
+
}
|
|
18621
|
+
await this.sleep(Math.ceil((1 - this.tokens) / this.refillPerSecond * 1e3));
|
|
18622
|
+
}
|
|
18623
|
+
}
|
|
18624
|
+
};
|
|
18625
|
+
const buckets = /* @__PURE__ */ new Map();
|
|
18626
|
+
function bucketFor(region, api) {
|
|
18627
|
+
const key = injectiveKey(region, api);
|
|
18628
|
+
let bucket = buckets.get(key);
|
|
18629
|
+
if (bucket === void 0) {
|
|
18630
|
+
const aws = AWS_BUCKETS[api];
|
|
18631
|
+
bucket = new LightsailTokenBucket(Math.max(1, aws.size - 1), aws.refillPerSecond * .9);
|
|
18632
|
+
buckets.set(key, bucket);
|
|
18633
|
+
}
|
|
18634
|
+
return bucket;
|
|
18635
|
+
}
|
|
18636
|
+
var LightsailAlarmProvider = class {
|
|
18637
|
+
client;
|
|
18638
|
+
providerRegion = ambientRegion();
|
|
18639
|
+
logger = getLogger().child("LightsailAlarmProvider");
|
|
18640
|
+
handledProperties = /* @__PURE__ */ new Map([["AWS::Lightsail::Alarm", /* @__PURE__ */ new Set([
|
|
18641
|
+
"AlarmName",
|
|
18642
|
+
"MonitoredResourceName",
|
|
18643
|
+
"MetricName",
|
|
18644
|
+
"ComparisonOperator",
|
|
18645
|
+
"EvaluationPeriods",
|
|
18646
|
+
"Threshold",
|
|
18647
|
+
"DatapointsToAlarm",
|
|
18648
|
+
"TreatMissingData",
|
|
18649
|
+
"ContactProtocols",
|
|
18650
|
+
"NotificationTriggers",
|
|
18651
|
+
"NotificationEnabled"
|
|
18652
|
+
])]]);
|
|
18653
|
+
throttleDelaysMs = [
|
|
18654
|
+
1e3,
|
|
18655
|
+
2e3,
|
|
18656
|
+
4e3,
|
|
18657
|
+
8e3,
|
|
18658
|
+
16e3,
|
|
18659
|
+
2e4
|
|
18660
|
+
];
|
|
18661
|
+
throttleJitter = () => Math.random();
|
|
18662
|
+
throttleSleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
18663
|
+
takeToken = (region, api) => bucketFor(region, api).take();
|
|
18664
|
+
getClient() {
|
|
18665
|
+
this.client ??= new LightsailClient({
|
|
18666
|
+
...ambientClientDefaults(),
|
|
18667
|
+
...this.providerRegion ? { region: this.providerRegion } : {},
|
|
18668
|
+
maxAttempts: 1
|
|
18669
|
+
});
|
|
18670
|
+
return this.client;
|
|
18671
|
+
}
|
|
18672
|
+
async send(api, logicalId, call) {
|
|
18673
|
+
const client = this.getClient();
|
|
18674
|
+
const region = await client.config.region();
|
|
18675
|
+
for (let retry = 0;; retry++) {
|
|
18676
|
+
await this.takeToken(region, api);
|
|
18677
|
+
try {
|
|
18678
|
+
return await call(client);
|
|
18679
|
+
} catch (error) {
|
|
18680
|
+
const ceiling = this.throttleDelaysMs[retry];
|
|
18681
|
+
if (ceiling === void 0 || !isThrottlingError(error)) throw error;
|
|
18682
|
+
const delay = Math.round(ceiling / 2 + this.throttleJitter() * ceiling / 2);
|
|
18683
|
+
this.logger.debug(safeMsg`${api} for ${logicalId} was throttled; retrying in ${delay}ms (retry ${retry + 1}/${this.throttleDelaysMs.length})`);
|
|
18684
|
+
await this.throttleSleep(delay);
|
|
18685
|
+
}
|
|
18686
|
+
}
|
|
18687
|
+
}
|
|
18688
|
+
wrapCaughtError(mask, error, build) {
|
|
18689
|
+
const failure = describeAwsFailure(error);
|
|
18690
|
+
if (!failure.redacted) return wrapMaskedAwsError(mask, error, build);
|
|
18691
|
+
this.logger.debug(mask(build(mask(failure.detail)).message));
|
|
18692
|
+
const wrapped = build(`${mask(failure.summary)}${relayedNameCollision(failure.detail)}`);
|
|
18693
|
+
return error instanceof Error ? markRedactedCause(wrapped) : wrapped;
|
|
18694
|
+
}
|
|
18695
|
+
async create(logicalId, resourceType, properties, context) {
|
|
18696
|
+
this.logger.debug(safeMsg`Creating Lightsail alarm ${logicalId}`);
|
|
18697
|
+
const alarmName = properties["AlarmName"] || this.generatedCreateName(resourceType, logicalId, properties);
|
|
18698
|
+
const mask = maskerOrIdentity(context?.maskSecrets);
|
|
18699
|
+
const input = this.buildPutAlarmInput(logicalId, alarmName, properties);
|
|
18700
|
+
try {
|
|
18701
|
+
await this.send("PutAlarm", logicalId, (client) => client.send(new PutAlarmCommand(input)));
|
|
18702
|
+
} catch (error) {
|
|
18703
|
+
const cause = error instanceof Error ? error : void 0;
|
|
18704
|
+
throw this.wrapCaughtError(mask, error, (text) => new ProvisioningError(`Failed to create Lightsail alarm ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
|
|
18705
|
+
}
|
|
18706
|
+
return {
|
|
18707
|
+
physicalId: alarmName,
|
|
18708
|
+
attributes: await this.readAttributesAfterWrite(alarmName, logicalId, mask)
|
|
18709
|
+
};
|
|
18710
|
+
}
|
|
18711
|
+
async update(logicalId, physicalId, resourceType, properties, _previousProperties, context) {
|
|
18712
|
+
this.logger.debug(safeMsg`Updating Lightsail alarm ${logicalId}: ${physicalId}`);
|
|
18713
|
+
assertRegionMatch(context?.expectedRegion ? await this.getClient().config.region() : void 0, context?.expectedRegion, resourceType, logicalId, physicalId, "pre-update");
|
|
18714
|
+
const mask = maskerOrIdentity(context?.maskSecrets);
|
|
18715
|
+
const input = this.buildPutAlarmInput(logicalId, physicalId, properties);
|
|
18716
|
+
try {
|
|
18717
|
+
await this.send("PutAlarm", logicalId, (client) => client.send(new PutAlarmCommand(input)));
|
|
18718
|
+
} catch (error) {
|
|
18719
|
+
const cause = error instanceof Error ? error : void 0;
|
|
18720
|
+
throw this.wrapCaughtError(mask, error, (text) => new ProvisioningError(`Failed to update Lightsail alarm ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
18721
|
+
}
|
|
18722
|
+
return {
|
|
18723
|
+
physicalId,
|
|
18724
|
+
wasReplaced: false,
|
|
18725
|
+
attributes: await this.readAttributesAfterWrite(physicalId, logicalId, mask)
|
|
18726
|
+
};
|
|
18727
|
+
}
|
|
18728
|
+
async delete(logicalId, physicalId, resourceType, _properties, context) {
|
|
18729
|
+
this.logger.debug(safeMsg`Deleting Lightsail alarm ${logicalId}: ${physicalId}`);
|
|
18730
|
+
assertRegionMatch(context?.expectedRegion ? await this.getClient().config.region() : void 0, context?.expectedRegion, resourceType, logicalId, physicalId, "pre-delete");
|
|
18731
|
+
try {
|
|
18732
|
+
await this.send("DeleteAlarm", logicalId, (client) => client.send(new DeleteAlarmCommand({ alarmName: physicalId })));
|
|
18733
|
+
} catch (error) {
|
|
18734
|
+
if (this.isNotFound(error)) {
|
|
18735
|
+
assertRegionMatch(await this.getClient().config.region(), context?.expectedRegion, resourceType, logicalId, physicalId);
|
|
18736
|
+
this.logger.debug(safeMsg`Lightsail alarm ${physicalId} does not exist, skipping deletion`);
|
|
18737
|
+
return;
|
|
18738
|
+
}
|
|
18739
|
+
const cause = error instanceof Error ? error : void 0;
|
|
18740
|
+
const thrown = this.wrapCaughtError(maskerOrIdentity(context?.maskSecrets), error, (text) => new ProvisioningError(`Failed to delete Lightsail alarm ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
18741
|
+
throw error instanceof Error && error.name.includes("NotFound") ? markNotGone(thrown) : thrown;
|
|
18742
|
+
}
|
|
18743
|
+
}
|
|
18744
|
+
async readAttributesAfterWrite(alarmName, logicalId, mask) {
|
|
18745
|
+
try {
|
|
18746
|
+
const alarm = await this.getAlarm(alarmName, logicalId);
|
|
18747
|
+
return definedAttributes({
|
|
18748
|
+
AlarmArn: alarm?.arn,
|
|
18749
|
+
State: alarm?.state
|
|
18750
|
+
});
|
|
18751
|
+
} catch (error) {
|
|
18752
|
+
this.logger.warn(mask(safeMsg`Could not read Lightsail alarm ${alarmName} back after writing it (${describeAwsFailure(error).summary}); its AlarmArn and State are read again when needed`));
|
|
18753
|
+
return {};
|
|
18754
|
+
}
|
|
18755
|
+
}
|
|
18756
|
+
async getAlarm(alarmName, logicalId) {
|
|
18757
|
+
try {
|
|
18758
|
+
return (await this.send("GetAlarms", logicalId, (client) => client.send(new GetAlarmsCommand({ alarmName })))).alarms?.find((alarm) => alarm.name === alarmName);
|
|
18759
|
+
} catch (error) {
|
|
18760
|
+
if (this.isNotFound(error)) return void 0;
|
|
18761
|
+
throw error;
|
|
18762
|
+
}
|
|
18763
|
+
}
|
|
18764
|
+
buildPutAlarmInput(logicalId, alarmName, properties) {
|
|
18765
|
+
const input = {
|
|
18766
|
+
alarmName,
|
|
18767
|
+
metricName: properties["MetricName"],
|
|
18768
|
+
monitoredResourceName: properties["MonitoredResourceName"],
|
|
18769
|
+
comparisonOperator: properties["ComparisonOperator"],
|
|
18770
|
+
threshold: Number(properties["Threshold"]),
|
|
18771
|
+
evaluationPeriods: Number(properties["EvaluationPeriods"])
|
|
18772
|
+
};
|
|
18773
|
+
if (properties["DatapointsToAlarm"] != null) input.datapointsToAlarm = Number(properties["DatapointsToAlarm"]);
|
|
18774
|
+
if (properties["TreatMissingData"] != null) input.treatMissingData = properties["TreatMissingData"];
|
|
18775
|
+
if (properties["ContactProtocols"] != null) input.contactProtocols = properties["ContactProtocols"];
|
|
18776
|
+
if (properties["NotificationTriggers"] != null) input.notificationTriggers = properties["NotificationTriggers"];
|
|
18777
|
+
if (properties["NotificationEnabled"] != null) {
|
|
18778
|
+
const enabled = coerceCfnBoolean(properties["NotificationEnabled"]);
|
|
18779
|
+
if (enabled === void 0) throw markNonRetryable(new ProvisioningError(`Lightsail alarm ${logicalId}: NotificationEnabled must be true or false`, "AWS::Lightsail::Alarm", logicalId));
|
|
18780
|
+
input.notificationEnabled = enabled;
|
|
18781
|
+
}
|
|
18782
|
+
return input;
|
|
18783
|
+
}
|
|
18784
|
+
async readCurrentState(physicalId, logicalId, _resourceType) {
|
|
18785
|
+
const alarm = await this.getAlarm(physicalId, logicalId);
|
|
18786
|
+
if (!alarm) return RESOURCE_NOT_FOUND;
|
|
18787
|
+
const result = {};
|
|
18788
|
+
if (alarm.name !== void 0) result["AlarmName"] = alarm.name;
|
|
18789
|
+
if (alarm.monitoredResourceInfo?.name !== void 0) result["MonitoredResourceName"] = alarm.monitoredResourceInfo.name;
|
|
18790
|
+
if (alarm.metricName !== void 0) result["MetricName"] = alarm.metricName;
|
|
18791
|
+
if (alarm.comparisonOperator !== void 0) result["ComparisonOperator"] = alarm.comparisonOperator;
|
|
18792
|
+
if (alarm.evaluationPeriods !== void 0) result["EvaluationPeriods"] = alarm.evaluationPeriods;
|
|
18793
|
+
if (alarm.threshold !== void 0) result["Threshold"] = alarm.threshold;
|
|
18794
|
+
if (alarm.datapointsToAlarm !== void 0) result["DatapointsToAlarm"] = alarm.datapointsToAlarm;
|
|
18795
|
+
if (alarm.treatMissingData !== void 0) result["TreatMissingData"] = alarm.treatMissingData;
|
|
18796
|
+
if (alarm.contactProtocols !== void 0) result["ContactProtocols"] = [...alarm.contactProtocols];
|
|
18797
|
+
if (alarm.notificationTriggers !== void 0) result["NotificationTriggers"] = [...alarm.notificationTriggers];
|
|
18798
|
+
if (alarm.notificationEnabled !== void 0) result["NotificationEnabled"] = alarm.notificationEnabled;
|
|
18799
|
+
return result;
|
|
18800
|
+
}
|
|
18801
|
+
generatedCreateName(_resourceType, logicalId, properties) {
|
|
18802
|
+
if (properties["AlarmName"]) return void 0;
|
|
18803
|
+
return generatedNameFor("AWS::Lightsail::Alarm", logicalId);
|
|
18804
|
+
}
|
|
18805
|
+
async import(input) {
|
|
18806
|
+
const explicit = resolveExplicitPhysicalId(input, "AlarmName");
|
|
18807
|
+
if (!explicit) return null;
|
|
18808
|
+
const alarm = await this.getAlarm(explicit, input.logicalId);
|
|
18809
|
+
return alarm ? {
|
|
18810
|
+
physicalId: explicit,
|
|
18811
|
+
attributes: definedAttributes({
|
|
18812
|
+
AlarmArn: alarm.arn,
|
|
18813
|
+
State: alarm.state
|
|
18814
|
+
})
|
|
18815
|
+
} : null;
|
|
18816
|
+
}
|
|
18817
|
+
isNotFound(err) {
|
|
18818
|
+
return err instanceof Error && err.name === "NotFoundException";
|
|
18819
|
+
}
|
|
18820
|
+
};
|
|
18821
|
+
|
|
18541
18822
|
// src/provisioning/providers/cloudwatch-anomaly-detector-provider.ts
|
|
18542
18823
|
const ID_ATTRIBUTES = ["AnomalyDetectorId", "Id"];
|
|
18543
18824
|
var CloudWatchAnomalyDetectorProvider = class {
|
|
@@ -41111,7 +41392,9 @@ var AppConfigEnvironmentProvider = class {
|
|
|
41111
41392
|
}
|
|
41112
41393
|
async import(input) {
|
|
41113
41394
|
if (input.resourceType !== TYPE$2 || !input.knownPhysicalId) return null;
|
|
41114
|
-
const
|
|
41395
|
+
const applicationIdProp = input.properties["ApplicationId"];
|
|
41396
|
+
const physicalId = !input.knownPhysicalId.includes("|") && typeof applicationIdProp === "string" && applicationIdProp !== "" ? `${applicationIdProp}|${input.knownPhysicalId}` : input.knownPhysicalId;
|
|
41397
|
+
const { applicationId, environmentId } = this.splitId(physicalId, input.resourceType, input.logicalId);
|
|
41115
41398
|
try {
|
|
41116
41399
|
await this.getClient().send(new GetEnvironmentCommand({
|
|
41117
41400
|
ApplicationId: applicationId,
|
|
@@ -41122,7 +41405,7 @@ var AppConfigEnvironmentProvider = class {
|
|
|
41122
41405
|
throw err;
|
|
41123
41406
|
}
|
|
41124
41407
|
return {
|
|
41125
|
-
physicalId
|
|
41408
|
+
physicalId,
|
|
41126
41409
|
attributes: { EnvironmentId: environmentId }
|
|
41127
41410
|
};
|
|
41128
41411
|
}
|
|
@@ -63613,7 +63896,7 @@ var S3VectorsProvider = class S3VectorsProvider {
|
|
|
63613
63896
|
this.logger.debug(safeMsg`Could not list S3 VectorBucket ${logicalId}'s indexes after its delete failed: ${listError instanceof Error ? listError.name : typeof listError}`);
|
|
63614
63897
|
});
|
|
63615
63898
|
if (held === "empty") continue;
|
|
63616
|
-
if (held !== void 0) throw markNonRetryable(new ProvisioningError(maskerOrIdentity(context?.maskSecrets)(`Failed to delete S3 VectorBucket ${logicalId}: vector bucket ${physicalId} is not empty: it holds vector index(es) ${held.names.join(", ")}${held.truncated ? ", and more" : ""}. This operation did not delete them: they were created outside the stack, or retained by a DeletionPolicy. Matching CloudFormation, cdkd does not delete them. Delete them first (aws s3vectors delete-index) and retry the operation; a replacement deletes them only under --force-stateful-recreation.`), resourceType, logicalId, physicalId, error instanceof Error ? error : void 0));
|
|
63899
|
+
if (held !== void 0) throw markNonRetryable(new ProvisioningError(holderRefusalMask(context, maskerOrIdentity(context?.maskSecrets))(`Failed to delete S3 VectorBucket ${logicalId}: vector bucket ${physicalId} is not empty: it holds vector index(es) ${held.names.join(", ")}${held.truncated ? ", and more" : ""}. This operation did not delete them: they were created outside the stack, or retained by a DeletionPolicy. Matching CloudFormation, cdkd does not delete them. Delete them first (aws s3vectors delete-index) and retry the operation; a replacement deletes them only under --force-stateful-recreation.`), resourceType, logicalId, physicalId, error instanceof Error ? error : void 0));
|
|
63617
63900
|
return this.failVectorBucketDelete(logicalId, physicalId, resourceType, error, context);
|
|
63618
63901
|
}
|
|
63619
63902
|
}
|
|
@@ -65122,7 +65405,7 @@ async function deleteTableBucket(logicalId, physicalId, resourceType, context) {
|
|
|
65122
65405
|
});
|
|
65123
65406
|
if (held === "empty") continue;
|
|
65124
65407
|
if (held !== void 0) {
|
|
65125
|
-
const mask = context?.maskSecrets ?? ((text) => text);
|
|
65408
|
+
const mask = holderRefusalMask(context, context?.maskSecrets ?? ((text) => text));
|
|
65126
65409
|
throw markNonRetryable(new ProvisioningError(mask(`Failed to delete S3 Table Bucket ${logicalId}: table bucket ${physicalId} is not empty: it holds ${describeTableBucketContents(held)}. This operation did not delete them: they were created outside the stack, or retained by a DeletionPolicy. Matching CloudFormation, cdkd does not delete them. Delete them first (aws s3tables delete-table, then aws s3tables delete-namespace) and retry the operation; a replacement deletes them only under --force-stateful-recreation.`), resourceType, logicalId, physicalId, error instanceof Error ? error : void 0));
|
|
65127
65410
|
}
|
|
65128
65411
|
return failTableBucketDelete.call(this, logicalId, physicalId, resourceType, error, context);
|
|
@@ -67668,5 +67951,5 @@ var ACMCertificateProvider = class {
|
|
|
67668
67951
|
}
|
|
67669
67952
|
};
|
|
67670
67953
|
|
|
67671
|
-
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, EventBridgeArchiveProvider, 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, LogsDeliveryDestinationProvider, LogsDeliveryProvider, LogsDeliverySourceProvider, 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, WaitConditionProvider };
|
|
67672
|
-
//# sourceMappingURL=provider-classes-
|
|
67954
|
+
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, EventBridgeArchiveProvider, 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, LightsailAlarmProvider, LogsDeliveryDestinationProvider, LogsDeliveryProvider, LogsDeliverySourceProvider, 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, WaitConditionProvider };
|
|
67955
|
+
//# sourceMappingURL=provider-classes-COU3GAT5.js.map
|