@go-to-k/cdkd 0.302.1 → 0.302.3
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-BpRcm_UB.js → asg-provider-DCrwgSCZ.js} +27 -9
- package/dist/asg-provider-DCrwgSCZ.js.map +1 -0
- package/dist/cli.js +2 -2
- package/dist/{deploy-engine-CYVt2NQR.js → deploy-engine-D9SDE-Pj.js} +359 -4269
- package/dist/deploy-engine-D9SDE-Pj.js.map +1 -0
- package/dist/{iam-policy-targets-CmHNH1DY.js → iam-policy-targets-OtGPguLH.js} +3 -2
- package/dist/{iam-policy-targets-CmHNH1DY.js.map → iam-policy-targets-OtGPguLH.js.map} +1 -1
- package/dist/{iam-role-provider-R1GC6KcT.js → iam-role-provider-Q1sv3tF1.js} +9 -5
- package/dist/iam-role-provider-Q1sv3tF1.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/{neptune-provider-DzTl6-74.js → neptune-provider-DjVgEWGf.js} +121 -11
- package/dist/neptune-provider-DjVgEWGf.js.map +1 -0
- package/dist/{program-CvRs5pV_.js → program-DSbJoNKe.js} +559 -305
- package/dist/program-DSbJoNKe.js.map +1 -0
- package/dist/{provider-classes-B2_u4Fg0.js → provider-classes-CDtquwkU.js} +673 -131
- package/dist/provider-classes-CDtquwkU.js.map +1 -0
- package/dist/{rds-provider-CmKbYAvr.js → rds-provider-ByCpdpUq.js} +208 -42
- package/dist/rds-provider-ByCpdpUq.js.map +1 -0
- package/dist/secret-redaction-BHWS-PZK.js +3937 -0
- package/dist/secret-redaction-BHWS-PZK.js.map +1 -0
- package/dist/{version-CaejipV3.js → version-DDpKuzTw.js} +2 -2
- package/dist/{version-CaejipV3.js.map → version-DDpKuzTw.js.map} +1 -1
- package/package.json +2 -2
- package/dist/asg-provider-BpRcm_UB.js.map +0 -1
- package/dist/deploy-engine-CYVt2NQR.js.map +0 -1
- package/dist/iam-role-provider-R1GC6KcT.js.map +0 -1
- package/dist/neptune-provider-DzTl6-74.js.map +0 -1
- package/dist/program-CvRs5pV_.js.map +0 -1
- package/dist/provider-classes-B2_u4Fg0.js.map +0 -1
- package/dist/rds-provider-CmKbYAvr.js.map +0 -1
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { r as getAwsClients } from "./aws-clients-B_CEQGE1.js";
|
|
2
2
|
import { B as SECRET_REF_MAX_CODE_POINTS, C as generateResourceName, D as getCurrentStackInstanceId, J as displayStackName, K as displayIdent, M as recordedGeneratedNameKept, Q as safeMsg, T as generatedNameFor, Y as isPasteableIdent, Z as plainIdentOr, a as safeStringify, i as isAwsAuthoredFailure, k as isBeforeStateRead, n as describeAwsFailure, q as displaySafe, r as describeAwsStatusReason, s as getLogger, w as generateResourceNameWithFallback } from "./aws-failure-text-e_ddrDDo.js";
|
|
3
|
-
import { $ as protectedReplacementAdvice, $t as ambientCredentialConfig, A as isQuotableImportValue, B as isTerminalDeleteFailure, Bn as plainOrDescribed, C as setBounded, D as VALUE_NOT_SHOWN, E as assertRegionMatch, F as resolveExplicitPhysicalId, Fn as commandHole, H as observeThenDisableProtection, In as hasClauseBreak, Kt as injectiveKey, L as ProtectionFlipRegistry, Ln as isInertUnquoted, M as quotedRemedyLogicalId, Mt as markCreatedBeforeFailure, N as refusalTypeShown, Nt as markSupersedesEarlierCreate, O as isPlainImportJson, P as remedyLogicalId, Q as pasteableAwsCommand, Qt as ambientClientDefaults, Rn as pasteableCommand, S as replayedSendWindow, St as withDerivedNameMasks, T as RESOURCE_NOT_FOUND, Tt as clearCreatedBeforeFailure, U as protectionFlipKey, Un as shellQuote, V as logGroupProtectionSite, W as rdsFamilyProtectionSite, Wn as withheldTargetClause, X as WITHHELD_AWS_COMMAND, Y as UNNAMEABLE_ID_CLAUSE, Yn as isNameCollisionError, Z as isAwsCliLiteral, Zt as withPasteableAwsProfile, _ as RecentIdSet, _r as isThrottlingError, _t as createMaskedLogSinks, a as onlySecretDerived, at as startInterruptWatch, b as isInsideWindow, br as wrapMaskedAwsError, bt as maskDeep, c as recordedPrincipalsRepair, ct as canonicalizeRoute53QueryName, dt as compositeIdSkipResult, en as clientDefaultsFor, er as markNameCollision, et as renderDisableCommand, fr as isRetryableTransientError, ft as logicalIdShown, g as AmbiguousCreateLatch, gr as isMarkedNonRetryable, gt as stateOrphanRecordRemedy, h as AMBIGUOUS_LATCH_TTL_MS, hr as THROTTLING_ERROR_NAMES, ht as segmentAfterAnchor, i as holdsSecretDerivedEntry, in as CdkdError, it as isInterruptedWaitError, j as normalizeAwsTagsToCfn, jt as markAuxiliaryFailure, k as isPlainImportValue, lr as isAmbiguousOutcomeError, lt as compositeIdFormatMessage, nn as AccountIdUnavailableError, nr as relayedNameCollision, o as readPrincipalLists, or as explicitDenyPolicyKind, ot as ElapsedBudgetRegistry, p as withRemovalDefaults, pr as isTransientServerError, pt as packCompositeId, q as userPoolProtectionSite, qt as injectiveKeyPrefix, r as SECRET_DERIVED_READ_LIVE, tn as credentialFingerprint, tr as markReplayMayCollide, u as clearOnUpdateRemoval, ur as isExplicitDenyError, ut as compositeIdSeparatorRefusal, v as ambiguousAttemptLead, vr as markNonRetryable, vt as createMaskedRetryLogger, w as withoutServerErrorRetries, x as replayFollowedAmbiguousAttempt, xn as ResourceUpdateNotSupportedError, xt as maskerOrIdentity, y as createAttemptKey, yn as ProvisioningError, yr as markRedactedCause, yt as isSecretDerivedValue, z as deleteWithProtectionCompensation } from "./iam-policy-targets-
|
|
3
|
+
import { $ as protectedReplacementAdvice, $t as ambientCredentialConfig, A as isQuotableImportValue, B as isTerminalDeleteFailure, Bn as plainOrDescribed, C as setBounded, D as VALUE_NOT_SHOWN, E as assertRegionMatch, F as resolveExplicitPhysicalId, Fn as commandHole, H as observeThenDisableProtection, In as hasClauseBreak, Kt as injectiveKey, L as ProtectionFlipRegistry, Ln as isInertUnquoted, M as quotedRemedyLogicalId, Mt as markCreatedBeforeFailure, N as refusalTypeShown, Nt as markSupersedesEarlierCreate, O as isPlainImportJson, P as remedyLogicalId, Q as pasteableAwsCommand, Qt as ambientClientDefaults, Rn as pasteableCommand, S as replayedSendWindow, St as withDerivedNameMasks, T as RESOURCE_NOT_FOUND, Tt as clearCreatedBeforeFailure, U as protectionFlipKey, Un as shellQuote, V as logGroupProtectionSite, W as rdsFamilyProtectionSite, Wn as withheldTargetClause, X as WITHHELD_AWS_COMMAND, Y as UNNAMEABLE_ID_CLAUSE, Yn as isNameCollisionError, Z as isAwsCliLiteral, Zt as withPasteableAwsProfile, _ as RecentIdSet, _r as isThrottlingError, _t as createMaskedLogSinks, a as onlySecretDerived, at as startInterruptWatch, b as isInsideWindow, br as wrapMaskedAwsError, bt as maskDeep, c as recordedPrincipalsRepair, ct as canonicalizeRoute53QueryName, dt as compositeIdSkipResult, en as clientDefaultsFor, er as markNameCollision, et as renderDisableCommand, fr as isRetryableTransientError, ft as logicalIdShown, g as AmbiguousCreateLatch, gr as isMarkedNonRetryable, gt as stateOrphanRecordRemedy, h as AMBIGUOUS_LATCH_TTL_MS, hr as THROTTLING_ERROR_NAMES, ht as segmentAfterAnchor, i as holdsSecretDerivedEntry, in as CdkdError, it as isInterruptedWaitError, j as normalizeAwsTagsToCfn, jt as markAuxiliaryFailure, k as isPlainImportValue, kt as isAuxiliaryFailure, lr as isAmbiguousOutcomeError, lt as compositeIdFormatMessage, nn as AccountIdUnavailableError, nr as relayedNameCollision, o as readPrincipalLists, or as explicitDenyPolicyKind, ot as ElapsedBudgetRegistry, p as withRemovalDefaults, pr as isTransientServerError, pt as packCompositeId, q as userPoolProtectionSite, qt as injectiveKeyPrefix, r as SECRET_DERIVED_READ_LIVE, tn as credentialFingerprint, tr as markReplayMayCollide, u as clearOnUpdateRemoval, ur as isExplicitDenyError, ut as compositeIdSeparatorRefusal, v as ambiguousAttemptLead, vr as markNonRetryable, vt as createMaskedRetryLogger, w as withoutServerErrorRetries, x as replayFollowedAmbiguousAttempt, xn as ResourceUpdateNotSupportedError, xt as maskerOrIdentity, y as createAttemptKey, yn as ProvisioningError, yr as markRedactedCause, yt as isSecretDerivedValue, z as deleteWithProtectionCompensation } from "./iam-policy-targets-OtGPguLH.js";
|
|
4
4
|
import { s as ambientRegion } from "./aws-client-defaults-DBXBcg0J.js";
|
|
5
|
-
import { Ar as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
5
|
+
import { An as awaitInFlightSibling, Ar as isRefusedByName, Bc as decodeListingKey, Bo as isWarmThroughputDecrease, Br as stringifyIfAssigned, C as hasCdkAutoDeleteTag, Ci as s3BucketArn, Di as s3BucketWebsiteUrl, Do as findSilentDropProperties, Dt as lookupEachName, E as markRefusedBeforeApplying, Ei as s3BucketRegionalDomainName, Er as acquireIdempotencyToken, Et as isAccessDeniedError, F as findNestedTemplateTreeDefect, Fr as readTagList, Go as configBooleanRefusal, Gt as getCurrentProducerRegions, Ho as toFiniteNumber, I as isAbsoluteAssetPath, Ir as refuseMalformedDesiredTags, Is as stringifyValue, Jo as readConfigString, Jt as isRedactedRecordedValue, Ko as configIntegerRefusal, Kr as waitForLambdaFunctionActive, L as listNestedTemplateRows, Lr as tagMapAsList, Mi as outputReferenceProvenanceOf, Mn as getStackRecords, Mr as DBPROXY_TAGS_WHAT, Nr as DBPROXY_TAG_OPTIONS, Ot as withApiLimit, Pn as replacedDeleteFailureVerdict, Pr as planTagDiff, Qi as getAccountInfo, Qo as requireConfigString, R as renderNestedTemplateTreeDefect, Ro as WARM_THROUGHPUT_MEMBERS, Rr as tagPlanWarning, S as S3_AUTO_DELETE_OBJECTS_TAG, Si as isSettledInstanceState, Sr as earliestDefined, T as getPriorAttempts, Ti as s3BucketDualStackDomainName, To as withheldAccountClause, Tt as chunks, Uc as canonicalizeRegion, Uo as coerceCfnBoolean, Vo as toCfnInteger, Vs as rewriteTemplateAssetReferences, W as enclosingDeadlineRemainingMs, Wc as derivePartitionAndUrlSuffix, Wo as coerceCfnInteger, Xo as requireConfigArray, Xr as getCurrentResourceSecrets, Xt as redactedDeleteAddressSkip, Yo as replayWarn, Yt as redactedDeleteAddressFields, Zo as requireConfigObject, _ as deleteTableWithIndexBusyRetry, _i as reEnableInstanceApiTermination, as as sameLambdaFunctionAddress, b as waitForIndexesSettled, c as DynamoDBGlobalTableProvider, ca as parseWebACLArn, ci as deleteSkipReason, d as compensateRemovedDeletionProtection, da as passedParameterClassesOf, di as markWaitAbandoned, el as describeFileReadFailure, f as deleteBudgetKey, g as INDEX_SETTLE_POLL_INTERVAL_MS, gi as reDisableInstanceApiTermination, h as DELETE_INDEX_WAIT_PROCEED_NOTE, hi as observeThenDisableInstanceApiTermination, ht as withNestedStackContext, is as lambdaFunctionNameForMask, jr as markDeleteStarted, ko as withoutSilentDropProperties, l as DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS, li as withIndeterminateGuard, lr as secretNamedAttributeNamesOf, m as resolveDynamoDbDeleteBudgetMs, mi as isTerminationProtectionPropagationError, mt as getCurrentNestedStackContext, ni as slowCcOperationTimeoutMs, nl as renderAssemblyPathEscape, ns as withRetry, p as resolveDynamoDbDeleteBudgetClock, pi as ec2InstanceProtectionSite, po as refuseMalformedResourcesForDestroy, qa as refuseMalformedNestedChildOutputs, qo as configStringRefusal, qt as REDACTED_DELETE_ADDRESS_SKIP_REASON, ri as unchangedBehindSecretReference, rl as resolveAssemblyPath, rs as canonicalLambdaFunctionName, st as getNestedRevertRun, t as DeployEngine, tl as displayAssemblyPath, u as beginDeleteWait, ui as isWaitAbandonedError, ut as revertNestedChildFromJournal, v as maskedLogger, va as accountArgs, w as isTruthyCfnBoolean, wi as s3BucketDomainName, wr as reserveStackCreateToken, x as ECR_AUTO_DELETE_IMAGES_TAG, y as relayedIndexBusyDelete, zo as coerceWarmThroughput$1, zr as definedAttributes } from "./deploy-engine-D9SDE-Pj.js";
|
|
6
|
+
import { D as markSameGenerationBag, F as redactForState, H as recordReferenceProvenanceEntry, Jt as physicalNameCopiesOf, Tt as dynamicReferenceTokens, W as snapshotPassProvenance, Y as hasMaskableValues, Yt as recordAttributeIdCopy, m as passedNoEchoParametersOf, nn as carriesSecretMask, qt as recoverMaskedOutput, xt as withoutPhysicalNameCopies } from "./secret-redaction-BHWS-PZK.js";
|
|
7
|
+
import { n as collectInlinePolicyNamesManagedBySiblings, r as IamCreateClientCache, t as IAMRoleProvider } from "./iam-role-provider-Q1sv3tF1.js";
|
|
8
|
+
import { a as resolveSecretDerivedPrincipals, i as isResolvableSecretPrincipalList, n as runDestroyForStack, o as canonicalizeIpProtocolValue, r as holdsUnprovenSecretPrincipalToken, s as resolvedResourceTimeoutMs, t as canonicalizeIpv4Cidr } from "./program-DSbJoNKe.js";
|
|
9
|
+
import { RDSProvider } from "./rds-provider-ByCpdpUq.js";
|
|
10
|
+
import { NeptuneProvider } from "./neptune-provider-DjVgEWGf.js";
|
|
11
|
+
import { ASGProvider } from "./asg-provider-DCrwgSCZ.js";
|
|
11
12
|
import { createHash, randomUUID } from "node:crypto";
|
|
12
13
|
import { CreateBucketCommand, DeleteBucketAnalyticsConfigurationCommand, DeleteBucketCommand, DeleteBucketCorsCommand, DeleteBucketEncryptionCommand, DeleteBucketIntelligentTieringConfigurationCommand, DeleteBucketInventoryConfigurationCommand, DeleteBucketLifecycleCommand, DeleteBucketMetricsConfigurationCommand, DeleteBucketOwnershipControlsCommand, DeleteBucketPolicyCommand, DeleteBucketReplicationCommand, DeleteBucketTaggingCommand, DeleteBucketWebsiteCommand, DeleteObjectsCommand, GetBucketAccelerateConfigurationCommand, GetBucketCorsCommand, GetBucketEncryptionCommand, GetBucketLifecycleConfigurationCommand, GetBucketLocationCommand, GetBucketLoggingCommand, GetBucketNotificationConfigurationCommand, GetBucketOwnershipControlsCommand, GetBucketPolicyCommand, GetBucketReplicationCommand, GetBucketTaggingCommand, GetBucketVersioningCommand, GetBucketWebsiteCommand, GetObjectCommand, GetObjectLockConfigurationCommand, GetPublicAccessBlockCommand, HeadBucketCommand, ListBucketAnalyticsConfigurationsCommand, ListBucketIntelligentTieringConfigurationsCommand, ListBucketInventoryConfigurationsCommand, ListBucketMetricsConfigurationsCommand, ListBucketsCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchBucket, PutBucketAccelerateConfigurationCommand, PutBucketAnalyticsConfigurationCommand, PutBucketCorsCommand, PutBucketEncryptionCommand, PutBucketIntelligentTieringConfigurationCommand, PutBucketInventoryConfigurationCommand, PutBucketLifecycleConfigurationCommand, PutBucketLoggingCommand, PutBucketMetricsConfigurationCommand, PutBucketNotificationConfigurationCommand, PutBucketOwnershipControlsCommand, PutBucketPolicyCommand, PutBucketReplicationCommand, PutBucketTaggingCommand, PutBucketVersioningCommand, PutBucketWebsiteCommand, PutObjectLockConfigurationCommand, PutPublicAccessBlockCommand, S3Client } from "@aws-sdk/client-s3";
|
|
13
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, UpdateLoginProfileCommand } from "@aws-sdk/client-iam";
|
|
@@ -48,8 +49,8 @@ import { AddCustomAttributesCommand, CognitoIdentityProviderClient, CreateUserPo
|
|
|
48
49
|
import { CreateHttpNamespaceCommand, CreatePrivateDnsNamespaceCommand, CreatePublicDnsNamespaceCommand, CreateServiceCommand as CreateServiceCommand$1, DeleteNamespaceCommand, DeleteServiceAttributesCommand, DeleteServiceCommand as DeleteServiceCommand$1, GetNamespaceCommand, GetOperationCommand, GetServiceAttributesCommand, GetServiceCommand, ListNamespacesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$14, NamespaceNotFound, ResourceInUse, ServiceDiscoveryClient, ServiceNotFound, TagResourceCommand as TagResourceCommand$16, UntagResourceCommand as UntagResourceCommand$16, UpdateHttpNamespaceCommand, UpdatePrivateDnsNamespaceCommand, UpdatePublicDnsNamespaceCommand, UpdateServiceAttributesCommand, UpdateServiceCommand as UpdateServiceCommand$1 } from "@aws-sdk/client-servicediscovery";
|
|
49
50
|
import { AppSyncClient, CreateApiKeyCommand, CreateDataSourceCommand, CreateGraphqlApiCommand, CreateResolverCommand, DeleteApiKeyCommand, DeleteDataSourceCommand, DeleteGraphqlApiCommand, DeleteResolverCommand, GetDataSourceCommand, GetGraphqlApiCommand, GetGraphqlApiEnvironmentVariablesCommand, GetIntrospectionSchemaCommand, GetResolverCommand, ListApiKeysCommand, ListGraphqlApisCommand, NotFoundException as NotFoundException$4, PutGraphqlApiEnvironmentVariablesCommand, StartSchemaCreationCommand, TagResourceCommand as TagResourceCommand$17, UntagResourceCommand as UntagResourceCommand$17, UpdateApiKeyCommand, UpdateDataSourceCommand, UpdateGraphqlApiCommand, UpdateResolverCommand } from "@aws-sdk/client-appsync";
|
|
50
51
|
import { ConcurrentModificationException, CrawlerRunningException, CreateConnectionCommand, CreateCrawlerCommand, CreateDatabaseCommand, CreateJobCommand, CreateSecurityConfigurationCommand, CreateTableCommand as CreateTableCommand$1, CreateTriggerCommand, CreateWorkflowCommand, DeleteConnectionCommand, DeleteCrawlerCommand, DeleteDatabaseCommand, DeleteJobCommand, DeleteSecurityConfigurationCommand, DeleteTableCommand as DeleteTableCommand$1, DeleteTriggerCommand, DeleteWorkflowCommand, EntityNotFoundException, GetConnectionCommand, GetCrawlerCommand, GetDatabaseCommand, GetJobCommand, GetSecurityConfigurationCommand, GetTableCommand, GetTagsCommand, GetTriggerCommand, GetWorkflowCommand, GlueClient, StartCrawlerScheduleCommand, StartTriggerCommand, StopCrawlerCommand, StopCrawlerScheduleCommand, StopTriggerCommand, TagResourceCommand as TagResourceCommand$18, UntagResourceCommand as UntagResourceCommand$18, UpdateConnectionCommand, UpdateCrawlerCommand, UpdateDatabaseCommand, UpdateJobCommand, UpdateTableCommand as UpdateTableCommand$1, UpdateTriggerCommand, UpdateWorkflowCommand } from "@aws-sdk/client-glue";
|
|
51
|
-
import { BudgetsClient, CreateBudgetCommand, CreateNotificationCommand, CreateSubscriberCommand, DeleteBudgetCommand, DeleteNotificationCommand, DeleteSubscriberCommand, DescribeBudgetCommand, DuplicateRecordException, NotFoundException as NotFoundException$5, TagResourceCommand as TagResourceCommand$19, UntagResourceCommand as UntagResourceCommand$19, UpdateBudgetCommand } from "@aws-sdk/client-budgets";
|
|
52
|
-
import { AddTagsToStreamCommand, CreateStreamCommand, DecreaseStreamRetentionPeriodCommand, DeleteStreamCommand, DeregisterStreamConsumerCommand, DescribeStreamCommand, DescribeStreamConsumerCommand, DescribeStreamSummaryCommand, DisableEnhancedMonitoringCommand, EnableEnhancedMonitoringCommand, IncreaseStreamRetentionPeriodCommand, KinesisClient, ListTagsForResourceCommand as ListTagsForResourceCommand$
|
|
52
|
+
import { BudgetsClient, CreateBudgetCommand, CreateNotificationCommand, CreateSubscriberCommand, DeleteBudgetCommand, DeleteNotificationCommand, DeleteSubscriberCommand, DescribeBudgetCommand, DescribeNotificationsForBudgetCommand, DescribeSubscribersForNotificationCommand, DuplicateRecordException, ListTagsForResourceCommand as ListTagsForResourceCommand$15, NotFoundException as NotFoundException$5, TagResourceCommand as TagResourceCommand$19, UntagResourceCommand as UntagResourceCommand$19, UpdateBudgetCommand } from "@aws-sdk/client-budgets";
|
|
53
|
+
import { AddTagsToStreamCommand, CreateStreamCommand, DecreaseStreamRetentionPeriodCommand, DeleteStreamCommand, DeregisterStreamConsumerCommand, DescribeStreamCommand, DescribeStreamConsumerCommand, DescribeStreamSummaryCommand, DisableEnhancedMonitoringCommand, EnableEnhancedMonitoringCommand, IncreaseStreamRetentionPeriodCommand, KinesisClient, ListTagsForResourceCommand as ListTagsForResourceCommand$16, ListTagsForStreamCommand, RegisterStreamConsumerCommand, RemoveTagsFromStreamCommand, ResourceNotFoundException as ResourceNotFoundException$12, StartStreamEncryptionCommand, StopStreamEncryptionCommand, TagResourceCommand as TagResourceCommand$20, UntagResourceCommand as UntagResourceCommand$20, UpdateMaxRecordSizeCommand, UpdateShardCountCommand, UpdateStreamModeCommand } from "@aws-sdk/client-kinesis";
|
|
53
54
|
import { CreateScheduleCommand, DeleteScheduleCommand, GetScheduleCommand, ListSchedulesCommand, ResourceNotFoundException as ResourceNotFoundException$13, SchedulerClient, UpdateScheduleCommand } from "@aws-sdk/client-scheduler";
|
|
54
55
|
import { CreatePipeCommand, DeletePipeCommand, DescribePipeCommand, NotFoundException as NotFoundException$6, PipesClient, TagResourceCommand as TagResourceCommand$21, UntagResourceCommand as UntagResourceCommand$21, UpdatePipeCommand } from "@aws-sdk/client-pipes";
|
|
55
56
|
import { AccessPointAlreadyExists, AccessPointNotFound, CreateAccessPointCommand, CreateFileSystemCommand, CreateMountTargetCommand, DeleteAccessPointCommand, DeleteFileSystemCommand, DeleteMountTargetCommand, DescribeAccessPointsCommand, DescribeBackupPolicyCommand, DescribeFileSystemPolicyCommand, DescribeFileSystemsCommand, DescribeLifecycleConfigurationCommand, DescribeMountTargetSecurityGroupsCommand, DescribeMountTargetsCommand, EFSClient, FileSystemAlreadyExists, FileSystemNotFound, ModifyMountTargetSecurityGroupsCommand, MountTargetNotFound, PutBackupPolicyCommand, PutFileSystemPolicyCommand, PutLifecycleConfigurationCommand, UpdateFileSystemCommand, UpdateFileSystemProtectionCommand } from "@aws-sdk/client-efs";
|
|
@@ -58,11 +59,11 @@ import { AddInstanceFleetCommand, AddInstanceGroupsCommand, AddTagsCommand as Ad
|
|
|
58
59
|
import { CreateDeliveryStreamCommand, DeleteDeliveryStreamCommand, DescribeDeliveryStreamCommand, FirehoseClient, ListTagsForDeliveryStreamCommand, ResourceNotFoundException as ResourceNotFoundException$14, TagDeliveryStreamCommand, UntagDeliveryStreamCommand, UpdateDestinationCommand } from "@aws-sdk/client-firehose";
|
|
59
60
|
import { AddTagsCommand as AddTagsCommand$2, CloudTrailClient, CreateTrailCommand, DeleteTrailCommand, GetEventSelectorsCommand, GetInsightSelectorsCommand, GetTrailCommand, GetTrailStatusCommand, ListTagsCommand as ListTagsCommand$2, PutEventSelectorsCommand, PutInsightSelectorsCommand, RemoveTagsCommand as RemoveTagsCommand$2, StartLoggingCommand, StopLoggingCommand, TrailNotFoundException, UpdateTrailCommand } from "@aws-sdk/client-cloudtrail";
|
|
60
61
|
import { BatchGetProjectsCommand, CodeBuildClient, CreateProjectCommand, DeleteProjectCommand, ResourceNotFoundException as ResourceNotFoundException$15, UpdateProjectCommand } from "@aws-sdk/client-codebuild";
|
|
61
|
-
import { CodeCommitClient, CreateCommitCommand, CreateRepositoryCommand as CreateRepositoryCommand$1, DeleteRepositoryCommand as DeleteRepositoryCommand$1, GetRepositoryCommand, GetRepositoryTriggersCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$
|
|
62
|
+
import { CodeCommitClient, CreateCommitCommand, CreateRepositoryCommand as CreateRepositoryCommand$1, DeleteRepositoryCommand as DeleteRepositoryCommand$1, GetRepositoryCommand, GetRepositoryTriggersCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$17, PutRepositoryTriggersCommand, RepositoryDoesNotExistException, TagResourceCommand as TagResourceCommand$23, UntagResourceCommand as UntagResourceCommand$23, UpdateRepositoryDescriptionCommand, UpdateRepositoryEncryptionKeyCommand, UpdateRepositoryNameCommand } from "@aws-sdk/client-codecommit";
|
|
62
63
|
import { CreateLifecyclePolicyCommand, DLMClient, DeleteLifecyclePolicyCommand as DeleteLifecyclePolicyCommand$1, GetLifecyclePoliciesCommand, GetLifecyclePolicyCommand as GetLifecyclePolicyCommand$1, ResourceNotFoundException as ResourceNotFoundException$16, TagResourceCommand as TagResourceCommand$24, UntagResourceCommand as UntagResourceCommand$24, UpdateLifecyclePolicyCommand } from "@aws-sdk/client-dlm";
|
|
63
|
-
import { CreateVectorBucketCommand, DeleteIndexCommand, DeleteVectorBucketCommand, GetVectorBucketCommand, ListIndexesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$
|
|
64
|
-
import { ListTagsForResourceCommand as ListTagsForResourceCommand$
|
|
65
|
-
import { CreateNamespaceCommand, CreateTableBucketCommand, CreateTableCommand as CreateTableCommand$2, DeleteNamespaceCommand as DeleteNamespaceCommand$1, DeleteTableBucketCommand, DeleteTableCommand as DeleteTableCommand$2, GetNamespaceCommand as GetNamespaceCommand$1, GetTableBucketCommand, GetTableCommand as GetTableCommand$1, ListNamespacesCommand as ListNamespacesCommand$1, ListTableBucketsCommand, ListTablesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$
|
|
64
|
+
import { CreateVectorBucketCommand, DeleteIndexCommand, DeleteVectorBucketCommand, GetVectorBucketCommand, ListIndexesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$18, S3VectorsClient, TagResourceCommand as TagResourceCommand$25, UntagResourceCommand as UntagResourceCommand$25 } from "@aws-sdk/client-s3vectors";
|
|
65
|
+
import { ListTagsForResourceCommand as ListTagsForResourceCommand$19, S3ControlClient, TagResourceCommand as TagResourceCommand$26, UntagResourceCommand as UntagResourceCommand$26 } from "@aws-sdk/client-s3-control";
|
|
66
|
+
import { CreateNamespaceCommand, CreateTableBucketCommand, CreateTableCommand as CreateTableCommand$2, DeleteNamespaceCommand as DeleteNamespaceCommand$1, DeleteTableBucketCommand, DeleteTableCommand as DeleteTableCommand$2, GetNamespaceCommand as GetNamespaceCommand$1, GetTableBucketCommand, GetTableCommand as GetTableCommand$1, ListNamespacesCommand as ListNamespacesCommand$1, ListTableBucketsCommand, ListTablesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$20, NotFoundException as NotFoundException$7, S3TablesClient, TagResourceCommand as TagResourceCommand$27, UntagResourceCommand as UntagResourceCommand$27 } from "@aws-sdk/client-s3tables";
|
|
66
67
|
|
|
67
68
|
//#region src/provisioning/providers/iam-policy-provider.ts
|
|
68
69
|
const POLICY_NAME_SKIP_REASON = "no policy name in state — no delete issued";
|
|
@@ -116,7 +117,11 @@ var IAMPolicyProvider = class {
|
|
|
116
117
|
iamClient;
|
|
117
118
|
logger = getLogger().child("IAMPolicyProvider");
|
|
118
119
|
wrapMaskedError(mask, error, build) {
|
|
119
|
-
|
|
120
|
+
const failure = describeAwsFailure(error);
|
|
121
|
+
if (!(error instanceof Error)) return build(mask(failure.detail));
|
|
122
|
+
if (!failure.redacted) return wrapMaskedAwsError(mask, error, build);
|
|
123
|
+
this.logger.debug(mask(build(mask(failure.detail)).message));
|
|
124
|
+
return markRedactedCause(build(`${mask(failure.summary)}${relayedNameCollision(failure.detail)}`));
|
|
120
125
|
}
|
|
121
126
|
handledProperties = /* @__PURE__ */ new Map([["AWS::IAM::Policy", /* @__PURE__ */ new Set([
|
|
122
127
|
"PolicyName",
|
|
@@ -515,7 +520,8 @@ var IAMPolicyProvider = class {
|
|
|
515
520
|
this.logger.debug(`Successfully deleted IAM policy ${logicalId}`);
|
|
516
521
|
} catch (error) {
|
|
517
522
|
const cause = error instanceof Error ? error : void 0;
|
|
518
|
-
const
|
|
523
|
+
const opMask = createMaskedLogSinks(this.logger, context?.maskSecrets).mask;
|
|
524
|
+
const failure = this.wrapMaskedError((text) => mask(opMask(text)), error, (text) => new ProvisioningError(`Failed to delete IAM policy ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
519
525
|
throw maskError(removedAny ? markDeleteStarted(failure) : failure);
|
|
520
526
|
}
|
|
521
527
|
}
|
|
@@ -597,7 +603,11 @@ var IAMManagedPolicyProvider = class {
|
|
|
597
603
|
createClient = new IamCreateClientCache(() => this.iamClient);
|
|
598
604
|
logger = getLogger().child("IAMManagedPolicyProvider");
|
|
599
605
|
wrapMaskedError(mask, error, build) {
|
|
600
|
-
|
|
606
|
+
const failure = describeAwsFailure(error);
|
|
607
|
+
if (!(error instanceof Error)) return build(mask(failure.detail));
|
|
608
|
+
if (!failure.redacted) return wrapMaskedAwsError(mask, error, build);
|
|
609
|
+
this.logger.debug(mask(build(mask(failure.detail)).message));
|
|
610
|
+
return markRedactedCause(build(`${mask(failure.summary)}${relayedNameCollision(failure.detail)}`));
|
|
601
611
|
}
|
|
602
612
|
handledProperties = /* @__PURE__ */ new Map([["AWS::IAM::ManagedPolicy", /* @__PURE__ */ new Set([
|
|
603
613
|
"ManagedPolicyName",
|
|
@@ -1208,7 +1218,11 @@ var IAMInstanceProfileProvider = class {
|
|
|
1208
1218
|
createClient = new IamCreateClientCache(() => this.iamClient);
|
|
1209
1219
|
logger = getLogger().child("IAMInstanceProfileProvider");
|
|
1210
1220
|
wrapMaskedError(mask, error, build) {
|
|
1211
|
-
|
|
1221
|
+
const failure = describeAwsFailure(error);
|
|
1222
|
+
if (!(error instanceof Error)) return build(mask(failure.detail));
|
|
1223
|
+
if (!failure.redacted) return wrapMaskedAwsError(mask, error, build);
|
|
1224
|
+
this.logger.debug(mask(build(mask(failure.detail)).message));
|
|
1225
|
+
return markRedactedCause(build(`${mask(failure.summary)}${relayedNameCollision(failure.detail)}`));
|
|
1212
1226
|
}
|
|
1213
1227
|
handledProperties = /* @__PURE__ */ new Map([["AWS::IAM::InstanceProfile", /* @__PURE__ */ new Set([
|
|
1214
1228
|
"InstanceProfileName",
|
|
@@ -1341,7 +1355,8 @@ var IAMInstanceProfileProvider = class {
|
|
|
1341
1355
|
}
|
|
1342
1356
|
}
|
|
1343
1357
|
async delete(logicalId, physicalId, resourceType, _properties, context) {
|
|
1344
|
-
this.logger
|
|
1358
|
+
const log = createMaskedLogSinks(this.logger, context?.maskSecrets);
|
|
1359
|
+
log.debug(`Deleting IAM instance profile ${logicalId}: ${physicalId}`);
|
|
1345
1360
|
let stripped = false;
|
|
1346
1361
|
try {
|
|
1347
1362
|
let roles = [];
|
|
@@ -1351,7 +1366,7 @@ var IAMInstanceProfileProvider = class {
|
|
|
1351
1366
|
if (error instanceof NoSuchEntityException) {
|
|
1352
1367
|
const clientRegion = await this.iamClient.config.region();
|
|
1353
1368
|
assertRegionMatch(clientRegion, context?.expectedRegion, resourceType, logicalId, physicalId);
|
|
1354
|
-
this.logGoneOnDelete(logicalId, physicalId, context);
|
|
1369
|
+
this.logGoneOnDelete(logicalId, physicalId, context, log);
|
|
1355
1370
|
return;
|
|
1356
1371
|
}
|
|
1357
1372
|
throw error;
|
|
@@ -1362,27 +1377,28 @@ var IAMInstanceProfileProvider = class {
|
|
|
1362
1377
|
RoleName: roleName
|
|
1363
1378
|
}));
|
|
1364
1379
|
stripped = true;
|
|
1365
|
-
|
|
1380
|
+
log.debug(`Removed role ${roleName} from instance profile ${physicalId}`);
|
|
1366
1381
|
} catch (error) {
|
|
1367
1382
|
if (!(error instanceof NoSuchEntityException)) throw error;
|
|
1368
1383
|
}
|
|
1369
1384
|
await this.iamClient.send(new DeleteInstanceProfileCommand({ InstanceProfileName: physicalId }));
|
|
1370
|
-
|
|
1385
|
+
log.debug(`Successfully deleted IAM instance profile ${logicalId}`);
|
|
1371
1386
|
} catch (error) {
|
|
1372
1387
|
if (error instanceof NoSuchEntityException) {
|
|
1373
1388
|
const clientRegion = await this.iamClient.config.region();
|
|
1374
1389
|
assertRegionMatch(clientRegion, context?.expectedRegion, resourceType, logicalId, physicalId);
|
|
1375
|
-
this.logGoneOnDelete(logicalId, physicalId, context);
|
|
1390
|
+
this.logGoneOnDelete(logicalId, physicalId, context, log);
|
|
1376
1391
|
return;
|
|
1377
1392
|
}
|
|
1378
1393
|
const cause = error instanceof Error ? error : void 0;
|
|
1379
|
-
const
|
|
1394
|
+
const { mask } = log;
|
|
1395
|
+
const failure = this.wrapMaskedError(mask, error, (text) => new ProvisioningError(mask(`Failed to delete IAM instance profile ${logicalId}: ${text}`), resourceType, logicalId, physicalId, cause));
|
|
1380
1396
|
throw stripped ? markDeleteStarted(failure) : failure;
|
|
1381
1397
|
}
|
|
1382
1398
|
}
|
|
1383
|
-
logGoneOnDelete(logicalId, physicalId, context) {
|
|
1399
|
+
logGoneOnDelete(logicalId, physicalId, context, log) {
|
|
1384
1400
|
if (context?.failedCreateOrphan === true) this.logger.info(safeMsg` IAM instance profile ${physicalId} (${logicalId}), which a failed deploy created, is already gone; nothing to delete`);
|
|
1385
|
-
else
|
|
1401
|
+
else log.debug(`Instance profile ${log.value(physicalId)} does not exist, skipping deletion`);
|
|
1386
1402
|
}
|
|
1387
1403
|
async isSameResource(journaledPhysicalId, record, resourceType, context) {
|
|
1388
1404
|
if (resourceType !== INSTANCE_PROFILE_TYPE) return "unknown";
|
|
@@ -1457,8 +1473,18 @@ var IAMAccessKeyProvider = class {
|
|
|
1457
1473
|
iamClient;
|
|
1458
1474
|
createClient = new IamCreateClientCache(() => this.iamClient);
|
|
1459
1475
|
logger = getLogger().child("IAMAccessKeyProvider");
|
|
1460
|
-
wrapMaskedError(
|
|
1461
|
-
|
|
1476
|
+
wrapMaskedError(log, error, build) {
|
|
1477
|
+
const failure = describeAwsFailure(error);
|
|
1478
|
+
if (!failure.redacted) return wrapMaskedAwsError(log.mask, error, build);
|
|
1479
|
+
log.debug(build(log.mask(failure.detail)).message);
|
|
1480
|
+
const wrapped = build(`${log.mask(failure.summary)}${relayedNameCollision(failure.detail)}`);
|
|
1481
|
+
return error instanceof Error ? markRedactedCause(wrapped) : wrapped;
|
|
1482
|
+
}
|
|
1483
|
+
warnFailureSentence(log, lead, error) {
|
|
1484
|
+
const failure = describeAwsFailure(error);
|
|
1485
|
+
if (!failure.redacted) return `${log.value(failure.detail)}.`;
|
|
1486
|
+
log.debug(`${lead}: ${log.value(failure.detail)}`);
|
|
1487
|
+
return log.value(failure.summary);
|
|
1462
1488
|
}
|
|
1463
1489
|
disableCcApiFallback = true;
|
|
1464
1490
|
handledProperties = /* @__PURE__ */ new Map([["AWS::IAM::AccessKey", /* @__PURE__ */ new Set([
|
|
@@ -1499,7 +1525,8 @@ var IAMAccessKeyProvider = class {
|
|
|
1499
1525
|
}));
|
|
1500
1526
|
leftBehindKeyId = void 0;
|
|
1501
1527
|
} catch (cleanupError) {
|
|
1502
|
-
|
|
1528
|
+
const lead = `Failed to clean up IAM access key ${logicalId} (${v(accessKeyId)}) minted by a partial CreateAccessKey response`;
|
|
1529
|
+
log.warn(`${lead}: ${this.warnFailureSentence(log, lead, cleanupError)} Manual deletion may be required: ${aws`aws iam delete-access-key --user-name ${userName} --access-key-id ${accessKeyId}`.render()}`);
|
|
1503
1530
|
}
|
|
1504
1531
|
throw new Error("CreateAccessKey returned no AccessKeyId/SecretAccessKey");
|
|
1505
1532
|
}
|
|
@@ -1518,7 +1545,8 @@ var IAMAccessKeyProvider = class {
|
|
|
1518
1545
|
leftBehindKeyId = void 0;
|
|
1519
1546
|
log.debug(`Cleaned up partially-created IAM access key ${logicalId} (${v(accessKeyId)}) after status wiring failure`);
|
|
1520
1547
|
} catch (cleanupError) {
|
|
1521
|
-
|
|
1548
|
+
const lead = `Failed to clean up partially-created IAM access key ${logicalId} (${v(accessKeyId)})`;
|
|
1549
|
+
log.warn(`${lead}: ${this.warnFailureSentence(log, lead, cleanupError)} Manual deletion may be required before the next deploy: ${aws`aws iam delete-access-key --user-name ${userName} --access-key-id ${accessKeyId}`.render()}`);
|
|
1522
1550
|
}
|
|
1523
1551
|
throw markAuxiliaryFailure(innerError, logicalId);
|
|
1524
1552
|
}
|
|
@@ -1527,7 +1555,8 @@ var IAMAccessKeyProvider = class {
|
|
|
1527
1555
|
if (replayFollowedAmbiguousAttempt(response)) try {
|
|
1528
1556
|
await this.deleteOrphanFromFailedAttempt(userName, logicalId, baseline, attemptStartMs, log, "replayed");
|
|
1529
1557
|
} catch (reconcileError) {
|
|
1530
|
-
|
|
1558
|
+
const lead = `Could not check user ${v(userName)} for an access key left by the replayed CreateAccessKey for ${logicalId}`;
|
|
1559
|
+
log.warn(`${lead}: ${this.warnFailureSentence(log, lead, reconcileError)} List the user's keys and delete any that no deploy records: ${aws`aws iam list-access-keys --user-name ${userName}`.render()}`);
|
|
1531
1560
|
}
|
|
1532
1561
|
return {
|
|
1533
1562
|
physicalId: accessKeyId,
|
|
@@ -1540,7 +1569,7 @@ var IAMAccessKeyProvider = class {
|
|
|
1540
1569
|
const reconciled = await this.deleteOrphanFromFailedAttempt(userName, logicalId, baseline, attemptStartMs, log);
|
|
1541
1570
|
if (leftBehindKeyId !== void 0 && reconciled.has(leftBehindKeyId)) leftBehindKeyId = void 0;
|
|
1542
1571
|
const cause = error instanceof Error ? error : void 0;
|
|
1543
|
-
const thrown = this.wrapMaskedError(log
|
|
1572
|
+
const thrown = this.wrapMaskedError(log, error, (text) => new ProvisioningError(`Failed to create IAM access key ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
|
|
1544
1573
|
if (leftBehindKeyId !== void 0) {
|
|
1545
1574
|
markCreatedBeforeFailure(thrown, logicalId, resourceType, leftBehindKeyId);
|
|
1546
1575
|
markNonRetryable(thrown);
|
|
@@ -1584,7 +1613,8 @@ var IAMAccessKeyProvider = class {
|
|
|
1584
1613
|
}));
|
|
1585
1614
|
deleted.add(accessKeyId);
|
|
1586
1615
|
} catch (error) {
|
|
1587
|
-
|
|
1616
|
+
const lead = `Failed to delete the orphaned IAM access key ${v(accessKeyId)} for user ${v(userName)}`;
|
|
1617
|
+
log.warn(`${lead}: ${this.warnFailureSentence(log, lead, error)} Manual deletion may be required: ${aws`aws iam delete-access-key --user-name ${userName} --access-key-id ${accessKeyId}`.render()}`);
|
|
1588
1618
|
}
|
|
1589
1619
|
}
|
|
1590
1620
|
return deleted;
|
|
@@ -1611,7 +1641,8 @@ var IAMAccessKeyProvider = class {
|
|
|
1611
1641
|
marker = page.IsTruncated ? page.Marker : void 0;
|
|
1612
1642
|
} while (marker);
|
|
1613
1643
|
} catch (error) {
|
|
1614
|
-
|
|
1644
|
+
const lead = `Could not list existing access keys for user ${v(userName)} while creating ${logicalId}`;
|
|
1645
|
+
log.warn(`${lead}: ${this.warnFailureSentence(log, lead, error)} Orphan detection is DISABLED for this create, so a retried attempt may leave an unusable but ACTIVE access key on the user. Grant iam:ListAccessKeys, or check the user's keys after the deploy: ${aws`aws iam list-access-keys --user-name ${userName}`.render()}`);
|
|
1615
1646
|
return;
|
|
1616
1647
|
}
|
|
1617
1648
|
return keys;
|
|
@@ -1642,7 +1673,7 @@ var IAMAccessKeyProvider = class {
|
|
|
1642
1673
|
};
|
|
1643
1674
|
} catch (error) {
|
|
1644
1675
|
const cause = error instanceof Error ? error : void 0;
|
|
1645
|
-
throw this.wrapMaskedError(log
|
|
1676
|
+
throw this.wrapMaskedError(log, error, (text) => new ProvisioningError(`Failed to update IAM access key ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
1646
1677
|
}
|
|
1647
1678
|
}
|
|
1648
1679
|
async delete(logicalId, physicalId, resourceType, properties, context) {
|
|
@@ -1665,7 +1696,7 @@ var IAMAccessKeyProvider = class {
|
|
|
1665
1696
|
return;
|
|
1666
1697
|
}
|
|
1667
1698
|
const cause = error instanceof Error ? error : void 0;
|
|
1668
|
-
throw new ProvisioningError(`Failed to delete IAM access key ${logicalId}: ${
|
|
1699
|
+
throw this.wrapMaskedError(createMaskedLogSinks(this.logger, context?.maskSecrets), error, (text) => new ProvisioningError(`Failed to delete IAM access key ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
1669
1700
|
}
|
|
1670
1701
|
}
|
|
1671
1702
|
async getAttribute(physicalId, resourceType, attributeName, logicalId) {
|
|
@@ -1805,7 +1836,11 @@ var IAMUserGroupProvider = class {
|
|
|
1805
1836
|
createClient = new IamCreateClientCache(() => this.iamClient);
|
|
1806
1837
|
logger = getLogger().child("IAMUserGroupProvider");
|
|
1807
1838
|
wrapMaskedError(mask, error, build) {
|
|
1808
|
-
|
|
1839
|
+
const failure = describeAwsFailure(error);
|
|
1840
|
+
if (!(error instanceof Error)) return build(mask(failure.detail));
|
|
1841
|
+
if (!failure.redacted) return wrapMaskedAwsError(mask, error, build);
|
|
1842
|
+
this.logger.debug(mask(build(mask(failure.detail)).message));
|
|
1843
|
+
return markRedactedCause(build(`${mask(failure.summary)}${relayedNameCollision(failure.detail)}`));
|
|
1809
1844
|
}
|
|
1810
1845
|
handledProperties = /* @__PURE__ */ new Map([
|
|
1811
1846
|
["AWS::IAM::User", /* @__PURE__ */ new Set([
|
|
@@ -2066,7 +2101,7 @@ var IAMUserGroupProvider = class {
|
|
|
2066
2101
|
log.debug(`Successfully deleted IAM user ${logicalId}`);
|
|
2067
2102
|
} catch (error) {
|
|
2068
2103
|
const cause = error instanceof Error ? error : void 0;
|
|
2069
|
-
const failure = new ProvisioningError(log.mask(`Failed to delete IAM user ${logicalId}: ${
|
|
2104
|
+
const failure = this.wrapMaskedError(log.mask, error, (text) => new ProvisioningError(log.mask(`Failed to delete IAM user ${logicalId}: ${text}`), resourceType, logicalId, physicalId, cause));
|
|
2070
2105
|
throw progress.stripped ? markDeleteStarted(failure) : failure;
|
|
2071
2106
|
}
|
|
2072
2107
|
}
|
|
@@ -2347,7 +2382,7 @@ var IAMUserGroupProvider = class {
|
|
|
2347
2382
|
return;
|
|
2348
2383
|
}
|
|
2349
2384
|
const cause = error instanceof Error ? error : void 0;
|
|
2350
|
-
const failure = new ProvisioningError(log.mask(`Failed to delete IAM group ${logicalId}: ${
|
|
2385
|
+
const failure = this.wrapMaskedError(log.mask, error, (text) => new ProvisioningError(log.mask(`Failed to delete IAM group ${logicalId}: ${text}`), resourceType, logicalId, physicalId, cause));
|
|
2351
2386
|
throw progress.stripped ? markDeleteStarted(failure) : failure;
|
|
2352
2387
|
}
|
|
2353
2388
|
}
|
|
@@ -2631,7 +2666,8 @@ var IAMUserGroupProvider = class {
|
|
|
2631
2666
|
this.logger.debug(`Successfully deleted IAM UserToGroupAddition ${logicalId}`);
|
|
2632
2667
|
} catch (error) {
|
|
2633
2668
|
const cause = error instanceof Error ? error : void 0;
|
|
2634
|
-
const
|
|
2669
|
+
const opMask = createMaskedLogSinks(this.logger, context?.maskSecrets).mask;
|
|
2670
|
+
const failure = this.wrapMaskedError((text) => mask(opMask(text)), error, (text) => new ProvisioningError(`Failed to delete IAM UserToGroupAddition ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
2635
2671
|
throw maskError(removedAny ? markDeleteStarted(failure) : failure);
|
|
2636
2672
|
}
|
|
2637
2673
|
}
|
|
@@ -11293,8 +11329,14 @@ var LambdaNetworkConnectorProvider = class {
|
|
|
11293
11329
|
async waitForSettled(arn, logicalId, operation) {
|
|
11294
11330
|
for (let attempt = 1; attempt <= MAX_POLL_ATTEMPTS; attempt++) {
|
|
11295
11331
|
const resp = await this.client.send(new GetNetworkConnectorCommand({ Identifier: arn }));
|
|
11296
|
-
if (resp.State === "FAILED" || resp.State === "DELETING" || resp.State === "DELETE_FAILED" || resp.State === "INACTIVE") throw
|
|
11297
|
-
|
|
11332
|
+
if (resp.State === "FAILED" || resp.State === "DELETING" || resp.State === "DELETE_FAILED" || resp.State === "INACTIVE") throw this.wrapStatusReasonError(`Lambda network connector ${logicalIdShown(logicalId)} entered ${resp.State}`, {
|
|
11333
|
+
code: resp.StateReasonCode,
|
|
11334
|
+
message: resp.StateReason
|
|
11335
|
+
}, (message, options) => new TerminalConnectorStateError(message, options));
|
|
11336
|
+
if (operation === "update" && resp.LastUpdateStatus === "Failed") throw this.wrapStatusReasonError(`Lambda network connector ${logicalIdShown(logicalId)} update failed`, {
|
|
11337
|
+
code: resp.LastUpdateStatusReasonCode,
|
|
11338
|
+
message: resp.LastUpdateStatusReason
|
|
11339
|
+
}, (message, options) => new Error(message, options));
|
|
11298
11340
|
if (resp.State === "ACTIVE" && resp.LastUpdateStatus !== "InProgress") return resp;
|
|
11299
11341
|
await sleep$1(POLL_INTERVAL_MS$2);
|
|
11300
11342
|
}
|
|
@@ -11309,15 +11351,28 @@ var LambdaNetworkConnectorProvider = class {
|
|
|
11309
11351
|
if (error instanceof ResourceNotFoundException$10) return;
|
|
11310
11352
|
throw error;
|
|
11311
11353
|
}
|
|
11312
|
-
if (resp.State === "DELETE_FAILED") throw
|
|
11354
|
+
if (resp.State === "DELETE_FAILED") throw this.wrapStatusReasonError(`Lambda network connector ${logicalIdShown(logicalId)} entered DELETE_FAILED`, {
|
|
11355
|
+
code: resp.StateReasonCode,
|
|
11356
|
+
message: resp.StateReason
|
|
11357
|
+
}, (message, options) => new Error(message, options));
|
|
11313
11358
|
await sleep$1(POLL_INTERVAL_MS$2);
|
|
11314
11359
|
}
|
|
11315
11360
|
throw new Error(`Lambda network connector ${logicalIdShown(logicalId)} was not fully deleted within ${MAX_POLL_ATTEMPTS * POLL_INTERVAL_MS$2 / 1e3}s.`);
|
|
11316
11361
|
}
|
|
11362
|
+
wrapStatusReasonError(prefix, reason, build) {
|
|
11363
|
+
const text = describeAwsStatusReason(reason, reason.code || "no reason given");
|
|
11364
|
+
if (!text.redacted) return build(`${prefix}: ${text.detail}`);
|
|
11365
|
+
this.logger.debug(safeMsg`${prefix}: ${text.detail}`);
|
|
11366
|
+
return markRedactedCause(build(`${prefix}: ${text.summary}`, { cause: new Error(text.detail) }));
|
|
11367
|
+
}
|
|
11317
11368
|
wrapError(operation, logicalId, resourceType, physicalId, error) {
|
|
11318
11369
|
if (error instanceof ProvisioningError) return error;
|
|
11319
11370
|
const cause = error instanceof Error ? error : void 0;
|
|
11320
|
-
|
|
11371
|
+
const build = (text) => new ProvisioningError(`Failed to ${operation} Lambda network connector ${logicalIdShown(logicalId)}: ${text}`, resourceType, logicalId, physicalId, cause);
|
|
11372
|
+
const failure = describeAwsFailure(error);
|
|
11373
|
+
if (!(error instanceof Error) || !failure.redacted) return build(failure.detail);
|
|
11374
|
+
this.logger.debug(build(failure.detail).message);
|
|
11375
|
+
return markRedactedCause(build(`${failure.summary}${relayedNameCollision(failure.detail)}`));
|
|
11321
11376
|
}
|
|
11322
11377
|
};
|
|
11323
11378
|
var TerminalConnectorStateError = class extends Error {};
|
|
@@ -12449,7 +12504,8 @@ var DynamoDBTableProvider = class {
|
|
|
12449
12504
|
try {
|
|
12450
12505
|
observedProtectionOn = (await this.dynamoDBClient.send(new DescribeTableCommand({ TableName: physicalId }))).Table?.DeletionProtectionEnabled === true;
|
|
12451
12506
|
} catch (observeError) {
|
|
12452
|
-
|
|
12507
|
+
const mask = maskerOrIdentity(context?.maskSecrets);
|
|
12508
|
+
this.logger.debug(mask(safeMsg`Could not read DeletionProtectionEnabled on ${mask(physicalId)} before disabling it: ${mask(describeAwsFailure(observeError).detail)}`));
|
|
12453
12509
|
}
|
|
12454
12510
|
await this.dynamoDBClient.send(new UpdateTableCommand({
|
|
12455
12511
|
TableName: physicalId,
|
|
@@ -12460,10 +12516,10 @@ var DynamoDBTableProvider = class {
|
|
|
12460
12516
|
try {
|
|
12461
12517
|
await this.waitForTableActiveAfterUpdate(physicalId, 60, budget);
|
|
12462
12518
|
} catch (waitErr) {
|
|
12463
|
-
this.logger.debug(`Could not wait for table ${physicalId} ACTIVE after disabling protection: ${describeAwsFailure(waitErr).detail}`);
|
|
12519
|
+
this.logger.debug(maskerOrIdentity(context?.maskSecrets)(`Could not wait for table ${physicalId} ACTIVE after disabling protection: ${describeAwsFailure(waitErr).detail}`));
|
|
12464
12520
|
}
|
|
12465
12521
|
} catch (flipError) {
|
|
12466
|
-
if (!(flipError instanceof ResourceNotFoundException$1)) this.logger.debug(`Could not disable DeletionProtectionEnabled on ${physicalId}: ${describeAwsFailure(flipError).detail}`);
|
|
12522
|
+
if (!(flipError instanceof ResourceNotFoundException$1)) this.logger.debug(maskerOrIdentity(context?.maskSecrets)(`Could not disable DeletionProtectionEnabled on ${physicalId}: ${describeAwsFailure(flipError).detail}`));
|
|
12467
12523
|
}
|
|
12468
12524
|
try {
|
|
12469
12525
|
const reArmPolls = () => {
|
|
@@ -13469,8 +13525,13 @@ var LogsLogGroupProvider = class {
|
|
|
13469
13525
|
this.logsClient = awsClients.cloudWatchLogs;
|
|
13470
13526
|
this.stsClient = awsClients.sts;
|
|
13471
13527
|
}
|
|
13472
|
-
|
|
13473
|
-
|
|
13528
|
+
wrapCaughtError(mask, error, build) {
|
|
13529
|
+
const failure = describeAwsFailure(error);
|
|
13530
|
+
if (!failure.redacted) return wrapMaskedAwsError(mask, error, build);
|
|
13531
|
+
this.logger.debug(mask(build(mask(failure.detail)).message));
|
|
13532
|
+
const relay = isAuxiliaryFailure(error) ? "" : relayedNameCollision(failure.detail);
|
|
13533
|
+
const wrapped = build(`${mask(failure.summary)}${relay}`);
|
|
13534
|
+
return error instanceof Error ? markRedactedCause(wrapped) : wrapped;
|
|
13474
13535
|
}
|
|
13475
13536
|
generatedCreateName(_resourceType, logicalId, properties) {
|
|
13476
13537
|
if (properties["LogGroupName"]) return void 0;
|
|
@@ -13588,7 +13649,7 @@ var LogsLogGroupProvider = class {
|
|
|
13588
13649
|
} catch (error) {
|
|
13589
13650
|
const cause = error instanceof Error ? error : void 0;
|
|
13590
13651
|
const mask = maskerOrIdentity(context?.maskSecrets);
|
|
13591
|
-
const thrown = this.
|
|
13652
|
+
const thrown = this.wrapCaughtError(mask, error, (text) => new ProvisioningError(`Failed to create log group ${logicalId}: ${text}`, resourceType, logicalId, logGroupName, cause));
|
|
13592
13653
|
if (leftBehind) markCreatedBeforeFailure(thrown, logicalId, resourceType, logGroupName);
|
|
13593
13654
|
throw thrown;
|
|
13594
13655
|
}
|
|
@@ -13604,7 +13665,7 @@ var LogsLogGroupProvider = class {
|
|
|
13604
13665
|
if (error instanceof CdkdError) throw error;
|
|
13605
13666
|
const cause = error instanceof Error ? error : void 0;
|
|
13606
13667
|
const mask = maskerOrIdentity(context?.maskSecrets);
|
|
13607
|
-
throw this.
|
|
13668
|
+
throw this.wrapCaughtError(mask, error, (text) => new ProvisioningError(`Failed to update log group ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
13608
13669
|
}
|
|
13609
13670
|
}
|
|
13610
13671
|
async applyUpdate(logicalId, physicalId, resourceType, properties, previousProperties, context) {
|
|
@@ -13756,6 +13817,7 @@ var LogsLogGroupProvider = class {
|
|
|
13756
13817
|
flip,
|
|
13757
13818
|
logger: this.logger,
|
|
13758
13819
|
physicalId,
|
|
13820
|
+
mask: context?.maskSecrets,
|
|
13759
13821
|
guardName: "DeletionProtectionEnabled",
|
|
13760
13822
|
observe: async () => {
|
|
13761
13823
|
return ((await this.logsClient.send(new DescribeLogGroupsCommand({ logGroupNamePrefix: physicalId }))).logGroups?.find((g) => g.logGroupName === physicalId))?.deletionProtectionEnabled === true;
|
|
@@ -13769,7 +13831,7 @@ var LogsLogGroupProvider = class {
|
|
|
13769
13831
|
});
|
|
13770
13832
|
this.logger.debug(`Disabled DeletionProtectionEnabled on log group ${logicalId} before delete`);
|
|
13771
13833
|
} catch (flipError) {
|
|
13772
|
-
this.logger.debug(`Could not disable DeletionProtectionEnabled on ${physicalId}: ${describeAwsFailure(flipError).detail}`);
|
|
13834
|
+
this.logger.debug(maskerOrIdentity(context?.maskSecrets)(`Could not disable DeletionProtectionEnabled on ${physicalId}: ${describeAwsFailure(flipError).detail}`));
|
|
13773
13835
|
}
|
|
13774
13836
|
try {
|
|
13775
13837
|
await this.logsClient.send(new DeleteLogGroupCommand({ logGroupName: physicalId }));
|
|
@@ -13783,7 +13845,7 @@ var LogsLogGroupProvider = class {
|
|
|
13783
13845
|
return;
|
|
13784
13846
|
}
|
|
13785
13847
|
const cause = error instanceof Error ? error : void 0;
|
|
13786
|
-
throw new ProvisioningError(`Failed to delete log group ${logicalId}: ${
|
|
13848
|
+
throw this.wrapCaughtError(maskerOrIdentity(context?.maskSecrets), error, (text) => new ProvisioningError(`Failed to delete log group ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
13787
13849
|
}
|
|
13788
13850
|
}
|
|
13789
13851
|
logGoneOnDelete(logicalId, physicalId, context) {
|
|
@@ -14792,6 +14854,17 @@ var SSMParameterProvider = class SSMParameterProvider {
|
|
|
14792
14854
|
"Policies",
|
|
14793
14855
|
"DataType"
|
|
14794
14856
|
])]]);
|
|
14857
|
+
removalHandledInUpdate = /* @__PURE__ */ new Map([["AWS::SSM::Parameter", /* @__PURE__ */ new Set([
|
|
14858
|
+
"Name",
|
|
14859
|
+
"Type",
|
|
14860
|
+
"Value",
|
|
14861
|
+
"Description",
|
|
14862
|
+
"Tags",
|
|
14863
|
+
"AllowedPattern",
|
|
14864
|
+
"Tier",
|
|
14865
|
+
"Policies",
|
|
14866
|
+
"DataType"
|
|
14867
|
+
])]]);
|
|
14795
14868
|
constructor() {
|
|
14796
14869
|
const awsClients = getAwsClients();
|
|
14797
14870
|
this.ssmClient = awsClients.ssm;
|
|
@@ -22701,6 +22774,14 @@ const CACHE_BEHAVIOR_QUANTITY_FIELDS = [
|
|
|
22701
22774
|
var CloudFrontDistributionProvider = class {
|
|
22702
22775
|
cloudFrontClient;
|
|
22703
22776
|
logger = getLogger().child("CloudFrontDistributionProvider");
|
|
22777
|
+
wrapCaughtError(mask, error, build) {
|
|
22778
|
+
const m = maskerOrIdentity(mask);
|
|
22779
|
+
const failure = describeAwsFailure(error);
|
|
22780
|
+
if (!failure.redacted) return wrapMaskedAwsError(m, error, build);
|
|
22781
|
+
this.logger.debug(m(build(m(failure.detail)).message));
|
|
22782
|
+
const wrapped = build(`${m(failure.summary)}${relayedNameCollision(failure.detail)}`);
|
|
22783
|
+
return error instanceof Error ? markRedactedCause(wrapped) : wrapped;
|
|
22784
|
+
}
|
|
22704
22785
|
handledProperties = /* @__PURE__ */ new Map([["AWS::CloudFront::Distribution", /* @__PURE__ */ new Set(["DistributionConfig", "Tags"])]]);
|
|
22705
22786
|
constructor() {
|
|
22706
22787
|
const awsClients = getAwsClients();
|
|
@@ -22745,7 +22826,7 @@ var CloudFrontDistributionProvider = class {
|
|
|
22745
22826
|
throw markNonRetryable(new ProvisioningError(maskSecrets(`Failed to create CloudFront Distribution ${logicalId}: CloudFront refused the create because this deploy's CallerReference had been used before, which means an EARLIER attempt of this same create succeeded and cdkd never received its response. That distribution is LIVE, is not in cdkd state, and 'cdkd destroy' will not remove it — it bills until you delete it by hand. CloudFront does not return CallerReference from ListDistributions, so find it with 'aws cloudfront list-distributions' and match on ${this.orphanSearchHint(properties, maskSecrets)}; then disable and delete it (or import it with 'cdkd import') before re-running. The AWS error is on this error's cause.`), resourceType, logicalId, void 0, cause));
|
|
22746
22827
|
}
|
|
22747
22828
|
const cause = error instanceof Error ? error : void 0;
|
|
22748
|
-
throw new ProvisioningError(`Failed to create CloudFront Distribution ${logicalId}: ${
|
|
22829
|
+
throw this.wrapCaughtError(maskSecrets, error, (text) => new ProvisioningError(`Failed to create CloudFront Distribution ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
|
|
22749
22830
|
}
|
|
22750
22831
|
}
|
|
22751
22832
|
orphanSearchHint(properties, maskSecrets) {
|
|
@@ -22777,7 +22858,7 @@ var CloudFrontDistributionProvider = class {
|
|
|
22777
22858
|
const getResponse = await this.cloudFrontClient.send(new GetDistributionCommand({ Id: physicalId }));
|
|
22778
22859
|
const domainName = getResponse.Distribution?.DomainName;
|
|
22779
22860
|
const arn = getResponse.Distribution?.ARN;
|
|
22780
|
-
await this.applyTagDiff(arn, previousProperties["Tags"], properties["Tags"], physicalId, logicalId, resourceType);
|
|
22861
|
+
await this.applyTagDiff(arn, previousProperties["Tags"], properties["Tags"], physicalId, logicalId, resourceType, context?.maskSecrets);
|
|
22781
22862
|
await this.settleDistribution(logicalId, physicalId);
|
|
22782
22863
|
this.logger.debug(`Updated CloudFront Distribution ${physicalId}`);
|
|
22783
22864
|
return {
|
|
@@ -22792,7 +22873,7 @@ var CloudFrontDistributionProvider = class {
|
|
|
22792
22873
|
} catch (error) {
|
|
22793
22874
|
if (error instanceof CdkdError) throw error;
|
|
22794
22875
|
const cause = error instanceof Error ? error : void 0;
|
|
22795
|
-
throw new ProvisioningError(`Failed to update CloudFront Distribution ${logicalId}: ${
|
|
22876
|
+
throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to update CloudFront Distribution ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
22796
22877
|
}
|
|
22797
22878
|
}
|
|
22798
22879
|
async delete(logicalId, physicalId, resourceType, _properties, context) {
|
|
@@ -22843,7 +22924,7 @@ var CloudFrontDistributionProvider = class {
|
|
|
22843
22924
|
return;
|
|
22844
22925
|
}
|
|
22845
22926
|
const cause = error instanceof Error ? error : void 0;
|
|
22846
|
-
const failure = new ProvisioningError(`Failed to delete CloudFront Distribution ${logicalId}: ${
|
|
22927
|
+
const failure = this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to delete CloudFront Distribution ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
22847
22928
|
throw stripped ? markDeleteStarted(failure) : failure;
|
|
22848
22929
|
}
|
|
22849
22930
|
}
|
|
@@ -23240,7 +23321,7 @@ var CloudFrontDistributionProvider = class {
|
|
|
23240
23321
|
upserts
|
|
23241
23322
|
};
|
|
23242
23323
|
}
|
|
23243
|
-
async applyTagDiff(arn, previousTags, newTags, physicalId, logicalId, resourceType) {
|
|
23324
|
+
async applyTagDiff(arn, previousTags, newTags, physicalId, logicalId, resourceType, mask) {
|
|
23244
23325
|
const { removed, upserts } = this.computeTagDiff(previousTags, newTags, resourceType, logicalId);
|
|
23245
23326
|
if (removed.length === 0 && upserts.length === 0) return;
|
|
23246
23327
|
if (!arn) throw new ProvisioningError(`CloudFront Distribution ${physicalId}: GetDistribution returned no ARN; cannot apply tag diff (removed=${removed.length}, upserts=${upserts.length}). Refusing to silently drop the tag update — retry on next deploy or check SDK version.`, resourceType, logicalId, physicalId);
|
|
@@ -23261,7 +23342,7 @@ var CloudFrontDistributionProvider = class {
|
|
|
23261
23342
|
}
|
|
23262
23343
|
} catch (err) {
|
|
23263
23344
|
const cause = err instanceof Error ? err : void 0;
|
|
23264
|
-
throw new ProvisioningError(`CloudFront Distribution ${physicalId}: tag diff failed (removed=${removed.length}, upserts=${upserts.length}): ${
|
|
23345
|
+
throw this.wrapCaughtError(mask, err, (text) => new ProvisioningError(`CloudFront Distribution ${physicalId}: tag diff failed (removed=${removed.length}, upserts=${upserts.length}): ${text}${text.endsWith(".") ? "" : "."} UpdateDistribution succeeded but TagResource/UntagResource did not — state has NOT been updated so the next deploy will retry the tag-diff.`, resourceType, logicalId, physicalId, cause));
|
|
23265
23346
|
}
|
|
23266
23347
|
}
|
|
23267
23348
|
async import(input) {
|
|
@@ -24723,7 +24804,7 @@ var ECSProvider = class {
|
|
|
24723
24804
|
const serviceConnectConfigurationInput = JSON.stringify(previousProperties["ServiceConnectConfiguration"] ?? null) !== JSON.stringify(properties["ServiceConnectConfiguration"] ?? null) ? clearOnUpdateRemoval(this.convertServiceConnectConfiguration(properties["ServiceConnectConfiguration"]), previousProperties["ServiceConnectConfiguration"], { enabled: false }) : void 0;
|
|
24724
24805
|
const volumeConfigurationsInput = JSON.stringify(previousProperties["VolumeConfigurations"] ?? null) !== JSON.stringify(properties["VolumeConfigurations"] ?? null) ? clearOnUpdateRemoval(this.convertServiceVolumeConfigurations(properties["VolumeConfigurations"]), previousProperties["VolumeConfigurations"], []) : void 0;
|
|
24725
24806
|
const vpcLatticeConfigurationsInput = JSON.stringify(previousProperties["VpcLatticeConfigurations"] ?? null) !== JSON.stringify(properties["VpcLatticeConfigurations"] ?? null) ? clearOnUpdateRemoval(this.convertVpcLatticeConfigurations(properties["VpcLatticeConfigurations"]), previousProperties["VpcLatticeConfigurations"], []) : void 0;
|
|
24726
|
-
const monitoringInput = JSON.stringify(previousProperties["Monitoring"] ?? null) !== JSON.stringify(properties["Monitoring"] ?? null)
|
|
24807
|
+
const monitoringInput = JSON.stringify(previousProperties["Monitoring"] ?? null) !== JSON.stringify(properties["Monitoring"] ?? null) ? clearOnUpdateRemoval(this.convertMonitoringConfiguration(properties["Monitoring"]), previousProperties["Monitoring"], { metricConfigurations: [] }) : void 0;
|
|
24727
24808
|
const forceNewDeploymentInput = this.resolveForceNewDeployment(properties, previousProperties, log);
|
|
24728
24809
|
const deploymentConfigurationInput = this.resolveDeploymentConfiguration(properties, previousProperties);
|
|
24729
24810
|
try {
|
|
@@ -26241,6 +26322,7 @@ var ELBv2Provider = class {
|
|
|
26241
26322
|
flip,
|
|
26242
26323
|
logger: this.logger,
|
|
26243
26324
|
physicalId,
|
|
26325
|
+
mask: context?.maskSecrets,
|
|
26244
26326
|
guardName: "deletion_protection.enabled",
|
|
26245
26327
|
observe: async () => {
|
|
26246
26328
|
return ((await this.getClient().send(new DescribeLoadBalancerAttributesCommand({ LoadBalancerArn: physicalId }))).Attributes ?? []).some((a) => a.Key === "deletion_protection.enabled" && a.Value === "true");
|
|
@@ -26257,7 +26339,7 @@ var ELBv2Provider = class {
|
|
|
26257
26339
|
});
|
|
26258
26340
|
this.logger.debug(`Disabled deletion_protection.enabled on LoadBalancer ${logicalId} before delete`);
|
|
26259
26341
|
} catch (flipError) {
|
|
26260
|
-
if (!this.isNotFoundError(flipError)) this.logger.debug(`Could not disable deletion_protection.enabled on ${physicalId}: ${describeAwsFailure(flipError).detail}`);
|
|
26342
|
+
if (!this.isNotFoundError(flipError)) this.logger.debug(maskerOrIdentity(context?.maskSecrets)(`Could not disable deletion_protection.enabled on ${physicalId}: ${describeAwsFailure(flipError).detail}`));
|
|
26261
26343
|
}
|
|
26262
26344
|
try {
|
|
26263
26345
|
await this.getClient().send(new DeleteLoadBalancerCommand({ LoadBalancerArn: physicalId }));
|
|
@@ -28183,6 +28265,14 @@ async function attachDocDBTags(client, logger, result, arn) {
|
|
|
28183
28265
|
|
|
28184
28266
|
//#endregion
|
|
28185
28267
|
//#region src/provisioning/providers/docdb-provider.ts
|
|
28268
|
+
function masterUserPasswordToSend(properties, previousProperties, context) {
|
|
28269
|
+
const desired = properties["MasterUserPassword"];
|
|
28270
|
+
if (desired === void 0 || desired === null) return void 0;
|
|
28271
|
+
const changedProperties = context?.changedProperties;
|
|
28272
|
+
if (changedProperties !== void 0) return changedProperties.has("MasterUserPassword") ? desired : void 0;
|
|
28273
|
+
const recorded = previousProperties["MasterUserPassword"];
|
|
28274
|
+
return typeof desired === "string" && typeof recorded === "string" && recorded === desired && dynamicReferenceTokens(recorded).length === 0 && recorded !== "***" ? void 0 : desired;
|
|
28275
|
+
}
|
|
28186
28276
|
function clusterAttributes(cluster) {
|
|
28187
28277
|
return definedAttributes({
|
|
28188
28278
|
Endpoint: cluster?.Endpoint,
|
|
@@ -28207,6 +28297,8 @@ function instanceAttributes(instance) {
|
|
|
28207
28297
|
function isDbIdentifier(id) {
|
|
28208
28298
|
return id.length <= 63 && /^[A-Za-z](?:-?[A-Za-z0-9])*$/.test(id);
|
|
28209
28299
|
}
|
|
28300
|
+
const FINAL_SNAPSHOT_SETTLE_WAIT_MS = 9e5;
|
|
28301
|
+
const FINAL_SNAPSHOT_COMPENSATION_MARGIN_MS = 6e4;
|
|
28210
28302
|
var DocDBProvider = class {
|
|
28211
28303
|
docdbClient;
|
|
28212
28304
|
createClient;
|
|
@@ -28263,9 +28355,9 @@ var DocDBProvider = class {
|
|
|
28263
28355
|
default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId);
|
|
28264
28356
|
}
|
|
28265
28357
|
}
|
|
28266
|
-
async update(logicalId, physicalId, resourceType, properties, previousProperties,
|
|
28358
|
+
async update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
|
|
28267
28359
|
switch (resourceType) {
|
|
28268
|
-
case "AWS::DocDB::DBCluster": return this.updateDBCluster(logicalId, physicalId, resourceType, properties, previousProperties);
|
|
28360
|
+
case "AWS::DocDB::DBCluster": return this.updateDBCluster(logicalId, physicalId, resourceType, properties, previousProperties, context);
|
|
28269
28361
|
case "AWS::DocDB::DBInstance": return this.updateDBInstance(logicalId, physicalId, resourceType, properties, previousProperties);
|
|
28270
28362
|
default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId, physicalId);
|
|
28271
28363
|
}
|
|
@@ -28317,7 +28409,7 @@ var DocDBProvider = class {
|
|
|
28317
28409
|
throw thrown;
|
|
28318
28410
|
}
|
|
28319
28411
|
}
|
|
28320
|
-
async updateDBCluster(logicalId, physicalId, resourceType, properties, previousProperties) {
|
|
28412
|
+
async updateDBCluster(logicalId, physicalId, resourceType, properties, previousProperties, context) {
|
|
28321
28413
|
this.logger.debug(`Updating DocDB DBCluster ${logicalId}: ${physicalId}`);
|
|
28322
28414
|
refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId, physicalId);
|
|
28323
28415
|
try {
|
|
@@ -28332,12 +28424,16 @@ var DocDBProvider = class {
|
|
|
28332
28424
|
PreferredMaintenanceWindow: properties["PreferredMaintenanceWindow"],
|
|
28333
28425
|
DBClusterParameterGroupName: properties["DBClusterParameterGroupName"],
|
|
28334
28426
|
...sendVpcSgIds && { VpcSecurityGroupIds: vpcSgIds },
|
|
28335
|
-
MasterUserPassword: properties
|
|
28427
|
+
MasterUserPassword: masterUserPasswordToSend(properties, previousProperties, context),
|
|
28336
28428
|
Port: properties["Port"] != null ? Number(properties["Port"]) : void 0,
|
|
28337
28429
|
ApplyImmediately: true
|
|
28338
28430
|
}));
|
|
28339
28431
|
this.logger.debug(`Successfully updated DocDB DBCluster ${logicalId}`);
|
|
28340
28432
|
const described = await this.describeDBCluster(physicalId);
|
|
28433
|
+
if (process.env["CDKD_NO_WAIT"] !== "true" && securityGroupListChanged(sendVpcSgIds ? vpcSgIds : void 0, previousProperties["VpcSecurityGroupIds"])) {
|
|
28434
|
+
await this.waitForSecurityGroupsApplied(physicalId, logicalId, (sendVpcSgIds ? vpcSgIds : void 0) ?? []);
|
|
28435
|
+
for (const member of described?.DBClusterMembers ?? []) if (member.DBInstanceIdentifier) await this.waitForMemberAfterSecurityGroupChange(member.DBInstanceIdentifier);
|
|
28436
|
+
}
|
|
28341
28437
|
if (described?.DBClusterArn) await applyDocDBTagDiff(this.getClient(), this.logger, described.DBClusterArn, resourceType, logicalId, previousProperties["Tags"], properties["Tags"]);
|
|
28342
28438
|
return {
|
|
28343
28439
|
physicalId,
|
|
@@ -28385,6 +28481,7 @@ var DocDBProvider = class {
|
|
|
28385
28481
|
flip,
|
|
28386
28482
|
logger: this.logger,
|
|
28387
28483
|
physicalId,
|
|
28484
|
+
mask: context?.maskSecrets,
|
|
28388
28485
|
guardName: "DeletionProtection",
|
|
28389
28486
|
observe: async () => (await this.describeDBCluster(physicalId))?.DeletionProtection === true,
|
|
28390
28487
|
disable: async () => {
|
|
@@ -28397,9 +28494,10 @@ var DocDBProvider = class {
|
|
|
28397
28494
|
});
|
|
28398
28495
|
this.logger.debug(`Disabled DeletionProtection on DocDB DBCluster ${logicalId} before delete`);
|
|
28399
28496
|
} catch (disableError) {
|
|
28400
|
-
if (!isDocDBNotFoundError(disableError, "DBClusterNotFoundFault")) this.logger.debug(`Could not disable deletion protection for DocDB DBCluster ${logicalId}: ${describeAwsFailure(disableError).detail}`);
|
|
28497
|
+
if (!isDocDBNotFoundError(disableError, "DBClusterNotFoundFault")) this.logger.debug(maskerOrIdentity(context?.maskSecrets)(`Could not disable deletion protection for DocDB DBCluster ${logicalId}: ${describeAwsFailure(disableError).detail}`));
|
|
28401
28498
|
}
|
|
28402
28499
|
const finalSnapshotId = context?.finalSnapshotIdentifier;
|
|
28500
|
+
if (finalSnapshotId && flip.flippedOffByThisRun && !flip.deleteAccepted) await this.waitForProtectionOffBeforeFinalSnapshot(logicalId, physicalId);
|
|
28403
28501
|
await this.getClient().send(new DeleteDBClusterCommand$1({
|
|
28404
28502
|
DBClusterIdentifier: physicalId,
|
|
28405
28503
|
...finalSnapshotId ? {
|
|
@@ -28552,6 +28650,54 @@ var DocDBProvider = class {
|
|
|
28552
28650
|
if (typeof found.resourceId !== "string" || found.resourceId === "") throw new Error(`${api} returned no resource id`);
|
|
28553
28651
|
return found.resourceId;
|
|
28554
28652
|
}
|
|
28653
|
+
async waitForMemberAfterSecurityGroupChange(dbInstanceIdentifier, maxWaitMs = 18e5) {
|
|
28654
|
+
const startTime = Date.now();
|
|
28655
|
+
let delay = 5e3;
|
|
28656
|
+
while (Date.now() - startTime < maxWaitMs) {
|
|
28657
|
+
let status;
|
|
28658
|
+
try {
|
|
28659
|
+
status = (await this.describeDBInstance(dbInstanceIdentifier))?.DBInstanceStatus;
|
|
28660
|
+
} catch (error) {
|
|
28661
|
+
if (isDocDBNotFoundError(error, "DBInstanceNotFoundFault")) return;
|
|
28662
|
+
throw error;
|
|
28663
|
+
}
|
|
28664
|
+
if (status !== "modifying") return;
|
|
28665
|
+
await this.sleep(delay);
|
|
28666
|
+
delay = Math.min(delay * 2, 1e4);
|
|
28667
|
+
}
|
|
28668
|
+
throw new Error(`Timed out waiting for a member instance of the cluster to finish applying its new VPC security groups`);
|
|
28669
|
+
}
|
|
28670
|
+
async waitForSecurityGroupsApplied(dbClusterIdentifier, logicalId, expected, maxWaitMs = 18e5) {
|
|
28671
|
+
const want = [...new Set(expected)].sort().join(" ");
|
|
28672
|
+
const startTime = Date.now();
|
|
28673
|
+
let delay = 5e3;
|
|
28674
|
+
while (Date.now() - startTime < maxWaitMs) {
|
|
28675
|
+
const cluster = await this.describeDBCluster(dbClusterIdentifier);
|
|
28676
|
+
const groups = cluster?.VpcSecurityGroups ?? [];
|
|
28677
|
+
const ids = groups.map((group) => group.VpcSecurityGroupId ?? "").sort().join(" ");
|
|
28678
|
+
if (cluster !== void 0 && cluster.Status !== "modifying" && groups.every((group) => group.Status === "active") && ids === want) return;
|
|
28679
|
+
this.logger.debug(safeMsg`DocDB DBCluster ${logicalId} security groups not settled yet (status ${cluster?.Status ?? "unknown"})`);
|
|
28680
|
+
await this.sleep(delay);
|
|
28681
|
+
delay = Math.min(delay * 2, 1e4);
|
|
28682
|
+
}
|
|
28683
|
+
throw new Error(`Timed out waiting for DocDB DBCluster ${logicalId} to apply its new VPC security groups`);
|
|
28684
|
+
}
|
|
28685
|
+
async waitForProtectionOffBeforeFinalSnapshot(logicalId, physicalId, maxWaitMs = FINAL_SNAPSHOT_SETTLE_WAIT_MS) {
|
|
28686
|
+
const budgetMs = Math.min(maxWaitMs, enclosingDeadlineRemainingMs() - FINAL_SNAPSHOT_COMPENSATION_MARGIN_MS);
|
|
28687
|
+
if (budgetMs <= 0) throw new Error(`--remove-protection turned DeletionProtection off, but the resource timeout leaves no time to wait for the cluster to return to 'available', which the final snapshot its DeletionPolicy asks for needs. The delete was not sent and the guard is put back; re-run the destroy with a longer --resource-timeout`);
|
|
28688
|
+
const startTime = Date.now();
|
|
28689
|
+
let delay = 5e3;
|
|
28690
|
+
for (;;) {
|
|
28691
|
+
const current = await this.describeDBCluster(physicalId);
|
|
28692
|
+
if (current === void 0) return;
|
|
28693
|
+
if (current.DeletionProtection === false && current.Status !== "modifying") return;
|
|
28694
|
+
if (Date.now() - startTime + delay >= budgetMs) break;
|
|
28695
|
+
this.logger.debug(safeMsg`DocDB DBCluster ${logicalId}: waiting for the DeletionProtection change to settle before the final snapshot (status ${current.Status ?? "unknown"})`);
|
|
28696
|
+
await this.sleep(delay);
|
|
28697
|
+
delay = Math.min(delay * 2, 1e4);
|
|
28698
|
+
}
|
|
28699
|
+
throw new Error(`--remove-protection turned DeletionProtection off, but the cluster did not return to 'available' within ${Math.max(1, Math.round(budgetMs / 6e4))} minutes, and the final snapshot its DeletionPolicy asks for needs it. The delete was not sent and the guard is put back; re-run the destroy once the cluster is 'available'`);
|
|
28700
|
+
}
|
|
28555
28701
|
async waitForClusterAvailable(dbClusterIdentifier, maxWaitMs = 18e5) {
|
|
28556
28702
|
const startTime = Date.now();
|
|
28557
28703
|
let delay = 5e3;
|
|
@@ -28704,6 +28850,11 @@ var DocDBProvider = class {
|
|
|
28704
28850
|
return null;
|
|
28705
28851
|
}
|
|
28706
28852
|
};
|
|
28853
|
+
function securityGroupListChanged(sent, previous) {
|
|
28854
|
+
if (sent === void 0) return false;
|
|
28855
|
+
const before = Array.isArray(previous) ? previous.filter((id) => typeof id === "string") : [];
|
|
28856
|
+
return [...sent].sort().join(" ") !== [...before].sort().join(" ");
|
|
28857
|
+
}
|
|
28707
28858
|
|
|
28708
28859
|
//#endregion
|
|
28709
28860
|
//#region src/provisioning/providers/docdb-subnet-group-provider.ts
|
|
@@ -30621,6 +30772,15 @@ var CognitoUserPoolProvider = class {
|
|
|
30621
30772
|
protectionFlips = new ProtectionFlipRegistry();
|
|
30622
30773
|
preFlipPools = /* @__PURE__ */ new WeakMap();
|
|
30623
30774
|
emailOmittedFlips = /* @__PURE__ */ new WeakMap();
|
|
30775
|
+
wrapCaughtError(mask, error, build) {
|
|
30776
|
+
const failure = describeAwsFailure(error);
|
|
30777
|
+
const m = maskerOrIdentity(mask);
|
|
30778
|
+
if (!failure.redacted) return wrapMaskedAwsError(m, error, build);
|
|
30779
|
+
this.logger.debug(m(build(m(failure.detail)).message));
|
|
30780
|
+
const relay = isAuxiliaryFailure(error) ? "" : relayedNameCollision(failure.detail);
|
|
30781
|
+
const wrapped = build(`${m(failure.summary)}${relay}`);
|
|
30782
|
+
return error instanceof Error ? markRedactedCause(wrapped) : wrapped;
|
|
30783
|
+
}
|
|
30624
30784
|
handledProperties = /* @__PURE__ */ new Map([["AWS::Cognito::UserPool", /* @__PURE__ */ new Set([
|
|
30625
30785
|
"UserPoolName",
|
|
30626
30786
|
"AutoVerifiedAttributes",
|
|
@@ -30771,11 +30931,13 @@ var CognitoUserPoolProvider = class {
|
|
|
30771
30931
|
this.logger.debug(`Rolled back partially-created Cognito User Pool ${createdUserPoolId}`);
|
|
30772
30932
|
} catch (rollbackError) {
|
|
30773
30933
|
poolLeftBehind = true;
|
|
30774
|
-
|
|
30934
|
+
const rollbackFailure = describeAwsFailure(rollbackError);
|
|
30935
|
+
if (rollbackFailure.redacted) this.logger.debug(maskerOrIdentity(context?.maskSecrets)(`Rollback of partially-created Cognito User Pool ${createdUserPoolId} failed: ${rollbackFailure.detail}`));
|
|
30936
|
+
this.logger.warn(`Failed to roll back partially-created Cognito User Pool ${createdUserPoolId}: ${rollbackFailure.summary}`);
|
|
30775
30937
|
}
|
|
30776
30938
|
}
|
|
30777
30939
|
const cause = error instanceof Error ? error : void 0;
|
|
30778
|
-
const thrown = new ProvisioningError(`Failed to create Cognito User Pool ${logicalId}: ${
|
|
30940
|
+
const thrown = this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to create Cognito User Pool ${logicalId}: ${text}`, resourceType, logicalId, poolName, cause));
|
|
30779
30941
|
if (poolLeftBehind && createdUserPoolId) {
|
|
30780
30942
|
markCreatedBeforeFailure(thrown, logicalId, resourceType, createdUserPoolId);
|
|
30781
30943
|
markNonRetryable(thrown);
|
|
@@ -30997,7 +31159,7 @@ var CognitoUserPoolProvider = class {
|
|
|
30997
31159
|
} catch (error) {
|
|
30998
31160
|
if (error instanceof ResourceUpdateNotSupportedError || error instanceof ProvisioningError) throw error;
|
|
30999
31161
|
const cause = error instanceof Error ? error : void 0;
|
|
31000
|
-
throw new ProvisioningError(`Failed to update Cognito User Pool ${logicalId}: ${
|
|
31162
|
+
throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to update Cognito User Pool ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
31001
31163
|
}
|
|
31002
31164
|
}
|
|
31003
31165
|
async reconcileSchemaCustomAttributes(logicalId, physicalId, resourceType, newSchema, oldSchema, deletionProtected = false) {
|
|
@@ -31095,7 +31257,8 @@ var CognitoUserPoolProvider = class {
|
|
|
31095
31257
|
failure = bareError;
|
|
31096
31258
|
}
|
|
31097
31259
|
if (readOn && !(failure instanceof ResourceNotFoundException$11)) {
|
|
31098
|
-
|
|
31260
|
+
const mask = maskerOrIdentity(context?.maskSecrets);
|
|
31261
|
+
this.logger.debug(mask(safeMsg`Writing DeletionProtection back on ${mask(physicalId)} failed: ${mask(describeAwsFailure(failure).detail)}`));
|
|
31099
31262
|
return "read-on-write-failed";
|
|
31100
31263
|
}
|
|
31101
31264
|
throw failure;
|
|
@@ -31137,6 +31300,7 @@ var CognitoUserPoolProvider = class {
|
|
|
31137
31300
|
flip,
|
|
31138
31301
|
logger: this.logger,
|
|
31139
31302
|
physicalId,
|
|
31303
|
+
mask: context?.maskSecrets,
|
|
31140
31304
|
guardName: "DeletionProtection",
|
|
31141
31305
|
observe: async () => {
|
|
31142
31306
|
observedPool = (await this.getClient().send(new DescribeUserPoolCommand({ UserPoolId: physicalId })).catch((error) => {
|
|
@@ -31163,12 +31327,12 @@ var CognitoUserPoolProvider = class {
|
|
|
31163
31327
|
return;
|
|
31164
31328
|
}
|
|
31165
31329
|
this.logger.debug(`Disabling DeletionProtection on Cognito User Pool ${physicalId} before deletion (--remove-protection)`);
|
|
31166
|
-
await this.disableUserPoolDeletionProtection(physicalId, observedPool, flip);
|
|
31330
|
+
await this.disableUserPoolDeletionProtection(physicalId, observedPool, flip, maskerOrIdentity(context?.maskSecrets));
|
|
31167
31331
|
}
|
|
31168
31332
|
});
|
|
31169
31333
|
} catch (flipError) {
|
|
31170
31334
|
if (isTransientCognitoFailure(flipError)) throw flipError;
|
|
31171
|
-
this.logger.debug(`Could not disable DeletionProtection for ${physicalId}: ${describeAwsFailure(flipError).detail}`);
|
|
31335
|
+
this.logger.debug(maskerOrIdentity(context?.maskSecrets)(`Could not disable DeletionProtection for ${physicalId}: ${describeAwsFailure(flipError).detail}`));
|
|
31172
31336
|
}
|
|
31173
31337
|
if (transientReadError !== void 0) throw transientReadError;
|
|
31174
31338
|
}
|
|
@@ -31183,7 +31347,7 @@ var CognitoUserPoolProvider = class {
|
|
|
31183
31347
|
return;
|
|
31184
31348
|
}
|
|
31185
31349
|
const cause = error instanceof Error ? error : void 0;
|
|
31186
|
-
throw new ProvisioningError(`Failed to delete Cognito User Pool ${logicalId}: ${
|
|
31350
|
+
throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to delete Cognito User Pool ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
31187
31351
|
}
|
|
31188
31352
|
}
|
|
31189
31353
|
async sendEchoedDeletionProtection(physicalId, pool, value, opts = {}) {
|
|
@@ -31206,7 +31370,7 @@ var CognitoUserPoolProvider = class {
|
|
|
31206
31370
|
return "without-email";
|
|
31207
31371
|
}
|
|
31208
31372
|
}
|
|
31209
|
-
async disableUserPoolDeletionProtection(physicalId, pool, flip) {
|
|
31373
|
+
async disableUserPoolDeletionProtection(physicalId, pool, flip, mask) {
|
|
31210
31374
|
if (this.preFlipPools.get(flip)?.ambiguous) this.preFlipPools.delete(flip);
|
|
31211
31375
|
const observedOn = pool.DeletionProtection === "ACTIVE";
|
|
31212
31376
|
try {
|
|
@@ -31221,7 +31385,7 @@ var CognitoUserPoolProvider = class {
|
|
|
31221
31385
|
if (observedOn && isAmbiguousWriteFailure(echoError)) flip.flippedOffByThisRun = true;
|
|
31222
31386
|
if (isTransientCognitoFailure(echoError)) throw echoError;
|
|
31223
31387
|
if (!isRefusedEcho(echoError)) {
|
|
31224
|
-
this.warnGuardLeftOn(physicalId, echoError);
|
|
31388
|
+
this.warnGuardLeftOn(physicalId, mask, echoError);
|
|
31225
31389
|
throw echoError;
|
|
31226
31390
|
}
|
|
31227
31391
|
try {
|
|
@@ -31242,7 +31406,7 @@ var CognitoUserPoolProvider = class {
|
|
|
31242
31406
|
if (isAmbiguousWriteFailure(bareError)) this.logger.warn(safeMsg`Cognito User Pool ${physicalId}: UpdateUserPool with DeletionProtection alone ` + safeMsg`(the pool's own configuration was refused) answered ${describeAwsFailure(bareError).summary}; ` + safeMsg`if that write landed, the pool's self sign-up, Lambda triggers and advanced ` + safeMsg`security were reset. Retrying the delete.`);
|
|
31243
31407
|
throw bareError;
|
|
31244
31408
|
}
|
|
31245
|
-
this.warnGuardLeftOn(physicalId, bareError, echoError);
|
|
31409
|
+
this.warnGuardLeftOn(physicalId, mask, bareError, echoError);
|
|
31246
31410
|
throw bareError;
|
|
31247
31411
|
}
|
|
31248
31412
|
const kept = this.preFlipPools.get(flip);
|
|
@@ -31254,15 +31418,15 @@ var CognitoUserPoolProvider = class {
|
|
|
31254
31418
|
kept.ambiguous = false;
|
|
31255
31419
|
kept.echoedSince = false;
|
|
31256
31420
|
}
|
|
31257
|
-
this.logger.debug(safeMsg`UpdateUserPool refused the echoed configuration of ${physicalId}: ${describeAwsFailure(echoError).detail}`);
|
|
31421
|
+
this.logger.debug(mask(safeMsg`UpdateUserPool refused the echoed configuration of ${mask(physicalId)}: ${mask(describeAwsFailure(echoError).detail)}`));
|
|
31258
31422
|
this.logger.warn(safeMsg`Cognito User Pool ${physicalId}: UpdateUserPool refused the pool's own configuration ` + safeMsg`echoed back (${describeAwsFailure(echoError).summary}), so DeletionProtection was ` + safeMsg`turned off alone. That write resets the settings it omits -- self sign-up, Lambda ` + safeMsg`triggers and advanced security among them -- which stays that way if the delete fails.`);
|
|
31259
31423
|
}
|
|
31260
31424
|
}
|
|
31261
|
-
warnGuardLeftOn(physicalId, error, echoError) {
|
|
31425
|
+
warnGuardLeftOn(physicalId, mask, error, echoError) {
|
|
31262
31426
|
const name = typeof error === "object" && error !== null ? String(error.name) : "";
|
|
31263
31427
|
const accessHint = /AccessDenied|NotAuthorized|Unauthorized/.test(name) ? " The caller needs cognito-idp:UpdateUserPool." : "";
|
|
31264
31428
|
const echoClause = echoError === void 0 ? "" : safeMsg`; the pool's own settings sent back were refused first (${describeAwsFailure(echoError).summary})`;
|
|
31265
|
-
this.logger.debug(safeMsg`UpdateUserPool did not turn DeletionProtection off on ${physicalId}: ${describeAwsFailure(error).detail}`);
|
|
31429
|
+
this.logger.debug(mask(safeMsg`UpdateUserPool did not turn DeletionProtection off on ${mask(physicalId)}: ${mask(describeAwsFailure(error).detail)}`));
|
|
31266
31430
|
const refused = error instanceof Error && isAwsAuthoredFailure(error);
|
|
31267
31431
|
this.logger.warn(refused ? safeMsg`Cognito User Pool ${physicalId}: DeletionProtection was left on, because UpdateUserPool ` + safeMsg`refused to turn it off (${describeAwsFailure(error).summary})` + echoClause + safeMsg`. The delete will be refused while it is on.${accessHint}` : safeMsg`Cognito User Pool ${physicalId}: UpdateUserPool failed without an answer from AWS ` + safeMsg`(${describeAwsFailure(error).summary})` + echoClause + (echoError === void 0 ? typeof error === "object" && error !== null && sentWithoutEmail.has(error) ? safeMsg`, so whether DeletionProtection was turned off is unknown. Its other settings were ` + safeMsg`not reset, except the SES EmailConfiguration, which that write omitted: if it ` + safeMsg`landed, the pool's email configuration was ${EMAIL_RESET_BEFORE_DELETE_CLAUSE}` : safeMsg`, so whether DeletionProtection was turned off is unknown. Its other settings were ` + safeMsg`not reset.` : safeMsg`, so whether DeletionProtection was turned off ALONE is unknown; if it was, the ` + safeMsg`pool's self sign-up, Lambda triggers and advanced security were reset.`) + safeMsg` If the delete then fails, cdkd turns the guard back on. Check the pool with ` + safeMsg`aws cognito-idp describe-user-pool.`);
|
|
31268
31432
|
}
|
|
@@ -31379,6 +31543,14 @@ var ElastiCacheProvider = class {
|
|
|
31379
31543
|
createClient;
|
|
31380
31544
|
providerRegion = ambientRegion();
|
|
31381
31545
|
logger = getLogger().child("ElastiCacheProvider");
|
|
31546
|
+
wrapCaughtError(mask, error, build) {
|
|
31547
|
+
const m = maskerOrIdentity(mask);
|
|
31548
|
+
const failure = describeAwsFailure(error);
|
|
31549
|
+
if (!failure.redacted) return wrapMaskedAwsError(m, error, build);
|
|
31550
|
+
this.logger.debug(m(build(m(failure.detail)).message));
|
|
31551
|
+
const wrapped = build(`${m(failure.summary)}${relayedNameCollision(failure.detail)}`);
|
|
31552
|
+
return error instanceof Error ? markRedactedCause(wrapped) : wrapped;
|
|
31553
|
+
}
|
|
31382
31554
|
handledProperties = /* @__PURE__ */ new Map([["AWS::ElastiCache::SubnetGroup", /* @__PURE__ */ new Set([
|
|
31383
31555
|
"CacheSubnetGroupName",
|
|
31384
31556
|
"CacheSubnetGroupDescription",
|
|
@@ -31428,17 +31600,19 @@ var ElastiCacheProvider = class {
|
|
|
31428
31600
|
this.getClient();
|
|
31429
31601
|
return this.createClient;
|
|
31430
31602
|
}
|
|
31431
|
-
async create(logicalId, resourceType, properties) {
|
|
31603
|
+
async create(logicalId, resourceType, properties, context) {
|
|
31604
|
+
const mask = context?.maskSecrets;
|
|
31432
31605
|
switch (resourceType) {
|
|
31433
|
-
case "AWS::ElastiCache::SubnetGroup": return this.createSubnetGroup(logicalId, resourceType, properties);
|
|
31434
|
-
case "AWS::ElastiCache::CacheCluster": return this.createCacheCluster(logicalId, resourceType, properties);
|
|
31606
|
+
case "AWS::ElastiCache::SubnetGroup": return this.createSubnetGroup(logicalId, resourceType, properties, mask);
|
|
31607
|
+
case "AWS::ElastiCache::CacheCluster": return this.createCacheCluster(logicalId, resourceType, properties, mask);
|
|
31435
31608
|
default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId);
|
|
31436
31609
|
}
|
|
31437
31610
|
}
|
|
31438
|
-
async update(logicalId, physicalId, resourceType, properties, previousProperties,
|
|
31611
|
+
async update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
|
|
31612
|
+
const mask = context?.maskSecrets;
|
|
31439
31613
|
switch (resourceType) {
|
|
31440
|
-
case "AWS::ElastiCache::SubnetGroup": return this.updateSubnetGroup(logicalId, physicalId, resourceType, properties, previousProperties);
|
|
31441
|
-
case "AWS::ElastiCache::CacheCluster": return this.updateCacheCluster(logicalId, physicalId, resourceType, properties, previousProperties);
|
|
31614
|
+
case "AWS::ElastiCache::SubnetGroup": return this.updateSubnetGroup(logicalId, physicalId, resourceType, properties, previousProperties, mask);
|
|
31615
|
+
case "AWS::ElastiCache::CacheCluster": return this.updateCacheCluster(logicalId, physicalId, resourceType, properties, previousProperties, mask);
|
|
31442
31616
|
default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId, physicalId);
|
|
31443
31617
|
}
|
|
31444
31618
|
}
|
|
@@ -31449,7 +31623,7 @@ var ElastiCacheProvider = class {
|
|
|
31449
31623
|
default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId, physicalId);
|
|
31450
31624
|
}
|
|
31451
31625
|
}
|
|
31452
|
-
async createSubnetGroup(logicalId, resourceType, properties) {
|
|
31626
|
+
async createSubnetGroup(logicalId, resourceType, properties, mask) {
|
|
31453
31627
|
this.logger.debug(`Creating CacheSubnetGroup ${logicalId}`);
|
|
31454
31628
|
const tags = refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId);
|
|
31455
31629
|
const cacheSubnetGroupName = properties["CacheSubnetGroupName"] || generatedNameFor("AWS::ElastiCache::SubnetGroup", logicalId);
|
|
@@ -31467,10 +31641,10 @@ var ElastiCacheProvider = class {
|
|
|
31467
31641
|
};
|
|
31468
31642
|
} catch (error) {
|
|
31469
31643
|
const cause = error instanceof Error ? error : void 0;
|
|
31470
|
-
throw new ProvisioningError(`Failed to create CacheSubnetGroup ${logicalId}: ${
|
|
31644
|
+
throw this.wrapCaughtError(mask, error, (text) => new ProvisioningError(`Failed to create CacheSubnetGroup ${logicalId}: ${text}`, resourceType, logicalId, cacheSubnetGroupName, cause));
|
|
31471
31645
|
}
|
|
31472
31646
|
}
|
|
31473
|
-
async updateSubnetGroup(logicalId, physicalId, resourceType, properties, previousProperties) {
|
|
31647
|
+
async updateSubnetGroup(logicalId, physicalId, resourceType, properties, previousProperties, mask) {
|
|
31474
31648
|
this.logger.debug(`Updating CacheSubnetGroup ${logicalId}: ${physicalId}`);
|
|
31475
31649
|
refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId, physicalId);
|
|
31476
31650
|
try {
|
|
@@ -31494,7 +31668,7 @@ var ElastiCacheProvider = class {
|
|
|
31494
31668
|
} catch (error) {
|
|
31495
31669
|
if (error instanceof ProvisioningError) throw error;
|
|
31496
31670
|
const cause = error instanceof Error ? error : void 0;
|
|
31497
|
-
throw new ProvisioningError(`Failed to update CacheSubnetGroup ${logicalId}: ${
|
|
31671
|
+
throw this.wrapCaughtError(mask, error, (text) => new ProvisioningError(`Failed to update CacheSubnetGroup ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
31498
31672
|
}
|
|
31499
31673
|
}
|
|
31500
31674
|
async deleteSubnetGroup(logicalId, physicalId, resourceType, context) {
|
|
@@ -31510,10 +31684,10 @@ var ElastiCacheProvider = class {
|
|
|
31510
31684
|
return;
|
|
31511
31685
|
}
|
|
31512
31686
|
const cause = error instanceof Error ? error : void 0;
|
|
31513
|
-
throw new ProvisioningError(`Failed to delete CacheSubnetGroup ${logicalId}: ${
|
|
31687
|
+
throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to delete CacheSubnetGroup ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
31514
31688
|
}
|
|
31515
31689
|
}
|
|
31516
|
-
async createCacheCluster(logicalId, resourceType, properties) {
|
|
31690
|
+
async createCacheCluster(logicalId, resourceType, properties, mask) {
|
|
31517
31691
|
this.logger.debug(`Creating CacheCluster ${logicalId}`);
|
|
31518
31692
|
const tags = refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId);
|
|
31519
31693
|
const cacheClusterId = properties["ClusterName"] || generatedNameFor("AWS::ElastiCache::CacheCluster", logicalId);
|
|
@@ -31564,12 +31738,12 @@ var ElastiCacheProvider = class {
|
|
|
31564
31738
|
attributes
|
|
31565
31739
|
};
|
|
31566
31740
|
} catch (error) {
|
|
31567
|
-
const thrown = error instanceof ProvisioningError ? error : new ProvisioningError(`Failed to create CacheCluster ${logicalId}: ${
|
|
31741
|
+
const thrown = error instanceof ProvisioningError ? error : this.wrapCaughtError(mask, error, (text) => new ProvisioningError(`Failed to create CacheCluster ${logicalId}: ${text}`, resourceType, logicalId, cacheClusterId, error instanceof Error ? error : void 0));
|
|
31568
31742
|
if (clusterCreated) markCreatedBeforeFailure(thrown, logicalId, resourceType, cacheClusterId);
|
|
31569
31743
|
throw thrown;
|
|
31570
31744
|
}
|
|
31571
31745
|
}
|
|
31572
|
-
async updateCacheCluster(logicalId, physicalId, resourceType, properties, previousProperties) {
|
|
31746
|
+
async updateCacheCluster(logicalId, physicalId, resourceType, properties, previousProperties, mask) {
|
|
31573
31747
|
this.logger.debug(`Updating CacheCluster ${logicalId}: ${physicalId}`);
|
|
31574
31748
|
refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId, physicalId);
|
|
31575
31749
|
try {
|
|
@@ -31615,7 +31789,7 @@ var ElastiCacheProvider = class {
|
|
|
31615
31789
|
} catch (error) {
|
|
31616
31790
|
if (error instanceof ProvisioningError) throw error;
|
|
31617
31791
|
const cause = error instanceof Error ? error : void 0;
|
|
31618
|
-
throw new ProvisioningError(`Failed to update CacheCluster ${logicalId}: ${
|
|
31792
|
+
throw this.wrapCaughtError(mask, error, (text) => new ProvisioningError(`Failed to update CacheCluster ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
31619
31793
|
}
|
|
31620
31794
|
}
|
|
31621
31795
|
async deleteCacheCluster(logicalId, physicalId, resourceType, context) {
|
|
@@ -31642,7 +31816,7 @@ var ElastiCacheProvider = class {
|
|
|
31642
31816
|
return;
|
|
31643
31817
|
}
|
|
31644
31818
|
const cause = error instanceof Error ? error : void 0;
|
|
31645
|
-
throw new ProvisioningError(`Failed to delete CacheCluster ${logicalId}: ${
|
|
31819
|
+
throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to delete CacheCluster ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
31646
31820
|
}
|
|
31647
31821
|
}
|
|
31648
31822
|
buildLogDeliveryConfigurationsForUpdate(newConfigs, previousConfigs) {
|
|
@@ -35920,6 +36094,25 @@ function pickDefined(obj) {
|
|
|
35920
36094
|
}
|
|
35921
36095
|
return out;
|
|
35922
36096
|
}
|
|
36097
|
+
const CRAWLER_LEFT_IN_PLACE_ON_REMOVAL = [
|
|
36098
|
+
"DatabaseName",
|
|
36099
|
+
"Description",
|
|
36100
|
+
"Classifiers",
|
|
36101
|
+
"TablePrefix",
|
|
36102
|
+
"Schedule",
|
|
36103
|
+
"SchemaChangePolicy",
|
|
36104
|
+
"RecrawlPolicy",
|
|
36105
|
+
"LineageConfiguration",
|
|
36106
|
+
"LakeFormationConfiguration",
|
|
36107
|
+
"Configuration",
|
|
36108
|
+
"CrawlerSecurityConfiguration"
|
|
36109
|
+
];
|
|
36110
|
+
const crawlerLeftInPlaceWarning = (logicalId, names, caller) => {
|
|
36111
|
+
const one = names.length === 1;
|
|
36112
|
+
const subject = one ? "property" : "properties";
|
|
36113
|
+
const cfnKeeps = names.includes("LineageConfiguration") ? "" : `, as CloudFormation leaves ${one ? "it" : "them"}`;
|
|
36114
|
+
return caller === "rollback" ? safeMsg`${logicalId} (AWS::Glue::Crawler): ${subject} ${names.join(", ")} ${one ? "is" : "are"} absent from the state being restored; UpdateCrawler keeps a setting it is not sent, so the rollback leaves the value the failed deploy applied in place.` : safeMsg`${logicalId} (AWS::Glue::Crawler): ${subject} ${names.join(", ")} ${one ? "was" : "were"} removed from the template and ${one ? "keeps its" : "keep their"} current AWS value${cfnKeeps}; UpdateCrawler keeps a setting it is not sent. Declare the intended value explicitly to change it.`;
|
|
36115
|
+
};
|
|
35923
36116
|
var GlueCrawlerProvider = class {
|
|
35924
36117
|
client;
|
|
35925
36118
|
createClient;
|
|
@@ -35947,6 +36140,13 @@ var GlueCrawlerProvider = class {
|
|
|
35947
36140
|
"CrawlerSecurityConfiguration",
|
|
35948
36141
|
"Tags"
|
|
35949
36142
|
])]]);
|
|
36143
|
+
removalHandledInUpdate = /* @__PURE__ */ new Map([["AWS::Glue::Crawler", /* @__PURE__ */ new Set([
|
|
36144
|
+
"Name",
|
|
36145
|
+
"Role",
|
|
36146
|
+
"Targets",
|
|
36147
|
+
"Tags",
|
|
36148
|
+
...CRAWLER_LEFT_IN_PLACE_ON_REMOVAL
|
|
36149
|
+
])]]);
|
|
35950
36150
|
getClient() {
|
|
35951
36151
|
if (!this.client) ({client: this.client, createClient: this.createClient} = newGlueClients(this.providerRegion));
|
|
35952
36152
|
return this.client;
|
|
@@ -36012,6 +36212,12 @@ var GlueCrawlerProvider = class {
|
|
|
36012
36212
|
} else throw err;
|
|
36013
36213
|
}
|
|
36014
36214
|
await applyGlueTagDiff(this.getClient(), () => this.resourceArn(physicalId), previousProperties["Tags"], properties["Tags"], resourceType, logicalId, log.warn);
|
|
36215
|
+
if (!context?.desiredFromAwsReadback) {
|
|
36216
|
+
const removed = context?.removedProperties;
|
|
36217
|
+
const leftInPlace = [];
|
|
36218
|
+
for (const key of CRAWLER_LEFT_IN_PLACE_ON_REMOVAL) if (removed !== void 0 ? removed.has(key) : properties[key] === void 0 && previousProperties?.[key] !== void 0) leftInPlace.push(key);
|
|
36219
|
+
if (leftInPlace.length > 0) log.warn(crawlerLeftInPlaceWarning(logicalId, leftInPlace, context?.replayingState ? "rollback" : "deploy"));
|
|
36220
|
+
}
|
|
36015
36221
|
return {
|
|
36016
36222
|
physicalId,
|
|
36017
36223
|
wasReplaced: false
|
|
@@ -37238,6 +37444,117 @@ function removableRecorded(kind, items) {
|
|
|
37238
37444
|
Subscribers: e["Subscribers"].filter((s) => !holdsSecretDerivedEntry(s["Address"]))
|
|
37239
37445
|
} : e);
|
|
37240
37446
|
}
|
|
37447
|
+
function finiteNumber(value) {
|
|
37448
|
+
if (typeof value === "number") return Number.isFinite(value) ? value : void 0;
|
|
37449
|
+
if (typeof value === "string" && value.trim() !== "") {
|
|
37450
|
+
const n = Number(value);
|
|
37451
|
+
return Number.isFinite(n) ? n : void 0;
|
|
37452
|
+
}
|
|
37453
|
+
}
|
|
37454
|
+
function isoDate(value) {
|
|
37455
|
+
let date;
|
|
37456
|
+
if (typeof value === "number") date = new Date(value < 0xe8d4a51000 ? value * 1e3 : value);
|
|
37457
|
+
else if (typeof value === "string" && /^\d+$/.test(value)) {
|
|
37458
|
+
const n = Number(value);
|
|
37459
|
+
date = new Date(n < 0xe8d4a51000 ? n * 1e3 : n);
|
|
37460
|
+
} else if (typeof value === "string") date = new Date(value);
|
|
37461
|
+
else if (value instanceof Date) date = value;
|
|
37462
|
+
else return void 0;
|
|
37463
|
+
return Number.isNaN(date.getTime()) ? void 0 : date.toISOString();
|
|
37464
|
+
}
|
|
37465
|
+
function canonicalSpend(spend) {
|
|
37466
|
+
if (!isPlainRecord(spend)) return spend;
|
|
37467
|
+
const amount = finiteNumber(spend["Amount"]);
|
|
37468
|
+
return amount === void 0 || amount === spend["Amount"] ? spend : {
|
|
37469
|
+
...spend,
|
|
37470
|
+
Amount: amount
|
|
37471
|
+
};
|
|
37472
|
+
}
|
|
37473
|
+
function canonicalizeBudgetDriftBag(side) {
|
|
37474
|
+
let out = side;
|
|
37475
|
+
const budget = side["Budget"];
|
|
37476
|
+
if (isPlainRecord(budget)) {
|
|
37477
|
+
let nextBudget = budget;
|
|
37478
|
+
const set = (key, value) => {
|
|
37479
|
+
if (value === nextBudget[key]) return;
|
|
37480
|
+
if (nextBudget === budget) nextBudget = { ...budget };
|
|
37481
|
+
nextBudget[key] = value;
|
|
37482
|
+
};
|
|
37483
|
+
set("BudgetLimit", canonicalSpend(budget["BudgetLimit"]));
|
|
37484
|
+
const planned = budget["PlannedBudgetLimits"];
|
|
37485
|
+
if (isPlainRecord(planned)) {
|
|
37486
|
+
const entries = Object.entries(planned).map(([key, spend]) => [key, canonicalSpend(spend)]);
|
|
37487
|
+
if (entries.some(([key, spend]) => spend !== planned[key])) set("PlannedBudgetLimits", Object.fromEntries(entries));
|
|
37488
|
+
}
|
|
37489
|
+
const period = budget["TimePeriod"];
|
|
37490
|
+
if (isPlainRecord(period)) {
|
|
37491
|
+
let nextPeriod = period;
|
|
37492
|
+
for (const key of ["Start", "End"]) {
|
|
37493
|
+
if (period[key] === void 0) continue;
|
|
37494
|
+
const iso = isoDate(period[key]);
|
|
37495
|
+
if (iso === void 0 || iso === period[key]) continue;
|
|
37496
|
+
if (nextPeriod === period) nextPeriod = { ...period };
|
|
37497
|
+
nextPeriod[key] = iso;
|
|
37498
|
+
}
|
|
37499
|
+
set("TimePeriod", nextPeriod);
|
|
37500
|
+
}
|
|
37501
|
+
if (nextBudget !== budget) out = {
|
|
37502
|
+
...out,
|
|
37503
|
+
Budget: nextBudget
|
|
37504
|
+
};
|
|
37505
|
+
}
|
|
37506
|
+
const list = side["NotificationsWithSubscribers"];
|
|
37507
|
+
if (Array.isArray(list)) {
|
|
37508
|
+
let changed = false;
|
|
37509
|
+
const nextList = list.map((entry) => {
|
|
37510
|
+
if (!isPlainRecord(entry) || !isPlainRecord(entry["Notification"])) return entry;
|
|
37511
|
+
const notification = entry["Notification"];
|
|
37512
|
+
const threshold = finiteNumber(notification["Threshold"]);
|
|
37513
|
+
const fillType = notification["ThresholdType"] == null;
|
|
37514
|
+
const fixThreshold = threshold !== void 0 && threshold !== notification["Threshold"];
|
|
37515
|
+
if (!fillType && !fixThreshold) return entry;
|
|
37516
|
+
changed = true;
|
|
37517
|
+
return {
|
|
37518
|
+
...entry,
|
|
37519
|
+
Notification: {
|
|
37520
|
+
...notification,
|
|
37521
|
+
...fixThreshold && { Threshold: threshold },
|
|
37522
|
+
...fillType && { ThresholdType: "PERCENTAGE" }
|
|
37523
|
+
}
|
|
37524
|
+
};
|
|
37525
|
+
});
|
|
37526
|
+
if (changed) out = {
|
|
37527
|
+
...out,
|
|
37528
|
+
NotificationsWithSubscribers: nextList
|
|
37529
|
+
};
|
|
37530
|
+
}
|
|
37531
|
+
return out;
|
|
37532
|
+
}
|
|
37533
|
+
function declaresLegacyFilterShape(properties) {
|
|
37534
|
+
const budget = properties?.["Budget"];
|
|
37535
|
+
if (!isPlainRecord(budget)) return false;
|
|
37536
|
+
const legacy = budget["CostFilters"] != null || budget["CostTypes"] != null;
|
|
37537
|
+
const current = budget["FilterExpression"] != null || budget["Metrics"] != null;
|
|
37538
|
+
return legacy && !current;
|
|
37539
|
+
}
|
|
37540
|
+
function dropElapsedPlannedLimits(baseline, aws, nowMs) {
|
|
37541
|
+
const budget = baseline["Budget"];
|
|
37542
|
+
const awsBudget = aws["Budget"];
|
|
37543
|
+
if (!isPlainRecord(budget) || !isPlainRecord(awsBudget)) return baseline;
|
|
37544
|
+
const planned = budget["PlannedBudgetLimits"];
|
|
37545
|
+
if (!isPlainRecord(planned)) return baseline;
|
|
37546
|
+
const awsPlanned = isPlainRecord(awsBudget["PlannedBudgetLimits"]) ? awsBudget["PlannedBudgetLimits"] : {};
|
|
37547
|
+
const elapsed = (key) => !Object.hasOwn(awsPlanned, key) && /^\d+$/.test(key) && Number(key) * 1e3 < nowMs;
|
|
37548
|
+
const kept = Object.entries(planned).filter(([key]) => !elapsed(key));
|
|
37549
|
+
if (kept.length === Object.keys(planned).length) return baseline;
|
|
37550
|
+
return {
|
|
37551
|
+
...baseline,
|
|
37552
|
+
Budget: {
|
|
37553
|
+
...budget,
|
|
37554
|
+
PlannedBudgetLimits: Object.fromEntries(kept)
|
|
37555
|
+
}
|
|
37556
|
+
};
|
|
37557
|
+
}
|
|
37241
37558
|
var BudgetsBudgetProvider = class {
|
|
37242
37559
|
client;
|
|
37243
37560
|
createClient;
|
|
@@ -37264,7 +37581,14 @@ var BudgetsBudgetProvider = class {
|
|
|
37264
37581
|
}
|
|
37265
37582
|
wrapBudgetError(mask, error, verb, logicalId, resourceType, physicalId) {
|
|
37266
37583
|
const cause = error instanceof Error ? error : void 0;
|
|
37267
|
-
return
|
|
37584
|
+
return this.wrapMaskedError(mask, error, (text) => new ProvisioningError(`Failed to ${verb} budget ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
37585
|
+
}
|
|
37586
|
+
wrapMaskedError(mask, error, build) {
|
|
37587
|
+
const failure = describeAwsFailure(error);
|
|
37588
|
+
if (!(error instanceof Error)) return build(mask(failure.detail));
|
|
37589
|
+
if (!failure.redacted) return wrapMaskedAwsError(mask, error, build);
|
|
37590
|
+
this.logger.debug(mask(build(mask(failure.detail)).message));
|
|
37591
|
+
return markRedactedCause(build(`${mask(failure.summary)}${relayedNameCollision(failure.detail)}`));
|
|
37268
37592
|
}
|
|
37269
37593
|
getCreateClient() {
|
|
37270
37594
|
this.getClient();
|
|
@@ -37427,7 +37751,8 @@ var BudgetsBudgetProvider = class {
|
|
|
37427
37751
|
try {
|
|
37428
37752
|
await this.addNotificationsOnly(accountId, physicalId, newNotifications);
|
|
37429
37753
|
} catch (error) {
|
|
37430
|
-
|
|
37754
|
+
const cause = error instanceof Error ? error : void 0;
|
|
37755
|
+
throw this.wrapMaskedError(mask, error, (text) => new ProvisioningError(`Failed to update budget ${logicalId}: adding ${newNotifications.length} desired notification(s) beside every notification the budget already holds (the recorded NotificationsWithSubscribers is not a list cdkd can read, so none was deleted; a budget allows at most 5 notifications and 10 email subscribers each): ${text}`, resourceType, logicalId, physicalId, cause));
|
|
37431
37756
|
}
|
|
37432
37757
|
this.logger.warn(safeMsg`The recorded NotificationsWithSubscribers of budget ${logicalId} is not a list cdkd can read, so cdkd deleted no notification or subscriber and only added the desired ones. Delete any the template no longer names yourself.`);
|
|
37433
37758
|
}
|
|
@@ -37605,7 +37930,7 @@ var BudgetsBudgetProvider = class {
|
|
|
37605
37930
|
return;
|
|
37606
37931
|
}
|
|
37607
37932
|
const cause = error instanceof Error ? error : void 0;
|
|
37608
|
-
throw new ProvisioningError(`Failed to delete budget ${logicalId}: ${
|
|
37933
|
+
throw this.wrapMaskedError(maskerOrIdentity(context?.maskSecrets), error, (text) => new ProvisioningError(`Failed to delete budget ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
37609
37934
|
}
|
|
37610
37935
|
}
|
|
37611
37936
|
async getAttribute(physicalId, resourceType, attributeName, logicalId) {
|
|
@@ -37619,8 +37944,168 @@ var BudgetsBudgetProvider = class {
|
|
|
37619
37944
|
return await this.budgetArn(accountId, physicalId);
|
|
37620
37945
|
} catch (error) {
|
|
37621
37946
|
const cause = error instanceof Error ? error : void 0;
|
|
37622
|
-
throw new ProvisioningError(`Failed to resolve Arn for budget ${physicalId}: ${
|
|
37947
|
+
throw this.wrapMaskedError(maskerOrIdentity(void 0), error, (text) => new ProvisioningError(`Failed to resolve Arn for budget ${physicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
37948
|
+
}
|
|
37949
|
+
}
|
|
37950
|
+
async readCurrentState(physicalId, _logicalId, resourceType, properties) {
|
|
37951
|
+
if (resourceType !== "AWS::Budgets::Budget") return void 0;
|
|
37952
|
+
const accountId = await this.resolveAccountId();
|
|
37953
|
+
const client = this.getClient();
|
|
37954
|
+
const describe = async () => {
|
|
37955
|
+
try {
|
|
37956
|
+
return (await client.send(new DescribeBudgetCommand({
|
|
37957
|
+
AccountId: accountId,
|
|
37958
|
+
BudgetName: physicalId,
|
|
37959
|
+
ShowFilterExpression: !declaresLegacyFilterShape(properties)
|
|
37960
|
+
}))).Budget;
|
|
37961
|
+
} catch (error) {
|
|
37962
|
+
if (error instanceof NotFoundException$5) return RESOURCE_NOT_FOUND;
|
|
37963
|
+
throw error;
|
|
37964
|
+
}
|
|
37965
|
+
};
|
|
37966
|
+
const budget = await describe();
|
|
37967
|
+
if (budget === RESOURCE_NOT_FOUND || budget === void 0) return budget;
|
|
37968
|
+
const notifications = await this.listNotifications(accountId, physicalId);
|
|
37969
|
+
if (notifications === void 0 && await describe() === RESOURCE_NOT_FOUND) return RESOURCE_NOT_FOUND;
|
|
37970
|
+
const notificationsWithSubscribers = (await Promise.all((notifications ?? []).map(async (notification) => {
|
|
37971
|
+
const subscribers = await this.listSubscribers(accountId, physicalId, notification);
|
|
37972
|
+
return subscribers === void 0 ? void 0 : {
|
|
37973
|
+
notification,
|
|
37974
|
+
subscribers
|
|
37975
|
+
};
|
|
37976
|
+
}))).filter((e) => e !== void 0).map(({ notification, subscribers }) => ({
|
|
37977
|
+
Notification: {
|
|
37978
|
+
NotificationType: notification.NotificationType,
|
|
37979
|
+
ComparisonOperator: notification.ComparisonOperator,
|
|
37980
|
+
Threshold: notification.Threshold,
|
|
37981
|
+
...notification.ThresholdType !== void 0 && notification.ThresholdType !== "PERCENTAGE" && { ThresholdType: notification.ThresholdType }
|
|
37982
|
+
},
|
|
37983
|
+
Subscribers: subscribers.map((s) => ({
|
|
37984
|
+
SubscriptionType: s.SubscriptionType,
|
|
37985
|
+
Address: s.Address
|
|
37986
|
+
}))
|
|
37987
|
+
}));
|
|
37988
|
+
let tags;
|
|
37989
|
+
try {
|
|
37990
|
+
tags = await client.send(new ListTagsForResourceCommand$15({ ResourceARN: await this.budgetArn(accountId, physicalId) }));
|
|
37991
|
+
} catch (error) {
|
|
37992
|
+
if (error instanceof NotFoundException$5 && await describe() === RESOURCE_NOT_FOUND) return RESOURCE_NOT_FOUND;
|
|
37993
|
+
throw error;
|
|
37994
|
+
}
|
|
37995
|
+
return {
|
|
37996
|
+
Budget: this.budgetFromSdk(budget),
|
|
37997
|
+
NotificationsWithSubscribers: notificationsWithSubscribers,
|
|
37998
|
+
ResourceTags: (tags.ResourceTags ?? []).map((t) => ({
|
|
37999
|
+
Key: t.Key,
|
|
38000
|
+
Value: t.Value
|
|
38001
|
+
}))
|
|
38002
|
+
};
|
|
38003
|
+
}
|
|
38004
|
+
async listNotifications(accountId, budgetName) {
|
|
38005
|
+
const out = [];
|
|
38006
|
+
let token;
|
|
38007
|
+
try {
|
|
38008
|
+
do {
|
|
38009
|
+
const page = await this.getClient().send(new DescribeNotificationsForBudgetCommand({
|
|
38010
|
+
AccountId: accountId,
|
|
38011
|
+
BudgetName: budgetName,
|
|
38012
|
+
MaxResults: 100,
|
|
38013
|
+
...token !== void 0 && { NextToken: token }
|
|
38014
|
+
}));
|
|
38015
|
+
out.push(...page.Notifications ?? []);
|
|
38016
|
+
token = page.NextToken;
|
|
38017
|
+
} while (token);
|
|
38018
|
+
} catch (error) {
|
|
38019
|
+
if (error instanceof NotFoundException$5) return void 0;
|
|
38020
|
+
throw error;
|
|
38021
|
+
}
|
|
38022
|
+
return out;
|
|
38023
|
+
}
|
|
38024
|
+
async listSubscribers(accountId, budgetName, notification) {
|
|
38025
|
+
const out = [];
|
|
38026
|
+
let token;
|
|
38027
|
+
try {
|
|
38028
|
+
do {
|
|
38029
|
+
const page = await this.getClient().send(new DescribeSubscribersForNotificationCommand({
|
|
38030
|
+
AccountId: accountId,
|
|
38031
|
+
BudgetName: budgetName,
|
|
38032
|
+
Notification: {
|
|
38033
|
+
NotificationType: notification.NotificationType,
|
|
38034
|
+
ComparisonOperator: notification.ComparisonOperator,
|
|
38035
|
+
Threshold: notification.Threshold,
|
|
38036
|
+
...notification.ThresholdType !== void 0 && { ThresholdType: notification.ThresholdType }
|
|
38037
|
+
},
|
|
38038
|
+
MaxResults: 100,
|
|
38039
|
+
...token !== void 0 && { NextToken: token }
|
|
38040
|
+
}));
|
|
38041
|
+
out.push(...page.Subscribers ?? []);
|
|
38042
|
+
token = page.NextToken;
|
|
38043
|
+
} while (token);
|
|
38044
|
+
} catch (error) {
|
|
38045
|
+
if (error instanceof NotFoundException$5) return void 0;
|
|
38046
|
+
throw error;
|
|
38047
|
+
}
|
|
38048
|
+
return out;
|
|
38049
|
+
}
|
|
38050
|
+
budgetFromSdk(budget) {
|
|
38051
|
+
const raw = budget;
|
|
38052
|
+
const spend = (s) => s === void 0 ? void 0 : {
|
|
38053
|
+
Amount: finiteNumber(s.Amount) ?? s.Amount,
|
|
38054
|
+
Unit: s.Unit
|
|
38055
|
+
};
|
|
38056
|
+
const out = {
|
|
38057
|
+
BudgetName: budget.BudgetName,
|
|
38058
|
+
BudgetType: raw["BudgetType"],
|
|
38059
|
+
TimeUnit: budget.TimeUnit
|
|
38060
|
+
};
|
|
38061
|
+
if (budget.BudgetLimit) out["BudgetLimit"] = spend(budget.BudgetLimit);
|
|
38062
|
+
if (budget.PlannedBudgetLimits && Object.keys(budget.PlannedBudgetLimits).length > 0) out["PlannedBudgetLimits"] = Object.fromEntries(Object.entries(budget.PlannedBudgetLimits).map(([key, s]) => [key, spend(s)]));
|
|
38063
|
+
if (budget.TimePeriod) out["TimePeriod"] = {
|
|
38064
|
+
...budget.TimePeriod.Start && { Start: isoDate(budget.TimePeriod.Start) },
|
|
38065
|
+
...budget.TimePeriod.End && { End: isoDate(budget.TimePeriod.End) }
|
|
38066
|
+
};
|
|
38067
|
+
if (budget.CostFilters && Object.keys(budget.CostFilters).length > 0) out["CostFilters"] = budget.CostFilters;
|
|
38068
|
+
if (budget.CostTypes) out["CostTypes"] = { ...budget.CostTypes };
|
|
38069
|
+
const autoAdjust = raw["AutoAdjustData"];
|
|
38070
|
+
if (isPlainRecord(autoAdjust)) {
|
|
38071
|
+
const historical = autoAdjust["HistoricalOptions"];
|
|
38072
|
+
out["AutoAdjustData"] = {
|
|
38073
|
+
AutoAdjustType: autoAdjust["AutoAdjustType"],
|
|
38074
|
+
...isPlainRecord(historical) && { HistoricalOptions: { BudgetAdjustmentPeriod: historical["BudgetAdjustmentPeriod"] } }
|
|
38075
|
+
};
|
|
38076
|
+
}
|
|
38077
|
+
if (raw["FilterExpression"] !== void 0) out["FilterExpression"] = raw["FilterExpression"];
|
|
38078
|
+
if (Array.isArray(raw["Metrics"]) && raw["Metrics"].length > 0) out["Metrics"] = raw["Metrics"];
|
|
38079
|
+
if (raw["BillingViewArn"] !== void 0) out["BillingViewArn"] = raw["BillingViewArn"];
|
|
38080
|
+
return out;
|
|
38081
|
+
}
|
|
38082
|
+
getDriftUnorderedPaths(resourceType) {
|
|
38083
|
+
return resourceType === "AWS::Budgets::Budget" ? ["NotificationsWithSubscribers"] : [];
|
|
38084
|
+
}
|
|
38085
|
+
getDriftUnknownPaths(resourceType, properties) {
|
|
38086
|
+
if (resourceType !== "AWS::Budgets::Budget") return [];
|
|
38087
|
+
const budget = properties?.["Budget"];
|
|
38088
|
+
if (!isPlainRecord(budget)) return [];
|
|
38089
|
+
const paths = [];
|
|
38090
|
+
if (budget["AutoAdjustData"] != null || budget["PlannedBudgetLimits"] != null) paths.push("Budget.BudgetLimit");
|
|
38091
|
+
if (budget["FilterExpression"] != null || budget["Metrics"] != null) {
|
|
38092
|
+
if (budget["CostTypes"] != null) paths.push("Budget.CostTypes");
|
|
38093
|
+
if (budget["CostFilters"] != null) paths.push("Budget.CostFilters");
|
|
37623
38094
|
}
|
|
38095
|
+
return paths;
|
|
38096
|
+
}
|
|
38097
|
+
canonicalizeDriftProperties(resourceType, side) {
|
|
38098
|
+
return resourceType === "AWS::Budgets::Budget" ? canonicalizeBudgetDriftBag(side) : side;
|
|
38099
|
+
}
|
|
38100
|
+
async canonicalizeDriftPair(resourceType, baseline, aws) {
|
|
38101
|
+
if (resourceType !== "AWS::Budgets::Budget") return {
|
|
38102
|
+
baseline,
|
|
38103
|
+
aws
|
|
38104
|
+
};
|
|
38105
|
+
return {
|
|
38106
|
+
baseline: dropElapsedPlannedLimits(baseline, aws, Date.now()),
|
|
38107
|
+
aws
|
|
38108
|
+
};
|
|
37624
38109
|
}
|
|
37625
38110
|
async import(input) {
|
|
37626
38111
|
const rawBudget = input.properties["Budget"] ?? {};
|
|
@@ -38397,7 +38882,7 @@ var KinesisStreamConsumerProvider = class {
|
|
|
38397
38882
|
if (desc.ConsumerName !== void 0) result["ConsumerName"] = desc.ConsumerName;
|
|
38398
38883
|
if (desc.StreamARN !== void 0) result["StreamARN"] = desc.StreamARN;
|
|
38399
38884
|
try {
|
|
38400
|
-
const tagsResp = await this.getClient().send(new ListTagsForResourceCommand$
|
|
38885
|
+
const tagsResp = await this.getClient().send(new ListTagsForResourceCommand$16({ ResourceARN: physicalId }));
|
|
38401
38886
|
result["Tags"] = normalizeAwsTagsToCfn(tagsResp.Tags);
|
|
38402
38887
|
} catch (err) {
|
|
38403
38888
|
if (err instanceof ResourceNotFoundException$12) return RESOURCE_NOT_FOUND;
|
|
@@ -38480,6 +38965,14 @@ var SchedulerScheduleProvider = class {
|
|
|
38480
38965
|
client;
|
|
38481
38966
|
providerRegion = ambientRegion();
|
|
38482
38967
|
logger = getLogger().child("SchedulerScheduleProvider");
|
|
38968
|
+
wrapCaughtError(mask, error, build) {
|
|
38969
|
+
const m = maskerOrIdentity(mask);
|
|
38970
|
+
const failure = describeAwsFailure(error);
|
|
38971
|
+
if (!failure.redacted) return wrapMaskedAwsError(m, error, build);
|
|
38972
|
+
this.logger.debug(m(build(m(failure.detail)).message));
|
|
38973
|
+
const wrapped = build(`${m(failure.summary)}${relayedNameCollision(failure.detail)}`);
|
|
38974
|
+
return error instanceof Error ? markRedactedCause(wrapped) : wrapped;
|
|
38975
|
+
}
|
|
38483
38976
|
handledProperties = /* @__PURE__ */ new Map([["AWS::Scheduler::Schedule", /* @__PURE__ */ new Set([
|
|
38484
38977
|
"Name",
|
|
38485
38978
|
"GroupName",
|
|
@@ -38575,7 +39068,7 @@ var SchedulerScheduleProvider = class {
|
|
|
38575
39068
|
}
|
|
38576
39069
|
return result;
|
|
38577
39070
|
}
|
|
38578
|
-
async create(logicalId, resourceType, properties) {
|
|
39071
|
+
async create(logicalId, resourceType, properties, context) {
|
|
38579
39072
|
const name = properties["Name"] ?? generatedNameFor("AWS::Scheduler::Schedule", logicalId);
|
|
38580
39073
|
const groupName = this.groupNameOf(properties);
|
|
38581
39074
|
this.logger.debug(`Creating Schedule ${logicalId}: ${name}${groupName ? ` (group: ${groupName})` : ""}`);
|
|
@@ -38595,7 +39088,7 @@ var SchedulerScheduleProvider = class {
|
|
|
38595
39088
|
};
|
|
38596
39089
|
} catch (error) {
|
|
38597
39090
|
const cause = error instanceof Error ? error : void 0;
|
|
38598
|
-
throw new ProvisioningError(`Failed to create Schedule ${logicalId}: ${
|
|
39091
|
+
throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to create Schedule ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
|
|
38599
39092
|
}
|
|
38600
39093
|
}
|
|
38601
39094
|
async readIdentity(name, groupName) {
|
|
@@ -38699,7 +39192,7 @@ var SchedulerScheduleProvider = class {
|
|
|
38699
39192
|
} catch (error) {
|
|
38700
39193
|
if (error instanceof ResourceUpdateNotSupportedError) throw error;
|
|
38701
39194
|
const cause = error instanceof Error ? error : void 0;
|
|
38702
|
-
throw new ProvisioningError(`Failed to update Schedule ${logicalId}: ${
|
|
39195
|
+
throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to update Schedule ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
38703
39196
|
}
|
|
38704
39197
|
}
|
|
38705
39198
|
async deleteByRecordedIdentity(logicalId, physicalId, resourceType, recorded, context) {
|
|
@@ -38810,7 +39303,7 @@ var SchedulerScheduleProvider = class {
|
|
|
38810
39303
|
return;
|
|
38811
39304
|
}
|
|
38812
39305
|
const cause = error instanceof Error ? error : void 0;
|
|
38813
|
-
throw new ProvisioningError(`Failed to delete Schedule ${logicalId}: ${
|
|
39306
|
+
throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to delete Schedule ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
38814
39307
|
}
|
|
38815
39308
|
}
|
|
38816
39309
|
async getAttribute(physicalId, resourceType, attributeName, logicalId) {
|
|
@@ -38820,7 +39313,7 @@ var SchedulerScheduleProvider = class {
|
|
|
38820
39313
|
} catch (error) {
|
|
38821
39314
|
const cause = error instanceof Error ? error : void 0;
|
|
38822
39315
|
const customGroupHint = error instanceof ResourceNotFoundException$13 ? " Schedules in a custom group cannot be looked up by bare name; the Arn is normally served from cdkd state attributes." : "";
|
|
38823
|
-
throw new ProvisioningError(`Failed to resolve Arn for Schedule ${physicalId}: ${
|
|
39316
|
+
throw this.wrapCaughtError(void 0, error, (text) => new ProvisioningError(`Failed to resolve Arn for Schedule ${physicalId}: ${text}${text.endsWith(".") ? "" : "."}${customGroupHint}`, resourceType, logicalId, physicalId, cause));
|
|
38824
39317
|
}
|
|
38825
39318
|
}
|
|
38826
39319
|
async readCurrentState(physicalId, _logicalId, _resourceType, properties) {
|
|
@@ -39068,6 +39561,14 @@ var PipesPipeProvider = class {
|
|
|
39068
39561
|
createClient;
|
|
39069
39562
|
providerRegion = ambientRegion();
|
|
39070
39563
|
logger = getLogger().child("PipesPipeProvider");
|
|
39564
|
+
wrapCaughtError(mask, error, build) {
|
|
39565
|
+
const m = maskerOrIdentity(mask);
|
|
39566
|
+
const failure = describeAwsFailure(error);
|
|
39567
|
+
if (!failure.redacted) return wrapMaskedAwsError(m, error, build);
|
|
39568
|
+
this.logger.debug(m(build(m(failure.detail)).message));
|
|
39569
|
+
const wrapped = build(`${m(failure.summary)}${relayedNameCollision(failure.detail)}`);
|
|
39570
|
+
return error instanceof Error ? markRedactedCause(wrapped) : wrapped;
|
|
39571
|
+
}
|
|
39071
39572
|
options;
|
|
39072
39573
|
sleep = (ms) => this.options.sleep ? this.options.sleep(ms) : new Promise((r) => setTimeout(r, ms));
|
|
39073
39574
|
now = () => this.options.now ? this.options.now() : Date.now();
|
|
@@ -39139,7 +39640,7 @@ var PipesPipeProvider = class {
|
|
|
39139
39640
|
createdIdentity = pipeIdentityToken(name, created?.Arn, created?.CreationTime);
|
|
39140
39641
|
} catch (error) {
|
|
39141
39642
|
const cause = error instanceof Error ? error : void 0;
|
|
39142
|
-
throw new ProvisioningError(`Failed to create Pipe ${logicalId}: ${
|
|
39643
|
+
throw this.wrapCaughtError(mask, error, (text) => new ProvisioningError(`Failed to create Pipe ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
|
|
39143
39644
|
}
|
|
39144
39645
|
let settled;
|
|
39145
39646
|
try {
|
|
@@ -39211,7 +39712,7 @@ var PipesPipeProvider = class {
|
|
|
39211
39712
|
if (error instanceof ProvisioningError) throw error;
|
|
39212
39713
|
if (error instanceof NotFoundException$6) assertRegionMatch(await this.getClient().config.region(), context?.expectedRegion, resourceType, logicalId, physicalId);
|
|
39213
39714
|
const cause = error instanceof Error ? error : void 0;
|
|
39214
|
-
throw new ProvisioningError(`Failed to update Pipe ${logicalId}: ${
|
|
39715
|
+
throw this.wrapCaughtError(mask, error, (text) => new ProvisioningError(`Failed to update Pipe ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
39215
39716
|
}
|
|
39216
39717
|
return {
|
|
39217
39718
|
physicalId,
|
|
@@ -39232,7 +39733,7 @@ var PipesPipeProvider = class {
|
|
|
39232
39733
|
return;
|
|
39233
39734
|
}
|
|
39234
39735
|
const cause = error instanceof Error ? error : void 0;
|
|
39235
|
-
throw new ProvisioningError(`Failed to delete Pipe ${logicalId}: ${
|
|
39736
|
+
throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to delete Pipe ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
39236
39737
|
}
|
|
39237
39738
|
await waitForGoneAfterDelete({
|
|
39238
39739
|
what: `Pipe ${physicalId}`,
|
|
@@ -39283,13 +39784,14 @@ var PipesPipeProvider = class {
|
|
|
39283
39784
|
throw error;
|
|
39284
39785
|
}
|
|
39285
39786
|
}
|
|
39286
|
-
async getAttribute(physicalId,
|
|
39787
|
+
async getAttribute(physicalId, resourceType, attributeName, logicalId) {
|
|
39287
39788
|
let response;
|
|
39288
39789
|
try {
|
|
39289
39790
|
response = await this.describe(physicalId);
|
|
39290
39791
|
} catch (error) {
|
|
39291
39792
|
if (error instanceof NotFoundException$6) return void 0;
|
|
39292
|
-
throw error;
|
|
39793
|
+
if (!describeAwsFailure(error).redacted) throw error;
|
|
39794
|
+
throw this.wrapCaughtError(void 0, error, (text) => new ProvisioningError(`Failed to read ${attributeName} of Pipe ${physicalId}: ${text}`, resourceType, logicalId, physicalId, error instanceof Error ? error : void 0));
|
|
39293
39795
|
}
|
|
39294
39796
|
return this.attributesOf(response)[attributeName];
|
|
39295
39797
|
}
|
|
@@ -39385,8 +39887,11 @@ var PipesPipeProvider = class {
|
|
|
39385
39887
|
if (settled && (!needsEvidence || sawUnsettled || this.now() - startedAt >= PIPE_POLL_INTERVAL_MS)) return response;
|
|
39386
39888
|
if (!settled) sawUnsettled = true;
|
|
39387
39889
|
if (state !== void 0 && state.endsWith("_FAILED") && !stale) {
|
|
39388
|
-
const reason =
|
|
39389
|
-
|
|
39890
|
+
const reason = describeAwsStatusReason({ message: response.StateReason }, "");
|
|
39891
|
+
const build = (text, cause) => new ProvisioningError(`Pipe ${logicalId} ${phase} failed: AWS reports ${state}${text}`, resourceType, logicalId, name, cause);
|
|
39892
|
+
if (!reason.redacted) throw markNonRetryable(build(""));
|
|
39893
|
+
this.logger.debug(mask(build(`: ${mask(reason.detail)}`).message));
|
|
39894
|
+
throw markNonRetryable(markRedactedCause(build(`. ${reason.summary}`, new Error(reason.detail))));
|
|
39390
39895
|
}
|
|
39391
39896
|
this.logger.debug(mask(`Pipe ${name} state: ${state ?? "unknown"}, waiting to settle`));
|
|
39392
39897
|
} catch (error) {
|
|
@@ -39403,7 +39908,7 @@ var PipesPipeProvider = class {
|
|
|
39403
39908
|
}
|
|
39404
39909
|
}
|
|
39405
39910
|
async retireFailedCreate(name, logicalId, resourceType, error, mask, createdIdentity) {
|
|
39406
|
-
const original = error instanceof Error ? error :
|
|
39911
|
+
const original = describeAwsFailure(error).redacted ? this.wrapCaughtError(mask, error, (text) => new ProvisioningError(`Failed to create Pipe ${logicalId}: ${text}`, resourceType, logicalId, name, error instanceof Error ? error : void 0)) : error;
|
|
39407
39912
|
const leftBehind = () => markNonRetryable(markCreatedBeforeFailure(original, logicalId, resourceType, name, createdIdentity));
|
|
39408
39913
|
const orphaned = async (why) => {
|
|
39409
39914
|
const aws = pasteableAwsCommand(mask);
|
|
@@ -41783,6 +42288,7 @@ var EMRClusterProvider = class {
|
|
|
41783
42288
|
flip,
|
|
41784
42289
|
logger: this.logger,
|
|
41785
42290
|
physicalId,
|
|
42291
|
+
mask: context?.maskSecrets,
|
|
41786
42292
|
guardName: "TerminationProtected",
|
|
41787
42293
|
observe: () => Promise.resolve(current?.TerminationProtected === true),
|
|
41788
42294
|
disable: async () => {
|
|
@@ -42837,7 +43343,8 @@ var FirehoseProvider = class {
|
|
|
42837
43343
|
ProcessingConfiguration: httpConfig["ProcessingConfiguration"],
|
|
42838
43344
|
RetryOptions: httpConfig["RetryOptions"],
|
|
42839
43345
|
S3BackupMode: httpConfig["S3BackupMode"],
|
|
42840
|
-
S3Configuration: httpConfig["S3Configuration"] ? this.mapS3DestinationConfiguration(httpConfig["S3Configuration"]) : void 0
|
|
43346
|
+
S3Configuration: httpConfig["S3Configuration"] ? this.mapS3DestinationConfiguration(httpConfig["S3Configuration"]) : void 0,
|
|
43347
|
+
SecretsManagerConfiguration: httpConfig["SecretsManagerConfiguration"]
|
|
42841
43348
|
};
|
|
42842
43349
|
}
|
|
42843
43350
|
if (properties["RedshiftDestinationConfiguration"]) {
|
|
@@ -42850,7 +43357,11 @@ var FirehoseProvider = class {
|
|
|
42850
43357
|
Password: rsConfig["Password"],
|
|
42851
43358
|
S3Configuration: rsConfig["S3Configuration"] ? this.mapS3DestinationConfiguration(rsConfig["S3Configuration"]) : void 0,
|
|
42852
43359
|
CloudWatchLoggingOptions: rsConfig["CloudWatchLoggingOptions"],
|
|
42853
|
-
ProcessingConfiguration: rsConfig["ProcessingConfiguration"]
|
|
43360
|
+
ProcessingConfiguration: rsConfig["ProcessingConfiguration"],
|
|
43361
|
+
RetryOptions: rsConfig["RetryOptions"],
|
|
43362
|
+
S3BackupMode: rsConfig["S3BackupMode"],
|
|
43363
|
+
S3BackupConfiguration: rsConfig["S3BackupConfiguration"] ? this.mapS3DestinationConfiguration(rsConfig["S3BackupConfiguration"]) : void 0,
|
|
43364
|
+
SecretsManagerConfiguration: rsConfig["SecretsManagerConfiguration"]
|
|
42854
43365
|
};
|
|
42855
43366
|
}
|
|
42856
43367
|
if (properties["ElasticsearchDestinationConfiguration"]) {
|
|
@@ -42867,7 +43378,9 @@ var FirehoseProvider = class {
|
|
|
42867
43378
|
S3BackupMode: esConfig["S3BackupMode"],
|
|
42868
43379
|
S3Configuration: esConfig["S3Configuration"] ? this.mapS3DestinationConfiguration(esConfig["S3Configuration"]) : void 0,
|
|
42869
43380
|
CloudWatchLoggingOptions: esConfig["CloudWatchLoggingOptions"],
|
|
42870
|
-
ProcessingConfiguration: esConfig["ProcessingConfiguration"]
|
|
43381
|
+
ProcessingConfiguration: esConfig["ProcessingConfiguration"],
|
|
43382
|
+
VpcConfiguration: esConfig["VpcConfiguration"],
|
|
43383
|
+
DocumentIdOptions: esConfig["DocumentIdOptions"]
|
|
42871
43384
|
};
|
|
42872
43385
|
}
|
|
42873
43386
|
if (properties["AmazonopensearchserviceDestinationConfiguration"]) {
|
|
@@ -42884,7 +43397,9 @@ var FirehoseProvider = class {
|
|
|
42884
43397
|
S3BackupMode: aosConfig["S3BackupMode"],
|
|
42885
43398
|
S3Configuration: aosConfig["S3Configuration"] ? this.mapS3DestinationConfiguration(aosConfig["S3Configuration"]) : void 0,
|
|
42886
43399
|
CloudWatchLoggingOptions: aosConfig["CloudWatchLoggingOptions"],
|
|
42887
|
-
ProcessingConfiguration: aosConfig["ProcessingConfiguration"]
|
|
43400
|
+
ProcessingConfiguration: aosConfig["ProcessingConfiguration"],
|
|
43401
|
+
VpcConfiguration: aosConfig["VpcConfiguration"],
|
|
43402
|
+
DocumentIdOptions: aosConfig["DocumentIdOptions"]
|
|
42888
43403
|
};
|
|
42889
43404
|
}
|
|
42890
43405
|
if (properties["SplunkDestinationConfiguration"]) {
|
|
@@ -42898,7 +43413,9 @@ var FirehoseProvider = class {
|
|
|
42898
43413
|
S3Configuration: splunkConfig["S3Configuration"] ? this.mapS3DestinationConfiguration(splunkConfig["S3Configuration"]) : void 0,
|
|
42899
43414
|
RetryOptions: splunkConfig["RetryOptions"],
|
|
42900
43415
|
CloudWatchLoggingOptions: splunkConfig["CloudWatchLoggingOptions"],
|
|
42901
|
-
ProcessingConfiguration: splunkConfig["ProcessingConfiguration"]
|
|
43416
|
+
ProcessingConfiguration: splunkConfig["ProcessingConfiguration"],
|
|
43417
|
+
BufferingHints: splunkConfig["BufferingHints"],
|
|
43418
|
+
SecretsManagerConfiguration: splunkConfig["SecretsManagerConfiguration"]
|
|
42902
43419
|
};
|
|
42903
43420
|
}
|
|
42904
43421
|
if (properties["AmazonOpenSearchServerlessDestinationConfiguration"]) {
|
|
@@ -42912,7 +43429,8 @@ var FirehoseProvider = class {
|
|
|
42912
43429
|
S3BackupMode: aossConfig["S3BackupMode"],
|
|
42913
43430
|
S3Configuration: aossConfig["S3Configuration"] ? this.mapS3DestinationConfiguration(aossConfig["S3Configuration"]) : void 0,
|
|
42914
43431
|
CloudWatchLoggingOptions: aossConfig["CloudWatchLoggingOptions"],
|
|
42915
|
-
ProcessingConfiguration: aossConfig["ProcessingConfiguration"]
|
|
43432
|
+
ProcessingConfiguration: aossConfig["ProcessingConfiguration"],
|
|
43433
|
+
VpcConfiguration: aossConfig["VpcConfiguration"]
|
|
42916
43434
|
};
|
|
42917
43435
|
}
|
|
42918
43436
|
if (properties["DeliveryStreamEncryptionConfigurationInput"]) {
|
|
@@ -43153,6 +43671,9 @@ var FirehoseProvider = class {
|
|
|
43153
43671
|
result.S3BackupConfiguration = this.mapS3DestinationConfiguration(backupConfig);
|
|
43154
43672
|
}
|
|
43155
43673
|
if (config["DataFormatConversionConfiguration"] !== void 0) result.DataFormatConversionConfiguration = config["DataFormatConversionConfiguration"];
|
|
43674
|
+
if (config["DynamicPartitioningConfiguration"] !== void 0) result.DynamicPartitioningConfiguration = config["DynamicPartitioningConfiguration"];
|
|
43675
|
+
if (config["FileExtension"] !== void 0) result.FileExtension = config["FileExtension"];
|
|
43676
|
+
if (config["CustomTimeZone"] !== void 0) result.CustomTimeZone = config["CustomTimeZone"];
|
|
43156
43677
|
return result;
|
|
43157
43678
|
}
|
|
43158
43679
|
mapExtendedS3ConfigToUpdate(config) {
|
|
@@ -43177,6 +43698,9 @@ var FirehoseProvider = class {
|
|
|
43177
43698
|
if (config["S3BackupMode"] !== void 0) result.S3BackupMode = config["S3BackupMode"];
|
|
43178
43699
|
if (config["S3BackupConfiguration"] !== void 0) result.S3BackupUpdate = this.mapS3ConfigToUpdate(config["S3BackupConfiguration"]);
|
|
43179
43700
|
if (config["DataFormatConversionConfiguration"] !== void 0) result.DataFormatConversionConfiguration = config["DataFormatConversionConfiguration"];
|
|
43701
|
+
if (config["DynamicPartitioningConfiguration"] !== void 0) result.DynamicPartitioningConfiguration = config["DynamicPartitioningConfiguration"];
|
|
43702
|
+
if (config["FileExtension"] !== void 0) result.FileExtension = config["FileExtension"];
|
|
43703
|
+
if (config["CustomTimeZone"] !== void 0) result.CustomTimeZone = config["CustomTimeZone"];
|
|
43180
43704
|
return result;
|
|
43181
43705
|
}
|
|
43182
43706
|
async applyRedshiftDestinationUpdate(logicalId, physicalId, nextConfig) {
|
|
@@ -43542,6 +44066,8 @@ function mapExtendedS3DescriptionToCfn(desc) {
|
|
|
43542
44066
|
out["ProcessingConfiguration"] = pickDefinedDeep(desc["ProcessingConfiguration"]) ?? {};
|
|
43543
44067
|
out["DataFormatConversionConfiguration"] = pickDefinedDeep(desc["DataFormatConversionConfiguration"]) ?? {};
|
|
43544
44068
|
out["DynamicPartitioningConfiguration"] = pickDefinedDeep(desc["DynamicPartitioningConfiguration"]) ?? {};
|
|
44069
|
+
if (desc["FileExtension"] !== void 0) out["FileExtension"] = desc["FileExtension"];
|
|
44070
|
+
if (desc["CustomTimeZone"] !== void 0) out["CustomTimeZone"] = desc["CustomTimeZone"];
|
|
43545
44071
|
if (desc["S3BackupDescription"]) out["S3BackupConfiguration"] = mapS3DescriptionToCfn(desc["S3BackupDescription"]);
|
|
43546
44072
|
else out["S3BackupConfiguration"] = {};
|
|
43547
44073
|
return out;
|
|
@@ -43642,6 +44168,14 @@ var CloudTrailProvider = class {
|
|
|
43642
44168
|
createClient;
|
|
43643
44169
|
providerRegion = ambientRegion();
|
|
43644
44170
|
logger = getLogger().child("CloudTrailProvider");
|
|
44171
|
+
wrapCaughtError(mask, error, build) {
|
|
44172
|
+
const m = maskerOrIdentity(mask);
|
|
44173
|
+
const failure = describeAwsFailure(error);
|
|
44174
|
+
if (!failure.redacted) return wrapMaskedAwsError(m, error, build);
|
|
44175
|
+
this.logger.debug(m(build(m(failure.detail)).message));
|
|
44176
|
+
const wrapped = build(`${m(failure.summary)}${relayedNameCollision(failure.detail)}`);
|
|
44177
|
+
return error instanceof Error ? markRedactedCause(wrapped) : wrapped;
|
|
44178
|
+
}
|
|
43645
44179
|
removalDefaults = /* @__PURE__ */ new Map([["AWS::CloudTrail::Trail", /* @__PURE__ */ new Map([["IsMultiRegionTrail", false], ["EnableLogFileValidation", false]])]]);
|
|
43646
44180
|
handledProperties = /* @__PURE__ */ new Map([["AWS::CloudTrail::Trail", /* @__PURE__ */ new Set([
|
|
43647
44181
|
"S3BucketName",
|
|
@@ -43677,7 +44211,7 @@ var CloudTrailProvider = class {
|
|
|
43677
44211
|
this.getClient();
|
|
43678
44212
|
return this.createClient;
|
|
43679
44213
|
}
|
|
43680
|
-
async create(logicalId, resourceType, properties) {
|
|
44214
|
+
async create(logicalId, resourceType, properties, context) {
|
|
43681
44215
|
this.logger.debug(`Creating CloudTrail Trail ${logicalId}`);
|
|
43682
44216
|
const desiredTags = refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId);
|
|
43683
44217
|
const s3BucketName = properties["S3BucketName"];
|
|
@@ -43744,7 +44278,7 @@ var CloudTrailProvider = class {
|
|
|
43744
44278
|
} catch (error) {
|
|
43745
44279
|
if (trailCreated) markAuxiliaryFailure(error, logicalId);
|
|
43746
44280
|
const cause = error instanceof Error ? error : void 0;
|
|
43747
|
-
const thrown = new ProvisioningError(`Failed to create CloudTrail Trail ${logicalId}: ${
|
|
44281
|
+
const thrown = this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to create CloudTrail Trail ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
|
|
43748
44282
|
if (createdTrailArn) markCreatedBeforeFailure(thrown, logicalId, resourceType, createdTrailArn);
|
|
43749
44283
|
throw thrown;
|
|
43750
44284
|
}
|
|
@@ -43832,7 +44366,7 @@ var CloudTrailProvider = class {
|
|
|
43832
44366
|
};
|
|
43833
44367
|
} catch (error) {
|
|
43834
44368
|
const cause = error instanceof Error ? error : void 0;
|
|
43835
|
-
throw new ProvisioningError(`Failed to update CloudTrail Trail ${logicalId}: ${
|
|
44369
|
+
throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to update CloudTrail Trail ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
43836
44370
|
}
|
|
43837
44371
|
}
|
|
43838
44372
|
async delete(logicalId, physicalId, resourceType, properties, context) {
|
|
@@ -43857,7 +44391,7 @@ var CloudTrailProvider = class {
|
|
|
43857
44391
|
return;
|
|
43858
44392
|
}
|
|
43859
44393
|
const cause = error instanceof Error ? error : void 0;
|
|
43860
|
-
const failure = new ProvisioningError(`Failed to delete CloudTrail Trail ${logicalId}: ${
|
|
44394
|
+
const failure = this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to delete CloudTrail Trail ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
43861
44395
|
throw stripped ? markDeleteStarted(failure) : failure;
|
|
43862
44396
|
}
|
|
43863
44397
|
}
|
|
@@ -44850,7 +45384,7 @@ var CodeCommitRepositoryProvider = class {
|
|
|
44850
45384
|
if (!metadata) return void 0;
|
|
44851
45385
|
let tags = [];
|
|
44852
45386
|
if (metadata.Arn) try {
|
|
44853
|
-
const tagsResp = await this.getClient().send(new ListTagsForResourceCommand$
|
|
45387
|
+
const tagsResp = await this.getClient().send(new ListTagsForResourceCommand$17({ resourceArn: metadata.Arn }));
|
|
44854
45388
|
tags = normalizeAwsTagsToCfn(tagsResp.tags);
|
|
44855
45389
|
} catch (err) {
|
|
44856
45390
|
if (err instanceof RepositoryDoesNotExistException) return RESOURCE_NOT_FOUND;
|
|
@@ -44938,6 +45472,14 @@ var DLMLifecyclePolicyProvider = class {
|
|
|
44938
45472
|
createClient;
|
|
44939
45473
|
providerRegion = ambientRegion();
|
|
44940
45474
|
logger = getLogger().child("DLMLifecyclePolicyProvider");
|
|
45475
|
+
wrapCaughtError(mask, error, build) {
|
|
45476
|
+
const m = maskerOrIdentity(mask);
|
|
45477
|
+
const failure = describeAwsFailure(error);
|
|
45478
|
+
if (!failure.redacted) return wrapMaskedAwsError(m, error, build);
|
|
45479
|
+
this.logger.debug(m(build(m(failure.detail)).message));
|
|
45480
|
+
const wrapped = build(`${m(failure.summary)}${relayedNameCollision(failure.detail)}`);
|
|
45481
|
+
return error instanceof Error ? markRedactedCause(wrapped) : wrapped;
|
|
45482
|
+
}
|
|
44941
45483
|
handledProperties = /* @__PURE__ */ new Map([["AWS::DLM::LifecyclePolicy", /* @__PURE__ */ new Set([
|
|
44942
45484
|
"Description",
|
|
44943
45485
|
"ExecutionRoleArn",
|
|
@@ -45061,7 +45603,7 @@ var DLMLifecyclePolicyProvider = class {
|
|
|
45061
45603
|
};
|
|
45062
45604
|
} catch (error) {
|
|
45063
45605
|
const cause = error instanceof Error ? error : void 0;
|
|
45064
|
-
throw new ProvisioningError(`Failed to create DLM Lifecycle Policy ${logicalId}: ${
|
|
45606
|
+
throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to create DLM Lifecycle Policy ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
|
|
45065
45607
|
}
|
|
45066
45608
|
}
|
|
45067
45609
|
async update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
|
|
@@ -45108,7 +45650,7 @@ var DLMLifecyclePolicyProvider = class {
|
|
|
45108
45650
|
} catch (error) {
|
|
45109
45651
|
if (error instanceof ResourceUpdateNotSupportedError) throw error;
|
|
45110
45652
|
const cause = error instanceof Error ? error : void 0;
|
|
45111
|
-
throw new ProvisioningError(`Failed to update DLM Lifecycle Policy ${logicalId}: ${
|
|
45653
|
+
throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to update DLM Lifecycle Policy ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
45112
45654
|
}
|
|
45113
45655
|
}
|
|
45114
45656
|
async delete(logicalId, physicalId, resourceType, _properties, context) {
|
|
@@ -45124,7 +45666,7 @@ var DLMLifecyclePolicyProvider = class {
|
|
|
45124
45666
|
return;
|
|
45125
45667
|
}
|
|
45126
45668
|
const cause = error instanceof Error ? error : void 0;
|
|
45127
|
-
throw new ProvisioningError(`Failed to delete DLM Lifecycle Policy ${logicalId}: ${
|
|
45669
|
+
throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to delete DLM Lifecycle Policy ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
45128
45670
|
}
|
|
45129
45671
|
}
|
|
45130
45672
|
async getAttribute(physicalId, resourceType, attributeName, logicalId) {
|
|
@@ -45134,7 +45676,7 @@ var DLMLifecyclePolicyProvider = class {
|
|
|
45134
45676
|
return await this.fetchPolicyArn(physicalId);
|
|
45135
45677
|
} catch (error) {
|
|
45136
45678
|
const cause = error instanceof Error ? error : void 0;
|
|
45137
|
-
throw new ProvisioningError(`Failed to resolve Arn for DLM Lifecycle Policy ${physicalId}: ${
|
|
45679
|
+
throw this.wrapCaughtError(void 0, error, (text) => new ProvisioningError(`Failed to resolve Arn for DLM Lifecycle Policy ${physicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
45138
45680
|
}
|
|
45139
45681
|
}
|
|
45140
45682
|
async readCurrentState(physicalId, _logicalId, _resourceType) {
|
|
@@ -45358,7 +45900,7 @@ var S3VectorsProvider = class {
|
|
|
45358
45900
|
if (Object.keys(enc).length > 0) result["EncryptionConfiguration"] = enc;
|
|
45359
45901
|
}
|
|
45360
45902
|
if (bucket?.vectorBucketArn) try {
|
|
45361
|
-
const tagsResp = await this.getClient().send(new ListTagsForResourceCommand$
|
|
45903
|
+
const tagsResp = await this.getClient().send(new ListTagsForResourceCommand$18({ resourceArn: bucket.vectorBucketArn }));
|
|
45362
45904
|
result["Tags"] = normalizeAwsTagsToCfn(tagsResp.tags);
|
|
45363
45905
|
} catch (err) {
|
|
45364
45906
|
this.logger.debug(`S3Vectors ListTagsForResource(${bucket.vectorBucketArn}) failed: ${describeAwsFailure(err).detail}`);
|
|
@@ -45630,7 +46172,7 @@ var S3DirectoryBucketProvider = class {
|
|
|
45630
46172
|
async readTags(bucketName) {
|
|
45631
46173
|
const accountId = await this.getAccountId();
|
|
45632
46174
|
const resourceArn = await this.buildBucketArn(bucketName, accountId);
|
|
45633
|
-
const resp = await this.getS3ControlClient().send(new ListTagsForResourceCommand$
|
|
46175
|
+
const resp = await this.getS3ControlClient().send(new ListTagsForResourceCommand$19({
|
|
45634
46176
|
AccountId: accountId,
|
|
45635
46177
|
ResourceArn: resourceArn
|
|
45636
46178
|
}));
|
|
@@ -46285,7 +46827,7 @@ var S3TablesProvider = class {
|
|
|
46285
46827
|
}
|
|
46286
46828
|
async readTagsBestEffort(resourceArn) {
|
|
46287
46829
|
try {
|
|
46288
|
-
const tags = (await this.getClient().send(new ListTagsForResourceCommand$
|
|
46830
|
+
const tags = (await this.getClient().send(new ListTagsForResourceCommand$20({ resourceArn }))).tags ?? {};
|
|
46289
46831
|
const out = [];
|
|
46290
46832
|
for (const [Key, Value] of Object.entries(tags)) out.push({
|
|
46291
46833
|
Key,
|
|
@@ -47410,4 +47952,4 @@ var ACMCertificateProvider = class {
|
|
|
47410
47952
|
|
|
47411
47953
|
//#endregion
|
|
47412
47954
|
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 };
|
|
47413
|
-
//# sourceMappingURL=provider-classes-
|
|
47955
|
+
//# sourceMappingURL=provider-classes-CDtquwkU.js.map
|