@cdkd/cli 0.360.0 → 0.360.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-Zw14vfrI.js → ambient-client-defaults-7ZUTgwyy.js} +3 -3
- package/dist/{ambient-client-defaults-Zw14vfrI.js.map → ambient-client-defaults-7ZUTgwyy.js.map} +1 -1
- package/dist/{asg-provider-D1t6qsKn.js → asg-provider-Bw8ajB1r.js} +6 -6
- package/dist/{asg-provider-D1t6qsKn.js.map → asg-provider-Bw8ajB1r.js.map} +1 -1
- package/dist/cli.js +3 -3
- package/dist/{custom-resource-runtime-CIDXtQ5Q.js → custom-resource-runtime-CAP2Al4I.js} +6 -6
- package/dist/{custom-resource-runtime-CIDXtQ5Q.js.map → custom-resource-runtime-CAP2Al4I.js.map} +1 -1
- package/dist/{db-associated-roles-CYMYBGeh.js → db-associated-roles-DSeRoEq5.js} +2 -2
- package/dist/{db-associated-roles-CYMYBGeh.js.map → db-associated-roles-DSeRoEq5.js.map} +1 -1
- package/dist/{delete-started-dMEHah06.js → delete-started-DHIp8imD.js} +4 -4
- package/dist/{delete-started-dMEHah06.js.map → delete-started-DHIp8imD.js.map} +1 -1
- package/dist/{deploy-engine-T1iXkB24.js → deploy-engine-Bo8PtTbG.js} +109 -57
- package/dist/{deploy-engine-T1iXkB24.js.map → deploy-engine-Bo8PtTbG.js.map} +1 -1
- package/dist/{ec2-termination-protection-Ct7iZKky.js → ec2-termination-protection-CRkl8_Wy.js} +6 -6
- package/dist/{ec2-termination-protection-Ct7iZKky.js.map → ec2-termination-protection-CRkl8_Wy.js.map} +1 -1
- package/dist/{ecr-uri-DMMMk4h5.js → ecr-uri-DaIBuz4E.js} +2 -2
- package/dist/{ecr-uri-DMMMk4h5.js.map → ecr-uri-DaIBuz4E.js.map} +1 -1
- package/dist/{expected-bucket-owner-D0my0zRR.js → expected-bucket-owner-BjRKj3hF.js} +2 -2
- package/dist/{expected-bucket-owner-D0my0zRR.js.map → expected-bucket-owner-BjRKj3hF.js.map} +1 -1
- package/dist/{iam-role-provider-R89AqWLY.js → iam-role-provider-CcK9C-mY.js} +52 -13
- package/dist/iam-role-provider-CcK9C-mY.js.map +1 -0
- package/dist/{image-plan-nkTmvIbr.js → image-plan-CwiLyeAj.js} +8 -8
- package/dist/{image-plan-nkTmvIbr.js.map → image-plan-CwiLyeAj.js.map} +1 -1
- package/dist/index.js +5 -5
- package/dist/{logger-Fqr4kSBL.js → logger-CjGMINd9.js} +2 -2
- package/dist/{logger-Fqr4kSBL.js.map → logger-CjGMINd9.js.map} +1 -1
- package/dist/{neptune-provider-BMDYjSf5.js → neptune-provider-D-jHbjCG.js} +7 -7
- package/dist/{neptune-provider-BMDYjSf5.js.map → neptune-provider-D-jHbjCG.js.map} +1 -1
- package/dist/{program-Di80isf8.js → program-BHLjuXmA.js} +326 -35
- package/dist/program-BHLjuXmA.js.map +1 -0
- package/dist/{provider-classes-Bkb_H0Sp.js → provider-classes-D5IgG-fE.js} +199 -93
- package/dist/provider-classes-D5IgG-fE.js.map +1 -0
- package/dist/{rds-provider-BcNL1C0E.js → rds-provider-BSDygv5j.js} +10 -10
- package/dist/{rds-provider-BcNL1C0E.js.map → rds-provider-BSDygv5j.js.map} +1 -1
- package/dist/{read-replica-mqoiWJdM.js → read-replica-a4eZWjUH.js} +3 -3
- package/dist/{read-replica-mqoiWJdM.js.map → read-replica-a4eZWjUH.js.map} +1 -1
- package/dist/{replacement-rules-Y1UE2Vqb.js → replacement-rules-JS1D0m-r.js} +3 -3
- package/dist/{replacement-rules-Y1UE2Vqb.js.map → replacement-rules-JS1D0m-r.js.map} +1 -1
- package/dist/{resource-deadline-BSt_tRep.js → resource-deadline-DtW_JiNE.js} +4 -4
- package/dist/{resource-deadline-BSt_tRep.js.map → resource-deadline-DtW_JiNE.js.map} +1 -1
- package/dist/{restore-source-guard-CDrsW4tB.js → restore-source-guard-BPEKIvrh.js} +4 -4
- package/dist/{restore-source-guard-CDrsW4tB.js.map → restore-source-guard-BPEKIvrh.js.map} +1 -1
- package/dist/{run-cli-BKSKYUvl.js → run-cli-F87YOoqR.js} +2 -2
- package/dist/{run-cli-BKSKYUvl.js.map → run-cli-F87YOoqR.js.map} +1 -1
- package/dist/{settle-own-write-members-BqIDAx00.js → settle-own-write-members-DmDIpP0O.js} +41 -23
- package/dist/{settle-own-write-members-BqIDAx00.js.map → settle-own-write-members-DmDIpP0O.js.map} +1 -1
- package/dist/{version-yPbqfysZ.js → version-MMfHOVaa.js} +2 -2
- package/dist/{version-yPbqfysZ.js.map → version-MMfHOVaa.js.map} +1 -1
- package/package.json +1 -1
- package/dist/iam-role-provider-R89AqWLY.js.map +0 -1
- package/dist/program-Di80isf8.js.map +0 -1
- package/dist/provider-classes-Bkb_H0Sp.js.map +0 -1
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { a as
|
|
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 restoreOwnWriteRemovals, c as isEntityAlreadyExists, i as recordOwnWriteRemoval, l as IamCreateClientCache, n as collectInlinePolicyNamesManagedBySiblings, o as takeOwnWriteRemovals, r as clearOwnWriteRemovals, s as iamEntityLeftByThisCreate, t as IAMRoleProvider } from "./iam-role-provider-CcK9C-mY.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-CjGMINd9.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 { $ as isProceedDbStatus, $t as markAuxiliaryFailure, A as isPlainImportJson, At as canonicalizeRoute53QueryName, B as assertRegionMatch, Bt as createMaskedRetryLogger, C as isInsideWindow, Ct as SECRET_DERIVED_READ_LIVE, D as withoutServerErrorRetries, E as setBounded, Et as readPrincipalLists, F as refusalTypeShown, Ft as packCompositeId, G as logGroupProtectionSite, H as markNotGone, Ht as maskDeep, I as remedyLogicalId, K as observeThenDisableProtection, L as resolveExplicitPhysicalId, Lt as segmentAfterAnchor, M as isQuotableImportValue, Mt as compositeIdSeparatorRefusal, N as normalizeAwsTagsToCfn, Nt as compositeIdSkipResult, O as VALUE_NOT_SHOWN, Ot as recordedPrincipalsRepair, P as quotedRemedyLogicalId, Pt as logicalIdShown, R as DriftReadRefusedError, Rt as stateOrphanRecordRemedy, S as createAttemptKey, T as replayedSendWindow, Tt as onlySecretDerived, Ut as maskerOrIdentity, Vt as isSecretDerivedValue, W as deleteWithProtectionCompensation, Wt as withDerivedNameMasks, X as PROTECTION_FLIP_RETRY_WAIT_MS, Y as userPoolProtectionSite, Z as deleteAfterProtectionFlipWithFinalSnapshot, Zt as isAuxiliaryFailure, _ as AMBIGUOUS_LATCH_TTL_MS, _n as withPasteableAwsProfile, a as clearOnUpdateRemoval, b as RecentIdSet, bt as startInterruptWatch, c as removedTemplateKeys, dt as WITHHELD_AWS_COMMAND, en as markCreatedBeforeFailure, et as isTerminalDbWaitStatus, ft as isAwsCliLiteral, g as retractCreatedResource, ht as renderDisableCommand, it as protectionFlipKey, j as isPlainImportValue, jt as compositeIdFormatMessage, k as importRemedyCommand, l as withRemovalDefaults, m as reportCreatedResource, mt as protectedReplacementAdvice, n as enclosingDeadlineRemainingMs, nt as ProtectionFlipRegistry, ot as ElapsedBudget, pt as pasteableAwsCommand, q as rdsFamilyProtectionSite, qt as clearCreatedBeforeFailure, rt as isTerminalDeleteFailure, st as ElapsedBudgetRegistry, t as enclosingDeadlineExpired, tn as markSupersedesEarlierCreate, ut as UNNAMEABLE_ID_CLAUSE, v as AmbiguousCreateLatch, vn as injectiveKey, w as replayFollowedAmbiguousAttempt, wt as holdsSecretDerivedEntry, x as ambiguousAttemptLead, y as CREATION_DATE_SKEW_MARGIN_MS, yn as injectiveKeyPrefix, yt as isInterruptedWaitError, z as RESOURCE_NOT_FOUND, zt as createMaskedLogSinks } from "./resource-deadline-
|
|
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 { gt as slowCcOperationTimeoutMs, n as isRefusedByName, r as markDeleteStarted } 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
|
|
9
|
-
import { $ as recordTagWrite, $r as redactedDeleteAddressSkip,
|
|
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, d as normalizeRecordName, f as planSubscriptionAttributes, 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-7ZUTgwyy.js";
|
|
5
|
+
import { $ as isProceedDbStatus, $t as markAuxiliaryFailure, A as isPlainImportJson, At as canonicalizeRoute53QueryName, B as assertRegionMatch, Bt as createMaskedRetryLogger, C as isInsideWindow, Ct as SECRET_DERIVED_READ_LIVE, D as withoutServerErrorRetries, E as setBounded, Et as readPrincipalLists, F as refusalTypeShown, Ft as packCompositeId, G as logGroupProtectionSite, H as markNotGone, Ht as maskDeep, I as remedyLogicalId, K as observeThenDisableProtection, L as resolveExplicitPhysicalId, Lt as segmentAfterAnchor, M as isQuotableImportValue, Mt as compositeIdSeparatorRefusal, N as normalizeAwsTagsToCfn, Nt as compositeIdSkipResult, O as VALUE_NOT_SHOWN, Ot as recordedPrincipalsRepair, P as quotedRemedyLogicalId, Pt as logicalIdShown, R as DriftReadRefusedError, Rt as stateOrphanRecordRemedy, S as createAttemptKey, T as replayedSendWindow, Tt as onlySecretDerived, Ut as maskerOrIdentity, Vt as isSecretDerivedValue, W as deleteWithProtectionCompensation, Wt as withDerivedNameMasks, X as PROTECTION_FLIP_RETRY_WAIT_MS, Y as userPoolProtectionSite, Z as deleteAfterProtectionFlipWithFinalSnapshot, Zt as isAuxiliaryFailure, _ as AMBIGUOUS_LATCH_TTL_MS, _n as withPasteableAwsProfile, a as clearOnUpdateRemoval, b as RecentIdSet, bt as startInterruptWatch, c as removedTemplateKeys, dt as WITHHELD_AWS_COMMAND, en as markCreatedBeforeFailure, et as isTerminalDbWaitStatus, ft as isAwsCliLiteral, g as retractCreatedResource, ht as renderDisableCommand, it as protectionFlipKey, j as isPlainImportValue, jt as compositeIdFormatMessage, k as importRemedyCommand, l as withRemovalDefaults, m as reportCreatedResource, mt as protectedReplacementAdvice, n as enclosingDeadlineRemainingMs, nt as ProtectionFlipRegistry, ot as ElapsedBudget, pt as pasteableAwsCommand, q as rdsFamilyProtectionSite, qt as clearCreatedBeforeFailure, rt as isTerminalDeleteFailure, st as ElapsedBudgetRegistry, t as enclosingDeadlineExpired, tn as markSupersedesEarlierCreate, ut as UNNAMEABLE_ID_CLAUSE, v as AmbiguousCreateLatch, vn as injectiveKey, w as replayFollowedAmbiguousAttempt, wt as holdsSecretDerivedEntry, x as ambiguousAttemptLead, y as CREATION_DATE_SKEW_MARGIN_MS, yn as injectiveKeyPrefix, yt as isInterruptedWaitError, z as RESOURCE_NOT_FOUND, zt as createMaskedLogSinks } from "./resource-deadline-DtW_JiNE.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-MMfHOVaa.js";
|
|
7
|
+
import { gt as slowCcOperationTimeoutMs, n as isRefusedByName, r as markDeleteStarted } from "./delete-started-DHIp8imD.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$4, 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-BHLjuXmA.js";
|
|
9
|
+
import { $ as recordTagWrite, $r as redactedDeleteAddressSkip, At as DELETE_INDEX_WAIT_PROCEED_NOTE, B as declaredStreamTagsMember, Ba as SNS_DEFAULT_POLICY_ID, Bt as isTruthyCfnBoolean, Ct as DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS, Dl as refuseMalformedResourcesForDestroy, Do as RecordedIdentityError, Dt as deleteBudgetKey, Eo as waitForGoneAfterDelete, Et as compensateRemovedDeletionProtection, Fa as withoutSiblingAttachedArns, Fo as deleteSkipReason, Fs as outputReferenceProvenanceOf, Ft as relayedIndexBusyDelete, G as streamDeclaresTags, Ga as memberReadFailure, Go as isSettledInstanceState, Ha as declaredPolicyDocument, I as DynamoDBGlobalTableProvider, Ia as withoutSiblingOwned, Ii as getStackRecords, Io as withIndeterminateGuard, Ir as acquireIdempotencyToken, It as waitForIndexesSettled, J as streamTagsMatchDeclared, Ja as settleDeclaredMember, Jo as maskedSecretSegment, K as streamMemberRefusals, Ka as policyDocumentMatchesDeclared, Ki as replacedDeleteFailureVerdict, Ko as APPSYNC_APIKEY_ARN_RESOURCE_PATH, L as STREAM_POLICY_KEY, La as KMS_DEFAULT_KEY_POLICY_ID, Lt as ECR_AUTO_DELETE_IMAGES_TAG, Lu as rewriteTemplateAssetReferences, Ma as collectManagedPolicyArnsAttachedBySiblings, Ml as accountArgs, Mr as earliestDefined, Mt as TABLE_INDEX_NOUN, Na as collectPrincipalsAttachingPolicy, Nl as withheldAccountClause, Nt as deleteTableWithIndexBusyRetry, Oo as RecordedIdentityMismatchError, Ot as resolveDynamoDbDeleteBudgetClock, Pa as isStoredExpression, Pi as awaitInFlightSibling, Pr as reserveStackCreateToken, Pt as maskedLogger, Q as isDynamoDBTableArnIn, Qa as policyContentKey, Qr as redactedDeleteAddressFields, Qt as licensedNameHolder, R as STREAM_TAGS_KEY, Rt as S3_AUTO_DELETE_OBJECTS_TAG, Sc as passedParameterClassesOf, St as DYNAMODB_DELETE_DEADLINE_MARGIN_MS, Tt as beginDeleteWait, Tu as decodeListingKey, U as reverseMapStreamPolicy, Ua as efsPolicyMatchesDeclared, V as planStreamMemberOps, Va as declaredMemberDocument, Vl as findSdkUnwiredProperties, Vs as getAccountInfo, W as streamDeclaresPolicy, Wa as lambdaPermissionMatchesDeclared, Wl as withoutSdkUnwiredProperties, X as clearTagWrites, Xa as verbatimEchoDriftKeys, Xr as REDACTED_DELETE_ADDRESS_SKIP_REASON, Y as TAGS_BASELINE_REREAD_DELAYS_MS, Ya as warnUnsettledMember, Za as attemptedPolicyDocument, Zr as isRedactedRecordedValue, _l as refuseMalformedNestedChildOutputs, _n as getCurrentNestedStackContext, _s as s3BucketArn, _t as planIndexContributorInsightsOps, _u as listNestedTemplateRows, ao as classifyHandleUrl, at as planTimeToLive, bs as s3BucketRegionalDomainName, bt as reverseMapTableContributorInsights, ct as planVectorIndexUpdates, dc as isWarmThroughputDecrease, dd as describeFileReadFailure, dr as withoutSiblingOwnedSgRules, dt as vectorIndexesSettled, ec as LEGACY_HANDLE_ID_PREFIX, en as chunks, et as settleWrittenTags, fc as toCfnInteger, fd as displayAssemblyPath, fr as SG_RULE_ID_PATTERN, ft as vectorIndexesShapeDetail, ga as secretNamedAttributeNamesOf, gt as planContributorInsightsOp, gu as isAbsoluteAssetPath, hd as resolveAssemblyPath, hr as sgProtocolKey, ht as indexDeclaresContributorInsights, hu as findNestedTemplateTreeDefect, io as WaitConditionSignalStore, it as isTtlRateLimited, ja as collectGroupsAddedBySiblings, js as parseWebACLArn, jt as INDEX_SETTLE_POLL_INTERVAL_MS, ko as assertRecordedIdentity, kt as resolveDynamoDbDeleteBudgetMs, lc as WARM_THROUGHPUT_MEMBERS, lr as siblingOwnedSgRuleIdentities, lt as readbackVectorIndexes, md as renderAssemblyPathEscape, mo as getCurrentResourceSecrets, mr as recordedSgRuleId, mt as contributorInsightsRefusals, nn as lookupEachName, nt as takeTagWrite, oo as evaluateSignals, ot as readTtlSpec, pc as toFiniteNumber, pn as revertNestedChildFromJournal, pr as cfnIngressPortValue, pt as CONTRIBUTOR_INSIGHTS_KEY, pu as stringifyValue, q as streamPolicyMatchesDeclared, qa as reReadUntilSettled, rn as withApiLimit, rt as isTtlAlreadyDisabled, st as sendTtlWaitingOutRateLimit, t as DeployEngine, tc as isLegacyHandleId, tn as isAccessDeniedError, uc as coerceWarmThroughput$1, ui as getCurrentProducerRegions, un as getNestedRevertRun, ut as vectorIndexesForCreate, vn as withNestedStackContext, vs as s3BucketDomainName, vt as readContributorInsightsSpec, vu as renderNestedTemplateTreeDefect, wo as waitForLambdaFunctionActive, wr as calculateResourceDrift, wt as DYNAMODB_DELETE_POLL_COST_MS, xs as s3BucketWebsiteUrl, xt as stripIndexContributorInsights, ys as s3BucketDualStackDomainName, yt as reverseMapIndexContributorInsights, z as declaredStreamPolicyMember, za as OWN_WRITE_REREAD_DELAYS_MS, zo as markWaitAbandoned, zt as hasCdkAutoDeleteTag } from "./deploy-engine-Bo8PtTbG.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-BPEKIvrh.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-CRkl8_Wy.js";
|
|
12
|
+
import { a as principalOwnWriteMembers, c as stringListMember, d as normalizeRecordName, f as planSubscriptionAttributes, n as declaredStringList, o as settleOwnWriteMembers } from "./settle-own-write-members-DmDIpP0O.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-JS1D0m-r.js";
|
|
16
|
+
import { RDSProvider } from "./rds-provider-BSDygv5j.js";
|
|
17
|
+
import { NeptuneProvider } from "./neptune-provider-D-jHbjCG.js";
|
|
18
|
+
import { ASGProvider } from "./asg-provider-Bw8ajB1r.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";
|
|
22
22
|
import { CreateQueueCommand, DeleteQueueCommand, GetQueueAttributesCommand, GetQueueUrlCommand, ListQueueTagsCommand, QueueDoesNotExist, SQSClient, SetQueueAttributesCommand, TagQueueCommand, UntagQueueCommand } from "@aws-sdk/client-sqs";
|
|
23
|
-
import { CreateTopicCommand, DeleteTopicCommand, GetSubscriptionAttributesCommand, GetTopicAttributesCommand, InvalidParameterException, ListSubscriptionsByTopicCommand, ListTagsForResourceCommand, ListTopicsCommand, NotFoundException, SNSClient, SetSubscriptionAttributesCommand, SetTopicAttributesCommand, SubscribeCommand, TagResourceCommand, UnsubscribeCommand, UntagResourceCommand } from "@aws-sdk/client-sns";
|
|
23
|
+
import { AuthorizationErrorException, CreateTopicCommand, DeleteTopicCommand, GetSubscriptionAttributesCommand, GetTopicAttributesCommand, InvalidParameterException, ListSubscriptionsByTopicCommand, ListTagsForResourceCommand, ListTopicsCommand, NotFoundException, SNSClient, SetSubscriptionAttributesCommand, SetTopicAttributesCommand, SubscribeCommand, TagResourceCommand, UnsubscribeCommand, UntagResourceCommand } from "@aws-sdk/client-sns";
|
|
24
24
|
import { AddPermissionCommand, CreateEventSourceMappingCommand, CreateFunctionCommand, CreateFunctionUrlConfigCommand, DeleteEventSourceMappingCommand, DeleteFunctionCodeSigningConfigCommand, DeleteFunctionCommand, DeleteFunctionConcurrencyCommand, DeleteFunctionEventInvokeConfigCommand, DeleteFunctionUrlConfigCommand, DeleteLayerVersionCommand, GetEventSourceMappingCommand, GetFunctionCodeSigningConfigCommand, GetFunctionCommand, GetFunctionConcurrencyCommand, GetFunctionConfigurationCommand, GetFunctionEventInvokeConfigCommand, GetFunctionRecursionConfigCommand, GetFunctionScalingConfigCommand, GetFunctionUrlConfigCommand, GetLayerVersionByArnCommand, GetPolicyCommand as GetPolicyCommand$1, GetRuntimeManagementConfigCommand, LambdaClient, ListEventSourceMappingsCommand, ListLayerVersionsCommand, ListTagsCommand, PublishLayerVersionCommand, PublishVersionCommand, PutFunctionCodeSigningConfigCommand, PutFunctionConcurrencyCommand, PutFunctionEventInvokeConfigCommand, PutFunctionRecursionConfigCommand, PutFunctionScalingConfigCommand, PutRuntimeManagementConfigCommand, RemovePermissionCommand, ResourceNotFoundException, TagResourceCommand as TagResourceCommand$1, UntagResourceCommand as UntagResourceCommand$1, UpdateEventSourceMappingCommand, UpdateFunctionCodeCommand, UpdateFunctionConfigurationCommand, UpdateFunctionUrlConfigCommand, waitUntilFunctionActiveV2, waitUntilFunctionUpdatedV2 } from "@aws-sdk/client-lambda";
|
|
25
25
|
import { GetCallerIdentityCommand, STSClient } from "@aws-sdk/client-sts";
|
|
26
26
|
import { AllocateAddressCommand, AssociateAddressCommand, AssociateIamInstanceProfileCommand, AssociateNatGatewayAddressCommand, AssociateRouteTableCommand, AssociateSubnetCidrBlockCommand, AttachInternetGatewayCommand, AttachVolumeCommand, AttachVpnGatewayCommand, AuthorizeSecurityGroupEgressCommand, AuthorizeSecurityGroupIngressCommand, CreateInternetGatewayCommand, CreateNatGatewayCommand, CreateNetworkAclCommand, CreateNetworkAclEntryCommand, CreateRouteCommand, CreateRouteTableCommand, CreateSecurityGroupCommand, CreateSubnetCommand, CreateTagsCommand, CreateVpcCommand, DeleteInternetGatewayCommand, DeleteNatGatewayCommand, DeleteNetworkAclCommand, DeleteNetworkAclEntryCommand, DeleteNetworkInterfaceCommand, DeleteRouteCommand, DeleteRouteTableCommand, DeleteSecurityGroupCommand, DeleteSubnetCommand, DeleteTagsCommand, DeleteVpcCommand, DescribeAddressesCommand, DescribeAvailabilityZonesCommand, DescribeIamInstanceProfileAssociationsCommand, DescribeInstanceAttributeCommand, DescribeInstanceCreditSpecificationsCommand, DescribeInstancesCommand, DescribeInternetGatewaysCommand, DescribeNatGatewaysCommand, DescribeNetworkAclsCommand, DescribeNetworkInterfacesCommand, DescribeRouteTablesCommand, DescribeSecurityGroupRulesCommand, DescribeSecurityGroupsCommand, DescribeSubnetsCommand, DescribeVolumesCommand, DescribeVpcAttributeCommand, DescribeVpcsCommand, DescribeVpnGatewaysCommand, DetachInternetGatewayCommand, DetachVolumeCommand, DetachVpnGatewayCommand, DisassociateAddressCommand, DisassociateIamInstanceProfileCommand, DisassociateNatGatewayAddressCommand, DisassociateRouteTableCommand, DisassociateSubnetCidrBlockCommand, EC2Client, GetIpamPoolAllocationsCommand, ModifyInstanceAttributeCommand, ModifyInstanceCreditSpecificationCommand, ModifyInstanceMetadataOptionsCommand, ModifyInstancePlacementCommand, ModifyPrivateDnsNameOptionsCommand, ModifySubnetAttributeCommand, ModifyVpcAttributeCommand, ModifyVpcTenancyCommand, MonitorInstancesCommand, ReleaseAddressCommand, ReplaceIamInstanceProfileAssociationCommand, ReplaceNetworkAclAssociationCommand, ReplaceNetworkAclEntryCommand, ReplaceRouteCommand, RevokeSecurityGroupEgressCommand, RevokeSecurityGroupIngressCommand, RunInstancesCommand, StartInstancesCommand, StopInstancesCommand, TerminateInstancesCommand, UnmonitorInstancesCommand, UpdateSecurityGroupRuleDescriptionsEgressCommand, UpdateSecurityGroupRuleDescriptionsIngressCommand, waitUntilInstanceRunning, waitUntilInstanceTerminated, waitUntilNatGatewayAvailable, waitUntilNatGatewayDeleted } from "@aws-sdk/client-ec2";
|
|
@@ -1097,6 +1097,7 @@ async function deleteImpl$39(logicalId, physicalId, resourceType, _properties, c
|
|
|
1097
1097
|
// src/provisioning/providers/iam-managed-policy/read-state.ts
|
|
1098
1098
|
const AWS_MANAGED_POLICY_ARN_RE = /^arn:aws[a-z0-9-]*:iam::aws:/;
|
|
1099
1099
|
async function readCurrentState$40(physicalId, logicalId, _resourceType, properties, context) {
|
|
1100
|
+
const removed = context?.afterOwnWrite === true ? takeOwnWriteRemovals("AWS::IAM::ManagedPolicy", physicalId) : void 0;
|
|
1100
1101
|
let policy;
|
|
1101
1102
|
try {
|
|
1102
1103
|
policy = (await this.iamClient.send(new GetPolicyCommand({ PolicyArn: physicalId }))).Policy;
|
|
@@ -1139,7 +1140,7 @@ async function readCurrentState$40(physicalId, logicalId, _resourceType, propert
|
|
|
1139
1140
|
} catch (err) {
|
|
1140
1141
|
if (!(err instanceof NoSuchEntityException)) throw err;
|
|
1141
1142
|
}
|
|
1142
|
-
if (context?.afterOwnWrite === true && properties !== void 0) await settleOwnWriteMembers(result, managedPolicyOwnWriteMembers.call(this, physicalId, properties, context), this.ownWriteRereadDelaysMs, (key) => warnUnsettledMember(this.logger, logicalId, "AWS::IAM::ManagedPolicy", key));
|
|
1143
|
+
if (context?.afterOwnWrite === true && properties !== void 0) await settleOwnWriteMembers(result, managedPolicyOwnWriteMembers.call(this, physicalId, properties, context, removed), this.ownWriteRereadDelaysMs, (key) => warnUnsettledMember(this.logger, logicalId, "AWS::IAM::ManagedPolicy", key));
|
|
1143
1144
|
return result;
|
|
1144
1145
|
}
|
|
1145
1146
|
async function readDefaultVersionDocument(physicalId, versionId) {
|
|
@@ -1177,7 +1178,7 @@ async function readAttachments(physicalId, properties, context) {
|
|
|
1177
1178
|
Users: own("Users", users)
|
|
1178
1179
|
};
|
|
1179
1180
|
}
|
|
1180
|
-
function managedPolicyOwnWriteMembers(physicalId, properties, context) {
|
|
1181
|
+
function managedPolicyOwnWriteMembers(physicalId, properties, context, removed) {
|
|
1181
1182
|
const members = [];
|
|
1182
1183
|
const document = declaredMemberDocument(properties["PolicyDocument"]);
|
|
1183
1184
|
if (document !== void 0) members.push({
|
|
@@ -1203,12 +1204,13 @@ function managedPolicyOwnWriteMembers(physicalId, properties, context) {
|
|
|
1203
1204
|
"Users"
|
|
1204
1205
|
]) {
|
|
1205
1206
|
const declared = declaredStringList(properties[key]);
|
|
1206
|
-
|
|
1207
|
-
|
|
1207
|
+
const gone = removed?.get(key);
|
|
1208
|
+
if (declared === void 0 && (gone?.size ?? 0) === 0) continue;
|
|
1209
|
+
members.push(stringListMember(key, declared ?? [], async () => {
|
|
1208
1210
|
const round = served[key]++;
|
|
1209
1211
|
rounds[round] ??= readAttachments.call(this, physicalId, properties, context);
|
|
1210
1212
|
return { value: (await rounds[round])[key] };
|
|
1211
|
-
}));
|
|
1213
|
+
}, gone));
|
|
1212
1214
|
}
|
|
1213
1215
|
return members;
|
|
1214
1216
|
}
|
|
@@ -1366,6 +1368,7 @@ var IAMManagedPolicyProvider = class {
|
|
|
1366
1368
|
}
|
|
1367
1369
|
async updatePrincipals(policyArn, newGroups, oldGroups, newRoles, oldRoles, newUsers, oldUsers, log) {
|
|
1368
1370
|
const { value: v } = log;
|
|
1371
|
+
clearOwnWriteRemovals(MANAGED_POLICY_TYPE, policyArn);
|
|
1369
1372
|
const newGroupSet = new Set(newGroups || []);
|
|
1370
1373
|
const oldGroupSet = new Set(oldGroups || []);
|
|
1371
1374
|
for (const g of newGroupSet) if (!oldGroupSet.has(g)) {
|
|
@@ -1375,14 +1378,17 @@ var IAMManagedPolicyProvider = class {
|
|
|
1375
1378
|
}));
|
|
1376
1379
|
log.debug(`Attached ${v(policyArn)} to group ${v(g)}`);
|
|
1377
1380
|
}
|
|
1378
|
-
for (const g of oldGroupSet) if (!newGroupSet.has(g))
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1381
|
+
for (const g of oldGroupSet) if (!newGroupSet.has(g)) {
|
|
1382
|
+
try {
|
|
1383
|
+
await this.iamClient.send(new DetachGroupPolicyCommand({
|
|
1384
|
+
GroupName: g,
|
|
1385
|
+
PolicyArn: policyArn
|
|
1386
|
+
}));
|
|
1387
|
+
log.debug(`Detached ${v(policyArn)} from group ${v(g)}`);
|
|
1388
|
+
} catch (err) {
|
|
1389
|
+
if (!(err instanceof NoSuchEntityException)) throw err;
|
|
1390
|
+
}
|
|
1391
|
+
recordOwnWriteRemoval(MANAGED_POLICY_TYPE, policyArn, "Groups", g);
|
|
1386
1392
|
}
|
|
1387
1393
|
const newRoleSet = new Set(newRoles || []);
|
|
1388
1394
|
const oldRoleSet = new Set(oldRoles || []);
|
|
@@ -1393,14 +1399,17 @@ var IAMManagedPolicyProvider = class {
|
|
|
1393
1399
|
}));
|
|
1394
1400
|
log.debug(`Attached ${v(policyArn)} to role ${v(r)}`);
|
|
1395
1401
|
}
|
|
1396
|
-
for (const r of oldRoleSet) if (!newRoleSet.has(r))
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1402
|
+
for (const r of oldRoleSet) if (!newRoleSet.has(r)) {
|
|
1403
|
+
try {
|
|
1404
|
+
await this.iamClient.send(new DetachRolePolicyCommand({
|
|
1405
|
+
RoleName: r,
|
|
1406
|
+
PolicyArn: policyArn
|
|
1407
|
+
}));
|
|
1408
|
+
log.debug(`Detached ${v(policyArn)} from role ${v(r)}`);
|
|
1409
|
+
} catch (err) {
|
|
1410
|
+
if (!(err instanceof NoSuchEntityException)) throw err;
|
|
1411
|
+
}
|
|
1412
|
+
recordOwnWriteRemoval(MANAGED_POLICY_TYPE, policyArn, "Roles", r);
|
|
1404
1413
|
}
|
|
1405
1414
|
const newUserSet = new Set(newUsers || []);
|
|
1406
1415
|
const oldUserSet = new Set(oldUsers || []);
|
|
@@ -1411,14 +1420,17 @@ var IAMManagedPolicyProvider = class {
|
|
|
1411
1420
|
}));
|
|
1412
1421
|
log.debug(`Attached ${v(policyArn)} to user ${v(u)}`);
|
|
1413
1422
|
}
|
|
1414
|
-
for (const u of oldUserSet) if (!newUserSet.has(u))
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1423
|
+
for (const u of oldUserSet) if (!newUserSet.has(u)) {
|
|
1424
|
+
try {
|
|
1425
|
+
await this.iamClient.send(new DetachUserPolicyCommand({
|
|
1426
|
+
UserName: u,
|
|
1427
|
+
PolicyArn: policyArn
|
|
1428
|
+
}));
|
|
1429
|
+
log.debug(`Detached ${v(policyArn)} from user ${v(u)}`);
|
|
1430
|
+
} catch (err) {
|
|
1431
|
+
if (!(err instanceof NoSuchEntityException)) throw err;
|
|
1432
|
+
}
|
|
1433
|
+
recordOwnWriteRemoval(MANAGED_POLICY_TYPE, policyArn, "Users", u);
|
|
1422
1434
|
}
|
|
1423
1435
|
}
|
|
1424
1436
|
async readLivePrincipals(policyArn) {
|
|
@@ -1691,6 +1703,7 @@ var IAMInstanceProfileProvider = class {
|
|
|
1691
1703
|
const log = withDerivedNameMasks(this.logger, createMaskedLogSinks(this.logger, context?.maskSecrets), [[properties["InstanceProfileName"], physicalId], [previousProperties["InstanceProfileName"], physicalId]]);
|
|
1692
1704
|
const { value: v } = log;
|
|
1693
1705
|
log.debug(`Updating IAM instance profile ${logicalId}: ${v(physicalId)}`);
|
|
1706
|
+
clearOwnWriteRemovals(INSTANCE_PROFILE_TYPE, physicalId);
|
|
1694
1707
|
const newPrincipals = readPrincipalLists({ Roles: properties["Roles"] });
|
|
1695
1708
|
let oldPrincipals = readPrincipalLists({ Roles: previousProperties["Roles"] });
|
|
1696
1709
|
if (!("malformed" in newPrincipals) && onlySecretDerived(oldPrincipals)) try {
|
|
@@ -1705,15 +1718,18 @@ var IAMInstanceProfileProvider = class {
|
|
|
1705
1718
|
const newRoles = newPrincipals.lists.Roles ?? [];
|
|
1706
1719
|
const oldRoles = oldPrincipals.lists.Roles ?? [];
|
|
1707
1720
|
try {
|
|
1708
|
-
for (const roleName of oldRoles) if (!newRoles.includes(roleName))
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1721
|
+
for (const roleName of oldRoles) if (!newRoles.includes(roleName)) {
|
|
1722
|
+
try {
|
|
1723
|
+
await this.iamClient.send(new RemoveRoleFromInstanceProfileCommand({
|
|
1724
|
+
InstanceProfileName: physicalId,
|
|
1725
|
+
RoleName: roleName
|
|
1726
|
+
}));
|
|
1727
|
+
log.debug(`Removed role ${v(roleName)} from instance profile ${v(physicalId)}`);
|
|
1728
|
+
} catch (error) {
|
|
1729
|
+
if (!(error instanceof NoSuchEntityException)) throw error;
|
|
1730
|
+
log.debug(`Role ${v(roleName)} already removed from instance profile ${v(physicalId)}`);
|
|
1731
|
+
}
|
|
1732
|
+
recordOwnWriteRemoval(INSTANCE_PROFILE_TYPE, physicalId, "Roles", roleName);
|
|
1717
1733
|
}
|
|
1718
1734
|
for (const roleName of newRoles) if (!oldRoles.includes(roleName)) {
|
|
1719
1735
|
try {
|
|
@@ -1848,6 +1864,7 @@ var IAMInstanceProfileProvider = class {
|
|
|
1848
1864
|
return token;
|
|
1849
1865
|
}
|
|
1850
1866
|
async readCurrentState(physicalId, logicalId, _resourceType, properties, context) {
|
|
1867
|
+
const removed = context?.afterOwnWrite === true ? takeOwnWriteRemovals(INSTANCE_PROFILE_TYPE, physicalId)?.get("Roles") : void 0;
|
|
1851
1868
|
let profile;
|
|
1852
1869
|
try {
|
|
1853
1870
|
profile = (await this.iamClient.send(new GetInstanceProfileCommand({ InstanceProfileName: physicalId }))).InstanceProfile;
|
|
@@ -1861,10 +1878,10 @@ var IAMInstanceProfileProvider = class {
|
|
|
1861
1878
|
if (profile.Path !== void 0) result["Path"] = profile.Path;
|
|
1862
1879
|
result["Roles"] = profileRoleNames(profile);
|
|
1863
1880
|
const declared = context?.afterOwnWrite === true ? declaredStringList(properties?.["Roles"]) : void 0;
|
|
1864
|
-
if (declared !== void 0) await settleOwnWriteMembers(result, [stringListMember("Roles", declared, async () => {
|
|
1881
|
+
if (declared !== void 0 || (removed?.size ?? 0) > 0) await settleOwnWriteMembers(result, [stringListMember("Roles", declared ?? [], async () => {
|
|
1865
1882
|
const resp = await this.iamClient.send(new GetInstanceProfileCommand({ InstanceProfileName: physicalId }));
|
|
1866
1883
|
return resp.InstanceProfile ? { value: profileRoleNames(resp.InstanceProfile) } : "failed";
|
|
1867
|
-
})], this.ownWriteRereadDelaysMs, (key) => warnUnsettledMember(this.logger, logicalId, "AWS::IAM::InstanceProfile", key));
|
|
1884
|
+
}, removed)], this.ownWriteRereadDelaysMs, (key) => warnUnsettledMember(this.logger, logicalId, "AWS::IAM::InstanceProfile", key));
|
|
1868
1885
|
return result;
|
|
1869
1886
|
}
|
|
1870
1887
|
async import(input) {
|
|
@@ -2447,10 +2464,12 @@ async function createUser(logicalId, resourceType, properties, log) {
|
|
|
2447
2464
|
}
|
|
2448
2465
|
|
|
2449
2466
|
// src/provisioning/providers/iam-user-group/user-update.ts
|
|
2467
|
+
const USER_TYPE = "AWS::IAM::User";
|
|
2450
2468
|
async function updateUser(logicalId, physicalId, resourceType, properties, previousProperties, log, claimed) {
|
|
2451
2469
|
const { value: v } = log;
|
|
2452
2470
|
log.debug(`Updating IAM user ${logicalId}: ${v(physicalId)}`);
|
|
2453
2471
|
refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId, physicalId);
|
|
2472
|
+
clearOwnWriteRemovals(USER_TYPE, physicalId);
|
|
2454
2473
|
const groups = await readPrincipalSides({
|
|
2455
2474
|
desired: { Groups: properties["Groups"] },
|
|
2456
2475
|
recorded: { Groups: previousProperties["Groups"] },
|
|
@@ -2491,6 +2510,7 @@ async function updateUser(logicalId, physicalId, resourceType, properties, previ
|
|
|
2491
2510
|
log.debug(`Updated permissions boundary on user ${v(physicalId)}`);
|
|
2492
2511
|
} else if (oldPermBoundary) {
|
|
2493
2512
|
await this.iamClient.send(new DeleteUserPermissionsBoundaryCommand({ UserName: physicalId }));
|
|
2513
|
+
recordOwnWriteRemoval(USER_TYPE, physicalId, "PermissionsBoundary", oldPermBoundary);
|
|
2494
2514
|
log.debug(`Removed permissions boundary from user ${v(physicalId)}`);
|
|
2495
2515
|
}
|
|
2496
2516
|
}
|
|
@@ -2569,14 +2589,17 @@ async function updateUserManagedPolicies(userName, newPolicies, oldPolicies, log
|
|
|
2569
2589
|
}));
|
|
2570
2590
|
log.debug(`Attached managed policy ${v(policyArn)} to user ${v(userName)}`);
|
|
2571
2591
|
}
|
|
2572
|
-
for (const policyArn of oldSet) if (!newSet.has(policyArn))
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2592
|
+
for (const policyArn of oldSet) if (!newSet.has(policyArn)) {
|
|
2593
|
+
try {
|
|
2594
|
+
await this.iamClient.send(new DetachUserPolicyCommand({
|
|
2595
|
+
UserName: userName,
|
|
2596
|
+
PolicyArn: policyArn
|
|
2597
|
+
}));
|
|
2598
|
+
log.debug(`Detached managed policy ${v(policyArn)} from user ${v(userName)}`);
|
|
2599
|
+
} catch (error) {
|
|
2600
|
+
if (!(error instanceof NoSuchEntityException)) throw error;
|
|
2601
|
+
}
|
|
2602
|
+
recordOwnWriteRemoval(USER_TYPE, userName, "ManagedPolicyArns", policyArn);
|
|
2580
2603
|
}
|
|
2581
2604
|
}
|
|
2582
2605
|
async function updateUserGroups(userName, newGroups, oldGroups, log) {
|
|
@@ -2590,14 +2613,17 @@ async function updateUserGroups(userName, newGroups, oldGroups, log) {
|
|
|
2590
2613
|
}));
|
|
2591
2614
|
log.debug(`Added user ${v(userName)} to group ${v(groupName)}`);
|
|
2592
2615
|
}
|
|
2593
|
-
for (const groupName of oldSet) if (!newSet.has(groupName))
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2616
|
+
for (const groupName of oldSet) if (!newSet.has(groupName)) {
|
|
2617
|
+
try {
|
|
2618
|
+
await this.iamClient.send(new RemoveUserFromGroupCommand({
|
|
2619
|
+
UserName: userName,
|
|
2620
|
+
GroupName: groupName
|
|
2621
|
+
}));
|
|
2622
|
+
log.debug(`Removed user ${v(userName)} from group ${v(groupName)}`);
|
|
2623
|
+
} catch (error) {
|
|
2624
|
+
if (!(error instanceof NoSuchEntityException)) throw error;
|
|
2625
|
+
}
|
|
2626
|
+
recordOwnWriteRemoval(USER_TYPE, userName, "Groups", groupName);
|
|
2601
2627
|
}
|
|
2602
2628
|
}
|
|
2603
2629
|
async function updateUserInlinePolicies(userName, newPolicies, oldPolicies, log, claimed) {
|
|
@@ -2627,6 +2653,7 @@ async function updateUserInlinePolicies(userName, newPolicies, oldPolicies, log,
|
|
|
2627
2653
|
} catch (error) {
|
|
2628
2654
|
if (!(error instanceof NoSuchEntityException)) throw error;
|
|
2629
2655
|
}
|
|
2656
|
+
recordOwnWriteRemoval(USER_TYPE, userName, "Policies", policyName);
|
|
2630
2657
|
}
|
|
2631
2658
|
}
|
|
2632
2659
|
|
|
@@ -2778,6 +2805,7 @@ async function deleteAllUserInlinePolicies(userName, log, progress) {
|
|
|
2778
2805
|
}
|
|
2779
2806
|
|
|
2780
2807
|
// src/provisioning/providers/iam-user-group/group.ts
|
|
2808
|
+
const GROUP_TYPE = "AWS::IAM::Group";
|
|
2781
2809
|
async function createGroup(logicalId, resourceType, properties, log) {
|
|
2782
2810
|
const { value: v } = log;
|
|
2783
2811
|
log.debug(`Creating IAM group ${logicalId}`);
|
|
@@ -2865,6 +2893,7 @@ async function createGroup(logicalId, resourceType, properties, log) {
|
|
|
2865
2893
|
async function updateGroup(logicalId, physicalId, resourceType, properties, previousProperties, log, claimed) {
|
|
2866
2894
|
const { value: v } = log;
|
|
2867
2895
|
log.debug(`Updating IAM group ${logicalId}: ${v(physicalId)}`);
|
|
2896
|
+
clearOwnWriteRemovals(GROUP_TYPE, physicalId);
|
|
2868
2897
|
try {
|
|
2869
2898
|
const newPath = iamPathOf(properties["Path"]);
|
|
2870
2899
|
if (newPath !== iamPathOf(previousProperties["Path"])) {
|
|
@@ -2984,6 +3013,7 @@ async function updateGroupManagedPolicies(groupName, newPolicies, oldPolicies, l
|
|
|
2984
3013
|
GroupName: groupName,
|
|
2985
3014
|
PolicyArn: policyArn
|
|
2986
3015
|
}));
|
|
3016
|
+
recordOwnWriteRemoval(GROUP_TYPE, groupName, "ManagedPolicyArns", policyArn);
|
|
2987
3017
|
log.debug(`Detached managed policy ${v(policyArn)} from group ${v(groupName)}`);
|
|
2988
3018
|
}
|
|
2989
3019
|
}
|
|
@@ -3033,6 +3063,7 @@ async function updateGroupInlinePolicies(groupName, newPolicies, oldPolicies, lo
|
|
|
3033
3063
|
} catch (error) {
|
|
3034
3064
|
if (!(error instanceof NoSuchEntityException)) throw error;
|
|
3035
3065
|
}
|
|
3066
|
+
recordOwnWriteRemoval(GROUP_TYPE, groupName, "Policies", policyName);
|
|
3036
3067
|
}
|
|
3037
3068
|
}
|
|
3038
3069
|
|
|
@@ -3274,6 +3305,7 @@ async function readCurrentState$39(physicalId, logicalId, resourceType, properti
|
|
|
3274
3305
|
}
|
|
3275
3306
|
}
|
|
3276
3307
|
async function readUserCurrentState(physicalId, properties, context, logicalId = physicalId) {
|
|
3308
|
+
const removed = context?.afterOwnWrite === true ? takeOwnWriteRemovals("AWS::IAM::User", physicalId) : void 0;
|
|
3277
3309
|
let user;
|
|
3278
3310
|
try {
|
|
3279
3311
|
user = (await this.iamClient.send(new GetUserCommand({ UserName: physicalId }))).User;
|
|
@@ -3310,7 +3342,7 @@ async function readUserCurrentState(physicalId, properties, context, logicalId =
|
|
|
3310
3342
|
managedPolicyArns: async () => ({ value: await reads.managedPolicyArns() }),
|
|
3311
3343
|
groups: async () => ({ value: await reads.groups() }),
|
|
3312
3344
|
policies: async () => ({ value: await reads.policies() })
|
|
3313
|
-
}), this.ownWriteRereadDelaysMs, (key) => warnUnsettledMember(this.logger, logicalId, "AWS::IAM::User", key));
|
|
3345
|
+
}, removed), this.ownWriteRereadDelaysMs, (key) => warnUnsettledMember(this.logger, logicalId, "AWS::IAM::User", key));
|
|
3314
3346
|
return result;
|
|
3315
3347
|
}
|
|
3316
3348
|
function userMemberReads(physicalId, properties, context) {
|
|
@@ -3327,6 +3359,7 @@ function userMemberReads(physicalId, properties, context) {
|
|
|
3327
3359
|
};
|
|
3328
3360
|
}
|
|
3329
3361
|
async function readGroupCurrentState(physicalId, properties, context, logicalId = physicalId) {
|
|
3362
|
+
const removed = context?.afterOwnWrite === true ? takeOwnWriteRemovals("AWS::IAM::Group", physicalId) : void 0;
|
|
3330
3363
|
let group;
|
|
3331
3364
|
try {
|
|
3332
3365
|
group = (await this.iamClient.send(new GetGroupCommand({ GroupName: physicalId }))).Group;
|
|
@@ -3356,7 +3389,7 @@ async function readGroupCurrentState(physicalId, properties, context, logicalId
|
|
|
3356
3389
|
if (context?.afterOwnWrite === true && properties !== void 0) await settleOwnWriteMembers(result, principalOwnWriteMembers(properties, {
|
|
3357
3390
|
managedPolicyArns: async () => ({ value: await managedPolicyArns() }),
|
|
3358
3391
|
policies: async () => ({ value: await policies() })
|
|
3359
|
-
}), this.ownWriteRereadDelaysMs, (key) => warnUnsettledMember(this.logger, logicalId, "AWS::IAM::Group", key));
|
|
3392
|
+
}, removed), this.ownWriteRereadDelaysMs, (key) => warnUnsettledMember(this.logger, logicalId, "AWS::IAM::Group", key));
|
|
3360
3393
|
return result;
|
|
3361
3394
|
}
|
|
3362
3395
|
async function collectInlinePolicies(kind, physicalId, statePolicies, context) {
|
|
@@ -8440,6 +8473,56 @@ var SNSTopicProvider = class {
|
|
|
8440
8473
|
}
|
|
8441
8474
|
};
|
|
8442
8475
|
|
|
8476
|
+
// src/provisioning/providers/sns-subscription/topic-membership.ts
|
|
8477
|
+
const membershipTiming = { absentRecheckMs: 2e3 };
|
|
8478
|
+
async function confirmTopicMembership(client, topicArn, subscriptionArn, attributes) {
|
|
8479
|
+
const pending = attributes["PendingConfirmation"] === "true" ? {
|
|
8480
|
+
protocol: attributes["Protocol"],
|
|
8481
|
+
endpoint: attributes["Endpoint"]
|
|
8482
|
+
} : void 0;
|
|
8483
|
+
const read = async () => {
|
|
8484
|
+
try {
|
|
8485
|
+
return await readTopicMembership(client, topicArn, subscriptionArn, pending);
|
|
8486
|
+
} catch (err) {
|
|
8487
|
+
const topicAccount = topicArn.split(":")[4];
|
|
8488
|
+
const owner = attributes["Owner"];
|
|
8489
|
+
if (err instanceof AuthorizationErrorException && owner !== void 0 && topicAccount !== void 0 && owner !== topicAccount) return "unconfirmable";
|
|
8490
|
+
throw err;
|
|
8491
|
+
}
|
|
8492
|
+
};
|
|
8493
|
+
let verdict = await read();
|
|
8494
|
+
if (verdict === "absent") {
|
|
8495
|
+
await new Promise((resolve) => setTimeout(resolve, membershipTiming.absentRecheckMs));
|
|
8496
|
+
verdict = await read();
|
|
8497
|
+
}
|
|
8498
|
+
if (verdict === "listed" || verdict === "unconfirmable") return verdict;
|
|
8499
|
+
return "gone";
|
|
8500
|
+
}
|
|
8501
|
+
async function readTopicMembership(client, topicArn, subscriptionArn, pending) {
|
|
8502
|
+
let nextToken;
|
|
8503
|
+
do {
|
|
8504
|
+
let resp;
|
|
8505
|
+
try {
|
|
8506
|
+
resp = await client.send(new ListSubscriptionsByTopicCommand({
|
|
8507
|
+
TopicArn: topicArn,
|
|
8508
|
+
...nextToken && { NextToken: nextToken }
|
|
8509
|
+
}));
|
|
8510
|
+
} catch (err) {
|
|
8511
|
+
if (err instanceof NotFoundException) return "topic-gone";
|
|
8512
|
+
throw err;
|
|
8513
|
+
}
|
|
8514
|
+
for (const s of resp?.Subscriptions ?? []) {
|
|
8515
|
+
if (s.SubscriptionArn === subscriptionArn) return "listed";
|
|
8516
|
+
if (pending !== void 0 && s.SubscriptionArn === "PendingConfirmation" && s.Protocol === pending.protocol && s.Endpoint !== void 0 && pending.endpoint !== void 0 && maskUrlPassword(s.Endpoint) === maskUrlPassword(pending.endpoint)) return "listed";
|
|
8517
|
+
}
|
|
8518
|
+
nextToken = resp?.NextToken;
|
|
8519
|
+
} while (nextToken);
|
|
8520
|
+
return "absent";
|
|
8521
|
+
}
|
|
8522
|
+
function maskUrlPassword(endpoint) {
|
|
8523
|
+
return endpoint.replace(/^(https?:\/\/[^:/?#@]*:)[^/?#@]*@/i, "$1****@");
|
|
8524
|
+
}
|
|
8525
|
+
|
|
8443
8526
|
// src/provisioning/providers/sns-subscription-provider.ts
|
|
8444
8527
|
const SNS_SUBSCRIPTION_DELETE_THREW_REASON = "the Unsubscribe call did not complete, so the old subscription is unproven";
|
|
8445
8528
|
const CREATE_ONLY_FIELDS = [
|
|
@@ -8610,7 +8693,7 @@ var SNSSubscriptionProvider = class {
|
|
|
8610
8693
|
logPendingConfirmationSkip(logicalId, physicalId) {
|
|
8611
8694
|
this.logger.warn(`SNS subscription ${logicalId} (${physicalId}) is pending confirmation and cannot be unsubscribed; skipping deletion to match CloudFormation behavior (the pending record expires automatically within 3 days)`);
|
|
8612
8695
|
}
|
|
8613
|
-
async readCurrentState(physicalId, _logicalId, _resourceType) {
|
|
8696
|
+
async readCurrentState(physicalId, _logicalId, _resourceType, _properties, context) {
|
|
8614
8697
|
if (physicalId === "PendingConfirmation" || physicalId === "pending confirmation") return;
|
|
8615
8698
|
let attributes;
|
|
8616
8699
|
try {
|
|
@@ -8620,6 +8703,10 @@ var SNSSubscriptionProvider = class {
|
|
|
8620
8703
|
throw err;
|
|
8621
8704
|
}
|
|
8622
8705
|
if (!attributes) return void 0;
|
|
8706
|
+
const topicArn = attributes["TopicArn"];
|
|
8707
|
+
if (context?.afterOwnWrite !== true && topicArn) {
|
|
8708
|
+
if (await confirmTopicMembership(this.snsClient, topicArn, physicalId, attributes) === "gone") return RESOURCE_NOT_FOUND;
|
|
8709
|
+
}
|
|
8623
8710
|
const result = {};
|
|
8624
8711
|
if (attributes["TopicArn"] !== void 0) result["TopicArn"] = attributes["TopicArn"];
|
|
8625
8712
|
if (attributes["Protocol"] !== void 0) result["Protocol"] = attributes["Protocol"];
|
|
@@ -22364,6 +22451,10 @@ async function applyInlineEgress(groupId, egressRules) {
|
|
|
22364
22451
|
this.logger.debug(`SecurityGroup ${groupId} egress equals the AWS default allow-all rule; skipping the redundant revoke + re-authorize`);
|
|
22365
22452
|
return;
|
|
22366
22453
|
}
|
|
22454
|
+
const defaultEgress = {
|
|
22455
|
+
IpProtocol: "-1",
|
|
22456
|
+
CidrIp: "0.0.0.0/0"
|
|
22457
|
+
};
|
|
22367
22458
|
try {
|
|
22368
22459
|
await this.ec2Client.send(new RevokeSecurityGroupEgressCommand({
|
|
22369
22460
|
GroupId: groupId,
|
|
@@ -22372,8 +22463,10 @@ async function applyInlineEgress(groupId, egressRules) {
|
|
|
22372
22463
|
IpRanges: [{ CidrIp: "0.0.0.0/0" }]
|
|
22373
22464
|
}]
|
|
22374
22465
|
}));
|
|
22466
|
+
noteRevokedRule(groupId, defaultEgress, "egress");
|
|
22375
22467
|
} catch (error) {
|
|
22376
22468
|
if (!this.isNotFoundError(error)) throw error;
|
|
22469
|
+
noteRevokedRule(groupId, defaultEgress, "egress");
|
|
22377
22470
|
}
|
|
22378
22471
|
if (egressRules.length === 0) return;
|
|
22379
22472
|
await this.ec2Client.send(new AuthorizeSecurityGroupEgressCommand({
|
|
@@ -22384,6 +22477,7 @@ async function applyInlineEgress(groupId, egressRules) {
|
|
|
22384
22477
|
async function updateSecurityGroup(logicalId, physicalId, resourceType, properties, previousProperties, context) {
|
|
22385
22478
|
this.logger.debug(`Updating SecurityGroup ${logicalId}: ${physicalId}`);
|
|
22386
22479
|
refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId, physicalId);
|
|
22480
|
+
clearOwnWriteRemovals(SECURITY_GROUP_TYPE, physicalId);
|
|
22387
22481
|
if (context?.desiredFromAwsReadback === true && (context.siblingSgRuleIds?.size ?? 0) > 0) await refuseRevertRevokingSiblingRules((group) => this.listGroupRules(group), logicalId, physicalId, resourceType, properties, previousProperties, context.siblingSgRuleIds);
|
|
22388
22482
|
try {
|
|
22389
22483
|
await this.applyTagDiff(physicalId, resourceType, logicalId, previousProperties["Tags"], properties["Tags"], maskerOrIdentity(context?.maskSecrets));
|
|
@@ -22521,6 +22615,18 @@ function buildIpPermission(properties, direction = "ingress", inline = false) {
|
|
|
22521
22615
|
}
|
|
22522
22616
|
return permission;
|
|
22523
22617
|
}
|
|
22618
|
+
const SECURITY_GROUP_TYPE = "AWS::EC2::SecurityGroup";
|
|
22619
|
+
function noteRevokedRule(groupId, rule, direction, revoked) {
|
|
22620
|
+
let key = sgRemovalRuleKey(rule, direction);
|
|
22621
|
+
const referenced = revoked?.length === 1 ? revoked[0]?.ReferencedGroupId : void 0;
|
|
22622
|
+
if (key === void 0 && direction === "ingress" && referenced !== void 0) key = sgRemovalRuleKey({
|
|
22623
|
+
...rule,
|
|
22624
|
+
SourceSecurityGroupName: void 0,
|
|
22625
|
+
SourceSecurityGroupId: referenced
|
|
22626
|
+
}, direction);
|
|
22627
|
+
if (key === void 0) return;
|
|
22628
|
+
recordOwnWriteRemoval(SECURITY_GROUP_TYPE, groupId, direction === "egress" ? "SecurityGroupEgress" : "SecurityGroupIngress", key);
|
|
22629
|
+
}
|
|
22524
22630
|
async function applySecurityGroupRuleDiff(groupId, previousRules, nextRules, direction, logicalId) {
|
|
22525
22631
|
const ruleKey = (rule) => sgRuleDiffKey(rule, direction);
|
|
22526
22632
|
const prevByKey = /* @__PURE__ */ new Map();
|
|
@@ -22545,16 +22651,16 @@ async function applySecurityGroupRuleDiff(groupId, previousRules, nextRules, dir
|
|
|
22545
22651
|
}
|
|
22546
22652
|
}
|
|
22547
22653
|
try {
|
|
22548
|
-
|
|
22654
|
+
noteRevokedRule(groupId, rule, direction, (direction === "egress" ? await this.ec2Client.send(new RevokeSecurityGroupEgressCommand({
|
|
22549
22655
|
GroupId: groupId,
|
|
22550
22656
|
IpPermissions: [this.buildIpPermission(rule, "egress")]
|
|
22551
|
-
}))
|
|
22552
|
-
else await this.ec2Client.send(new RevokeSecurityGroupIngressCommand({
|
|
22657
|
+
})) : await this.ec2Client.send(new RevokeSecurityGroupIngressCommand({
|
|
22553
22658
|
GroupId: groupId,
|
|
22554
22659
|
IpPermissions: [this.buildIpPermission(rule, "ingress", true)]
|
|
22555
|
-
}));
|
|
22660
|
+
})))?.RevokedSecurityGroupRules);
|
|
22556
22661
|
} catch (error) {
|
|
22557
22662
|
if (!this.isNotFoundError(error)) throw error;
|
|
22663
|
+
noteRevokedRule(groupId, rule, direction);
|
|
22558
22664
|
}
|
|
22559
22665
|
}
|
|
22560
22666
|
for (const rule of toDescribe) {
|
|
@@ -25439,8 +25545,12 @@ async function readRouteTableCurrentState(physicalId) {
|
|
|
25439
25545
|
return result;
|
|
25440
25546
|
}
|
|
25441
25547
|
async function readSecurityGroupCurrentState(physicalId, properties, context) {
|
|
25548
|
+
const removed = context?.afterOwnWrite === true ? takeOwnWriteRemovals("AWS::EC2::SecurityGroup", physicalId) : void 0;
|
|
25442
25549
|
const sg = (await this.ec2Client.send(new DescribeSecurityGroupsCommand({ GroupIds: [physicalId] }))).SecurityGroups?.[0];
|
|
25443
|
-
if (!sg)
|
|
25550
|
+
if (!sg) {
|
|
25551
|
+
if (removed !== void 0) restoreOwnWriteRemovals("AWS::EC2::SecurityGroup", physicalId, removed);
|
|
25552
|
+
return RESOURCE_NOT_FOUND;
|
|
25553
|
+
}
|
|
25444
25554
|
const idOwned = await siblingIdOwnedSgRules(this, physicalId, properties, context);
|
|
25445
25555
|
const result = {};
|
|
25446
25556
|
if (sg.GroupName !== void 0) result["GroupName"] = sg.GroupName;
|
|
@@ -25452,18 +25562,14 @@ async function readSecurityGroupCurrentState(physicalId, properties, context) {
|
|
|
25452
25562
|
if (context?.afterOwnWrite === true && properties !== void 0) {
|
|
25453
25563
|
const members = [];
|
|
25454
25564
|
for (const [key, direction] of [["SecurityGroupIngress", "ingress"], ["SecurityGroupEgress", "egress"]]) {
|
|
25455
|
-
const
|
|
25456
|
-
|
|
25457
|
-
|
|
25458
|
-
|
|
25459
|
-
|
|
25460
|
-
|
|
25461
|
-
|
|
25462
|
-
|
|
25463
|
-
const group = (await this.ec2Client.send(new DescribeSecurityGroupsCommand({ GroupIds: [physicalId] }))).SecurityGroups?.[0];
|
|
25464
|
-
return group ? { value: sgRuleLists(group, physicalId, properties, context, idOwned)[key] } : "failed";
|
|
25465
|
-
}
|
|
25466
|
-
});
|
|
25565
|
+
const listed = properties[key];
|
|
25566
|
+
const revoked = removed?.get(key);
|
|
25567
|
+
if (!Array.isArray(listed) && (revoked?.size ?? 0) === 0) continue;
|
|
25568
|
+
const declared = Array.isArray(listed) ? listed : [];
|
|
25569
|
+
members.push(sgRuleListMember(key, direction, declared, revoked, (rules) => reconcileSgRules(rules, declared, direction), async () => {
|
|
25570
|
+
const group = (await this.ec2Client.send(new DescribeSecurityGroupsCommand({ GroupIds: [physicalId] }))).SecurityGroups?.[0];
|
|
25571
|
+
return group ? { value: sgRuleLists(group, physicalId, properties, context, idOwned)[key] } : "failed";
|
|
25572
|
+
}));
|
|
25467
25573
|
}
|
|
25468
25574
|
await settleOwnWriteMembers(result, members, OWN_WRITE_REREAD_DELAYS_MS, (key) => warnUnsettledMember(this.logger, physicalId, "AWS::EC2::SecurityGroup", key));
|
|
25469
25575
|
}
|
|
@@ -65887,4 +65993,4 @@ var ACMCertificateProvider = class {
|
|
|
65887
65993
|
};
|
|
65888
65994
|
|
|
65889
65995
|
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 };
|
|
65890
|
-
//# sourceMappingURL=provider-classes-
|
|
65996
|
+
//# sourceMappingURL=provider-classes-D5IgG-fE.js.map
|