@cdkd/cli 0.328.0 → 0.329.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{asg-provider-CO3HJW1b.js → asg-provider-Bd973kBH.js} +3 -3
- package/dist/{asg-provider-CO3HJW1b.js.map → asg-provider-Bd973kBH.js.map} +1 -1
- package/dist/cli.js +2 -2
- package/dist/{created-resource-sink-DMf6WEao.js → created-resource-sink-DBYrPwKg.js} +2 -1
- package/dist/created-resource-sink-DBYrPwKg.js.map +1 -0
- package/dist/{db-associated-roles-DO8XhKqB.js → db-associated-roles-BcKk-mcl.js} +3 -3
- package/dist/{db-associated-roles-DO8XhKqB.js.map → db-associated-roles-BcKk-mcl.js.map} +1 -1
- package/dist/{deploy-engine-CJwvL5y1.js → deploy-engine-CCqsQYdL.js} +38 -13
- package/dist/deploy-engine-CCqsQYdL.js.map +1 -0
- package/dist/{iam-role-provider-C_DnBxIR.js → iam-role-provider-BNIMjk9E.js} +3 -3
- package/dist/{iam-role-provider-C_DnBxIR.js.map → iam-role-provider-BNIMjk9E.js.map} +1 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/{neptune-provider-Cjtwclgw.js → neptune-provider-CeMr2BVU.js} +4 -4
- package/dist/{neptune-provider-Cjtwclgw.js.map → neptune-provider-CeMr2BVU.js.map} +1 -1
- package/dist/{program-DQppIvNH.js → program-DCyjI7yc.js} +66 -33
- package/dist/program-DCyjI7yc.js.map +1 -0
- package/dist/{provider-classes-Bc4zBeE0.js → provider-classes-CfOASAxa.js} +224 -19
- package/dist/provider-classes-CfOASAxa.js.map +1 -0
- package/dist/{rds-provider-BtvIg3GL.js → rds-provider-D7gnUnsx.js} +4 -4
- package/dist/{rds-provider-BtvIg3GL.js.map → rds-provider-D7gnUnsx.js.map} +1 -1
- package/dist/{version-z453ivOv.js → version-DFQI9iez.js} +2 -2
- package/dist/{version-z453ivOv.js.map → version-DFQI9iez.js.map} +1 -1
- package/package.json +1 -1
- package/dist/created-resource-sink-DMf6WEao.js.map +0 -1
- package/dist/deploy-engine-CJwvL5y1.js.map +0 -1
- package/dist/program-DQppIvNH.js.map +0 -1
- package/dist/provider-classes-Bc4zBeE0.js.map +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { d as withApiGatewayPacing, l as s3ClientDefaults, r as getAwsClients } from "./aws-clients-ez_oXu6x.js";
|
|
2
2
|
import { $ as safeMsg, A as isBeforeStateRead, E as generatedNameFor, J as displaySafe, N as recordedGeneratedNameKept, O as getCurrentStackInstanceId, Q as plainIdentOr, T as generateResourceNameWithFallback, V as SECRET_REF_MAX_CODE_POINTS, X as isPasteableIdent, Y as displayStackName, a as safeStringify, i as isAwsAuthoredFailure, n as describeAwsFailure, q as displayIdent, r as describeAwsStatusReason, s as getLogger, t as VERBOSE_POINTER, w as generateResourceName } from "./aws-failure-text-DiHodi76.js";
|
|
3
|
-
import { $ as isTerminalDeleteFailure, A as setBounded, Ar as isThrottlingError, At as stateOrphanRecordRemedy, B as normalizeAwsTagsToCfn, C as AmbiguousCreateLatch, Cr as isExplicitDenyError, Ct as compositeIdFormatMessage, D as isInsideWindow, Dt as packCompositeId, E as createAttemptKey, Er as isTransientServerError, Et as logicalIdShown, F as assertRegionMatch, Fn as ResourceUpdateNotSupportedError, Ft as maskerOrIdentity, Gt as markAuxiliaryFailure, H as refusalTypeShown, I as VALUE_NOT_SHOWN, It as withDerivedNameMasks, J as deleteAfterProtectionFlipWithFinalSnapshot, K as ProtectionFlipRegistry, Kt as markCreatedBeforeFailure, L as isPlainImportJson, M as RESOURCE_NOT_FOUND, Mr as markRedactedCause, Mt as createMaskedRetryLogger, Nn as ProvisioningError, Nr as wrapMaskedAwsError, Nt as isSecretDerivedValue, O as replayFollowedAmbiguousAttempt, Or as THROTTLING_ERROR_NAMES, P as markNotGone, Pt as maskDeep, Q as isTerminalDbWaitStatus, Qn as pasteableCommand, R as isPlainImportValue, S as AMBIGUOUS_LATCH_TTL_MS, Sr as isAmbiguousOutcomeError, St as canonicalizeRoute53QueryName, T as ambiguousAttemptLead, Tr as isRetryableTransientError, Tt as compositeIdSkipResult, U as remedyLogicalId, Ut as isAuxiliaryFailure, V as quotedRemedyLogicalId, W as resolveExplicitPhysicalId, Xn as hasClauseBreak, Y as deleteWithProtectionCompensation, Yn as commandHole, Z as isProceedDbStatus, Zn as isInertUnquoted, b as withRemovalDefaults, bt as isInterruptedWaitError, ct as UNNAMEABLE_ID_CLAUSE, d as onlySecretDerived, dn as withPasteableAwsProfile, dt as pasteableAwsCommand, er as plainOrDescribed, et as logGroupProtectionSite, f as readPrincipalLists, fn as ambientClientDefaults, ft as protectedReplacementAdvice, g as clearOnUpdateRemoval, gn as AccountIdUnavailableError, hn as credentialFingerprint, hr as relayedNameCollision, ht as ElapsedBudgetRegistry, i as reportCreatedResource, ir as withheldTargetClause, j as withoutServerErrorRetries, jr as markNonRetryable, jt as createMaskedLogSinks, k as replayedSendWindow, kr as isMarkedNonRetryable, kt as segmentAfterAnchor, l as SECRET_DERIVED_READ_LIVE, lt as WITHHELD_AWS_COMMAND, m as recordedPrincipalsRepair, mn as clientDefaultsFor, mr as markReplayMayCollide, mt as ElapsedBudget, nt as protectionFlipKey, o as retractCreatedResource, on as injectiveKey, ot as userPoolProtectionSite, pn as ambientCredentialConfig, pr as markNameCollision, pt as renderDisableCommand, qt as markSupersedesEarlierCreate, rr as shellQuote, rt as rdsFamilyProtectionSite, sn as injectiveKeyPrefix, tt as observeThenDisableProtection, u as holdsSecretDerivedEntry, ut as isAwsCliLiteral, vn as CdkdError, w as RecentIdSet, wt as compositeIdSeparatorRefusal, xt as startInterruptWatch, y as removedTemplateKeys, yr as explicitDenyPolicyKind, z as isQuotableImportValue, zt as clearCreatedBeforeFailure } from "./created-resource-sink-
|
|
3
|
+
import { $ as isTerminalDeleteFailure, A as setBounded, Ar as isThrottlingError, At as stateOrphanRecordRemedy, B as normalizeAwsTagsToCfn, C as AmbiguousCreateLatch, Cr as isExplicitDenyError, Ct as compositeIdFormatMessage, D as isInsideWindow, Dt as packCompositeId, E as createAttemptKey, Er as isTransientServerError, Et as logicalIdShown, F as assertRegionMatch, Fn as ResourceUpdateNotSupportedError, Ft as maskerOrIdentity, Gt as markAuxiliaryFailure, H as refusalTypeShown, I as VALUE_NOT_SHOWN, It as withDerivedNameMasks, J as deleteAfterProtectionFlipWithFinalSnapshot, K as ProtectionFlipRegistry, Kt as markCreatedBeforeFailure, L as isPlainImportJson, M as RESOURCE_NOT_FOUND, Mr as markRedactedCause, Mt as createMaskedRetryLogger, Nn as ProvisioningError, Nr as wrapMaskedAwsError, Nt as isSecretDerivedValue, O as replayFollowedAmbiguousAttempt, Or as THROTTLING_ERROR_NAMES, P as markNotGone, Pt as maskDeep, Q as isTerminalDbWaitStatus, Qn as pasteableCommand, R as isPlainImportValue, S as AMBIGUOUS_LATCH_TTL_MS, Sr as isAmbiguousOutcomeError, St as canonicalizeRoute53QueryName, T as ambiguousAttemptLead, Tr as isRetryableTransientError, Tt as compositeIdSkipResult, U as remedyLogicalId, Ut as isAuxiliaryFailure, V as quotedRemedyLogicalId, W as resolveExplicitPhysicalId, Xn as hasClauseBreak, Y as deleteWithProtectionCompensation, Yn as commandHole, Z as isProceedDbStatus, Zn as isInertUnquoted, b as withRemovalDefaults, bt as isInterruptedWaitError, ct as UNNAMEABLE_ID_CLAUSE, d as onlySecretDerived, dn as withPasteableAwsProfile, dt as pasteableAwsCommand, er as plainOrDescribed, et as logGroupProtectionSite, f as readPrincipalLists, fn as ambientClientDefaults, ft as protectedReplacementAdvice, g as clearOnUpdateRemoval, gn as AccountIdUnavailableError, hn as credentialFingerprint, hr as relayedNameCollision, ht as ElapsedBudgetRegistry, i as reportCreatedResource, ir as withheldTargetClause, j as withoutServerErrorRetries, jr as markNonRetryable, jt as createMaskedLogSinks, k as replayedSendWindow, kr as isMarkedNonRetryable, kt as segmentAfterAnchor, l as SECRET_DERIVED_READ_LIVE, lt as WITHHELD_AWS_COMMAND, m as recordedPrincipalsRepair, mn as clientDefaultsFor, mr as markReplayMayCollide, mt as ElapsedBudget, nt as protectionFlipKey, o as retractCreatedResource, on as injectiveKey, ot as userPoolProtectionSite, pn as ambientCredentialConfig, pr as markNameCollision, pt as renderDisableCommand, qt as markSupersedesEarlierCreate, rr as shellQuote, rt as rdsFamilyProtectionSite, sn as injectiveKeyPrefix, tt as observeThenDisableProtection, u as holdsSecretDerivedEntry, ut as isAwsCliLiteral, vn as CdkdError, w as RecentIdSet, wt as compositeIdSeparatorRefusal, xt as startInterruptWatch, y as removedTemplateKeys, yr as explicitDenyPolicyKind, z as isQuotableImportValue, zt as clearCreatedBeforeFailure } from "./created-resource-sink-DBYrPwKg.js";
|
|
4
4
|
import { c as ambientRegion } from "./aws-client-defaults-BLXFsfMa.js";
|
|
5
|
-
import { $ as isTtlRateLimited, $i as stringifyIfAssigned, A as resolvedResourceTimeoutMs, Aa as reEnableInstanceApiTermination, Ac as sameLambdaFunctionAddress, B as DELETE_INDEX_WAIT_PROCEED_NOTE, C as planContributorInsightsOp, Ca as withIndeterminateGuard, Cc as withRetry, Cd as derivePartitionAndUrlSuffix, Cl as recoverMaskedOutput, D as reverseMapTableContributorInsights, Da as isTerminationProtectionPropagationError, Dc as emrClusterInstancesReplaced, Dt as enclosingDeadlineRemainingMs, E as reverseMapIndexContributorInsights, Ea as ec2InstanceProtectionSite, Ec as ecsServiceLaunchTypeSetOrChanged, Et as enclosingDeadlineExpired, F as beginDeleteWait, Fi as earliestDefined, G as relayedIndexBusyDelete, Ga as s3BucketRegionalDomainName, Gi as DBPROXY_TAGS_WHAT, Gn as getCurrentProducerRegions, Gs as withheldAccountClause, H as TABLE_INDEX_NOUN, Ha as s3BucketArn, Hc as passedNoEchoParametersOf, Hr as awaitInFlightSibling, I as compensateRemovedDeletionProtection,
|
|
6
|
-
import { a as IamCreateClientCache, i as isEntityAlreadyExists, n as collectInlinePolicyNamesManagedBySiblings, r as iamEntityLeftByThisCreate, t as IAMRoleProvider } from "./iam-role-provider-
|
|
7
|
-
import { a as resolveSecretDerivedPrincipals, i as isResolvableSecretPrincipalList, n as runDestroyForStack, o as canonicalizeIpProtocolValue, r as holdsUnprovenSecretPrincipalToken, t as canonicalizeIpv4Cidr } from "./program-
|
|
8
|
-
import { u as modifyDbInstanceWhenAvailable } from "./db-associated-roles-
|
|
9
|
-
import { RDSProvider } from "./rds-provider-
|
|
10
|
-
import { NeptuneProvider } from "./neptune-provider-
|
|
11
|
-
import { ASGProvider } from "./asg-provider-
|
|
5
|
+
import { $ as isTtlRateLimited, $i as stringifyIfAssigned, A as resolvedResourceTimeoutMs, Aa as reEnableInstanceApiTermination, Ac as sameLambdaFunctionAddress, B as DELETE_INDEX_WAIT_PROCEED_NOTE, Bd as resolveAssemblyPath, C as planContributorInsightsOp, Ca as withIndeterminateGuard, Cc as withRetry, Cd as derivePartitionAndUrlSuffix, Cl as recoverMaskedOutput, D as reverseMapTableContributorInsights, Da as isTerminationProtectionPropagationError, Dc as emrClusterInstancesReplaced, Dt as enclosingDeadlineRemainingMs, E as reverseMapIndexContributorInsights, Ea as ec2InstanceProtectionSite, Ec as ecsServiceLaunchTypeSetOrChanged, Et as enclosingDeadlineExpired, F as beginDeleteWait, Fi as earliestDefined, G as relayedIndexBusyDelete, Ga as s3BucketRegionalDomainName, Gi as DBPROXY_TAGS_WHAT, Gn as getCurrentProducerRegions, Gs as withheldAccountClause, H as TABLE_INDEX_NOUN, Ha as s3BucketArn, Hc as passedNoEchoParametersOf, Hr as awaitInFlightSibling, I as compensateRemovedDeletionProtection, J as readbackVectorIndexes, Jc as markSameGenerationBag, Ji as readTagList, Jn as isRedactedRecordedValue, Js as findSdkUnwiredProperties, K as waitForIndexesSettled, Ka as s3BucketWebsiteUrl, Ki as DBPROXY_TAG_OPTIONS, Kr as replacedDeleteFailureVerdict, L as deleteBudgetKey, Ld as describeFileReadFailure, Li as reserveStackCreateToken, M as DYNAMODB_DELETE_DEADLINE_MARGIN_MS, N as DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS, Na as isUsableAttemptedName, Ns as refuseMalformedResourcesForDestroy, O as stripIndexContributorInsights, Oa as observeThenDisableInstanceApiTermination, Oc as canonicalLambdaFunctionName, Ol as carriesSecretMask, Oo as parseWebACLArn, P as DYNAMODB_DELETE_POLL_COST_MS, Q as isTtlAlreadyDisabled, Qi as definedAttributes, Qt as withNestedStackContext, R as resolveDynamoDbDeleteBudgetClock, Rd as displayAssemblyPath, Ro as accountArgs, S as indexDeclaresContributorInsights, Sa as deleteSkipReason, Sd as canonicalizeRegion, Si as secretNamedAttributeNamesOf, T as readContributorInsightsSpec, Tl as recordAttributeIdCopy, U as deleteTableWithIndexBusyRetry, Ua as s3BucketDomainName, Ui as isRefusedByName, V as INDEX_SETTLE_POLL_INTERVAL_MS, Va as isSettledInstanceState, Vr as refuseRestoreFromItself, W as maskedLogger, Wa as s3BucketDualStackDomainName, Wi as markDeleteStarted, Wr as getStackRecords, Wt as getNestedRevertRun, X as vectorIndexesSettled, Xc as recordReferenceProvenanceEntry, Xi as tagMapAsList, Xn as redactedDeleteAddressSkip, Xs as withoutSdkUnwiredProperties, Y as vectorIndexesForCreate, Yc as redactForState, Yi as refuseMalformedDesiredTags, Yn as redactedDeleteAddressFields, Z as vectorIndexesShapeDetail, Za as outputReferenceProvenanceOf, Zc as snapshotPassProvenance, Zi as tagPlanWarning, Zt as getCurrentNestedStackContext, _ as streamMemberRefusals, _a as unchangedBehindSecretReference, _c as requireConfigArray, _o as getAccountInfo, _t as findNestedTemplateTreeDefect, aa as waitForLambdaFunctionActive, ac as WARM_THROUGHPUT_MEMBERS, at as hasCdkAutoDeleteTag, b as CONTRIBUTOR_INSIGHTS_KEY, bt as renderNestedTemplateTreeDefect, bu as rewriteTemplateAssetReferences, c as DynamoDBGlobalTableProvider, cc as toCfnInteger, cn as chunks, ct as markRefusedBeforeApplying, d as declaredStreamPolicyMember, dc as coerceCfnInteger, dn as withApiLimit, el as hasMaskableValues, et as planTimeToLive, f as declaredStreamTagsMember, fc as configBooleanRefusal, fu as timePhase, g as streamDeclaresTags, ga as onlySecretReferencesDiffer, gc as replayWarn, gl as dynamicReferenceTokens, h as streamDeclaresPolicy, ha as slowCcOperationTimeoutMs, hc as readConfigString, hu as stringifyValue, it as S3_AUTO_DELETE_OBJECTS_TAG, jo as passedParameterClassesOf, k as waitForGoneAfterDelete, ka as reDisableInstanceApiTermination, kc as lambdaFunctionNameForMask, l as STREAM_POLICY_KEY, la as getCurrentResourceSecrets, lc as toFiniteNumber, ln as isAccessDeniedError, m as reverseMapStreamPolicy, mc as configStringRefusal, ml as withoutPhysicalNameCopies, nt as sendTtlWaitingOutRateLimit, oc as coerceWarmThroughput$1, ot as isTruthyCfnBoolean, p as planStreamMemberOps, pc as configIntegerRefusal, ps as refuseMalformedNestedChildOutputs, q as planVectorIndexUpdates, qi as planTagDiff, qn as REDACTED_DELETE_ADDRESS_SKIP_REASON, qt as revertNestedChildFromJournal, rt as ECR_AUTO_DELETE_IMAGES_TAG, sc as isWarmThroughputDecrease, st as getPriorAttempts, t as DeployEngine, tt as readTtlSpec, u as STREAM_TAGS_KEY, uc as coerceCfnBoolean, un as lookupEachName, v as streamPolicyMatchesDeclared, vc as requireConfigObject, vt as isAbsoluteAssetPath, w as planIndexContributorInsightsOps, wc as blockDeviceMappingsDifferOnlyInDeleteOnTermination, wl as physicalNameCopiesOf, x as contributorInsightsRefusals, y as streamTagsMatchDeclared, yc as requireConfigString, yd as decodeListingKey, yt as listNestedTemplateRows, z as resolveDynamoDbDeleteBudgetMs, zd as renderAssemblyPathEscape, zi as acquireIdempotencyToken } from "./deploy-engine-CCqsQYdL.js";
|
|
6
|
+
import { a as IamCreateClientCache, i as isEntityAlreadyExists, n as collectInlinePolicyNamesManagedBySiblings, r as iamEntityLeftByThisCreate, t as IAMRoleProvider } from "./iam-role-provider-BNIMjk9E.js";
|
|
7
|
+
import { a as resolveSecretDerivedPrincipals, i as isResolvableSecretPrincipalList, n as runDestroyForStack, o as canonicalizeIpProtocolValue, r as holdsUnprovenSecretPrincipalToken, t as canonicalizeIpv4Cidr } from "./program-DCyjI7yc.js";
|
|
8
|
+
import { u as modifyDbInstanceWhenAvailable } from "./db-associated-roles-BcKk-mcl.js";
|
|
9
|
+
import { RDSProvider } from "./rds-provider-D7gnUnsx.js";
|
|
10
|
+
import { NeptuneProvider } from "./neptune-provider-CeMr2BVU.js";
|
|
11
|
+
import { ASGProvider } from "./asg-provider-Bd973kBH.js";
|
|
12
12
|
import { createHash, randomUUID } from "node:crypto";
|
|
13
13
|
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";
|
|
14
14
|
import { AddRoleToInstanceProfileCommand, AddUserToGroupCommand, AttachGroupPolicyCommand, AttachRolePolicyCommand, AttachUserPolicyCommand, CreateAccessKeyCommand, CreateGroupCommand, CreateInstanceProfileCommand, CreateLoginProfileCommand, CreatePolicyCommand, CreatePolicyVersionCommand, CreateUserCommand, DeleteAccessKeyCommand, DeleteGroupCommand, DeleteGroupPolicyCommand, DeleteInstanceProfileCommand, DeleteLoginProfileCommand, DeletePolicyCommand, DeletePolicyVersionCommand, DeleteRolePolicyCommand, DeleteUserCommand, DeleteUserPermissionsBoundaryCommand, DeleteUserPolicyCommand, DetachGroupPolicyCommand, DetachRolePolicyCommand, DetachUserPolicyCommand, GetAccessKeyLastUsedCommand, GetGroupCommand, GetGroupPolicyCommand, GetInstanceProfileCommand, GetPolicyCommand, GetPolicyVersionCommand, GetRolePolicyCommand, GetUserCommand, GetUserPolicyCommand, IAMClient, ListAccessKeysCommand, ListAttachedGroupPoliciesCommand, ListAttachedUserPoliciesCommand, ListEntitiesForPolicyCommand, ListGroupPoliciesCommand, ListGroupsForUserCommand, ListPoliciesCommand, ListPolicyTagsCommand, ListPolicyVersionsCommand, ListUserPoliciesCommand, NoSuchEntityException, PutGroupPolicyCommand, PutRolePolicyCommand, PutUserPermissionsBoundaryCommand, PutUserPolicyCommand, RemoveRoleFromInstanceProfileCommand, RemoveUserFromGroupCommand, TagPolicyCommand, TagUserCommand, UntagPolicyCommand, UntagUserCommand, UpdateAccessKeyCommand, UpdateGroupCommand, UpdateLoginProfileCommand, UpdateUserCommand } from "@aws-sdk/client-iam";
|
|
@@ -16,7 +16,7 @@ import { CreateQueueCommand, DeleteQueueCommand, GetQueueAttributesCommand, GetQ
|
|
|
16
16
|
import { CreateTopicCommand, DeleteTopicCommand, GetSubscriptionAttributesCommand, GetTopicAttributesCommand, InvalidParameterException, ListSubscriptionsByTopicCommand, ListTagsForResourceCommand, ListTopicsCommand, NotFoundException, SNSClient, SetSubscriptionAttributesCommand, SetTopicAttributesCommand, SubscribeCommand, TagResourceCommand, UnsubscribeCommand, UntagResourceCommand } from "@aws-sdk/client-sns";
|
|
17
17
|
import { AddPermissionCommand, CreateEventSourceMappingCommand, CreateFunctionCommand, CreateFunctionUrlConfigCommand, DeleteEventSourceMappingCommand, DeleteFunctionCodeSigningConfigCommand, DeleteFunctionCommand, DeleteFunctionConcurrencyCommand, DeleteFunctionEventInvokeConfigCommand, DeleteFunctionUrlConfigCommand, DeleteLayerVersionCommand, GetEventSourceMappingCommand, GetFunctionCodeSigningConfigCommand, GetFunctionCommand, GetFunctionConcurrencyCommand, 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";
|
|
18
18
|
import { GetCallerIdentityCommand, STSClient } from "@aws-sdk/client-sts";
|
|
19
|
-
import { AllocateAddressCommand, AssociateAddressCommand, AssociateIamInstanceProfileCommand, AssociateNatGatewayAddressCommand, AssociateRouteTableCommand, AttachInternetGatewayCommand, 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, DetachVpnGatewayCommand, DisassociateAddressCommand, DisassociateIamInstanceProfileCommand, DisassociateNatGatewayAddressCommand, DisassociateRouteTableCommand, EC2Client, GetIpamPoolAllocationsCommand, ModifyInstanceAttributeCommand, ModifyInstanceCreditSpecificationCommand, ModifyInstanceMetadataOptionsCommand, ModifyPrivateDnsNameOptionsCommand, ModifySubnetAttributeCommand, ModifyVpcAttributeCommand, ModifyVpcTenancyCommand, MonitorInstancesCommand, ReleaseAddressCommand, ReplaceIamInstanceProfileAssociationCommand, ReplaceNetworkAclAssociationCommand, ReplaceNetworkAclEntryCommand, ReplaceRouteCommand, RevokeSecurityGroupEgressCommand, RevokeSecurityGroupIngressCommand, RunInstancesCommand, StartInstancesCommand, StopInstancesCommand, TerminateInstancesCommand, UnmonitorInstancesCommand, waitUntilInstanceRunning, waitUntilInstanceTerminated, waitUntilNatGatewayAvailable, waitUntilNatGatewayDeleted } from "@aws-sdk/client-ec2";
|
|
19
|
+
import { AllocateAddressCommand, AssociateAddressCommand, AssociateIamInstanceProfileCommand, AssociateNatGatewayAddressCommand, AssociateRouteTableCommand, AssociateSubnetCidrBlockCommand, AttachInternetGatewayCommand, 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, DetachVpnGatewayCommand, DisassociateAddressCommand, DisassociateIamInstanceProfileCommand, DisassociateNatGatewayAddressCommand, DisassociateRouteTableCommand, DisassociateSubnetCidrBlockCommand, EC2Client, GetIpamPoolAllocationsCommand, ModifyInstanceAttributeCommand, ModifyInstanceCreditSpecificationCommand, ModifyInstanceMetadataOptionsCommand, ModifyPrivateDnsNameOptionsCommand, ModifySubnetAttributeCommand, ModifyVpcAttributeCommand, ModifyVpcTenancyCommand, MonitorInstancesCommand, ReleaseAddressCommand, ReplaceIamInstanceProfileAssociationCommand, ReplaceNetworkAclAssociationCommand, ReplaceNetworkAclEntryCommand, ReplaceRouteCommand, RevokeSecurityGroupEgressCommand, RevokeSecurityGroupIngressCommand, RunInstancesCommand, StartInstancesCommand, StopInstancesCommand, TerminateInstancesCommand, UnmonitorInstancesCommand, waitUntilInstanceRunning, waitUntilInstanceTerminated, waitUntilNatGatewayAvailable, waitUntilNatGatewayDeleted } from "@aws-sdk/client-ec2";
|
|
20
20
|
import { CreateTableCommand, DeleteResourcePolicyCommand, DeleteTableCommand, DescribeContinuousBackupsCommand, DescribeContributorInsightsCommand, DescribeKinesisStreamingDestinationCommand, DescribeTableCommand, DescribeTimeToLiveCommand, DisableKinesisStreamingDestinationCommand, DynamoDBClient, EnableKinesisStreamingDestinationCommand, GetResourcePolicyCommand, ListTagsOfResourceCommand, PolicyNotFoundException, PutResourcePolicyCommand, ResourceNotFoundException as ResourceNotFoundException$1, TagResourceCommand as TagResourceCommand$2, UntagResourceCommand as UntagResourceCommand$2, UpdateContinuousBackupsCommand, UpdateContributorInsightsCommand, UpdateKinesisStreamingDestinationCommand, UpdateTableCommand, UpdateTimeToLiveCommand } from "@aws-sdk/client-dynamodb";
|
|
21
21
|
import { APIGatewayClient, CreateAuthorizerCommand, CreateDeploymentCommand, CreateResourceCommand, CreateStageCommand, DeleteAuthorizerCommand, DeleteDeploymentCommand, DeleteIntegrationCommand, DeleteIntegrationResponseCommand, DeleteMethodCommand, DeleteMethodResponseCommand, DeleteResourceCommand, DeleteStageCommand, GetAccountCommand, GetAuthorizerCommand, GetAuthorizersCommand, GetDeploymentCommand, GetDeploymentsCommand, GetMethodCommand, GetResourceCommand, GetStageCommand, NotFoundException as NotFoundException$1, PutIntegrationCommand, PutIntegrationResponseCommand, PutMethodCommand, PutMethodResponseCommand, TagResourceCommand as TagResourceCommand$3, UntagResourceCommand as UntagResourceCommand$3, UpdateAccountCommand, UpdateAuthorizerCommand, UpdateDeploymentCommand, UpdateMethodCommand, UpdateStageCommand } from "@aws-sdk/client-api-gateway";
|
|
22
22
|
import { CreateEventBusCommand, DeleteEventBusCommand, DeleteRuleCommand, DescribeEventBusCommand, DescribeRuleCommand, EventBridgeClient, ListRulesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$1, ListTargetsByRuleCommand, PutPermissionCommand, PutRuleCommand, PutTargetsCommand, RemoveTargetsCommand, ResourceNotFoundException as ResourceNotFoundException$2, TagResourceCommand as TagResourceCommand$4, UntagResourceCommand as UntagResourceCommand$4, UpdateEventBusCommand } from "@aws-sdk/client-eventbridge";
|
|
@@ -39,6 +39,7 @@ import { CreateAliasCommand, CreateKeyCommand, DeleteAliasCommand, DescribeKeyCo
|
|
|
39
39
|
import { CreateRepositoryCommand, DeleteLifecyclePolicyCommand, DeleteRepositoryCommand, DeleteRepositoryPolicyCommand, DescribeRepositoriesCommand, ECRClient, GetLifecyclePolicyCommand, LifecyclePolicyNotFoundException, ListTagsForResourceCommand as ListTagsForResourceCommand$9, PutImageScanningConfigurationCommand, PutImageTagMutabilityCommand, PutLifecyclePolicyCommand, RepositoryNotEmptyException, RepositoryNotFoundException, SetRepositoryPolicyCommand, TagResourceCommand as TagResourceCommand$12, UntagResourceCommand as UntagResourceCommand$12 } from "@aws-sdk/client-ecr";
|
|
40
40
|
import { isDeepStrictEqual } from "node:util";
|
|
41
41
|
import { AddTagsToResourceCommand as AddTagsToResourceCommand$2, CreateDBProxyCommand, CreateDBProxyEndpointCommand, DBProxyEndpointNotFoundFault, DBProxyNotFoundFault, DBProxyTargetGroupNotFoundFault, DBProxyTargetNotFoundFault, DeleteDBProxyCommand, DeleteDBProxyEndpointCommand, DeregisterDBProxyTargetsCommand, DescribeDBProxiesCommand, DescribeDBProxyEndpointsCommand, DescribeDBProxyTargetGroupsCommand, DescribeDBProxyTargetsCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$10, ModifyDBProxyCommand, ModifyDBProxyEndpointCommand, ModifyDBProxyTargetGroupCommand, RDSClient, RegisterDBProxyTargetsCommand, RemoveTagsFromResourceCommand as RemoveTagsFromResourceCommand$2 } from "@aws-sdk/client-rds";
|
|
42
|
+
import { isIPv6 } from "node:net";
|
|
42
43
|
import { ListTagsForResourceCommand as ListTagsForResourceCommand$11, S3ControlClient, TagResourceCommand as TagResourceCommand$13, UntagResourceCommand as UntagResourceCommand$13 } from "@aws-sdk/client-s3-control";
|
|
43
44
|
import * as zlib from "node:zlib";
|
|
44
45
|
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";
|
|
@@ -17265,6 +17266,30 @@ var EventBridgeBusProvider = class {
|
|
|
17265
17266
|
}
|
|
17266
17267
|
};
|
|
17267
17268
|
|
|
17269
|
+
// src/utils/ipv6-cidr.ts
|
|
17270
|
+
function canonicalizeIpv6Cidr(value) {
|
|
17271
|
+
const match = /^([0-9a-fA-F:.]{2,45})\/(\d{1,3})$/.exec(value);
|
|
17272
|
+
if (!match || !isIPv6(match[1])) return void 0;
|
|
17273
|
+
const prefix = Number(match[2]);
|
|
17274
|
+
if (prefix > 128) return void 0;
|
|
17275
|
+
try {
|
|
17276
|
+
const [left, right] = new URL(`http://[${match[1]}]/`).hostname.slice(1, -1).split("::");
|
|
17277
|
+
const before = left ? left.split(":") : [];
|
|
17278
|
+
const after = right ? right.split(":") : [];
|
|
17279
|
+
const pieces = right === void 0 ? before : [
|
|
17280
|
+
...before,
|
|
17281
|
+
...new Array(8 - before.length - after.length).fill("0"),
|
|
17282
|
+
...after
|
|
17283
|
+
];
|
|
17284
|
+
const hostBits = BigInt(128 - prefix);
|
|
17285
|
+
const hex = (BigInt(`0x${pieces.map((piece) => piece.padStart(4, "0")).join("")}`) >> hostBits << hostBits).toString(16).padStart(32, "0");
|
|
17286
|
+
const expanded = Array.from({ length: 8 }, (_, index) => hex.slice(index * 4, index * 4 + 4)).join(":");
|
|
17287
|
+
return `${new URL(`http://[${expanded}]/`).hostname.slice(1, -1)}/${prefix}`;
|
|
17288
|
+
} catch {
|
|
17289
|
+
return;
|
|
17290
|
+
}
|
|
17291
|
+
}
|
|
17292
|
+
|
|
17268
17293
|
// src/provisioning/providers/ec2-provider.ts
|
|
17269
17294
|
const EC2_VPC_GATEWAY_ATTACHMENT_ID_FORMAT = {
|
|
17270
17295
|
label: "VPCGatewayAttachment",
|
|
@@ -17725,6 +17750,8 @@ var EC2Provider = class {
|
|
|
17725
17750
|
"CidrBlock",
|
|
17726
17751
|
"AvailabilityZone",
|
|
17727
17752
|
"MapPublicIpOnLaunch",
|
|
17753
|
+
"EnableDns64",
|
|
17754
|
+
"Ipv6CidrBlock",
|
|
17728
17755
|
"Tags"
|
|
17729
17756
|
])],
|
|
17730
17757
|
["AWS::EC2::InternetGateway", /* @__PURE__ */ new Set(["Tags"])],
|
|
@@ -18448,9 +18475,28 @@ var EC2Provider = class {
|
|
|
18448
18475
|
return;
|
|
18449
18476
|
}
|
|
18450
18477
|
}
|
|
18478
|
+
async prepareSubnetProperties(logicalId, resourceType, properties, context, physicalId, previousProperties) {
|
|
18479
|
+
let prepared = properties;
|
|
18480
|
+
for (const key of ["EnableDns64", "Ipv6CidrBlock"]) {
|
|
18481
|
+
const refusal = (bag) => key === "EnableDns64" ? configBooleanRefusal(bag, key, "Subnet") : configStringRefusal(bag, key, "<unset>", "Subnet");
|
|
18482
|
+
const message = refusal(properties);
|
|
18483
|
+
if (message === void 0) continue;
|
|
18484
|
+
if (context?.replayingState !== true) throw new ProvisioningError(message, resourceType, logicalId, physicalId);
|
|
18485
|
+
this.logger.warn(safeMsg`${logicalId}: ${message}; leaving ${key} unchanged during state replay`);
|
|
18486
|
+
prepared = { ...prepared };
|
|
18487
|
+
delete prepared[key];
|
|
18488
|
+
if (previousProperties?.[key] !== void 0) {
|
|
18489
|
+
const baseline = refusal(previousProperties) === void 0 ? previousProperties : await this.readSubnetCurrentState(physicalId);
|
|
18490
|
+
if (baseline && baseline !== RESOURCE_NOT_FOUND && baseline[key] !== void 0) prepared[key] = baseline[key];
|
|
18491
|
+
else if (baseline === void 0 || baseline === RESOURCE_NOT_FOUND) throw new ProvisioningError(`Cannot read ${key} for Subnet ${logicalId}; retry after DescribeSubnets succeeds`, resourceType, logicalId, physicalId);
|
|
18492
|
+
}
|
|
18493
|
+
}
|
|
18494
|
+
return prepared;
|
|
18495
|
+
}
|
|
18451
18496
|
async createSubnet(logicalId, resourceType, properties, context) {
|
|
18452
18497
|
this.logger.debug(`Creating Subnet ${logicalId}`);
|
|
18453
18498
|
const desiredTags = refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId);
|
|
18499
|
+
const prepared = await this.prepareSubnetProperties(logicalId, resourceType, properties, context);
|
|
18454
18500
|
const vpcId = properties["VpcId"];
|
|
18455
18501
|
const cidrBlock = properties["CidrBlock"];
|
|
18456
18502
|
if (!vpcId || !cidrBlock) throw new ProvisioningError(`VpcId and CidrBlock are required for Subnet ${logicalId}`, resourceType, logicalId);
|
|
@@ -18466,6 +18512,7 @@ var EC2Provider = class {
|
|
|
18466
18512
|
({response, tagsApplied} = await this.sendTaggedCreate(logicalId, "subnet", desiredTags, (TagSpecifications) => createClient.send(new CreateSubnetCommand({
|
|
18467
18513
|
VpcId: vpcId,
|
|
18468
18514
|
CidrBlock: cidrBlock,
|
|
18515
|
+
Ipv6CidrBlock: prepared["Ipv6CidrBlock"],
|
|
18469
18516
|
AvailabilityZone: properties["AvailabilityZone"] ?? void 0,
|
|
18470
18517
|
...TagSpecifications && { TagSpecifications }
|
|
18471
18518
|
}))));
|
|
@@ -18481,13 +18528,26 @@ var EC2Provider = class {
|
|
|
18481
18528
|
const availabilityZone = response.Subnet.AvailabilityZone;
|
|
18482
18529
|
try {
|
|
18483
18530
|
if (!tagsApplied) await this.applyTags(subnetId, desiredTags, logicalId, maskerOrIdentity(context?.maskSecrets));
|
|
18531
|
+
if (prepared["Ipv6CidrBlock"] !== void 0) {
|
|
18532
|
+
const associationId = response.Subnet?.Ipv6CidrBlockAssociationSet?.[0]?.AssociationId;
|
|
18533
|
+
if (!associationId) throw new ProvisioningError(`CreateSubnet returned no IPv6 association ID for ${logicalId}`, resourceType, logicalId, subnetId);
|
|
18534
|
+
await this.waitForSubnetIpv6Association(logicalId, subnetId, resourceType, associationId, "associated");
|
|
18535
|
+
}
|
|
18484
18536
|
const mapPublicIp = properties["MapPublicIpOnLaunch"];
|
|
18485
18537
|
if (mapPublicIp === true || mapPublicIp === "true") {
|
|
18486
18538
|
await this.ec2Client.send(new ModifySubnetAttributeCommand({
|
|
18487
18539
|
SubnetId: subnetId,
|
|
18488
18540
|
MapPublicIpOnLaunch: { Value: true }
|
|
18489
18541
|
}));
|
|
18490
|
-
await this.
|
|
18542
|
+
await this.waitForSubnetAttribute(subnetId, true);
|
|
18543
|
+
}
|
|
18544
|
+
const dns64 = coerceCfnBoolean(prepared["EnableDns64"]);
|
|
18545
|
+
if (dns64 !== void 0) {
|
|
18546
|
+
await this.ec2Client.send(new ModifySubnetAttributeCommand({
|
|
18547
|
+
SubnetId: subnetId,
|
|
18548
|
+
EnableDns64: { Value: dns64 }
|
|
18549
|
+
}));
|
|
18550
|
+
await this.waitForSubnetAttribute(subnetId, dns64, "EnableDns64");
|
|
18491
18551
|
}
|
|
18492
18552
|
} catch (innerError) {
|
|
18493
18553
|
try {
|
|
@@ -18504,6 +18564,7 @@ var EC2Provider = class {
|
|
|
18504
18564
|
this.logger.debug(`Successfully created Subnet ${logicalId}: ${subnetId}`);
|
|
18505
18565
|
return {
|
|
18506
18566
|
physicalId: subnetId,
|
|
18567
|
+
...prepared !== properties && { effectiveProperties: prepared },
|
|
18507
18568
|
attributes: {
|
|
18508
18569
|
SubnetId: subnetId,
|
|
18509
18570
|
AvailabilityZone: availabilityZone
|
|
@@ -18519,6 +18580,7 @@ var EC2Provider = class {
|
|
|
18519
18580
|
async updateSubnet(logicalId, physicalId, resourceType, properties, previousProperties, context) {
|
|
18520
18581
|
this.logger.debug(`Updating Subnet ${logicalId}: ${physicalId}`);
|
|
18521
18582
|
refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId, physicalId);
|
|
18583
|
+
const prepared = await this.prepareSubnetProperties(logicalId, resourceType, properties, context, physicalId, previousProperties);
|
|
18522
18584
|
try {
|
|
18523
18585
|
for (const createOnly of [
|
|
18524
18586
|
"VpcId",
|
|
@@ -18536,13 +18598,34 @@ var EC2Provider = class {
|
|
|
18536
18598
|
SubnetId: physicalId,
|
|
18537
18599
|
MapPublicIpOnLaunch: { Value: newMapPublicIp }
|
|
18538
18600
|
}));
|
|
18539
|
-
await this.
|
|
18540
|
-
}
|
|
18601
|
+
await this.waitForSubnetAttribute(physicalId, newMapPublicIp);
|
|
18602
|
+
}
|
|
18603
|
+
const dns64 = coerceCfnBoolean(prepared["EnableDns64"]);
|
|
18604
|
+
const keptDns64 = prepared["EnableDns64"] !== properties["EnableDns64"];
|
|
18605
|
+
let previousDns64 = coerceCfnBoolean(previousProperties["EnableDns64"]);
|
|
18606
|
+
if (!keptDns64 && dns64 !== void 0 && context?.unsettledProperties?.has("EnableDns64")) {
|
|
18607
|
+
const live = await this.readSubnetCurrentState(physicalId, /* @__PURE__ */ new Set(["EnableDns64"]));
|
|
18608
|
+
if (live === RESOURCE_NOT_FOUND || live === void 0) throw new ProvisioningError("Subnet was not returned by DescribeSubnets; retry the subnet read", resourceType, logicalId, physicalId);
|
|
18609
|
+
previousDns64 = live["EnableDns64"];
|
|
18610
|
+
}
|
|
18611
|
+
const changedDns64 = !keptDns64 && dns64 !== void 0 && dns64 !== previousDns64;
|
|
18612
|
+
const applyDns64 = async (value) => {
|
|
18613
|
+
context?.markUnsettled?.("EnableDns64");
|
|
18614
|
+
await this.ec2Client.send(new ModifySubnetAttributeCommand({
|
|
18615
|
+
SubnetId: physicalId,
|
|
18616
|
+
EnableDns64: { Value: value }
|
|
18617
|
+
}));
|
|
18618
|
+
await this.waitForSubnetAttribute(physicalId, value, "EnableDns64");
|
|
18619
|
+
};
|
|
18620
|
+
if (changedDns64 && dns64 === false) await applyDns64(false);
|
|
18621
|
+
if (!(prepared["Ipv6CidrBlock"] !== properties["Ipv6CidrBlock"]) && (prepared["Ipv6CidrBlock"] !== previousProperties["Ipv6CidrBlock"] || context?.unsettledProperties?.has("Ipv6CidrBlock"))) await this.updateSubnetIpv6CidrBlock(logicalId, physicalId, resourceType, prepared["Ipv6CidrBlock"], true, context?.markUnsettled);
|
|
18622
|
+
if (changedDns64 && dns64 === true) await applyDns64(true);
|
|
18541
18623
|
await this.applyTagDiff(physicalId, resourceType, logicalId, previousProperties["Tags"], properties["Tags"], maskerOrIdentity(context?.maskSecrets));
|
|
18542
18624
|
this.logger.debug(`Successfully updated Subnet ${logicalId}`);
|
|
18543
18625
|
return {
|
|
18544
18626
|
physicalId,
|
|
18545
|
-
wasReplaced: false
|
|
18627
|
+
wasReplaced: false,
|
|
18628
|
+
...prepared !== properties && { effectiveProperties: prepared }
|
|
18546
18629
|
};
|
|
18547
18630
|
} catch (error) {
|
|
18548
18631
|
if (error instanceof CdkdError) throw error;
|
|
@@ -18550,18 +18633,78 @@ var EC2Provider = class {
|
|
|
18550
18633
|
throw this.wrapCaughtError(maskerOrIdentity(context?.maskSecrets), error, (text) => new ProvisioningError(`Failed to update Subnet ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
18551
18634
|
}
|
|
18552
18635
|
}
|
|
18553
|
-
async
|
|
18636
|
+
async updateSubnetIpv6CidrBlock(logicalId, physicalId, resourceType, desired, recoverOnFailure = true, markUnsettled) {
|
|
18637
|
+
let response = await this.ec2Client.send(new DescribeSubnetsCommand({ SubnetIds: [physicalId] }));
|
|
18638
|
+
let subnet = response.Subnets?.[0];
|
|
18639
|
+
for (const pending of subnet?.Ipv6CidrBlockAssociationSet ?? []) {
|
|
18640
|
+
const state = pending.Ipv6CidrBlockState?.State;
|
|
18641
|
+
if (pending.AssociationId && (state === "associating" || state === "disassociating")) {
|
|
18642
|
+
await this.waitForSubnetIpv6Association(logicalId, physicalId, resourceType, pending.AssociationId, state === "associating" ? "associated" : "disassociated");
|
|
18643
|
+
response = await this.ec2Client.send(new DescribeSubnetsCommand({ SubnetIds: [physicalId] }));
|
|
18644
|
+
subnet = response.Subnets?.[0];
|
|
18645
|
+
}
|
|
18646
|
+
}
|
|
18647
|
+
if (!subnet) throw new ProvisioningError(`Subnet ${logicalId} was not returned by DescribeSubnets`, resourceType, logicalId, physicalId);
|
|
18648
|
+
const current = subnet.Ipv6CidrBlockAssociationSet?.find((association) => association.Ipv6CidrBlockState?.State === "associated");
|
|
18649
|
+
if (current?.Ipv6CidrBlock === desired) return;
|
|
18650
|
+
const currentCidr = current?.Ipv6CidrBlock;
|
|
18651
|
+
const canonicalCurrent = currentCidr === void 0 ? void 0 : canonicalizeIpv6Cidr(currentCidr);
|
|
18652
|
+
if (canonicalCurrent !== void 0 && desired !== void 0 && canonicalCurrent === canonicalizeIpv6Cidr(desired)) return;
|
|
18653
|
+
try {
|
|
18654
|
+
if (current) {
|
|
18655
|
+
if (!current.AssociationId) throw new ProvisioningError(`Subnet ${logicalId} has no IPv6 association ID; retry DescribeSubnets`, resourceType, logicalId, physicalId);
|
|
18656
|
+
markUnsettled?.("Ipv6CidrBlock");
|
|
18657
|
+
await this.ec2Client.send(new DisassociateSubnetCidrBlockCommand({ AssociationId: current.AssociationId }));
|
|
18658
|
+
await this.waitForSubnetIpv6Association(logicalId, physicalId, resourceType, current.AssociationId, "disassociated");
|
|
18659
|
+
}
|
|
18660
|
+
if (desired !== void 0) {
|
|
18661
|
+
markUnsettled?.("Ipv6CidrBlock");
|
|
18662
|
+
const associationId = (await this.ec2Client.send(new AssociateSubnetCidrBlockCommand({
|
|
18663
|
+
SubnetId: physicalId,
|
|
18664
|
+
Ipv6CidrBlock: desired
|
|
18665
|
+
}))).Ipv6CidrBlockAssociation?.AssociationId;
|
|
18666
|
+
if (!associationId) throw new ProvisioningError(`AssociateSubnetCidrBlock returned no association ID for ${logicalId}`, resourceType, logicalId, physicalId);
|
|
18667
|
+
await this.waitForSubnetIpv6Association(logicalId, physicalId, resourceType, associationId, "associated");
|
|
18668
|
+
}
|
|
18669
|
+
} catch (error) {
|
|
18670
|
+
if (current?.Ipv6CidrBlock !== void 0 && recoverOnFailure && !isInterruptedWaitError(error) && !enclosingDeadlineExpired()) try {
|
|
18671
|
+
await this.updateSubnetIpv6CidrBlock(logicalId, physicalId, resourceType, current.Ipv6CidrBlock, false, markUnsettled);
|
|
18672
|
+
} catch {
|
|
18673
|
+
this.logger.warn(safeMsg`Subnet ${logicalId}: IPv6 association recovery failed; inspect DescribeSubnets and redeploy before using the subnet`);
|
|
18674
|
+
}
|
|
18675
|
+
throw error;
|
|
18676
|
+
}
|
|
18677
|
+
}
|
|
18678
|
+
async waitForSubnetIpv6Association(logicalId, physicalId, resourceType, associationId, target) {
|
|
18679
|
+
const watch = startInterruptWatch(`Subnet ${logicalId} IPv6 association wait`);
|
|
18680
|
+
try {
|
|
18681
|
+
for (let attempt = 0; attempt < 30; attempt++) {
|
|
18682
|
+
if (watch.isInterrupted()) throw watch.onInterrupted();
|
|
18683
|
+
if (enclosingDeadlineExpired()) break;
|
|
18684
|
+
const subnet = (await this.ec2Client.send(new DescribeSubnetsCommand({ SubnetIds: [physicalId] }))).Subnets?.[0];
|
|
18685
|
+
const association = subnet?.Ipv6CidrBlockAssociationSet?.find((item) => item.AssociationId === associationId);
|
|
18686
|
+
const state = association?.Ipv6CidrBlockState?.State;
|
|
18687
|
+
if (subnet && (state === target || target === "disassociated" && association === void 0)) return;
|
|
18688
|
+
if (state === "failed" || state === "failing") throw new ProvisioningError(`IPv6 association change failed for Subnet ${logicalId}; inspect DescribeSubnets`, resourceType, logicalId, physicalId);
|
|
18689
|
+
if (attempt < 29) await this.sleep(Math.max(0, Math.min(1e3, enclosingDeadlineRemainingMs())));
|
|
18690
|
+
}
|
|
18691
|
+
throw markNonRetryable(new ProvisioningError(`Timed out waiting for Subnet ${logicalId} IPv6 association to be ${target}; inspect DescribeSubnets before retrying`, resourceType, logicalId, physicalId));
|
|
18692
|
+
} finally {
|
|
18693
|
+
watch.dispose();
|
|
18694
|
+
}
|
|
18695
|
+
}
|
|
18696
|
+
async waitForSubnetAttribute(subnetId, expected, attribute = "MapPublicIpOnLaunch") {
|
|
18554
18697
|
const maxAttempts = 6;
|
|
18555
18698
|
for (let attempt = 1; attempt <= maxAttempts; attempt++) {
|
|
18556
18699
|
try {
|
|
18557
|
-
if ((await this.ec2Client.send(new DescribeSubnetsCommand({ SubnetIds: [subnetId] }))).Subnets?.[0]?.
|
|
18700
|
+
if ((await this.ec2Client.send(new DescribeSubnetsCommand({ SubnetIds: [subnetId] }))).Subnets?.[0]?.[attribute] === expected) return;
|
|
18558
18701
|
} catch (error) {
|
|
18559
|
-
this.logger.debug(
|
|
18702
|
+
this.logger.debug(`${attribute} read-back for ${subnetId} failed (attempt ${attempt}/${maxAttempts}): ${describeAwsFailure(error).detail}`);
|
|
18560
18703
|
return;
|
|
18561
18704
|
}
|
|
18562
18705
|
if (attempt < maxAttempts) await this.sleep(100 * 2 ** (attempt - 1));
|
|
18563
18706
|
}
|
|
18564
|
-
this.logger.debug(
|
|
18707
|
+
this.logger.debug(`${attribute} update not yet visible on ${subnetId} after ${maxAttempts} reads — the observed-state capture may record the stale value`);
|
|
18565
18708
|
}
|
|
18566
18709
|
async deleteSubnet(logicalId, physicalId, resourceType, context) {
|
|
18567
18710
|
this.logger.debug(`Deleting Subnet ${logicalId}: ${physicalId}`);
|
|
@@ -21447,6 +21590,55 @@ var EC2Provider = class {
|
|
|
21447
21590
|
if (input.knownPhysicalId) return this.verifyExplicit(input.logicalId, input.resourceType, input.knownPhysicalId, input.properties ?? {});
|
|
21448
21591
|
return null;
|
|
21449
21592
|
}
|
|
21593
|
+
subnetIpv6InTransition(subnet) {
|
|
21594
|
+
return (subnet.Ipv6CidrBlockAssociationSet ?? []).some((association) => {
|
|
21595
|
+
const state = association.Ipv6CidrBlockState?.State;
|
|
21596
|
+
return state === void 0 || state === "associating" || state === "disassociating" || state === "failing";
|
|
21597
|
+
});
|
|
21598
|
+
}
|
|
21599
|
+
async unsettledInTransition(physicalId, _logicalId, resourceType, names) {
|
|
21600
|
+
if (resourceType !== "AWS::EC2::Subnet" || !names.has("Ipv6CidrBlock")) return /* @__PURE__ */ new Set();
|
|
21601
|
+
try {
|
|
21602
|
+
const subnet = (await this.ec2Client.send(new DescribeSubnetsCommand({ SubnetIds: [physicalId] }))).Subnets?.[0];
|
|
21603
|
+
return !subnet || this.subnetIpv6InTransition(subnet) ? /* @__PURE__ */ new Set(["Ipv6CidrBlock"]) : /* @__PURE__ */ new Set();
|
|
21604
|
+
} catch {
|
|
21605
|
+
return /* @__PURE__ */ new Set(["Ipv6CidrBlock"]);
|
|
21606
|
+
}
|
|
21607
|
+
}
|
|
21608
|
+
async readUnsettled(physicalId, logicalId, resourceType, names, recordedProperties) {
|
|
21609
|
+
if (resourceType === "AWS::EC2::Subnet") return this.readSubnetCurrentState(physicalId, names);
|
|
21610
|
+
return this.readCurrentState(physicalId, logicalId, resourceType, recordedProperties);
|
|
21611
|
+
}
|
|
21612
|
+
async canonicalizeDriftPair(resourceType, baseline, aws) {
|
|
21613
|
+
const key = "Ipv6CidrBlock";
|
|
21614
|
+
if (resourceType === "AWS::EC2::Subnet") {
|
|
21615
|
+
const old = baseline[key];
|
|
21616
|
+
const live = aws[key];
|
|
21617
|
+
const canonical = typeof old === "string" ? canonicalizeIpv6Cidr(old) : void 0;
|
|
21618
|
+
if (canonical !== void 0 && typeof live === "string" && canonical === canonicalizeIpv6Cidr(live)) return {
|
|
21619
|
+
baseline: {
|
|
21620
|
+
...baseline,
|
|
21621
|
+
[key]: live
|
|
21622
|
+
},
|
|
21623
|
+
aws
|
|
21624
|
+
};
|
|
21625
|
+
}
|
|
21626
|
+
return {
|
|
21627
|
+
baseline,
|
|
21628
|
+
aws
|
|
21629
|
+
};
|
|
21630
|
+
}
|
|
21631
|
+
canonicalizeUnsettledProperties(resourceType, properties) {
|
|
21632
|
+
if (resourceType !== "AWS::EC2::Subnet") return properties;
|
|
21633
|
+
const out = this.canonicalizeDesiredProperties(resourceType, properties);
|
|
21634
|
+
const key = "Ipv6CidrBlock";
|
|
21635
|
+
const cidr = out[key];
|
|
21636
|
+
const canonical = typeof cidr === "string" ? canonicalizeIpv6Cidr(cidr) : void 0;
|
|
21637
|
+
return canonical === void 0 ? out : {
|
|
21638
|
+
...out,
|
|
21639
|
+
[key]: canonical
|
|
21640
|
+
};
|
|
21641
|
+
}
|
|
21450
21642
|
async readCurrentState(physicalId, logicalId, resourceType, properties, context) {
|
|
21451
21643
|
const attempts = context?.afterOwnWrite === true ? OWN_WRITE_READ_ATTEMPTS : 1;
|
|
21452
21644
|
for (let attempt = 1;; attempt++) {
|
|
@@ -21506,6 +21698,14 @@ var EC2Provider = class {
|
|
|
21506
21698
|
}
|
|
21507
21699
|
}
|
|
21508
21700
|
canonicalizeDesiredProperties(resourceType, properties) {
|
|
21701
|
+
if (resourceType === "AWS::EC2::Subnet") {
|
|
21702
|
+
const dnsKey = "EnableDns64";
|
|
21703
|
+
const dns64 = coerceCfnBoolean(properties[dnsKey]);
|
|
21704
|
+
return dns64 === void 0 ? properties : {
|
|
21705
|
+
...properties,
|
|
21706
|
+
[dnsKey]: dns64
|
|
21707
|
+
};
|
|
21708
|
+
}
|
|
21509
21709
|
if (resourceType === "AWS::EC2::SecurityGroupIngress") {
|
|
21510
21710
|
const { narrowed } = narrowIngressIpProtocol(properties, () => {});
|
|
21511
21711
|
return canonicalizeSgRuleProtocol(narrowed);
|
|
@@ -21556,14 +21756,19 @@ var EC2Provider = class {
|
|
|
21556
21756
|
}
|
|
21557
21757
|
return result;
|
|
21558
21758
|
}
|
|
21559
|
-
async readSubnetCurrentState(physicalId) {
|
|
21759
|
+
async readSubnetCurrentState(physicalId, unsettledNames) {
|
|
21560
21760
|
const subnet = (await this.ec2Client.send(new DescribeSubnetsCommand({ SubnetIds: [physicalId] }))).Subnets?.[0];
|
|
21561
21761
|
if (!subnet) return RESOURCE_NOT_FOUND;
|
|
21762
|
+
if (unsettledNames?.has("Ipv6CidrBlock") && this.subnetIpv6InTransition(subnet)) throw new Error("Subnet IPv6 association is still in transition; retry after it has settled");
|
|
21763
|
+
if (unsettledNames?.has("EnableDns64") && typeof subnet.EnableDns64 !== "boolean") throw new Error("DescribeSubnets did not return EnableDns64; retry the subnet read");
|
|
21562
21764
|
const result = {};
|
|
21563
21765
|
if (subnet.VpcId !== void 0) result["VpcId"] = subnet.VpcId;
|
|
21564
21766
|
if (subnet.CidrBlock !== void 0) result["CidrBlock"] = subnet.CidrBlock;
|
|
21565
21767
|
if (subnet.AvailabilityZone !== void 0) result["AvailabilityZone"] = subnet.AvailabilityZone;
|
|
21566
21768
|
if (subnet.MapPublicIpOnLaunch !== void 0) result["MapPublicIpOnLaunch"] = subnet.MapPublicIpOnLaunch;
|
|
21769
|
+
if (subnet.EnableDns64 !== void 0) result["EnableDns64"] = subnet.EnableDns64;
|
|
21770
|
+
const ipv6 = subnet.Ipv6CidrBlockAssociationSet?.find((association) => association.Ipv6CidrBlockState?.State === "associated");
|
|
21771
|
+
if (ipv6?.Ipv6CidrBlock !== void 0) result["Ipv6CidrBlock"] = ipv6.Ipv6CidrBlock;
|
|
21567
21772
|
return result;
|
|
21568
21773
|
}
|
|
21569
21774
|
async readInternetGatewayCurrentState(physicalId) {
|
|
@@ -55753,4 +55958,4 @@ var ACMCertificateProvider = class {
|
|
|
55753
55958
|
};
|
|
55754
55959
|
|
|
55755
55960
|
export { ACMCertificateProvider, ASGProvider, AgentCoreBrowserProvider, AgentCoreCodeInterpreterProvider, AgentCoreEvaluatorProvider, AgentCoreRuntimeProvider, ApiGatewayProvider, ApiGatewayV2Provider, AppSyncProvider, BudgetsBudgetProvider, CloudFrontDistributionProvider, CloudFrontOACProvider, CloudFrontOAIProvider, CloudTrailProvider, CloudWatchAlarmProvider, CloudWatchAnomalyDetectorProvider, CodeBuildProvider, CodeCommitRepositoryProvider, CognitoUserPoolProvider, DLMLifecyclePolicyProvider, DocDBProvider, DocDBSubnetGroupProvider, DynamoDBGlobalTableProvider, DynamoDBTableProvider, EC2Provider, ECRProvider, ECSProvider, EFSProvider, ELBv2Provider, EMRClusterProvider, EMRInstanceFleetConfigProvider, EMRInstanceGroupConfigProvider, ElastiCacheProvider, EventBridgeBusProvider, EventBridgeRuleProvider, FSxFileSystemProvider, FirehoseProvider, GlueConnectionProvider, GlueCrawlerProvider, GlueJobProvider, GlueProvider, GlueSecurityConfigurationProvider, GlueTriggerProvider, GlueWorkflowProvider, IAMAccessKeyProvider, IAMInstanceProfileProvider, IAMManagedPolicyProvider, IAMPolicyProvider, IAMRoleProvider, IAMUserGroupProvider, KMSProvider, KinesisStreamConsumerProvider, KinesisStreamProvider, LambdaEventInvokeConfigProvider, LambdaEventSourceMappingProvider, LambdaFunctionProvider, LambdaLayerVersionProvider, LambdaMicrovmImageProvider, LambdaNetworkConnectorProvider, LambdaPermissionProvider, LambdaUrlProvider, LambdaWebFunctionEndpointProvider, LambdaWebFunctionRevisionProvider, LogsLogGroupProvider, NeptuneProvider, NestedStackProvider, PipesPipeProvider, RDSDBProxyEndpointProvider, RDSDBProxyProvider, RDSDBProxyTargetGroupProvider, RDSProvider, Route53Provider, S3BucketPolicyProvider, S3BucketProvider, S3DirectoryBucketProvider, S3TablesProvider, S3VectorsProvider, SNSSubscriptionProvider, SNSTopicPolicyProvider, SNSTopicProvider, SQSQueuePolicyProvider, SQSQueueProvider, SSMParameterProvider, SchedulerScheduleProvider, SecretsManagerSecretProvider, ServiceDiscoveryProvider, StepFunctionsProvider, WAFv2WebACLProvider, WaitConditionHandleProvider };
|
|
55756
|
-
//# sourceMappingURL=provider-classes-
|
|
55961
|
+
//# sourceMappingURL=provider-classes-CfOASAxa.js.map
|