@go-to-k/cdkd 0.316.0 → 0.317.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-DOLuhiky.js → asg-provider-WornuySB.js} +3 -3
- package/dist/{asg-provider-DOLuhiky.js.map → asg-provider-WornuySB.js.map} +1 -1
- package/dist/{aws-clients-CGZAQ1gS.js → aws-clients-DWpHZk2l.js} +2 -1
- package/dist/aws-clients-DWpHZk2l.js.map +1 -0
- package/dist/cli.js +2 -2
- package/dist/{created-resource-sink-B9OCHRr_.js → created-resource-sink-BpB3iPvn.js} +10 -3
- package/dist/{created-resource-sink-B9OCHRr_.js.map → created-resource-sink-BpB3iPvn.js.map} +1 -1
- package/dist/{db-instance-modify-retry-DQTozL4b.js → db-instance-modify-retry-CspmK57I.js} +2 -2
- package/dist/{db-instance-modify-retry-DQTozL4b.js.map → db-instance-modify-retry-CspmK57I.js.map} +1 -1
- package/dist/{deploy-engine-NYjdxQWe.js → deploy-engine-b0rYBotL.js} +22 -15
- package/dist/deploy-engine-b0rYBotL.js.map +1 -0
- package/dist/{iam-role-provider-Ddo7WwEs.js → iam-role-provider-gTpDZhfz.js} +44 -12
- package/dist/iam-role-provider-gTpDZhfz.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/{neptune-provider-CuZbMn9R.js → neptune-provider-BfzktOKC.js} +4 -4
- package/dist/{neptune-provider-CuZbMn9R.js.map → neptune-provider-BfzktOKC.js.map} +1 -1
- package/dist/{program-DSq5150i.js → program-BZ-VVfXu.js} +6 -6
- package/dist/{program-DSq5150i.js.map → program-BZ-VVfXu.js.map} +1 -1
- package/dist/{provider-classes-ushrO6ri.js → provider-classes-DGFOKPO9.js} +446 -45
- package/dist/provider-classes-DGFOKPO9.js.map +1 -0
- package/dist/{rds-provider-VigGKsxO.js → rds-provider-BUNLNluC.js} +60 -7
- package/dist/rds-provider-BUNLNluC.js.map +1 -0
- package/dist/{version-9_dvIw-h.js → version-BkSInxUL.js} +2 -2
- package/dist/{version-9_dvIw-h.js.map → version-BkSInxUL.js.map} +1 -1
- package/package.json +1 -1
- package/dist/aws-clients-CGZAQ1gS.js.map +0 -1
- package/dist/deploy-engine-NYjdxQWe.js.map +0 -1
- package/dist/iam-role-provider-Ddo7WwEs.js.map +0 -1
- package/dist/provider-classes-ushrO6ri.js.map +0 -1
- package/dist/rds-provider-VigGKsxO.js.map +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { r as getAwsClients, s as withApiGatewayPacing } from "./aws-clients-
|
|
1
|
+
import { r as getAwsClients, s as withApiGatewayPacing } from "./aws-clients-DWpHZk2l.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
|
|
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-BpB3iPvn.js";
|
|
4
4
|
import { c as ambientRegion } from "./aws-client-defaults-BLXFsfMa.js";
|
|
5
|
-
import { $ as sendTtlWaitingOutRateLimit, A as DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS, Aa as isUsableAttemptedName, As as refuseMalformedResourcesForDestroy, B as deleteTableWithIndexBusyRetry, Ba as s3BucketDomainName, Bi as markDeleteStarted, Br as getStackRecords, C as planContributorInsightsOp, Ca as ec2InstanceProtectionSite, Cc as ecsServiceLaunchTypeSetOrChanged, Ct as enclosingDeadlineExpired, D as reverseMapTableContributorInsights, Da as reEnableInstanceApiTermination, Dc as sameLambdaFunctionAddress, E as reverseMapIndexContributorInsights, Ea as reDisableInstanceApiTermination, Ec as lambdaFunctionNameForMask, F as resolveDynamoDbDeleteBudgetClock, Fd as renderAssemblyPathEscape, Fi as acquireIdempotencyToken, Fo as accountArgs, G as readbackVectorIndexes, Gc as markSameGenerationBag, Gi as refuseMalformedDesiredTags, Gn as isRedactedRecordedValue, Gs as findSilentDropProperties, H as relayedIndexBusyDelete, Ha as s3BucketRegionalDomainName, Hi as DBPROXY_TAG_OPTIONS, Hn as getCurrentProducerRegions, Hr as replacedDeleteFailureVerdict, Hs as withheldAccountClause, I as resolveDynamoDbDeleteBudgetMs, Id as resolveAssemblyPath, J as vectorIndexesShapeDetail, Ja as outputReferenceProvenanceOf, Jc as snapshotPassProvenance, Ji as definedAttributes, Jt as getCurrentNestedStackContext, K as vectorIndexesForCreate, Kc as redactForState, Ki as tagMapAsList, Kn as redactedDeleteAddressFields, L as DELETE_INDEX_WAIT_PROCEED_NOTE, M as beginDeleteWait, N as compensateRemovedDeletionProtection, Nd as describeFileReadFailure, Ni as reserveStackCreateToken, O as stripIndexContributorInsights, Oo as passedParameterClassesOf, P as deleteBudgetKey, Pd as displayAssemblyPath, Q as readTtlSpec, R as INDEX_SETTLE_POLL_INTERVAL_MS, Ra as isSettledInstanceState, Rr as awaitInFlightSibling, S as indexDeclaresContributorInsights, Sl as recordAttributeIdCopy, T as readContributorInsightsSpec, Ta as observeThenDisableInstanceApiTermination, Tc as canonicalLambdaFunctionName, Tl as carriesSecretMask, To as parseWebACLArn, U as waitForIndexesSettled, Ua as s3BucketWebsiteUrl, Ui as planTagDiff, V as maskedLogger, Va as s3BucketDualStackDomainName, Vi as DBPROXY_TAGS_WHAT, Vt as getNestedRevertRun, W as planVectorIndexUpdates, Wi as readTagList, Wn as REDACTED_DELETE_ADDRESS_SKIP_REASON, Wt as revertNestedChildFromJournal, X as isTtlRateLimited, Y as isTtlAlreadyDisabled, Yi as stringifyIfAssigned, Yt as withNestedStackContext, Z as planTimeToLive, Zc as hasMaskableValues, _ as streamMemberRefusals, _t as renderNestedTemplateTreeDefect, _u as rewriteTemplateAssetReferences, aa as getCurrentResourceSecrets, ac as toCfnInteger, an as chunks, at as markRefusedBeforeApplying, b as CONTRIBUTOR_INSIGHTS_KEY, ba as isWaitAbandonedError, bc as withRetry, bd as derivePartitionAndUrlSuffix, bl as recoverMaskedOutput, c as DynamoDBGlobalTableProvider, cc as coerceCfnInteger, cn as withApiLimit, d as declaredStreamPolicyMember, da as slowCcOperationTimeoutMs, dc as configStringRefusal, dl as withoutPhysicalNameCopies, et as ECR_AUTO_DELETE_IMAGES_TAG, f as declaredStreamTagsMember, fa as onlySecretReferencesDiffer, fc as readConfigString, fu as stringifyValue, g as streamDeclaresTags, gc as requireConfigString, gd as decodeListingKey, gt as listNestedTemplateRows, h as streamDeclaresPolicy, hc as requireConfigObject, ht as isAbsoluteAssetPath, ic as isWarmThroughputDecrease, it as getPriorAttempts, j as DYNAMODB_DELETE_POLL_COST_MS, ji as earliestDefined, k as DYNAMODB_DELETE_DEADLINE_MARGIN_MS, l as STREAM_POLICY_KEY, lc as configBooleanRefusal, lu as timePhase, m as reverseMapStreamPolicy, mc as requireConfigArray, mo as getAccountInfo, mt as findNestedTemplateTreeDefect, nc as WARM_THROUGHPUT_MEMBERS, nt as hasCdkAutoDeleteTag, oc as toFiniteNumber, on as isAccessDeniedError, p as planStreamMemberOps, pa as unchangedBehindSecretReference, pc as replayWarn, pl as dynamicReferenceTokens, q as vectorIndexesSettled, qc as recordReferenceProvenanceEntry, qi as tagPlanWarning, qn as redactedDeleteAddressSkip, qs as withoutSilentDropProperties, rc as coerceWarmThroughput$1, rt as isTruthyCfnBoolean, sc as coerceCfnBoolean, sn as lookupEachName, t as DeployEngine, ta as waitForLambdaFunctionActive, tt as S3_AUTO_DELETE_OBJECTS_TAG, u as STREAM_TAGS_KEY, uc as configIntegerRefusal, us as refuseMalformedNestedChildOutputs, v as streamPolicyMatchesDeclared, va as deleteSkipReason, vi as secretNamedAttributeNamesOf, w as planIndexContributorInsightsOps, wa as isTerminationProtectionPropagationError, wc as emrClusterInstancesReplaced, wt as enclosingDeadlineRemainingMs, x as contributorInsightsRefusals, xa as markWaitAbandoned, xc as blockDeviceMappingsDifferOnlyInDeleteOnTermination, xl as physicalNameCopiesOf, y as streamTagsMatchDeclared, ya as withIndeterminateGuard, yd as canonicalizeRegion, z as TABLE_INDEX_NOUN, za as s3BucketArn, zc as passedNoEchoParametersOf, zi as isRefusedByName } from "./deploy-engine-
|
|
6
|
-
import { n as collectInlinePolicyNamesManagedBySiblings, r as IamCreateClientCache, t as IAMRoleProvider } from "./iam-role-provider-
|
|
7
|
-
import { a as resolveSecretDerivedPrincipals, i as isResolvableSecretPrincipalList, n as runDestroyForStack, o as canonicalizeIpProtocolValue, r as holdsUnprovenSecretPrincipalToken, s as resolvedResourceTimeoutMs, t as canonicalizeIpv4Cidr } from "./program-
|
|
8
|
-
import { n as modifyDbInstanceWhenAvailable } from "./db-instance-modify-retry-
|
|
9
|
-
import { RDSProvider } from "./rds-provider-
|
|
10
|
-
import { NeptuneProvider } from "./neptune-provider-
|
|
11
|
-
import { ASGProvider } from "./asg-provider-
|
|
5
|
+
import { $ as sendTtlWaitingOutRateLimit, A as DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS, Aa as isUsableAttemptedName, As as refuseMalformedResourcesForDestroy, B as deleteTableWithIndexBusyRetry, Ba as s3BucketDomainName, Bi as markDeleteStarted, Br as getStackRecords, C as planContributorInsightsOp, Ca as ec2InstanceProtectionSite, Cc as ecsServiceLaunchTypeSetOrChanged, Ct as enclosingDeadlineExpired, D as reverseMapTableContributorInsights, Da as reEnableInstanceApiTermination, Dc as sameLambdaFunctionAddress, E as reverseMapIndexContributorInsights, Ea as reDisableInstanceApiTermination, Ec as lambdaFunctionNameForMask, F as resolveDynamoDbDeleteBudgetClock, Fd as renderAssemblyPathEscape, Fi as acquireIdempotencyToken, Fo as accountArgs, G as readbackVectorIndexes, Gc as markSameGenerationBag, Gi as refuseMalformedDesiredTags, Gn as isRedactedRecordedValue, Gs as findSilentDropProperties, H as relayedIndexBusyDelete, Ha as s3BucketRegionalDomainName, Hi as DBPROXY_TAG_OPTIONS, Hn as getCurrentProducerRegions, Hr as replacedDeleteFailureVerdict, Hs as withheldAccountClause, I as resolveDynamoDbDeleteBudgetMs, Id as resolveAssemblyPath, J as vectorIndexesShapeDetail, Ja as outputReferenceProvenanceOf, Jc as snapshotPassProvenance, Ji as definedAttributes, Jt as getCurrentNestedStackContext, K as vectorIndexesForCreate, Kc as redactForState, Ki as tagMapAsList, Kn as redactedDeleteAddressFields, L as DELETE_INDEX_WAIT_PROCEED_NOTE, M as beginDeleteWait, N as compensateRemovedDeletionProtection, Nd as describeFileReadFailure, Ni as reserveStackCreateToken, O as stripIndexContributorInsights, Oo as passedParameterClassesOf, P as deleteBudgetKey, Pd as displayAssemblyPath, Q as readTtlSpec, R as INDEX_SETTLE_POLL_INTERVAL_MS, Ra as isSettledInstanceState, Rr as awaitInFlightSibling, S as indexDeclaresContributorInsights, Sl as recordAttributeIdCopy, T as readContributorInsightsSpec, Ta as observeThenDisableInstanceApiTermination, Tc as canonicalLambdaFunctionName, Tl as carriesSecretMask, To as parseWebACLArn, U as waitForIndexesSettled, Ua as s3BucketWebsiteUrl, Ui as planTagDiff, V as maskedLogger, Va as s3BucketDualStackDomainName, Vi as DBPROXY_TAGS_WHAT, Vt as getNestedRevertRun, W as planVectorIndexUpdates, Wi as readTagList, Wn as REDACTED_DELETE_ADDRESS_SKIP_REASON, Wt as revertNestedChildFromJournal, X as isTtlRateLimited, Y as isTtlAlreadyDisabled, Yi as stringifyIfAssigned, Yt as withNestedStackContext, Z as planTimeToLive, Zc as hasMaskableValues, _ as streamMemberRefusals, _t as renderNestedTemplateTreeDefect, _u as rewriteTemplateAssetReferences, aa as getCurrentResourceSecrets, ac as toCfnInteger, an as chunks, at as markRefusedBeforeApplying, b as CONTRIBUTOR_INSIGHTS_KEY, ba as isWaitAbandonedError, bc as withRetry, bd as derivePartitionAndUrlSuffix, bl as recoverMaskedOutput, c as DynamoDBGlobalTableProvider, cc as coerceCfnInteger, cn as withApiLimit, d as declaredStreamPolicyMember, da as slowCcOperationTimeoutMs, dc as configStringRefusal, dl as withoutPhysicalNameCopies, et as ECR_AUTO_DELETE_IMAGES_TAG, f as declaredStreamTagsMember, fa as onlySecretReferencesDiffer, fc as readConfigString, fu as stringifyValue, g as streamDeclaresTags, gc as requireConfigString, gd as decodeListingKey, gt as listNestedTemplateRows, h as streamDeclaresPolicy, hc as requireConfigObject, ht as isAbsoluteAssetPath, ic as isWarmThroughputDecrease, it as getPriorAttempts, j as DYNAMODB_DELETE_POLL_COST_MS, ji as earliestDefined, k as DYNAMODB_DELETE_DEADLINE_MARGIN_MS, l as STREAM_POLICY_KEY, lc as configBooleanRefusal, lu as timePhase, m as reverseMapStreamPolicy, mc as requireConfigArray, mo as getAccountInfo, mt as findNestedTemplateTreeDefect, nc as WARM_THROUGHPUT_MEMBERS, nt as hasCdkAutoDeleteTag, oc as toFiniteNumber, on as isAccessDeniedError, p as planStreamMemberOps, pa as unchangedBehindSecretReference, pc as replayWarn, pl as dynamicReferenceTokens, q as vectorIndexesSettled, qc as recordReferenceProvenanceEntry, qi as tagPlanWarning, qn as redactedDeleteAddressSkip, qs as withoutSilentDropProperties, rc as coerceWarmThroughput$1, rt as isTruthyCfnBoolean, sc as coerceCfnBoolean, sn as lookupEachName, t as DeployEngine, ta as waitForLambdaFunctionActive, tt as S3_AUTO_DELETE_OBJECTS_TAG, u as STREAM_TAGS_KEY, uc as configIntegerRefusal, us as refuseMalformedNestedChildOutputs, v as streamPolicyMatchesDeclared, va as deleteSkipReason, vi as secretNamedAttributeNamesOf, w as planIndexContributorInsightsOps, wa as isTerminationProtectionPropagationError, wc as emrClusterInstancesReplaced, wt as enclosingDeadlineRemainingMs, x as contributorInsightsRefusals, xa as markWaitAbandoned, xc as blockDeviceMappingsDifferOnlyInDeleteOnTermination, xl as physicalNameCopiesOf, y as streamTagsMatchDeclared, ya as withIndeterminateGuard, yd as canonicalizeRegion, z as TABLE_INDEX_NOUN, za as s3BucketArn, zc as passedNoEchoParametersOf, zi as isRefusedByName } from "./deploy-engine-b0rYBotL.js";
|
|
6
|
+
import { n as collectInlinePolicyNamesManagedBySiblings, r as IamCreateClientCache, t as IAMRoleProvider } from "./iam-role-provider-gTpDZhfz.js";
|
|
7
|
+
import { a as resolveSecretDerivedPrincipals, i as isResolvableSecretPrincipalList, n as runDestroyForStack, o as canonicalizeIpProtocolValue, r as holdsUnprovenSecretPrincipalToken, s as resolvedResourceTimeoutMs, t as canonicalizeIpv4Cidr } from "./program-BZ-VVfXu.js";
|
|
8
|
+
import { n as modifyDbInstanceWhenAvailable } from "./db-instance-modify-retry-CspmK57I.js";
|
|
9
|
+
import { RDSProvider } from "./rds-provider-BUNLNluC.js";
|
|
10
|
+
import { NeptuneProvider } from "./neptune-provider-BfzktOKC.js";
|
|
11
|
+
import { ASGProvider } from "./asg-provider-WornuySB.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";
|
|
@@ -44,7 +44,7 @@ import * as zlib from "node:zlib";
|
|
|
44
44
|
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";
|
|
45
45
|
import { CreateStateMachineCommand, DeleteStateMachineCommand, DescribeStateMachineCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$12, SFNClient, StateMachineDoesNotExist, TagResourceCommand as TagResourceCommand$15, UntagResourceCommand as UntagResourceCommand$15, UpdateStateMachineCommand } from "@aws-sdk/client-sfn";
|
|
46
46
|
import { CreateClusterCommand, CreateServiceCommand, DeleteClusterCommand, DeleteServiceCommand, DeregisterTaskDefinitionCommand, DescribeClustersCommand, DescribeServicesCommand, DescribeTaskDefinitionCommand, ECSClient, ListTaskDefinitionsCommand, PutClusterCapacityProvidersCommand, RegisterTaskDefinitionCommand, TagResourceCommand as TagResourceCommand$16, UntagResourceCommand as UntagResourceCommand$16, UpdateClusterCommand, UpdateServiceCommand, waitUntilServicesStable } from "@aws-sdk/client-ecs";
|
|
47
|
-
import { AddTagsToResourceCommand as AddTagsToResourceCommand$3, CreateDBClusterCommand as CreateDBClusterCommand$1, CreateDBInstanceCommand as CreateDBInstanceCommand$1, CreateDBSubnetGroupCommand as CreateDBSubnetGroupCommand$1, DeleteDBClusterCommand as DeleteDBClusterCommand$1, DeleteDBInstanceCommand as DeleteDBInstanceCommand$1, DeleteDBSubnetGroupCommand as DeleteDBSubnetGroupCommand$1, DescribeDBClustersCommand as DescribeDBClustersCommand$1, DescribeDBInstancesCommand as DescribeDBInstancesCommand$1, DescribeDBSubnetGroupsCommand as DescribeDBSubnetGroupsCommand$1, DocDBClient, ListTagsForResourceCommand as ListTagsForResourceCommand$13, ModifyDBClusterCommand as ModifyDBClusterCommand$1, ModifyDBInstanceCommand as ModifyDBInstanceCommand$1, ModifyDBSubnetGroupCommand as ModifyDBSubnetGroupCommand$1, RemoveTagsFromResourceCommand as RemoveTagsFromResourceCommand$3 } from "@aws-sdk/client-docdb";
|
|
47
|
+
import { AddTagsToResourceCommand as AddTagsToResourceCommand$3, CreateDBClusterCommand as CreateDBClusterCommand$1, CreateDBInstanceCommand as CreateDBInstanceCommand$1, CreateDBSubnetGroupCommand as CreateDBSubnetGroupCommand$1, DeleteDBClusterCommand as DeleteDBClusterCommand$1, DeleteDBInstanceCommand as DeleteDBInstanceCommand$1, DeleteDBSubnetGroupCommand as DeleteDBSubnetGroupCommand$1, DescribeDBClustersCommand as DescribeDBClustersCommand$1, DescribeDBInstancesCommand as DescribeDBInstancesCommand$1, DescribeDBSubnetGroupsCommand as DescribeDBSubnetGroupsCommand$1, DescribeGlobalClustersCommand as DescribeGlobalClustersCommand$1, DocDBClient, ListTagsForResourceCommand as ListTagsForResourceCommand$13, ModifyDBClusterCommand as ModifyDBClusterCommand$1, ModifyDBInstanceCommand as ModifyDBInstanceCommand$1, ModifyDBSubnetGroupCommand as ModifyDBSubnetGroupCommand$1, RemoveFromGlobalClusterCommand as RemoveFromGlobalClusterCommand$1, RemoveTagsFromResourceCommand as RemoveTagsFromResourceCommand$3 } from "@aws-sdk/client-docdb";
|
|
48
48
|
import { CreateWebACLCommand, DeleteWebACLCommand, GetWebACLCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$14, TagResourceCommand as TagResourceCommand$17, UntagResourceCommand as UntagResourceCommand$17, UpdateWebACLCommand, WAFNonexistentItemException, WAFV2Client } from "@aws-sdk/client-wafv2";
|
|
49
49
|
import { AddCustomAttributesCommand, CognitoIdentityProviderClient, CreateUserPoolCommand, DeleteUserPoolCommand, DescribeUserPoolCommand, GetUserPoolMfaConfigCommand, ListUserPoolsCommand, ResourceNotFoundException as ResourceNotFoundException$11, SetUserPoolMfaConfigCommand, UntagResourceCommand as UntagResourceCommand$18, UpdateUserPoolCommand } from "@aws-sdk/client-cognito-identity-provider";
|
|
50
50
|
import { CreateHttpNamespaceCommand, CreatePrivateDnsNamespaceCommand, CreatePublicDnsNamespaceCommand, CreateServiceCommand as CreateServiceCommand$1, DeleteNamespaceCommand, DeleteServiceAttributesCommand, DeleteServiceCommand as DeleteServiceCommand$1, GetNamespaceCommand, GetOperationCommand, GetServiceAttributesCommand, GetServiceCommand, ListNamespacesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$15, NamespaceNotFound, ResourceInUse, ServiceDiscoveryClient, ServiceNotFound, TagResourceCommand as TagResourceCommand$18, UntagResourceCommand as UntagResourceCommand$19, UpdateHttpNamespaceCommand, UpdatePrivateDnsNamespaceCommand, UpdatePublicDnsNamespaceCommand, UpdateServiceAttributesCommand, UpdateServiceCommand as UpdateServiceCommand$1 } from "@aws-sdk/client-servicediscovery";
|
|
@@ -59,7 +59,7 @@ import { AssociateFileSystemAliasesCommand, CreateFileSystemCommand as CreateFil
|
|
|
59
59
|
import { AddInstanceFleetCommand, AddInstanceGroupsCommand, AddTagsCommand as AddTagsCommand$1, DescribeClusterCommand, EMRClient, InvalidRequestException, ListClustersCommand, ListInstanceFleetsCommand, ListInstanceGroupsCommand, ModifyClusterCommand, ModifyInstanceFleetCommand, ModifyInstanceGroupsCommand, PutAutoScalingPolicyCommand, PutAutoTerminationPolicyCommand, PutManagedScalingPolicyCommand, RemoveAutoScalingPolicyCommand, RemoveAutoTerminationPolicyCommand, RemoveManagedScalingPolicyCommand, RemoveTagsCommand as RemoveTagsCommand$1, RunJobFlowCommand, SetTerminationProtectionCommand, SetUnhealthyNodeReplacementCommand, SetVisibleToAllUsersCommand, TerminateJobFlowsCommand } from "@aws-sdk/client-emr";
|
|
60
60
|
import { CreateDeliveryStreamCommand, DeleteDeliveryStreamCommand, DescribeDeliveryStreamCommand, FirehoseClient, ListTagsForDeliveryStreamCommand, ResourceNotFoundException as ResourceNotFoundException$14, StartDeliveryStreamEncryptionCommand, StopDeliveryStreamEncryptionCommand, TagDeliveryStreamCommand, UntagDeliveryStreamCommand, UpdateDestinationCommand } from "@aws-sdk/client-firehose";
|
|
61
61
|
import { AddTagsCommand as AddTagsCommand$2, CloudTrailClient, CreateTrailCommand, DeleteTrailCommand, GetEventConfigurationCommand, GetEventSelectorsCommand, GetInsightSelectorsCommand, GetTrailCommand, GetTrailStatusCommand, ListTagsCommand as ListTagsCommand$2, PutEventConfigurationCommand, PutEventSelectorsCommand, PutInsightSelectorsCommand, RemoveTagsCommand as RemoveTagsCommand$2, StartLoggingCommand, StopLoggingCommand, TrailNotFoundException, UpdateTrailCommand } from "@aws-sdk/client-cloudtrail";
|
|
62
|
-
import { BatchGetProjectsCommand, CodeBuildClient, CreateProjectCommand, DeleteProjectCommand, ResourceNotFoundException as ResourceNotFoundException$15, UpdateProjectCommand, UpdateProjectVisibilityCommand } from "@aws-sdk/client-codebuild";
|
|
62
|
+
import { BatchGetProjectsCommand, CodeBuildClient, CreateProjectCommand, CreateWebhookCommand, DeleteProjectCommand, DeleteWebhookCommand, ResourceNotFoundException as ResourceNotFoundException$15, UpdateProjectCommand, UpdateProjectVisibilityCommand, UpdateWebhookCommand } from "@aws-sdk/client-codebuild";
|
|
63
63
|
import { CodeCommitClient, CreateCommitCommand, CreateRepositoryCommand as CreateRepositoryCommand$1, DeleteRepositoryCommand as DeleteRepositoryCommand$1, GetRepositoryCommand, GetRepositoryTriggersCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$18, PutRepositoryTriggersCommand, RepositoryDoesNotExistException, TagResourceCommand as TagResourceCommand$26, UntagResourceCommand as UntagResourceCommand$27, UpdateRepositoryDescriptionCommand, UpdateRepositoryEncryptionKeyCommand, UpdateRepositoryNameCommand } from "@aws-sdk/client-codecommit";
|
|
64
64
|
import { CreateLifecyclePolicyCommand, DLMClient, DeleteLifecyclePolicyCommand as DeleteLifecyclePolicyCommand$1, GetLifecyclePoliciesCommand, GetLifecyclePolicyCommand as GetLifecyclePolicyCommand$1, ResourceNotFoundException as ResourceNotFoundException$16, TagResourceCommand as TagResourceCommand$27, UntagResourceCommand as UntagResourceCommand$28, UpdateLifecyclePolicyCommand } from "@aws-sdk/client-dlm";
|
|
65
65
|
import { CreateVectorBucketCommand, DeleteIndexCommand, DeleteVectorBucketCommand, GetVectorBucketCommand, ListIndexesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$19, S3VectorsClient, TagResourceCommand as TagResourceCommand$28, UntagResourceCommand as UntagResourceCommand$29 } from "@aws-sdk/client-s3vectors";
|
|
@@ -11096,15 +11096,15 @@ function buildCommonImageInput(properties) {
|
|
|
11096
11096
|
return input;
|
|
11097
11097
|
}
|
|
11098
11098
|
function mapCodeArtifact(value) {
|
|
11099
|
-
if (!isRecord$
|
|
11099
|
+
if (!isRecord$3(value)) return void 0;
|
|
11100
11100
|
const uri = value["Uri"];
|
|
11101
11101
|
return typeof uri === "string" ? { uri } : void 0;
|
|
11102
11102
|
}
|
|
11103
11103
|
function mapLogging(value) {
|
|
11104
|
-
if (!isRecord$
|
|
11104
|
+
if (!isRecord$3(value)) return void 0;
|
|
11105
11105
|
if (value["Disabled"] === true) return { disabled: {} };
|
|
11106
11106
|
const cloudWatch = value["CloudWatch"];
|
|
11107
|
-
if (isRecord$
|
|
11107
|
+
if (isRecord$3(cloudWatch)) {
|
|
11108
11108
|
const cw = {};
|
|
11109
11109
|
if (typeof cloudWatch["LogGroup"] === "string") cw.logGroup = cloudWatch["LogGroup"];
|
|
11110
11110
|
if (typeof cloudWatch["LogStream"] === "string") cw.logStream = cloudWatch["LogStream"];
|
|
@@ -11113,32 +11113,32 @@ function mapLogging(value) {
|
|
|
11113
11113
|
}
|
|
11114
11114
|
function mapCpuConfigurations(value) {
|
|
11115
11115
|
if (!Array.isArray(value)) return void 0;
|
|
11116
|
-
return value.filter(isRecord$
|
|
11116
|
+
return value.filter(isRecord$3).map((c) => ({ architecture: c["Architecture"] }));
|
|
11117
11117
|
}
|
|
11118
11118
|
function mapResources(value) {
|
|
11119
11119
|
if (!Array.isArray(value)) return void 0;
|
|
11120
|
-
return value.filter(isRecord$
|
|
11120
|
+
return value.filter(isRecord$3).map((r) => Number(r["MinimumMemoryInMiB"])).filter((n) => Number.isFinite(n)).map((minimumMemoryInMiB) => ({ minimumMemoryInMiB }));
|
|
11121
11121
|
}
|
|
11122
11122
|
function mapHooks(value) {
|
|
11123
|
-
if (!isRecord$
|
|
11123
|
+
if (!isRecord$3(value)) return void 0;
|
|
11124
11124
|
return lowerFirstKeysDeep(value);
|
|
11125
11125
|
}
|
|
11126
11126
|
function mapKeyValueListToRecord(value) {
|
|
11127
11127
|
if (!Array.isArray(value)) return void 0;
|
|
11128
11128
|
const out = {};
|
|
11129
|
-
for (const entry of value) if (isRecord$
|
|
11129
|
+
for (const entry of value) if (isRecord$3(entry) && typeof entry["Key"] === "string") out[entry["Key"]] = typeof entry["Value"] === "string" ? entry["Value"] : "";
|
|
11130
11130
|
return Object.keys(out).length > 0 ? out : void 0;
|
|
11131
11131
|
}
|
|
11132
11132
|
function lowerFirstKeysDeep(value) {
|
|
11133
11133
|
if (Array.isArray(value)) return value.map(lowerFirstKeysDeep);
|
|
11134
|
-
if (isRecord$
|
|
11134
|
+
if (isRecord$3(value)) {
|
|
11135
11135
|
const out = {};
|
|
11136
11136
|
for (const [k, v] of Object.entries(value)) out[k.charAt(0).toLowerCase() + k.slice(1)] = lowerFirstKeysDeep(v);
|
|
11137
11137
|
return out;
|
|
11138
11138
|
}
|
|
11139
11139
|
return value;
|
|
11140
11140
|
}
|
|
11141
|
-
function isRecord$
|
|
11141
|
+
function isRecord$3(value) {
|
|
11142
11142
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
11143
11143
|
}
|
|
11144
11144
|
|
|
@@ -31330,6 +31330,45 @@ const PORT_CHANGE_MEMBER_STATUSES = /* @__PURE__ */ new Set(["modifying", "reboo
|
|
|
31330
31330
|
function numberOrUndefined(value) {
|
|
31331
31331
|
return value == null ? void 0 : Number(value);
|
|
31332
31332
|
}
|
|
31333
|
+
function docdbGlobalClusterId(value) {
|
|
31334
|
+
return typeof value === "string" && value.trim() !== "" ? value : void 0;
|
|
31335
|
+
}
|
|
31336
|
+
function withRecordedGlobalCluster(bag, previousProperties) {
|
|
31337
|
+
const { GlobalClusterIdentifier: _dropped, ...rest } = bag;
|
|
31338
|
+
const previous = previousProperties["GlobalClusterIdentifier"];
|
|
31339
|
+
return previous === void 0 ? rest : {
|
|
31340
|
+
...rest,
|
|
31341
|
+
GlobalClusterIdentifier: previous
|
|
31342
|
+
};
|
|
31343
|
+
}
|
|
31344
|
+
function readableGlobalClusterId(value) {
|
|
31345
|
+
return value == null || typeof value === "string";
|
|
31346
|
+
}
|
|
31347
|
+
const DETACH_MAX_WAIT_MS = 18e5;
|
|
31348
|
+
const GLOBAL_CLUSTER_BUSY_MAX_WAIT_MS = 6e5;
|
|
31349
|
+
const TRANSIENT_DETACH_FAULTS = /* @__PURE__ */ new Set([
|
|
31350
|
+
"InvalidDBClusterStateFault",
|
|
31351
|
+
"InvalidGlobalClusterStateFault",
|
|
31352
|
+
"ThrottlingException",
|
|
31353
|
+
"Throttling",
|
|
31354
|
+
"RequestLimitExceeded"
|
|
31355
|
+
]);
|
|
31356
|
+
function awsErrorName(error) {
|
|
31357
|
+
return error?.name ?? "";
|
|
31358
|
+
}
|
|
31359
|
+
var GlobalClusterDetachError = class extends Error {
|
|
31360
|
+
constructor(message) {
|
|
31361
|
+
super(message);
|
|
31362
|
+
this.name = "GlobalClusterDetachError";
|
|
31363
|
+
}
|
|
31364
|
+
};
|
|
31365
|
+
function docdbEngineVersionToSend(properties, previousProperties, context) {
|
|
31366
|
+
if (context?.replayingState === true) return void 0;
|
|
31367
|
+
const desired = properties["EngineVersion"];
|
|
31368
|
+
if (desired == null) return void 0;
|
|
31369
|
+
const previous = previousProperties["EngineVersion"];
|
|
31370
|
+
return previous != null && String(previous) === String(desired) ? void 0 : desired;
|
|
31371
|
+
}
|
|
31333
31372
|
function clusterPortToSend(properties, previousProperties) {
|
|
31334
31373
|
if (properties["Port"] != null) return Number(properties["Port"]);
|
|
31335
31374
|
if (previousProperties["Port"] == null) return void 0;
|
|
@@ -31377,6 +31416,7 @@ var DocDBProvider = class {
|
|
|
31377
31416
|
"Tags",
|
|
31378
31417
|
"MasterUserPassword",
|
|
31379
31418
|
"RotateMasterUserPassword",
|
|
31419
|
+
"GlobalClusterIdentifier",
|
|
31380
31420
|
...DOCDB_CLUSTER_KEPT_ON_REMOVAL,
|
|
31381
31421
|
...DOCDB_CLUSTER_UNMEASURED_ON_REMOVAL
|
|
31382
31422
|
])], ["AWS::DocDB::DBInstance", /* @__PURE__ */ new Set([
|
|
@@ -31408,6 +31448,7 @@ var DocDBProvider = class {
|
|
|
31408
31448
|
"AvailabilityZones",
|
|
31409
31449
|
"CopyTagsToSnapshot",
|
|
31410
31450
|
"EnableCloudwatchLogsExports",
|
|
31451
|
+
"GlobalClusterIdentifier",
|
|
31411
31452
|
"ManageMasterUserPassword",
|
|
31412
31453
|
"MasterUserSecretKmsKeyId",
|
|
31413
31454
|
"NetworkType",
|
|
@@ -31458,9 +31499,9 @@ var DocDBProvider = class {
|
|
|
31458
31499
|
default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId, physicalId);
|
|
31459
31500
|
}
|
|
31460
31501
|
}
|
|
31461
|
-
async delete(logicalId, physicalId, resourceType,
|
|
31502
|
+
async delete(logicalId, physicalId, resourceType, properties, context) {
|
|
31462
31503
|
switch (resourceType) {
|
|
31463
|
-
case "AWS::DocDB::DBCluster": return this.deleteDBCluster(logicalId, physicalId, resourceType, context);
|
|
31504
|
+
case "AWS::DocDB::DBCluster": return this.deleteDBCluster(logicalId, physicalId, resourceType, properties, context);
|
|
31464
31505
|
case "AWS::DocDB::DBInstance": return this.deleteDBInstance(logicalId, physicalId, resourceType, context);
|
|
31465
31506
|
default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId, physicalId);
|
|
31466
31507
|
}
|
|
@@ -31479,6 +31520,11 @@ var DocDBProvider = class {
|
|
|
31479
31520
|
const { logTypes, scaling } = this.readClusterBlocks(properties, resourceType, logicalId, origin, true);
|
|
31480
31521
|
const managedPassword = this.readBooleanProperty("ManageMasterUserPassword", properties, resourceType, logicalId, origin);
|
|
31481
31522
|
const password = this.passwordBesideManaged(managedPassword, false, properties["MasterUserPassword"], resourceType, logicalId, origin);
|
|
31523
|
+
if (!readableGlobalClusterId(properties["GlobalClusterIdentifier"])) {
|
|
31524
|
+
if (!replayingState) this.refuseBlock(logicalId, resourceType, void 0, "GlobalClusterIdentifier is not a string");
|
|
31525
|
+
this.logger.warn(safeMsg`${logicalId} (${resourceType}): the recorded GlobalClusterIdentifier is unusable, so it is not sent.`);
|
|
31526
|
+
}
|
|
31527
|
+
const globalClusterId = docdbGlobalClusterId(properties["GlobalClusterIdentifier"]);
|
|
31482
31528
|
const dbClusterIdentifier = properties["DBClusterIdentifier"] || generatedNameFor("AWS::DocDB::DBCluster", logicalId);
|
|
31483
31529
|
let clusterCreated = false;
|
|
31484
31530
|
let createdResourceId;
|
|
@@ -31505,6 +31551,7 @@ var DocDBProvider = class {
|
|
|
31505
31551
|
MasterUserSecretKmsKeyId: properties["MasterUserSecretKmsKeyId"],
|
|
31506
31552
|
NetworkType: properties["NetworkType"],
|
|
31507
31553
|
StorageType: properties["StorageType"],
|
|
31554
|
+
...globalClusterId !== void 0 && { GlobalClusterIdentifier: globalClusterId },
|
|
31508
31555
|
...logTypes !== void 0 && logTypes.length > 0 && { EnableCloudwatchLogsExports: logTypes },
|
|
31509
31556
|
...scaling != null && { ServerlessV2ScalingConfiguration: scaling },
|
|
31510
31557
|
...tags.length > 0 && { Tags: tags }
|
|
@@ -31533,7 +31580,9 @@ var DocDBProvider = class {
|
|
|
31533
31580
|
physicalId
|
|
31534
31581
|
};
|
|
31535
31582
|
const { logTypes, scaling } = this.readClusterBlocks(properties, resourceType, logicalId, origin, false);
|
|
31583
|
+
const globalClusterPlan = await this.planGlobalClusterUpdate(physicalId, properties, previousProperties, resourceType, logicalId, origin, context?.desiredFromAwsReadback === true);
|
|
31536
31584
|
const logExportConfig = logTypes === void 0 ? void 0 : docdbLogExportChange(logTypes, docdbStringList(previousProperties["EnableCloudwatchLogsExports"]) ?? []);
|
|
31585
|
+
let detachedFrom;
|
|
31537
31586
|
try {
|
|
31538
31587
|
const credentials = await this.planMasterCredentials(physicalId, properties, previousProperties, resourceType, logicalId, context, origin);
|
|
31539
31588
|
const vpcSgIds = properties["VpcSecurityGroupIds"];
|
|
@@ -31547,10 +31596,16 @@ var DocDBProvider = class {
|
|
|
31547
31596
|
const storageChange = declaredChange(storageType, previousProperties["StorageType"], live?.StorageType ?? DOCDB_DEFAULT_STORAGE_TYPE);
|
|
31548
31597
|
const previousScaling = docdbServerlessScaling(previousProperties["ServerlessV2ScalingConfiguration"]);
|
|
31549
31598
|
const scalingChange = scaling != null && (scaling.MinCapacity !== previousScaling?.MinCapacity || scaling.MaxCapacity !== previousScaling?.MaxCapacity);
|
|
31599
|
+
if (globalClusterPlan.kind === "detach") {
|
|
31600
|
+
if (await this.detachFromGlobalCluster(logicalId, physicalId, globalClusterPlan.globalClusterId, {
|
|
31601
|
+
beforeDelete: false,
|
|
31602
|
+
removeProtection: false
|
|
31603
|
+
}, { stripped: false }, maskerOrIdentity(context?.maskSecrets))) detachedFrom = globalClusterPlan.globalClusterId;
|
|
31604
|
+
}
|
|
31550
31605
|
this.markChangedUnsettled(CLUSTER_MODIFY_UNSETTLED_KEYS, properties, previousProperties, context);
|
|
31551
31606
|
await this.getClient().send(new ModifyDBClusterCommand$1({
|
|
31552
31607
|
DBClusterIdentifier: physicalId,
|
|
31553
|
-
EngineVersion: properties
|
|
31608
|
+
EngineVersion: docdbEngineVersionToSend(properties, previousProperties, context),
|
|
31554
31609
|
DeletionProtection: properties["DeletionProtection"],
|
|
31555
31610
|
BackupRetentionPeriod: properties["BackupRetentionPeriod"] != null ? Number(properties["BackupRetentionPeriod"]) : void 0,
|
|
31556
31611
|
PreferredBackupWindow: properties["PreferredBackupWindow"],
|
|
@@ -31611,19 +31666,21 @@ var DocDBProvider = class {
|
|
|
31611
31666
|
...described,
|
|
31612
31667
|
Port: portToSend
|
|
31613
31668
|
} : described),
|
|
31614
|
-
...credentials.effectiveProperties !== void 0 && { effectiveProperties: credentials.effectiveProperties }
|
|
31669
|
+
...(credentials.effectiveProperties !== void 0 || globalClusterPlan.kind === "keep") && { effectiveProperties: globalClusterPlan.kind === "keep" ? withRecordedGlobalCluster(credentials.effectiveProperties ?? properties, previousProperties) : credentials.effectiveProperties }
|
|
31615
31670
|
};
|
|
31616
31671
|
} catch (error) {
|
|
31617
31672
|
if (error instanceof ProvisioningError) throw error;
|
|
31673
|
+
if (error instanceof GlobalClusterDetachError) throw markNonRetryable(new ProvisioningError(`Failed to update DocDB DBCluster ${logicalId}: ${error.message}`, resourceType, logicalId, physicalId, error));
|
|
31618
31674
|
const cause = error instanceof Error ? error : void 0;
|
|
31619
|
-
|
|
31675
|
+
const detachedNote = detachedFrom !== void 0 ? " (it was already detached from its global cluster, and stays a standalone cluster)" : "";
|
|
31676
|
+
throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to update DocDB DBCluster ${logicalId}: ${text}${detachedNote}`, resourceType, logicalId, physicalId, cause));
|
|
31620
31677
|
}
|
|
31621
31678
|
}
|
|
31622
|
-
async deleteDBCluster(logicalId, physicalId, resourceType, context) {
|
|
31679
|
+
async deleteDBCluster(logicalId, physicalId, resourceType, properties, context) {
|
|
31623
31680
|
await deleteWithProtectionCompensation({
|
|
31624
31681
|
registry: this.protectionFlips,
|
|
31625
31682
|
key: protectionFlipKey(resourceType, physicalId, context?.expectedRegion),
|
|
31626
|
-
run: (flip) => this.deleteDBClusterOnce(logicalId, physicalId, resourceType, context, flip),
|
|
31683
|
+
run: (flip) => this.deleteDBClusterOnce(logicalId, physicalId, resourceType, properties, context, flip),
|
|
31627
31684
|
compensation: {
|
|
31628
31685
|
logicalId,
|
|
31629
31686
|
physicalId,
|
|
@@ -31647,8 +31704,10 @@ var DocDBProvider = class {
|
|
|
31647
31704
|
}
|
|
31648
31705
|
});
|
|
31649
31706
|
}
|
|
31650
|
-
async deleteDBClusterOnce(logicalId, physicalId, resourceType, context, flip) {
|
|
31707
|
+
async deleteDBClusterOnce(logicalId, physicalId, resourceType, properties, context, flip) {
|
|
31651
31708
|
this.logger.debug(`Deleting DocDB DBCluster ${logicalId}`);
|
|
31709
|
+
let detachedFrom;
|
|
31710
|
+
const progress = { stripped: false };
|
|
31652
31711
|
try {
|
|
31653
31712
|
if (context?.removeProtection === true) try {
|
|
31654
31713
|
await observeThenDisableProtection({
|
|
@@ -31670,6 +31729,11 @@ var DocDBProvider = class {
|
|
|
31670
31729
|
} catch (disableError) {
|
|
31671
31730
|
if (!isDocDBNotFoundError(disableError, "DBClusterNotFoundFault")) this.logger.debug(maskerOrIdentity(context?.maskSecrets)(`Could not disable deletion protection for DocDB DBCluster ${logicalId}: ${describeAwsFailure(disableError).detail}`));
|
|
31672
31731
|
}
|
|
31732
|
+
const globalClusterId = docdbGlobalClusterId(properties?.["GlobalClusterIdentifier"]);
|
|
31733
|
+
if (globalClusterId !== void 0) detachedFrom = await this.detachFromGlobalCluster(logicalId, physicalId, globalClusterId, {
|
|
31734
|
+
beforeDelete: true,
|
|
31735
|
+
removeProtection: context?.removeProtection === true
|
|
31736
|
+
}, progress, maskerOrIdentity(context?.maskSecrets)) ? globalClusterId : void 0;
|
|
31673
31737
|
const finalSnapshotId = context?.finalSnapshotIdentifier;
|
|
31674
31738
|
const sendDelete = () => this.getClient().send(new DeleteDBClusterCommand$1({
|
|
31675
31739
|
DBClusterIdentifier: physicalId,
|
|
@@ -31685,6 +31749,10 @@ var DocDBProvider = class {
|
|
|
31685
31749
|
this.logger.debug(`Successfully initiated deletion of DocDB DBCluster ${logicalId}`);
|
|
31686
31750
|
await this.waitForClusterDeleted(logicalId, physicalId);
|
|
31687
31751
|
} catch (error) {
|
|
31752
|
+
if (error instanceof GlobalClusterDetachError) {
|
|
31753
|
+
const detachFailure = markNotGone(markNonRetryable(new ProvisioningError(`Failed to delete DocDB DBCluster ${logicalId}: ${error.message}`, resourceType, logicalId, physicalId, error)));
|
|
31754
|
+
throw progress.stripped ? markDeleteStarted(detachFailure) : detachFailure;
|
|
31755
|
+
}
|
|
31688
31756
|
if (isDocDBNotFoundError(error, "DBClusterNotFoundFault")) {
|
|
31689
31757
|
const clientRegion = await this.getClient().config.region();
|
|
31690
31758
|
assertRegionMatch(clientRegion, context?.expectedRegion, resourceType, logicalId, physicalId);
|
|
@@ -31693,7 +31761,95 @@ var DocDBProvider = class {
|
|
|
31693
31761
|
return;
|
|
31694
31762
|
}
|
|
31695
31763
|
const cause = error instanceof Error ? error : void 0;
|
|
31696
|
-
|
|
31764
|
+
const detachedNote = detachedFrom !== void 0 ? " (it was already detached from its global cluster, and stays a standalone cluster)" : "";
|
|
31765
|
+
const failure = this.wrapDeleteError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to delete DocDB DBCluster ${logicalId}: ${text}${detachedNote}`, resourceType, logicalId, physicalId, cause));
|
|
31766
|
+
throw progress.stripped ? markDeleteStarted(failure) : failure;
|
|
31767
|
+
}
|
|
31768
|
+
}
|
|
31769
|
+
wrapGlobalClusterDetachError(error, mask, build) {
|
|
31770
|
+
const failure = describeAwsFailure(error);
|
|
31771
|
+
if (failure.redacted) this.logger.debug(mask(build(mask(failure.detail))));
|
|
31772
|
+
return new GlobalClusterDetachError(build(mask(failure.summary)));
|
|
31773
|
+
}
|
|
31774
|
+
async detachFromGlobalCluster(logicalId, physicalId, globalClusterId, { beforeDelete, removeProtection }, progress, mask) {
|
|
31775
|
+
let cluster = await this.describeDBCluster(physicalId);
|
|
31776
|
+
for (let i = 0; removeProtection && cluster?.DeletionProtection === true && i < 6; i++) {
|
|
31777
|
+
await this.sleep(5e3);
|
|
31778
|
+
cluster = await this.describeDBCluster(physicalId);
|
|
31779
|
+
}
|
|
31780
|
+
if (cluster === void 0) return false;
|
|
31781
|
+
if (beforeDelete && cluster.DeletionProtection === true) throw new GlobalClusterDetachError(safeMsg`${physicalId} has deletion protection on, so cdkd did not detach it from global cluster ${globalClusterId}; turn it off (cdkd destroy --remove-protection does) and re-run`);
|
|
31782
|
+
const clusterArn = cluster.DBClusterArn;
|
|
31783
|
+
if (typeof clusterArn !== "string" || clusterArn === "") throw new GlobalClusterDetachError(safeMsg`could not read the ARN of ${physicalId} to detach it from global cluster ${globalClusterId}`);
|
|
31784
|
+
const startTime = Date.now();
|
|
31785
|
+
let delay = 5e3;
|
|
31786
|
+
const backOff = async () => {
|
|
31787
|
+
if (Date.now() - startTime >= DETACH_MAX_WAIT_MS) throw new GlobalClusterDetachError(safeMsg`timed out waiting for ${physicalId} to leave global cluster ${globalClusterId}`);
|
|
31788
|
+
await this.sleep(delay);
|
|
31789
|
+
delay = Math.min(delay * 2, 1e4);
|
|
31790
|
+
};
|
|
31791
|
+
const readMembers = async (build) => {
|
|
31792
|
+
try {
|
|
31793
|
+
return (await this.getClient().send(new DescribeGlobalClustersCommand$1({ GlobalClusterIdentifier: globalClusterId }))).GlobalClusters?.[0]?.GlobalClusterMembers ?? [];
|
|
31794
|
+
} catch (error) {
|
|
31795
|
+
const name = awsErrorName(error);
|
|
31796
|
+
if (name === "GlobalClusterNotFoundFault") return [];
|
|
31797
|
+
if (TRANSIENT_DETACH_FAULTS.has(name)) return void 0;
|
|
31798
|
+
throw this.wrapGlobalClusterDetachError(error, mask, build);
|
|
31799
|
+
}
|
|
31800
|
+
};
|
|
31801
|
+
const isMember = async (build) => {
|
|
31802
|
+
return (await readMembers(build))?.some((member) => member.DBClusterArn === clusterArn);
|
|
31803
|
+
};
|
|
31804
|
+
for (;;) {
|
|
31805
|
+
const members = await readMembers((text) => safeMsg`could not read whether ${physicalId} is a member of global cluster ${globalClusterId} (${text})`);
|
|
31806
|
+
if (members !== void 0) {
|
|
31807
|
+
const own = members.find((member) => member.DBClusterArn === clusterArn);
|
|
31808
|
+
if (own === void 0) return false;
|
|
31809
|
+
const others = members.filter((member) => member.DBClusterArn !== clusterArn).map((member) => /^arn:[^:]*:rds:[^:]*:[^:]*:cluster:(.+)$/.exec(member.DBClusterArn ?? "")?.[1] ?? "(unnamed)");
|
|
31810
|
+
if (own.IsWriter === true && others.length > 0) throw new GlobalClusterDetachError(safeMsg`${physicalId} is the primary of global cluster ${globalClusterId}, which still has other members (${others.join(", ")}); detach or delete them first, then re-run`);
|
|
31811
|
+
break;
|
|
31812
|
+
}
|
|
31813
|
+
await backOff();
|
|
31814
|
+
}
|
|
31815
|
+
let globalBusySince;
|
|
31816
|
+
for (;;) try {
|
|
31817
|
+
await this.getClient().send(new RemoveFromGlobalClusterCommand$1({
|
|
31818
|
+
GlobalClusterIdentifier: globalClusterId,
|
|
31819
|
+
DbClusterIdentifier: clusterArn
|
|
31820
|
+
}));
|
|
31821
|
+
progress.stripped = true;
|
|
31822
|
+
this.logger.info(beforeDelete ? safeMsg`Detaching DocDB DBCluster ${logicalId} from global cluster ${globalClusterId} before the delete` : safeMsg`Detaching DocDB DBCluster ${logicalId} from global cluster ${globalClusterId}: GlobalClusterIdentifier was removed`);
|
|
31823
|
+
break;
|
|
31824
|
+
} catch (error) {
|
|
31825
|
+
const name = awsErrorName(error);
|
|
31826
|
+
if (name === "GlobalClusterNotFoundFault") return false;
|
|
31827
|
+
if (name === "DBClusterNotFoundFault") {
|
|
31828
|
+
progress.stripped = true;
|
|
31829
|
+
break;
|
|
31830
|
+
}
|
|
31831
|
+
if (name === "InvalidGlobalClusterStateFault") {
|
|
31832
|
+
globalBusySince ??= Date.now();
|
|
31833
|
+
if (Date.now() - globalBusySince >= GLOBAL_CLUSTER_BUSY_MAX_WAIT_MS) throw this.wrapGlobalClusterDetachError(error, mask, (text) => safeMsg`detaching ${physicalId} from global cluster ${globalClusterId} failed (${text})`);
|
|
31834
|
+
}
|
|
31835
|
+
if (!TRANSIENT_DETACH_FAULTS.has(name)) throw this.wrapGlobalClusterDetachError(error, mask, (text) => safeMsg`detaching ${physicalId} from global cluster ${globalClusterId} failed (${text})`);
|
|
31836
|
+
await backOff();
|
|
31837
|
+
}
|
|
31838
|
+
for (;;) {
|
|
31839
|
+
if (await isMember((text) => safeMsg`could not confirm ${physicalId} left global cluster ${globalClusterId} (${text})`) === false) {
|
|
31840
|
+
let after;
|
|
31841
|
+
try {
|
|
31842
|
+
after = await this.describeDBCluster(physicalId);
|
|
31843
|
+
} catch (error) {
|
|
31844
|
+
if (!TRANSIENT_DETACH_FAULTS.has(awsErrorName(error))) throw error;
|
|
31845
|
+
await backOff();
|
|
31846
|
+
continue;
|
|
31847
|
+
}
|
|
31848
|
+
if (after === void 0) return true;
|
|
31849
|
+
this.logger.debug(safeMsg`DocDB DBCluster ${physicalId} status after the detach: ${after.Status}`);
|
|
31850
|
+
if (after.Status === "available") return true;
|
|
31851
|
+
}
|
|
31852
|
+
await backOff();
|
|
31697
31853
|
}
|
|
31698
31854
|
}
|
|
31699
31855
|
async createDBInstance(logicalId, resourceType, properties, mask, replayingState) {
|
|
@@ -31809,6 +31965,53 @@ var DocDBProvider = class {
|
|
|
31809
31965
|
refuseBlock(logicalId, resourceType, physicalId, text) {
|
|
31810
31966
|
throw markNonRetryable(new ProvisioningError(safeMsg`${resourceType === "AWS::DocDB::DBInstance" ? "DocDB DBInstance" : "DocDB DBCluster"} ${logicalId}: ${text}; nothing was changed.`, resourceType, logicalId, physicalId));
|
|
31811
31967
|
}
|
|
31968
|
+
async planGlobalClusterUpdate(physicalId, properties, previousProperties, resourceType, logicalId, origin, fromReadback) {
|
|
31969
|
+
const desired = properties["GlobalClusterIdentifier"];
|
|
31970
|
+
if (fromReadback && desired === void 0) return previousProperties["GlobalClusterIdentifier"] !== void 0 ? { kind: "keep" } : { kind: "none" };
|
|
31971
|
+
const readable = readableGlobalClusterId(desired);
|
|
31972
|
+
const desiredId = docdbGlobalClusterId(desired);
|
|
31973
|
+
const previousId = docdbGlobalClusterId(previousProperties["GlobalClusterIdentifier"]);
|
|
31974
|
+
if (readable && desiredId === previousId) return { kind: "none" };
|
|
31975
|
+
if (readable && desiredId === void 0 && previousId !== void 0) {
|
|
31976
|
+
if (origin.stateBorne) {
|
|
31977
|
+
const member = await this.liveGlobalClusterMatches(physicalId, previousId);
|
|
31978
|
+
if (member === void 0) this.logger.warn(safeMsg`${logicalId} (${resourceType}): the cluster's membership of global cluster ${previousId} could not be read, so the record treats it as absent; if it is still a member, a later destroy may need aws docdb remove-from-global-cluster first.`);
|
|
31979
|
+
if (member !== true) return { kind: "none" };
|
|
31980
|
+
this.logger.warn(safeMsg`${logicalId} (${resourceType}): the restored state has no GlobalClusterIdentifier, but cdkd did not add the cluster to global cluster ${previousId} (it was already a member), so it leaves it there.`);
|
|
31981
|
+
return { kind: "keep" };
|
|
31982
|
+
}
|
|
31983
|
+
return {
|
|
31984
|
+
kind: "detach",
|
|
31985
|
+
globalClusterId: previousId
|
|
31986
|
+
};
|
|
31987
|
+
}
|
|
31988
|
+
if (readable && await this.liveGlobalClusterMatches(physicalId, desiredId) === true) return { kind: "none" };
|
|
31989
|
+
const text = readable ? "Changing GlobalClusterIdentifier to a different global cluster is not supported unless the cluster is already part of the target global cluster (CloudFormation refuses it too). To join a different global cluster, replace the cluster, for example with a new DBClusterIdentifier" : "GlobalClusterIdentifier is not a string";
|
|
31990
|
+
if (!origin.stateBorne) this.refuseBlock(logicalId, resourceType, physicalId, text);
|
|
31991
|
+
this.logger.warn(safeMsg`${logicalId} (${resourceType}): ${text}; the cluster keeps its current global cluster membership.`);
|
|
31992
|
+
return { kind: "keep" };
|
|
31993
|
+
}
|
|
31994
|
+
async liveGlobalClusterMatches(physicalId, desiredId) {
|
|
31995
|
+
try {
|
|
31996
|
+
const arn = (await this.describeDBCluster(physicalId))?.DBClusterArn;
|
|
31997
|
+
if (typeof arn !== "string" || arn === "") return void 0;
|
|
31998
|
+
let liveId;
|
|
31999
|
+
let marker;
|
|
32000
|
+
do {
|
|
32001
|
+
const page = await this.getClient().send(new DescribeGlobalClustersCommand$1({ ...marker !== void 0 && { Marker: marker } }));
|
|
32002
|
+
const holder = (page.GlobalClusters ?? []).find((global) => (global.GlobalClusterMembers ?? []).some((member) => member.DBClusterArn === arn));
|
|
32003
|
+
if (holder !== void 0) {
|
|
32004
|
+
liveId = holder.GlobalClusterIdentifier;
|
|
32005
|
+
break;
|
|
32006
|
+
}
|
|
32007
|
+
marker = page.Marker;
|
|
32008
|
+
} while (marker);
|
|
32009
|
+
return liveId === desiredId;
|
|
32010
|
+
} catch (error) {
|
|
32011
|
+
this.logger.debug(safeMsg`Could not read a DocDB cluster's global cluster membership: ${describeAwsFailure(error).summary}`);
|
|
32012
|
+
return;
|
|
32013
|
+
}
|
|
32014
|
+
}
|
|
31812
32015
|
readClusterBlocks(properties, resourceType, logicalId, origin, creating) {
|
|
31813
32016
|
const leaveOut = (key) => {
|
|
31814
32017
|
this.logger.warn(safeMsg`${logicalId} (${resourceType}): the recorded ${key} is unusable, so it is not sent.`);
|
|
@@ -32094,6 +32297,7 @@ var DocDBProvider = class {
|
|
|
32094
32297
|
getDriftUnknownPaths(resourceType) {
|
|
32095
32298
|
if (resourceType === "AWS::DocDB::DBCluster") return [
|
|
32096
32299
|
"AvailabilityZones",
|
|
32300
|
+
"GlobalClusterIdentifier",
|
|
32097
32301
|
"MasterUserSecretKmsKeyId",
|
|
32098
32302
|
"RotateMasterUserPassword"
|
|
32099
32303
|
];
|
|
@@ -35161,6 +35365,7 @@ var CognitoUserPoolProvider = class {
|
|
|
35161
35365
|
const CACHE_DELETE_WAIT_MS = Math.max(6e5, slowCcOperationTimeoutMs("AWS::ElastiCache::CacheCluster", "DELETE"));
|
|
35162
35366
|
const NODE_TYPE_MODIFY_WAIT_MS = Math.max(36e5, slowCcOperationTimeoutMs("AWS::ElastiCache::CacheCluster", "UPDATE"));
|
|
35163
35367
|
const MODIFY_DROPPED_AFTER_MS = 12e4;
|
|
35368
|
+
const TERMINAL_CLUSTER_STATUSES = /* @__PURE__ */ new Set(["restore-failed", "incompatible-network"]);
|
|
35164
35369
|
function availabilityZonesNotCovered(a, b) {
|
|
35165
35370
|
const remaining = [...b];
|
|
35166
35371
|
const out = [];
|
|
@@ -35265,6 +35470,7 @@ var ElastiCacheProvider = class {
|
|
|
35265
35470
|
"Tags",
|
|
35266
35471
|
"NotificationTopicArn",
|
|
35267
35472
|
"SnapshotName",
|
|
35473
|
+
"SnapshotArns",
|
|
35268
35474
|
"LogDeliveryConfigurations",
|
|
35269
35475
|
"NetworkType",
|
|
35270
35476
|
"IpDiscovery",
|
|
@@ -35416,6 +35622,7 @@ var ElastiCacheProvider = class {
|
|
|
35416
35622
|
AutoMinorVersionUpgrade: properties["AutoMinorVersionUpgrade"],
|
|
35417
35623
|
NotificationTopicArn: properties["NotificationTopicArn"],
|
|
35418
35624
|
SnapshotName: properties["SnapshotName"],
|
|
35625
|
+
SnapshotArns: properties["SnapshotArns"],
|
|
35419
35626
|
LogDeliveryConfigurations: properties["LogDeliveryConfigurations"],
|
|
35420
35627
|
NetworkType: properties["NetworkType"],
|
|
35421
35628
|
IpDiscovery: properties["IpDiscovery"],
|
|
@@ -35665,6 +35872,7 @@ var ElastiCacheProvider = class {
|
|
|
35665
35872
|
const cluster = await this.describeCacheCluster(cacheClusterId);
|
|
35666
35873
|
const status = cluster?.CacheClusterStatus;
|
|
35667
35874
|
this.logger.debug(`CacheCluster ${cacheClusterId} status: ${status}`);
|
|
35875
|
+
if (status !== void 0 && TERMINAL_CLUSTER_STATUSES.has(status)) throw new Error(safeMsg`CacheCluster ${cacheClusterId} is ${status} and will not become available. Check the cluster's events (aws elasticache describe-events --source-type cache-cluster --source-identifier ${cacheClusterId}) for the reason.`);
|
|
35668
35876
|
const liveNodeType = cluster?.CacheNodeType;
|
|
35669
35877
|
const removalDone = removedNodeIds.length === 0 || cluster?.CacheNodes !== void 0 && !cluster.CacheNodes.some((n) => n.CacheNodeId !== void 0 && removedNodeIds.includes(n.CacheNodeId));
|
|
35670
35878
|
if (status === "available" && removalDone && (expectedNodeType === void 0 || liveNodeType === expectedNodeType)) return;
|
|
@@ -35696,6 +35904,9 @@ var ElastiCacheProvider = class {
|
|
|
35696
35904
|
sleep(ms) {
|
|
35697
35905
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
35698
35906
|
}
|
|
35907
|
+
getDriftUnknownPaths(resourceType) {
|
|
35908
|
+
return resourceType === "AWS::ElastiCache::CacheCluster" ? ["SnapshotArns", "SnapshotName"] : [];
|
|
35909
|
+
}
|
|
35699
35910
|
async readCurrentState(physicalId, _logicalId, resourceType) {
|
|
35700
35911
|
switch (resourceType) {
|
|
35701
35912
|
case "AWS::ElastiCache::CacheCluster": return this.readCacheCluster(physicalId);
|
|
@@ -46166,11 +46377,11 @@ var FSxFileSystemProvider = class {
|
|
|
46166
46377
|
};
|
|
46167
46378
|
|
|
46168
46379
|
// src/provisioning/emr-configuration.ts
|
|
46169
|
-
function isRecord$
|
|
46380
|
+
function isRecord$2(value) {
|
|
46170
46381
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
46171
46382
|
}
|
|
46172
46383
|
function toSdkConfiguration(raw) {
|
|
46173
|
-
if (!isRecord$
|
|
46384
|
+
if (!isRecord$2(raw)) return raw;
|
|
46174
46385
|
const { ConfigurationProperties, Configurations, ...rest } = raw;
|
|
46175
46386
|
return {
|
|
46176
46387
|
...rest,
|
|
@@ -46187,9 +46398,9 @@ function toSdkStepConfigs(value) {
|
|
|
46187
46398
|
if (value === void 0) return void 0;
|
|
46188
46399
|
if (!Array.isArray(value)) return value;
|
|
46189
46400
|
return value.map((step) => {
|
|
46190
|
-
if (!isRecord$
|
|
46401
|
+
if (!isRecord$2(step)) return step;
|
|
46191
46402
|
const hadoopJarStep = step["HadoopJarStep"];
|
|
46192
|
-
if (!isRecord$
|
|
46403
|
+
if (!isRecord$2(hadoopJarStep) || hadoopJarStep["StepProperties"] === void 0) return step;
|
|
46193
46404
|
const { StepProperties, ...restHadoopJarStep } = hadoopJarStep;
|
|
46194
46405
|
return {
|
|
46195
46406
|
...step,
|
|
@@ -46204,7 +46415,7 @@ function toSdkInstanceTypeConfigs(value) {
|
|
|
46204
46415
|
if (value === void 0) return void 0;
|
|
46205
46416
|
if (!Array.isArray(value)) return value;
|
|
46206
46417
|
return value.map((instanceTypeConfig) => {
|
|
46207
|
-
if (!isRecord$
|
|
46418
|
+
if (!isRecord$2(instanceTypeConfig) || instanceTypeConfig["Configurations"] === void 0) return instanceTypeConfig;
|
|
46208
46419
|
return {
|
|
46209
46420
|
...instanceTypeConfig,
|
|
46210
46421
|
Configurations: toSdkConfigurations(instanceTypeConfig["Configurations"])
|
|
@@ -48029,7 +48240,8 @@ var FirehoseProvider = class {
|
|
|
48029
48240
|
"AmazonopensearchserviceDestinationConfiguration",
|
|
48030
48241
|
"SplunkDestinationConfiguration",
|
|
48031
48242
|
"AmazonOpenSearchServerlessDestinationConfiguration",
|
|
48032
|
-
"DeliveryStreamEncryptionConfigurationInput"
|
|
48243
|
+
"DeliveryStreamEncryptionConfigurationInput",
|
|
48244
|
+
"IcebergDestinationConfiguration"
|
|
48033
48245
|
])]]);
|
|
48034
48246
|
getClient() {
|
|
48035
48247
|
if (!this.client) {
|
|
@@ -48181,6 +48393,7 @@ var FirehoseProvider = class {
|
|
|
48181
48393
|
VpcConfiguration: aossConfig["VpcConfiguration"]
|
|
48182
48394
|
};
|
|
48183
48395
|
}
|
|
48396
|
+
if (properties["IcebergDestinationConfiguration"]) input.IcebergDestinationConfiguration = this.mapIcebergDestinationConfiguration(properties["IcebergDestinationConfiguration"]);
|
|
48184
48397
|
if (properties["DeliveryStreamEncryptionConfigurationInput"]) {
|
|
48185
48398
|
const encConfig = properties["DeliveryStreamEncryptionConfigurationInput"];
|
|
48186
48399
|
input.DeliveryStreamEncryptionConfigurationInput = {
|
|
@@ -48760,6 +48973,15 @@ var FirehoseProvider = class {
|
|
|
48760
48973
|
IcebergDestinationUpdate: this.mapIcebergConfigToUpdate(nextConfig)
|
|
48761
48974
|
}));
|
|
48762
48975
|
}
|
|
48976
|
+
mapIcebergDestinationConfiguration(config) {
|
|
48977
|
+
const result = this.mapIcebergConfigToUpdate(config);
|
|
48978
|
+
const catalog = config["CatalogConfiguration"];
|
|
48979
|
+
if (catalog !== void 0) result.CatalogConfiguration = {
|
|
48980
|
+
...catalog["CatalogArn"] !== void 0 && { CatalogARN: catalog["CatalogArn"] },
|
|
48981
|
+
...catalog["WarehouseLocation"] !== void 0 && { WarehouseLocation: catalog["WarehouseLocation"] }
|
|
48982
|
+
};
|
|
48983
|
+
return result;
|
|
48984
|
+
}
|
|
48763
48985
|
mapIcebergConfigToUpdate(config) {
|
|
48764
48986
|
const result = {};
|
|
48765
48987
|
if (config["DestinationTableConfigurationList"] !== void 0) result.DestinationTableConfigurationList = config["DestinationTableConfigurationList"];
|
|
@@ -48768,12 +48990,11 @@ var FirehoseProvider = class {
|
|
|
48768
48990
|
if (config["BufferingHints"] !== void 0) result.BufferingHints = config["BufferingHints"];
|
|
48769
48991
|
if (config["CloudWatchLoggingOptions"] !== void 0) result.CloudWatchLoggingOptions = config["CloudWatchLoggingOptions"];
|
|
48770
48992
|
if (config["ProcessingConfiguration"] !== void 0) result.ProcessingConfiguration = config["ProcessingConfiguration"];
|
|
48771
|
-
if (config["
|
|
48993
|
+
if (config["s3BackupMode"] !== void 0) result.S3BackupMode = config["s3BackupMode"];
|
|
48772
48994
|
if (config["RetryOptions"] !== void 0) result.RetryOptions = config["RetryOptions"];
|
|
48773
48995
|
const roleArn = config["RoleARN"] ?? config["RoleArn"];
|
|
48774
48996
|
if (roleArn !== void 0) result.RoleARN = roleArn;
|
|
48775
48997
|
if (config["AppendOnly"] !== void 0) result.AppendOnly = config["AppendOnly"];
|
|
48776
|
-
if (config["CatalogConfiguration"] !== void 0) result.CatalogConfiguration = config["CatalogConfiguration"];
|
|
48777
48998
|
if (config["S3Configuration"] !== void 0) result.S3Configuration = this.mapS3DestinationConfiguration(config["S3Configuration"]);
|
|
48778
48999
|
return result;
|
|
48779
49000
|
}
|
|
@@ -48865,6 +49086,7 @@ var FirehoseProvider = class {
|
|
|
48865
49086
|
if (directPut?.ThroughputHintInMBs !== void 0) result["DirectPutSourceConfiguration"] = { ThroughputHintInMBs: directPut.ThroughputHintInMBs };
|
|
48866
49087
|
const dest = desc.Destinations?.[0];
|
|
48867
49088
|
if (dest?.ExtendedS3DestinationDescription) result["ExtendedS3DestinationConfiguration"] = mapExtendedS3DescriptionToCfn(dest.ExtendedS3DestinationDescription);
|
|
49089
|
+
else if (dest?.IcebergDestinationDescription) result["IcebergDestinationConfiguration"] = mapIcebergDescriptionToCfn(dest.IcebergDestinationDescription);
|
|
48868
49090
|
else if (dest?.S3DestinationDescription) result["S3DestinationConfiguration"] = mapS3DescriptionToCfn(dest.S3DestinationDescription);
|
|
48869
49091
|
else if (dest?.RedshiftDestinationDescription) result["RedshiftDestinationConfiguration"] = mapRedshiftDescriptionToCfn(dest.RedshiftDestinationDescription);
|
|
48870
49092
|
else if (dest?.ElasticsearchDestinationDescription) result["ElasticsearchDestinationConfiguration"] = mapNonS3DestinationToCfn(dest.ElasticsearchDestinationDescription);
|
|
@@ -49027,6 +49249,31 @@ function mapRedshiftDescriptionToCfn(desc) {
|
|
|
49027
49249
|
if (desc["S3BackupDescription"]) out["S3BackupConfiguration"] = mapS3DescriptionToCfn(desc["S3BackupDescription"]);
|
|
49028
49250
|
return out;
|
|
49029
49251
|
}
|
|
49252
|
+
function mapIcebergDescriptionToCfn(desc) {
|
|
49253
|
+
const out = {};
|
|
49254
|
+
for (const k of [
|
|
49255
|
+
"DestinationTableConfigurationList",
|
|
49256
|
+
"SchemaEvolutionConfiguration",
|
|
49257
|
+
"TableCreationConfiguration",
|
|
49258
|
+
"BufferingHints",
|
|
49259
|
+
"CloudWatchLoggingOptions",
|
|
49260
|
+
"ProcessingConfiguration",
|
|
49261
|
+
"RetryOptions",
|
|
49262
|
+
"RoleARN",
|
|
49263
|
+
"AppendOnly"
|
|
49264
|
+
]) {
|
|
49265
|
+
const v = pickDefinedDeep(desc[k]);
|
|
49266
|
+
if (v !== void 0) out[k] = v;
|
|
49267
|
+
}
|
|
49268
|
+
if (desc["S3BackupMode"] !== void 0) out["s3BackupMode"] = desc["S3BackupMode"];
|
|
49269
|
+
const catalog = desc["CatalogConfiguration"];
|
|
49270
|
+
if (catalog) out["CatalogConfiguration"] = {
|
|
49271
|
+
...catalog["CatalogARN"] !== void 0 && { CatalogArn: catalog["CatalogARN"] },
|
|
49272
|
+
...catalog["WarehouseLocation"] !== void 0 && { WarehouseLocation: catalog["WarehouseLocation"] }
|
|
49273
|
+
};
|
|
49274
|
+
if (desc["S3DestinationDescription"]) out["S3Configuration"] = mapS3DescriptionToCfn(desc["S3DestinationDescription"]);
|
|
49275
|
+
return out;
|
|
49276
|
+
}
|
|
49030
49277
|
function mapHttpEndpointDescriptionToCfn(desc) {
|
|
49031
49278
|
const out = {};
|
|
49032
49279
|
for (const k of [
|
|
@@ -49621,6 +49868,89 @@ function readVisibility(properties, mask) {
|
|
|
49621
49868
|
...typeof role === "string" && role !== "" && { resourceAccessRole: role }
|
|
49622
49869
|
};
|
|
49623
49870
|
}
|
|
49871
|
+
const DEFAULT_WEBHOOK_BUILD_TYPE = "BUILD";
|
|
49872
|
+
const NEW_PROJECT_WEBHOOK_ATTEMPTS = 4;
|
|
49873
|
+
const NEW_PROJECT_WEBHOOK_RETRY_BASE_MS = 2e3;
|
|
49874
|
+
const DEFAULT_WEBHOOK_SOURCE_LOCATION = "CODEBUILD_DEFAULT_WEBHOOK_SOURCE_LOCATION";
|
|
49875
|
+
const DEFAULT_WEBHOOK_SCOPE = "GITHUB_ORGANIZATION";
|
|
49876
|
+
function relayedConnectionRace(error, detail) {
|
|
49877
|
+
if (!(error instanceof Error) || error.name !== "OAuthProviderException") return "";
|
|
49878
|
+
if (detail.includes("security token included in the request is invalid")) return " (The security token included in the request is invalid. (Service: CodeBuild))";
|
|
49879
|
+
if (detail.includes("not authorized to access connection")) return " (The service role is not authorized to perform access to the connection Source.Auth names)";
|
|
49880
|
+
return "";
|
|
49881
|
+
}
|
|
49882
|
+
function isRecord$1(value) {
|
|
49883
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
49884
|
+
}
|
|
49885
|
+
function readTriggers(properties, mask) {
|
|
49886
|
+
const triggers = properties["Triggers"];
|
|
49887
|
+
if (triggers == null) return { kind: "unmanaged" };
|
|
49888
|
+
const refuse = (key, expected, value) => ({
|
|
49889
|
+
kind: "unusable",
|
|
49890
|
+
reason: `AWS::CodeBuild::Project ${key} must be ${expected}, got ${JSON.stringify(maskDeep(value, mask))}`
|
|
49891
|
+
});
|
|
49892
|
+
if (!isRecord$1(triggers)) return refuse("Triggers", "an object", triggers);
|
|
49893
|
+
const declared = triggers["Webhook"];
|
|
49894
|
+
const webhook = declared == null ? void 0 : coerceCfnBoolean(declared);
|
|
49895
|
+
if (declared != null && webhook === void 0) return refuse("Triggers.Webhook", "a boolean", declared);
|
|
49896
|
+
const groups = triggers["FilterGroups"];
|
|
49897
|
+
const buildType = triggers["BuildType"];
|
|
49898
|
+
if (webhook !== true) {
|
|
49899
|
+
for (const [key, value, noun] of [[
|
|
49900
|
+
"FilterGroups",
|
|
49901
|
+
groups,
|
|
49902
|
+
"filter groups"
|
|
49903
|
+
], [
|
|
49904
|
+
"BuildType",
|
|
49905
|
+
buildType,
|
|
49906
|
+
"build type"
|
|
49907
|
+
]]) if (value != null) return {
|
|
49908
|
+
kind: "unusable",
|
|
49909
|
+
reason: `AWS::CodeBuild::Project Triggers.${key}: cannot specify ${noun} when webhook is disabled`
|
|
49910
|
+
};
|
|
49911
|
+
return { kind: webhook === false ? "disabled" : "unmanaged" };
|
|
49912
|
+
}
|
|
49913
|
+
if (buildType != null && typeof buildType !== "string") return refuse("Triggers.BuildType", "a string", buildType);
|
|
49914
|
+
let filterGroups;
|
|
49915
|
+
if (groups != null) {
|
|
49916
|
+
if (!Array.isArray(groups) || !groups.every(Array.isArray)) return refuse("Triggers.FilterGroups", "a list of filter lists", groups);
|
|
49917
|
+
const rows = groups;
|
|
49918
|
+
if (!rows.every((group) => group.every(isRecord$1))) return refuse("Triggers.FilterGroups", "a list of filter lists", groups);
|
|
49919
|
+
filterGroups = rows.map((group) => group.map((filter) => {
|
|
49920
|
+
const excluded = filter["ExcludeMatchedPattern"];
|
|
49921
|
+
return {
|
|
49922
|
+
type: filter["Type"],
|
|
49923
|
+
pattern: filter["Pattern"],
|
|
49924
|
+
...excluded != null && { excludeMatchedPattern: coerceCfnBoolean(excluded) ?? excluded }
|
|
49925
|
+
};
|
|
49926
|
+
}));
|
|
49927
|
+
}
|
|
49928
|
+
const policy = triggers["PullRequestBuildPolicy"];
|
|
49929
|
+
if (policy != null && !isRecord$1(policy)) return refuse("Triggers.PullRequestBuildPolicy", "an object", policy);
|
|
49930
|
+
const scope = triggers["ScopeConfiguration"];
|
|
49931
|
+
if (scope != null && !isRecord$1(scope)) return refuse("Triggers.ScopeConfiguration", "an object", scope);
|
|
49932
|
+
if (scope != null) {
|
|
49933
|
+
const source = properties["Source"];
|
|
49934
|
+
if (!isRecord$1(source) || source["Location"] !== DEFAULT_WEBHOOK_SOURCE_LOCATION) return {
|
|
49935
|
+
kind: "unusable",
|
|
49936
|
+
reason: `AWS::CodeBuild::Project Triggers.ScopeConfiguration: cannot specify a scope when the project source location is not ${DEFAULT_WEBHOOK_SOURCE_LOCATION}`
|
|
49937
|
+
};
|
|
49938
|
+
}
|
|
49939
|
+
return {
|
|
49940
|
+
kind: "enabled",
|
|
49941
|
+
...filterGroups !== void 0 && { filterGroups },
|
|
49942
|
+
...buildType != null && { buildType },
|
|
49943
|
+
...scope != null && { scopeConfiguration: {
|
|
49944
|
+
name: scope["Name"],
|
|
49945
|
+
scope: scope["Scope"] ?? DEFAULT_WEBHOOK_SCOPE,
|
|
49946
|
+
...scope["Domain"] != null && { domain: scope["Domain"] }
|
|
49947
|
+
} },
|
|
49948
|
+
...policy != null && { pullRequestBuildPolicy: {
|
|
49949
|
+
requiresCommentApproval: policy["RequiresCommentApproval"],
|
|
49950
|
+
...policy["ApproverRoles"] != null && { approverRoles: policy["ApproverRoles"] }
|
|
49951
|
+
} }
|
|
49952
|
+
};
|
|
49953
|
+
}
|
|
49624
49954
|
var CodeBuildProvider = class {
|
|
49625
49955
|
client;
|
|
49626
49956
|
createClient;
|
|
@@ -49651,7 +49981,8 @@ var CodeBuildProvider = class {
|
|
|
49651
49981
|
"SourceVersion",
|
|
49652
49982
|
"AutoRetryLimit",
|
|
49653
49983
|
"Visibility",
|
|
49654
|
-
"ResourceAccessRole"
|
|
49984
|
+
"ResourceAccessRole",
|
|
49985
|
+
"Triggers"
|
|
49655
49986
|
])]]);
|
|
49656
49987
|
getClient() {
|
|
49657
49988
|
if (!this.client) {
|
|
@@ -49849,6 +50180,11 @@ var CodeBuildProvider = class {
|
|
|
49849
50180
|
if (context?.replayingState !== true) throw new ProvisioningError(visibilityRead.reason, resourceType, logicalId);
|
|
49850
50181
|
this.logger.warn(mask(`${visibilityRead.reason}. Replaying a state record, so CodeBuild Project ${logicalId} is left ${DEFAULT_PROJECT_VISIBILITY} with no resource access role rather than refusing the restore`));
|
|
49851
50182
|
}
|
|
50183
|
+
const triggersRead = readTriggers(properties, mask);
|
|
50184
|
+
if (triggersRead.kind === "unusable") {
|
|
50185
|
+
if (context?.replayingState !== true) throw new ProvisioningError(triggersRead.reason, resourceType, logicalId);
|
|
50186
|
+
this.logger.warn(mask(`${triggersRead.reason}. Replaying a state record, so CodeBuild Project ${logicalId} gets no webhook rather than refusing the restore`));
|
|
50187
|
+
}
|
|
49852
50188
|
let createdName;
|
|
49853
50189
|
try {
|
|
49854
50190
|
const input = this.mapProperties(() => generatedNameFor("AWS::CodeBuild::Project", logicalId), properties);
|
|
@@ -49857,6 +50193,7 @@ var CodeBuildProvider = class {
|
|
|
49857
50193
|
const projectArn = result.project.arn;
|
|
49858
50194
|
createdName = projectName;
|
|
49859
50195
|
reportCreatedResource(logicalId, resourceType, createdName);
|
|
50196
|
+
if (triggersRead.kind === "enabled") await this.createWebhookOnNewProject(projectName, triggersRead);
|
|
49860
50197
|
if (visibilityRead.kind === "usable" && (visibilityRead.visibility !== DEFAULT_PROJECT_VISIBILITY || visibilityRead.resourceAccessRole !== void 0)) await this.applyVisibility(projectArn, visibilityRead);
|
|
49861
50198
|
this.logger.debug(`Successfully created CodeBuild Project ${logicalId}: ${projectName}`);
|
|
49862
50199
|
return {
|
|
@@ -49866,11 +50203,67 @@ var CodeBuildProvider = class {
|
|
|
49866
50203
|
} catch (error) {
|
|
49867
50204
|
if (createdName !== void 0) markAuxiliaryFailure(error, logicalId);
|
|
49868
50205
|
const cause = error instanceof Error ? error : void 0;
|
|
49869
|
-
const thrown = this.wrapCaughtError(mask, error, (text) => new ProvisioningError(`Failed to create CodeBuild Project ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
|
|
50206
|
+
const thrown = this.wrapCaughtError(mask, error, (text) => new ProvisioningError(`Failed to create CodeBuild Project ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause), createdName === void 0);
|
|
49870
50207
|
if (createdName !== void 0) markCreatedBeforeFailure(thrown, logicalId, resourceType, createdName);
|
|
49871
50208
|
throw thrown;
|
|
49872
50209
|
}
|
|
49873
50210
|
}
|
|
50211
|
+
async createWebhook(projectName, read) {
|
|
50212
|
+
await this.getCreateClient().send(new CreateWebhookCommand({
|
|
50213
|
+
projectName,
|
|
50214
|
+
...read.filterGroups !== void 0 && { filterGroups: read.filterGroups },
|
|
50215
|
+
...read.buildType !== void 0 && { buildType: read.buildType },
|
|
50216
|
+
...read.scopeConfiguration !== void 0 && { scopeConfiguration: read.scopeConfiguration },
|
|
50217
|
+
...read.pullRequestBuildPolicy !== void 0 && { pullRequestBuildPolicy: read.pullRequestBuildPolicy }
|
|
50218
|
+
}));
|
|
50219
|
+
}
|
|
50220
|
+
async createWebhookOnNewProject(projectName, read) {
|
|
50221
|
+
const watch = startInterruptWatch(`The webhook of CodeBuild Project ${projectName}`);
|
|
50222
|
+
let mayHaveLanded = false;
|
|
50223
|
+
try {
|
|
50224
|
+
for (let attempt = 1;; attempt++) try {
|
|
50225
|
+
await this.createWebhook(projectName, read);
|
|
50226
|
+
return;
|
|
50227
|
+
} catch (error) {
|
|
50228
|
+
if (!(error instanceof Error)) throw error;
|
|
50229
|
+
if (mayHaveLanded && error.name === "ResourceAlreadyExistsException") return;
|
|
50230
|
+
const ambiguous = isAmbiguousOutcomeError(error);
|
|
50231
|
+
mayHaveLanded ||= ambiguous;
|
|
50232
|
+
if (!(ambiguous || isRetryableTransientError(error, error.message)) || attempt === NEW_PROJECT_WEBHOOK_ATTEMPTS) throw markNonRetryable(error);
|
|
50233
|
+
let remaining = NEW_PROJECT_WEBHOOK_RETRY_BASE_MS * 2 ** (attempt - 1);
|
|
50234
|
+
while (remaining > 0) {
|
|
50235
|
+
if (watch.isInterrupted()) throw watch.onInterrupted();
|
|
50236
|
+
const chunk = Math.min(1e3, remaining);
|
|
50237
|
+
await this.sleep(chunk);
|
|
50238
|
+
remaining -= chunk;
|
|
50239
|
+
}
|
|
50240
|
+
if (watch.isInterrupted()) throw watch.onInterrupted();
|
|
50241
|
+
}
|
|
50242
|
+
} finally {
|
|
50243
|
+
watch.dispose();
|
|
50244
|
+
}
|
|
50245
|
+
}
|
|
50246
|
+
sleep(ms) {
|
|
50247
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
50248
|
+
}
|
|
50249
|
+
async reconcileWebhook(projectName, read, liveWebhook) {
|
|
50250
|
+
if (read.kind === "disabled" && liveWebhook) {
|
|
50251
|
+
await this.getClient().send(new DeleteWebhookCommand({ projectName }));
|
|
50252
|
+
return;
|
|
50253
|
+
}
|
|
50254
|
+
if (read.kind !== "enabled") return;
|
|
50255
|
+
if (!liveWebhook) {
|
|
50256
|
+
await this.createWebhook(projectName, read);
|
|
50257
|
+
return;
|
|
50258
|
+
}
|
|
50259
|
+
await this.getClient().send(new UpdateWebhookCommand({
|
|
50260
|
+
projectName,
|
|
50261
|
+
filterGroups: read.filterGroups ?? [],
|
|
50262
|
+
buildType: read.buildType ?? DEFAULT_WEBHOOK_BUILD_TYPE,
|
|
50263
|
+
rotateSecret: false,
|
|
50264
|
+
...read.pullRequestBuildPolicy !== void 0 && { pullRequestBuildPolicy: read.pullRequestBuildPolicy }
|
|
50265
|
+
}));
|
|
50266
|
+
}
|
|
49874
50267
|
async applyVisibility(projectArn, read) {
|
|
49875
50268
|
await this.getClient().send(new UpdateProjectVisibilityCommand({
|
|
49876
50269
|
projectArn,
|
|
@@ -49882,6 +50275,11 @@ var CodeBuildProvider = class {
|
|
|
49882
50275
|
this.logger.debug(`Updating CodeBuild Project ${logicalId}: ${physicalId}`);
|
|
49883
50276
|
const mask = maskerOrIdentity(context?.maskSecrets);
|
|
49884
50277
|
assertRegionMatch(context?.expectedRegion ? await this.getClient().config.region() : void 0, context?.expectedRegion, resourceType, logicalId, physicalId, "pre-update");
|
|
50278
|
+
const triggersRead = readTriggers(properties, mask);
|
|
50279
|
+
if (triggersRead.kind === "unusable") {
|
|
50280
|
+
if (context?.replayingState !== true) throw new ProvisioningError(triggersRead.reason, resourceType, logicalId, physicalId);
|
|
50281
|
+
this.logger.warn(mask(`${triggersRead.reason}. Replaying a state record, so the webhook of CodeBuild Project ${physicalId} is left unchanged`));
|
|
50282
|
+
}
|
|
49885
50283
|
try {
|
|
49886
50284
|
const input = this.mapProperties(() => physicalId, properties);
|
|
49887
50285
|
input.name = physicalId;
|
|
@@ -49890,6 +50288,9 @@ var CodeBuildProvider = class {
|
|
|
49890
50288
|
if (!declaredKey(properties["EncryptionKey"]) && declaredKey(previousProperties["EncryptionKey"])) input.encryptionKey = DEFAULT_ENCRYPTION_KEY;
|
|
49891
50289
|
if (properties["Tags"] == null && previousProperties["Tags"] != null) input.tags = [];
|
|
49892
50290
|
const updated = await this.getClient().send(new UpdateProjectCommand(input));
|
|
50291
|
+
const liveWebhook = updated.project?.webhook;
|
|
50292
|
+
await this.reconcileWebhook(physicalId, triggersRead, liveWebhook != null);
|
|
50293
|
+
if (triggersRead.kind === "enabled" && triggersRead.scopeConfiguration !== void 0 && liveWebhook != null && Object.entries(triggersRead.scopeConfiguration).some(([key, value]) => liveWebhook.scopeConfiguration?.[key] !== value)) this.logger.warn(mask(`The Triggers.ScopeConfiguration of CodeBuild Project ${physicalId} differs from its live webhook, which cannot change scope: the webhook keeps its scope. Delete it with Webhook: false, then deploy Webhook: true to apply the new one`));
|
|
49893
50294
|
const desiredVisibility = readVisibility(properties, mask);
|
|
49894
50295
|
const recorded = readVisibility(previousProperties, mask);
|
|
49895
50296
|
if (desiredVisibility.kind === "unusable") {
|
|
@@ -49907,14 +50308,14 @@ var CodeBuildProvider = class {
|
|
|
49907
50308
|
};
|
|
49908
50309
|
} catch (error) {
|
|
49909
50310
|
const cause = error instanceof Error ? error : void 0;
|
|
49910
|
-
throw this.wrapCaughtError(mask, error, (text) => new ProvisioningError(`Failed to update CodeBuild Project ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
50311
|
+
throw this.wrapCaughtError(mask, error, (text) => new ProvisioningError(`Failed to update CodeBuild Project ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause), true);
|
|
49911
50312
|
}
|
|
49912
50313
|
}
|
|
49913
|
-
wrapCaughtError(mask, error, build) {
|
|
50314
|
+
wrapCaughtError(mask, error, build, retryConnectionRace) {
|
|
49914
50315
|
const failure = describeAwsFailure(error);
|
|
49915
50316
|
if (!failure.redacted) return wrapMaskedAwsError(mask, error, build);
|
|
49916
50317
|
this.logger.debug(mask(build(mask(failure.detail)).message));
|
|
49917
|
-
const wrapped = build(`${mask(failure.summary)}${relayedNameCollision(failure.detail)}`);
|
|
50318
|
+
const wrapped = build(`${mask(failure.summary)}${relayedNameCollision(failure.detail)}` + (retryConnectionRace ? relayedConnectionRace(error, failure.detail) : ""));
|
|
49918
50319
|
return error instanceof Error ? markRedactedCause(wrapped) : wrapped;
|
|
49919
50320
|
}
|
|
49920
50321
|
async delete(logicalId, physicalId, resourceType, _properties, context) {
|
|
@@ -49930,7 +50331,7 @@ var CodeBuildProvider = class {
|
|
|
49930
50331
|
return;
|
|
49931
50332
|
}
|
|
49932
50333
|
const cause = error instanceof Error ? error : void 0;
|
|
49933
|
-
const thrown = this.wrapCaughtError(maskerOrIdentity(context?.maskSecrets), error, (text) => new ProvisioningError(`Failed to delete CodeBuild Project ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
50334
|
+
const thrown = this.wrapCaughtError(maskerOrIdentity(context?.maskSecrets), error, (text) => new ProvisioningError(`Failed to delete CodeBuild Project ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause), false);
|
|
49934
50335
|
throw error instanceof Error && error.name.includes("NotFound") ? markNotGone(thrown) : thrown;
|
|
49935
50336
|
}
|
|
49936
50337
|
}
|
|
@@ -50110,7 +50511,7 @@ var CodeBuildProvider = class {
|
|
|
50110
50511
|
return result;
|
|
50111
50512
|
}
|
|
50112
50513
|
getDriftUnknownPaths() {
|
|
50113
|
-
return ["Source.Auth"];
|
|
50514
|
+
return ["Source.Auth", "Triggers"];
|
|
50114
50515
|
}
|
|
50115
50516
|
async import(input) {
|
|
50116
50517
|
const explicit = resolveExplicitPhysicalId(input, "Name");
|
|
@@ -54317,4 +54718,4 @@ var ACMCertificateProvider = class {
|
|
|
54317
54718
|
};
|
|
54318
54719
|
|
|
54319
54720
|
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 };
|
|
54320
|
-
//# sourceMappingURL=provider-classes-
|
|
54721
|
+
//# sourceMappingURL=provider-classes-DGFOKPO9.js.map
|