@go-to-k/cdkd 0.302.0 → 0.302.2
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-BRr_hsky.js → asg-provider-B5RKfCs2.js} +28 -10
- package/dist/asg-provider-B5RKfCs2.js.map +1 -0
- package/dist/{aws-failure-text-BDZdavf4.js → aws-failure-text-e_ddrDDo.js} +5 -2
- package/dist/{aws-failure-text-BDZdavf4.js.map → aws-failure-text-e_ddrDDo.js.map} +1 -1
- package/dist/cli.js +2 -2
- package/dist/{deploy-engine-DU0BoQqo.js → deploy-engine-B_xWnZ4Q.js} +516 -4380
- package/dist/deploy-engine-B_xWnZ4Q.js.map +1 -0
- package/dist/{iam-policy-targets-Dnk6FCsr.js → iam-policy-targets-OtGPguLH.js} +19 -5
- package/dist/iam-policy-targets-OtGPguLH.js.map +1 -0
- package/dist/{iam-role-provider-WGsb9RxZ.js → iam-role-provider-TdX7t0Ac.js} +10 -6
- package/dist/iam-role-provider-TdX7t0Ac.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/{neptune-provider-WE1O3kXY.js → neptune-provider-CUoBJ6Ys.js} +122 -12
- package/dist/neptune-provider-CUoBJ6Ys.js.map +1 -0
- package/dist/{program-BVLiidXb.js → program-DDJHp1K3.js} +10 -6
- package/dist/program-DDJHp1K3.js.map +1 -0
- package/dist/{provider-classes-CXSiWJVn.js → provider-classes-CUKmyCQ8.js} +532 -166
- package/dist/provider-classes-CUKmyCQ8.js.map +1 -0
- package/dist/{rds-provider-6RgDTDCV.js → rds-provider-Bxh9YW5y.js} +209 -43
- package/dist/rds-provider-Bxh9YW5y.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-C2XBsD-i.js → version-CZS6bEuG.js} +2 -2
- package/dist/{version-C2XBsD-i.js.map → version-CZS6bEuG.js.map} +1 -1
- package/package.json +2 -2
- package/dist/asg-provider-BRr_hsky.js.map +0 -1
- package/dist/deploy-engine-DU0BoQqo.js.map +0 -1
- package/dist/iam-policy-targets-Dnk6FCsr.js.map +0 -1
- package/dist/iam-role-provider-WGsb9RxZ.js.map +0 -1
- package/dist/neptune-provider-WE1O3kXY.js.map +0 -1
- package/dist/program-BVLiidXb.js.map +0 -1
- package/dist/provider-classes-CXSiWJVn.js.map +0 -1
- package/dist/rds-provider-6RgDTDCV.js.map +0 -1
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { r as getAwsClients } from "./aws-clients-B_CEQGE1.js";
|
|
2
|
-
import { C as generateResourceName,
|
|
3
|
-
import { $ as protectedReplacementAdvice, $
|
|
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, 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 {
|
|
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-B_xWnZ4Q.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-TdX7t0Ac.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-DDJHp1K3.js";
|
|
9
|
+
import { RDSProvider } from "./rds-provider-Bxh9YW5y.js";
|
|
10
|
+
import { NeptuneProvider } from "./neptune-provider-CUoBJ6Ys.js";
|
|
11
|
+
import { ASGProvider } from "./asg-provider-B5RKfCs2.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";
|
|
@@ -17,7 +18,7 @@ import { AddPermissionCommand, CreateEventSourceMappingCommand, CreateFunctionCo
|
|
|
17
18
|
import { GetCallerIdentityCommand, STSClient } from "@aws-sdk/client-sts";
|
|
18
19
|
import { AllocateAddressCommand, AssociateAddressCommand, AssociateIamInstanceProfileCommand, AssociateRouteTableCommand, AttachInternetGatewayCommand, AuthorizeSecurityGroupEgressCommand, AuthorizeSecurityGroupIngressCommand, CreateInternetGatewayCommand, CreateNatGatewayCommand, CreateNetworkAclCommand, CreateNetworkAclEntryCommand, CreateRouteCommand, CreateRouteTableCommand, CreateSecurityGroupCommand, CreateSubnetCommand, CreateTagsCommand, CreateVpcCommand, DeleteInternetGatewayCommand, DeleteNatGatewayCommand, DeleteNetworkAclCommand, DeleteNetworkAclEntryCommand, DeleteNetworkInterfaceCommand, DeleteRouteCommand, DeleteRouteTableCommand, DeleteSecurityGroupCommand, DeleteSubnetCommand, DeleteTagsCommand, DeleteVpcCommand, DescribeAddressesCommand, DescribeAvailabilityZonesCommand, DescribeIamInstanceProfileAssociationsCommand, DescribeInstanceAttributeCommand, DescribeInstanceCreditSpecificationsCommand, DescribeInstancesCommand, DescribeInternetGatewaysCommand, DescribeNatGatewaysCommand, DescribeNetworkAclsCommand, DescribeNetworkInterfacesCommand, DescribeRouteTablesCommand, DescribeSecurityGroupRulesCommand, DescribeSecurityGroupsCommand, DescribeSubnetsCommand, DescribeVolumesCommand, DescribeVpcAttributeCommand, DescribeVpcsCommand, DetachInternetGatewayCommand, DisassociateAddressCommand, DisassociateRouteTableCommand, EC2Client, ModifyInstanceAttributeCommand, ModifyInstanceCreditSpecificationCommand, ModifyInstanceMetadataOptionsCommand, ModifySubnetAttributeCommand, ModifyVpcAttributeCommand, MonitorInstancesCommand, ReleaseAddressCommand, ReplaceNetworkAclAssociationCommand, ReplaceNetworkAclEntryCommand, ReplaceRouteCommand, RevokeSecurityGroupEgressCommand, RevokeSecurityGroupIngressCommand, RunInstancesCommand, TerminateInstancesCommand, UnmonitorInstancesCommand, waitUntilInstanceRunning, waitUntilInstanceTerminated, waitUntilNatGatewayAvailable, waitUntilNatGatewayDeleted } from "@aws-sdk/client-ec2";
|
|
19
20
|
import { CreateTableCommand, DeleteResourcePolicyCommand, DeleteTableCommand, DescribeContinuousBackupsCommand, DescribeContributorInsightsCommand, DescribeKinesisStreamingDestinationCommand, DescribeTableCommand, DescribeTimeToLiveCommand, DisableKinesisStreamingDestinationCommand, DynamoDBClient, EnableKinesisStreamingDestinationCommand, GetResourcePolicyCommand, ListTagsOfResourceCommand, PolicyNotFoundException, PutResourcePolicyCommand, ResourceNotFoundException as ResourceNotFoundException$1, TagResourceCommand as TagResourceCommand$2, UntagResourceCommand as UntagResourceCommand$2, UpdateContinuousBackupsCommand, UpdateContributorInsightsCommand, UpdateTableCommand, UpdateTimeToLiveCommand } from "@aws-sdk/client-dynamodb";
|
|
20
|
-
import { APIGatewayClient, CreateAuthorizerCommand, CreateDeploymentCommand, CreateResourceCommand, CreateStageCommand, DeleteAuthorizerCommand, DeleteDeploymentCommand, DeleteMethodCommand, DeleteResourceCommand, DeleteStageCommand, GetAccountCommand, GetAuthorizerCommand, GetAuthorizersCommand, GetDeploymentCommand, GetDeploymentsCommand, GetMethodCommand, GetResourceCommand, GetStageCommand, NotFoundException as NotFoundException$1, PutIntegrationCommand, PutIntegrationResponseCommand, PutMethodCommand, PutMethodResponseCommand, TagResourceCommand as TagResourceCommand$3, UntagResourceCommand as UntagResourceCommand$3, UpdateAccountCommand, UpdateAuthorizerCommand, UpdateMethodCommand, UpdateStageCommand } from "@aws-sdk/client-api-gateway";
|
|
21
|
+
import { APIGatewayClient, CreateAuthorizerCommand, CreateDeploymentCommand, CreateResourceCommand, CreateStageCommand, DeleteAuthorizerCommand, DeleteDeploymentCommand, DeleteIntegrationCommand, DeleteIntegrationResponseCommand, DeleteMethodCommand, DeleteMethodResponseCommand, DeleteResourceCommand, DeleteStageCommand, GetAccountCommand, GetAuthorizerCommand, GetAuthorizersCommand, GetDeploymentCommand, GetDeploymentsCommand, GetMethodCommand, GetResourceCommand, GetStageCommand, NotFoundException as NotFoundException$1, PutIntegrationCommand, PutIntegrationResponseCommand, PutMethodCommand, PutMethodResponseCommand, TagResourceCommand as TagResourceCommand$3, UntagResourceCommand as UntagResourceCommand$3, UpdateAccountCommand, UpdateAuthorizerCommand, UpdateMethodCommand, UpdateStageCommand } from "@aws-sdk/client-api-gateway";
|
|
21
22
|
import { CreateEventBusCommand, DeleteEventBusCommand, DeleteRuleCommand, DescribeEventBusCommand, DescribeRuleCommand, EventBridgeClient, ListRulesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$1, ListTargetsByRuleCommand, PutPermissionCommand, PutRuleCommand, PutTargetsCommand, RemoveTargetsCommand, ResourceNotFoundException as ResourceNotFoundException$2, TagResourceCommand as TagResourceCommand$4, UntagResourceCommand as UntagResourceCommand$4, UpdateEventBusCommand } from "@aws-sdk/client-eventbridge";
|
|
22
23
|
import { CreateSecretCommand, DeleteSecretCommand, DescribeSecretCommand, RemoveRegionsFromReplicationCommand, ReplicateSecretToRegionsCommand, ResourceNotFoundException as ResourceNotFoundException$3, SecretsManagerClient, TagResourceCommand as TagResourceCommand$5, UntagResourceCommand as UntagResourceCommand$5, UpdateSecretCommand } from "@aws-sdk/client-secrets-manager";
|
|
23
24
|
import { AddTagsToResourceCommand, DeleteParameterCommand, DescribeParametersCommand, GetParameterCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$2, ParameterNotFound, PutParameterCommand, RemoveTagsFromResourceCommand, SSMClient } from "@aws-sdk/client-ssm";
|
|
@@ -39,7 +40,7 @@ import { CreateRepositoryCommand, DeleteLifecyclePolicyCommand, DeleteRepository
|
|
|
39
40
|
import { isDeepStrictEqual } from "node:util";
|
|
40
41
|
import { AddTagsToResourceCommand as AddTagsToResourceCommand$2, CreateDBProxyCommand, CreateDBProxyEndpointCommand, DBProxyEndpointNotFoundFault, DBProxyNotFoundFault, DBProxyTargetGroupNotFoundFault, DBProxyTargetNotFoundFault, DeleteDBProxyCommand, DeleteDBProxyEndpointCommand, DeregisterDBProxyTargetsCommand, DescribeDBProxiesCommand, DescribeDBProxyEndpointsCommand, DescribeDBProxyTargetGroupsCommand, DescribeDBProxyTargetsCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$10, ModifyDBProxyCommand, ModifyDBProxyEndpointCommand, ModifyDBProxyTargetGroupCommand, RDSClient, RegisterDBProxyTargetsCommand, RemoveTagsFromResourceCommand as RemoveTagsFromResourceCommand$2 } from "@aws-sdk/client-rds";
|
|
41
42
|
import * as zlib from "node:zlib";
|
|
42
|
-
import { ApiGatewayV2Client, CreateApiCommand, CreateAuthorizerCommand as CreateAuthorizerCommand$1, CreateIntegrationCommand, CreateRouteCommand as CreateRouteCommand$1, CreateStageCommand as CreateStageCommand$1, DeleteAccessLogSettingsCommand, DeleteApiCommand, DeleteAuthorizerCommand as DeleteAuthorizerCommand$1, DeleteCorsConfigurationCommand, DeleteIntegrationCommand, DeleteRouteCommand as DeleteRouteCommand$1, DeleteRouteRequestParameterCommand, DeleteRouteSettingsCommand, DeleteStageCommand as DeleteStageCommand$1, GetApiCommand, GetApisCommand, GetAuthorizerCommand as GetAuthorizerCommand$1, GetAuthorizersCommand as GetAuthorizersCommand$1, GetIntegrationCommand, GetIntegrationsCommand, GetRouteCommand, GetStageCommand as GetStageCommand$1, NotFoundException as NotFoundException$3, UpdateApiCommand, UpdateAuthorizerCommand as UpdateAuthorizerCommand$1, UpdateIntegrationCommand, UpdateRouteCommand, UpdateStageCommand as UpdateStageCommand$1 } from "@aws-sdk/client-apigatewayv2";
|
|
43
|
+
import { ApiGatewayV2Client, CreateApiCommand, CreateAuthorizerCommand as CreateAuthorizerCommand$1, CreateIntegrationCommand, CreateRouteCommand as CreateRouteCommand$1, CreateStageCommand as CreateStageCommand$1, DeleteAccessLogSettingsCommand, DeleteApiCommand, DeleteAuthorizerCommand as DeleteAuthorizerCommand$1, DeleteCorsConfigurationCommand, DeleteIntegrationCommand as DeleteIntegrationCommand$1, DeleteRouteCommand as DeleteRouteCommand$1, DeleteRouteRequestParameterCommand, DeleteRouteSettingsCommand, DeleteStageCommand as DeleteStageCommand$1, GetApiCommand, GetApisCommand, GetAuthorizerCommand as GetAuthorizerCommand$1, GetAuthorizersCommand as GetAuthorizersCommand$1, GetIntegrationCommand, GetIntegrationsCommand, GetRouteCommand, GetStageCommand as GetStageCommand$1, NotFoundException as NotFoundException$3, UpdateApiCommand, UpdateAuthorizerCommand as UpdateAuthorizerCommand$1, UpdateIntegrationCommand, UpdateRouteCommand, UpdateStageCommand as UpdateStageCommand$1 } from "@aws-sdk/client-apigatewayv2";
|
|
43
44
|
import { CreateStateMachineCommand, DeleteStateMachineCommand, DescribeStateMachineCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$11, SFNClient, StateMachineDoesNotExist, TagResourceCommand as TagResourceCommand$13, UntagResourceCommand as UntagResourceCommand$13, UpdateStateMachineCommand } from "@aws-sdk/client-sfn";
|
|
44
45
|
import { CreateClusterCommand, CreateServiceCommand, DeleteClusterCommand, DeleteServiceCommand, DeregisterTaskDefinitionCommand, DescribeClustersCommand, DescribeServicesCommand, DescribeTaskDefinitionCommand, ECSClient, ListTaskDefinitionsCommand, PutClusterCapacityProvidersCommand, RegisterTaskDefinitionCommand, TagResourceCommand as TagResourceCommand$14, UntagResourceCommand as UntagResourceCommand$14, UpdateClusterCommand, UpdateServiceCommand, waitUntilServicesStable } from "@aws-sdk/client-ecs";
|
|
45
46
|
import { AddTagsToResourceCommand as AddTagsToResourceCommand$3, CreateDBClusterCommand as CreateDBClusterCommand$1, CreateDBInstanceCommand as CreateDBInstanceCommand$1, CreateDBSubnetGroupCommand as CreateDBSubnetGroupCommand$1, DeleteDBClusterCommand as DeleteDBClusterCommand$1, DeleteDBInstanceCommand as DeleteDBInstanceCommand$1, DeleteDBSubnetGroupCommand as DeleteDBSubnetGroupCommand$1, DescribeDBClustersCommand as DescribeDBClustersCommand$1, DescribeDBInstancesCommand as DescribeDBInstancesCommand$1, DescribeDBSubnetGroupsCommand as DescribeDBSubnetGroupsCommand$1, DocDBClient, ListTagsForResourceCommand as ListTagsForResourceCommand$12, ModifyDBClusterCommand as ModifyDBClusterCommand$1, ModifyDBInstanceCommand as ModifyDBInstanceCommand$1, ModifyDBSubnetGroupCommand as ModifyDBSubnetGroupCommand$1, RemoveTagsFromResourceCommand as RemoveTagsFromResourceCommand$3 } from "@aws-sdk/client-docdb";
|
|
@@ -597,7 +598,11 @@ var IAMManagedPolicyProvider = class {
|
|
|
597
598
|
createClient = new IamCreateClientCache(() => this.iamClient);
|
|
598
599
|
logger = getLogger().child("IAMManagedPolicyProvider");
|
|
599
600
|
wrapMaskedError(mask, error, build) {
|
|
600
|
-
|
|
601
|
+
const failure = describeAwsFailure(error);
|
|
602
|
+
if (!(error instanceof Error)) return build(mask(failure.detail));
|
|
603
|
+
if (!failure.redacted) return wrapMaskedAwsError(mask, error, build);
|
|
604
|
+
this.logger.debug(mask(build(mask(failure.detail)).message));
|
|
605
|
+
return markRedactedCause(build(`${mask(failure.summary)}${relayedNameCollision(failure.detail)}`));
|
|
601
606
|
}
|
|
602
607
|
handledProperties = /* @__PURE__ */ new Map([["AWS::IAM::ManagedPolicy", /* @__PURE__ */ new Set([
|
|
603
608
|
"ManagedPolicyName",
|
|
@@ -1457,8 +1462,18 @@ var IAMAccessKeyProvider = class {
|
|
|
1457
1462
|
iamClient;
|
|
1458
1463
|
createClient = new IamCreateClientCache(() => this.iamClient);
|
|
1459
1464
|
logger = getLogger().child("IAMAccessKeyProvider");
|
|
1460
|
-
wrapMaskedError(
|
|
1461
|
-
|
|
1465
|
+
wrapMaskedError(log, error, build) {
|
|
1466
|
+
const failure = describeAwsFailure(error);
|
|
1467
|
+
if (!failure.redacted) return wrapMaskedAwsError(log.mask, error, build);
|
|
1468
|
+
log.debug(build(log.mask(failure.detail)).message);
|
|
1469
|
+
const wrapped = build(`${log.mask(failure.summary)}${relayedNameCollision(failure.detail)}`);
|
|
1470
|
+
return error instanceof Error ? markRedactedCause(wrapped) : wrapped;
|
|
1471
|
+
}
|
|
1472
|
+
warnFailureSentence(log, lead, error) {
|
|
1473
|
+
const failure = describeAwsFailure(error);
|
|
1474
|
+
if (!failure.redacted) return `${log.value(failure.detail)}.`;
|
|
1475
|
+
log.debug(`${lead}: ${log.value(failure.detail)}`);
|
|
1476
|
+
return log.value(failure.summary);
|
|
1462
1477
|
}
|
|
1463
1478
|
disableCcApiFallback = true;
|
|
1464
1479
|
handledProperties = /* @__PURE__ */ new Map([["AWS::IAM::AccessKey", /* @__PURE__ */ new Set([
|
|
@@ -1499,7 +1514,8 @@ var IAMAccessKeyProvider = class {
|
|
|
1499
1514
|
}));
|
|
1500
1515
|
leftBehindKeyId = void 0;
|
|
1501
1516
|
} catch (cleanupError) {
|
|
1502
|
-
|
|
1517
|
+
const lead = `Failed to clean up IAM access key ${logicalId} (${v(accessKeyId)}) minted by a partial CreateAccessKey response`;
|
|
1518
|
+
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
1519
|
}
|
|
1504
1520
|
throw new Error("CreateAccessKey returned no AccessKeyId/SecretAccessKey");
|
|
1505
1521
|
}
|
|
@@ -1518,7 +1534,8 @@ var IAMAccessKeyProvider = class {
|
|
|
1518
1534
|
leftBehindKeyId = void 0;
|
|
1519
1535
|
log.debug(`Cleaned up partially-created IAM access key ${logicalId} (${v(accessKeyId)}) after status wiring failure`);
|
|
1520
1536
|
} catch (cleanupError) {
|
|
1521
|
-
|
|
1537
|
+
const lead = `Failed to clean up partially-created IAM access key ${logicalId} (${v(accessKeyId)})`;
|
|
1538
|
+
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
1539
|
}
|
|
1523
1540
|
throw markAuxiliaryFailure(innerError, logicalId);
|
|
1524
1541
|
}
|
|
@@ -1527,7 +1544,8 @@ var IAMAccessKeyProvider = class {
|
|
|
1527
1544
|
if (replayFollowedAmbiguousAttempt(response)) try {
|
|
1528
1545
|
await this.deleteOrphanFromFailedAttempt(userName, logicalId, baseline, attemptStartMs, log, "replayed");
|
|
1529
1546
|
} catch (reconcileError) {
|
|
1530
|
-
|
|
1547
|
+
const lead = `Could not check user ${v(userName)} for an access key left by the replayed CreateAccessKey for ${logicalId}`;
|
|
1548
|
+
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
1549
|
}
|
|
1532
1550
|
return {
|
|
1533
1551
|
physicalId: accessKeyId,
|
|
@@ -1540,7 +1558,7 @@ var IAMAccessKeyProvider = class {
|
|
|
1540
1558
|
const reconciled = await this.deleteOrphanFromFailedAttempt(userName, logicalId, baseline, attemptStartMs, log);
|
|
1541
1559
|
if (leftBehindKeyId !== void 0 && reconciled.has(leftBehindKeyId)) leftBehindKeyId = void 0;
|
|
1542
1560
|
const cause = error instanceof Error ? error : void 0;
|
|
1543
|
-
const thrown = this.wrapMaskedError(log
|
|
1561
|
+
const thrown = this.wrapMaskedError(log, error, (text) => new ProvisioningError(`Failed to create IAM access key ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
|
|
1544
1562
|
if (leftBehindKeyId !== void 0) {
|
|
1545
1563
|
markCreatedBeforeFailure(thrown, logicalId, resourceType, leftBehindKeyId);
|
|
1546
1564
|
markNonRetryable(thrown);
|
|
@@ -1584,7 +1602,8 @@ var IAMAccessKeyProvider = class {
|
|
|
1584
1602
|
}));
|
|
1585
1603
|
deleted.add(accessKeyId);
|
|
1586
1604
|
} catch (error) {
|
|
1587
|
-
|
|
1605
|
+
const lead = `Failed to delete the orphaned IAM access key ${v(accessKeyId)} for user ${v(userName)}`;
|
|
1606
|
+
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
1607
|
}
|
|
1589
1608
|
}
|
|
1590
1609
|
return deleted;
|
|
@@ -1611,7 +1630,8 @@ var IAMAccessKeyProvider = class {
|
|
|
1611
1630
|
marker = page.IsTruncated ? page.Marker : void 0;
|
|
1612
1631
|
} while (marker);
|
|
1613
1632
|
} catch (error) {
|
|
1614
|
-
|
|
1633
|
+
const lead = `Could not list existing access keys for user ${v(userName)} while creating ${logicalId}`;
|
|
1634
|
+
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
1635
|
return;
|
|
1616
1636
|
}
|
|
1617
1637
|
return keys;
|
|
@@ -1642,7 +1662,7 @@ var IAMAccessKeyProvider = class {
|
|
|
1642
1662
|
};
|
|
1643
1663
|
} catch (error) {
|
|
1644
1664
|
const cause = error instanceof Error ? error : void 0;
|
|
1645
|
-
throw this.wrapMaskedError(log
|
|
1665
|
+
throw this.wrapMaskedError(log, error, (text) => new ProvisioningError(`Failed to update IAM access key ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
1646
1666
|
}
|
|
1647
1667
|
}
|
|
1648
1668
|
async delete(logicalId, physicalId, resourceType, properties, context) {
|
|
@@ -1665,7 +1685,7 @@ var IAMAccessKeyProvider = class {
|
|
|
1665
1685
|
return;
|
|
1666
1686
|
}
|
|
1667
1687
|
const cause = error instanceof Error ? error : void 0;
|
|
1668
|
-
throw new ProvisioningError(`Failed to delete IAM access key ${logicalId}: ${
|
|
1688
|
+
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
1689
|
}
|
|
1670
1690
|
}
|
|
1671
1691
|
async getAttribute(physicalId, resourceType, attributeName, logicalId) {
|
|
@@ -8609,13 +8629,7 @@ var LambdaPermissionProvider = class {
|
|
|
8609
8629
|
if (!action) throw new ProvisioningError(`Action is required for Lambda permission ${logicalId}`, resourceType, logicalId);
|
|
8610
8630
|
const principal = properties["Principal"];
|
|
8611
8631
|
if (!principal) throw new ProvisioningError(`Principal is required for Lambda permission ${logicalId}`, resourceType, logicalId);
|
|
8612
|
-
|
|
8613
|
-
if (statementId.length > 100) {
|
|
8614
|
-
let hashNum = 0;
|
|
8615
|
-
for (let i = 0; i < logicalId.length; i++) hashNum = (hashNum << 5) - hashNum + logicalId.charCodeAt(i) | 0;
|
|
8616
|
-
const hash = Math.abs(hashNum).toString(16).padStart(8, "0").substring(0, 8);
|
|
8617
|
-
statementId = `${statementId.substring(0, 91)}-${hash}`;
|
|
8618
|
-
}
|
|
8632
|
+
const statementId = permissionStatementId(logicalId);
|
|
8619
8633
|
try {
|
|
8620
8634
|
const addParams = {
|
|
8621
8635
|
FunctionName: functionName,
|
|
@@ -8781,6 +8795,20 @@ var LambdaPermissionProvider = class {
|
|
|
8781
8795
|
return null;
|
|
8782
8796
|
}
|
|
8783
8797
|
};
|
|
8798
|
+
function permissionStatementId(logicalId) {
|
|
8799
|
+
if (getCurrentStackInstanceId() !== void 0 || isBeforeStateRead()) return generateResourceName(logicalId, {
|
|
8800
|
+
maxLength: 100,
|
|
8801
|
+
allowedPattern: /[^a-zA-Z0-9_-]/g
|
|
8802
|
+
});
|
|
8803
|
+
let statementId = logicalId.replace(/[^a-zA-Z0-9_-]/g, "");
|
|
8804
|
+
if (statementId.length > 100) {
|
|
8805
|
+
let hashNum = 0;
|
|
8806
|
+
for (let i = 0; i < logicalId.length; i++) hashNum = (hashNum << 5) - hashNum + logicalId.charCodeAt(i) | 0;
|
|
8807
|
+
const hash = Math.abs(hashNum).toString(16).padStart(8, "0").substring(0, 8);
|
|
8808
|
+
statementId = `${statementId.substring(0, 91)}-${hash}`;
|
|
8809
|
+
}
|
|
8810
|
+
return statementId;
|
|
8811
|
+
}
|
|
8784
8812
|
|
|
8785
8813
|
//#endregion
|
|
8786
8814
|
//#region src/provisioning/providers/lambda-url-provider.ts
|
|
@@ -11285,8 +11313,14 @@ var LambdaNetworkConnectorProvider = class {
|
|
|
11285
11313
|
async waitForSettled(arn, logicalId, operation) {
|
|
11286
11314
|
for (let attempt = 1; attempt <= MAX_POLL_ATTEMPTS; attempt++) {
|
|
11287
11315
|
const resp = await this.client.send(new GetNetworkConnectorCommand({ Identifier: arn }));
|
|
11288
|
-
if (resp.State === "FAILED" || resp.State === "DELETING" || resp.State === "DELETE_FAILED" || resp.State === "INACTIVE") throw
|
|
11289
|
-
|
|
11316
|
+
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}`, {
|
|
11317
|
+
code: resp.StateReasonCode,
|
|
11318
|
+
message: resp.StateReason
|
|
11319
|
+
}, (message, options) => new TerminalConnectorStateError(message, options));
|
|
11320
|
+
if (operation === "update" && resp.LastUpdateStatus === "Failed") throw this.wrapStatusReasonError(`Lambda network connector ${logicalIdShown(logicalId)} update failed`, {
|
|
11321
|
+
code: resp.LastUpdateStatusReasonCode,
|
|
11322
|
+
message: resp.LastUpdateStatusReason
|
|
11323
|
+
}, (message, options) => new Error(message, options));
|
|
11290
11324
|
if (resp.State === "ACTIVE" && resp.LastUpdateStatus !== "InProgress") return resp;
|
|
11291
11325
|
await sleep$1(POLL_INTERVAL_MS$2);
|
|
11292
11326
|
}
|
|
@@ -11301,15 +11335,28 @@ var LambdaNetworkConnectorProvider = class {
|
|
|
11301
11335
|
if (error instanceof ResourceNotFoundException$10) return;
|
|
11302
11336
|
throw error;
|
|
11303
11337
|
}
|
|
11304
|
-
if (resp.State === "DELETE_FAILED") throw
|
|
11338
|
+
if (resp.State === "DELETE_FAILED") throw this.wrapStatusReasonError(`Lambda network connector ${logicalIdShown(logicalId)} entered DELETE_FAILED`, {
|
|
11339
|
+
code: resp.StateReasonCode,
|
|
11340
|
+
message: resp.StateReason
|
|
11341
|
+
}, (message, options) => new Error(message, options));
|
|
11305
11342
|
await sleep$1(POLL_INTERVAL_MS$2);
|
|
11306
11343
|
}
|
|
11307
11344
|
throw new Error(`Lambda network connector ${logicalIdShown(logicalId)} was not fully deleted within ${MAX_POLL_ATTEMPTS * POLL_INTERVAL_MS$2 / 1e3}s.`);
|
|
11308
11345
|
}
|
|
11346
|
+
wrapStatusReasonError(prefix, reason, build) {
|
|
11347
|
+
const text = describeAwsStatusReason(reason, reason.code || "no reason given");
|
|
11348
|
+
if (!text.redacted) return build(`${prefix}: ${text.detail}`);
|
|
11349
|
+
this.logger.debug(safeMsg`${prefix}: ${text.detail}`);
|
|
11350
|
+
return markRedactedCause(build(`${prefix}: ${text.summary}`, { cause: new Error(text.detail) }));
|
|
11351
|
+
}
|
|
11309
11352
|
wrapError(operation, logicalId, resourceType, physicalId, error) {
|
|
11310
11353
|
if (error instanceof ProvisioningError) return error;
|
|
11311
11354
|
const cause = error instanceof Error ? error : void 0;
|
|
11312
|
-
|
|
11355
|
+
const build = (text) => new ProvisioningError(`Failed to ${operation} Lambda network connector ${logicalIdShown(logicalId)}: ${text}`, resourceType, logicalId, physicalId, cause);
|
|
11356
|
+
const failure = describeAwsFailure(error);
|
|
11357
|
+
if (!(error instanceof Error) || !failure.redacted) return build(failure.detail);
|
|
11358
|
+
this.logger.debug(build(failure.detail).message);
|
|
11359
|
+
return markRedactedCause(build(`${failure.summary}${relayedNameCollision(failure.detail)}`));
|
|
11313
11360
|
}
|
|
11314
11361
|
};
|
|
11315
11362
|
var TerminalConnectorStateError = class extends Error {};
|
|
@@ -12441,7 +12488,8 @@ var DynamoDBTableProvider = class {
|
|
|
12441
12488
|
try {
|
|
12442
12489
|
observedProtectionOn = (await this.dynamoDBClient.send(new DescribeTableCommand({ TableName: physicalId }))).Table?.DeletionProtectionEnabled === true;
|
|
12443
12490
|
} catch (observeError) {
|
|
12444
|
-
|
|
12491
|
+
const mask = maskerOrIdentity(context?.maskSecrets);
|
|
12492
|
+
this.logger.debug(mask(safeMsg`Could not read DeletionProtectionEnabled on ${mask(physicalId)} before disabling it: ${mask(describeAwsFailure(observeError).detail)}`));
|
|
12445
12493
|
}
|
|
12446
12494
|
await this.dynamoDBClient.send(new UpdateTableCommand({
|
|
12447
12495
|
TableName: physicalId,
|
|
@@ -12452,10 +12500,10 @@ var DynamoDBTableProvider = class {
|
|
|
12452
12500
|
try {
|
|
12453
12501
|
await this.waitForTableActiveAfterUpdate(physicalId, 60, budget);
|
|
12454
12502
|
} catch (waitErr) {
|
|
12455
|
-
this.logger.debug(`Could not wait for table ${physicalId} ACTIVE after disabling protection: ${describeAwsFailure(waitErr).detail}`);
|
|
12503
|
+
this.logger.debug(maskerOrIdentity(context?.maskSecrets)(`Could not wait for table ${physicalId} ACTIVE after disabling protection: ${describeAwsFailure(waitErr).detail}`));
|
|
12456
12504
|
}
|
|
12457
12505
|
} catch (flipError) {
|
|
12458
|
-
if (!(flipError instanceof ResourceNotFoundException$1)) this.logger.debug(`Could not disable DeletionProtectionEnabled on ${physicalId}: ${describeAwsFailure(flipError).detail}`);
|
|
12506
|
+
if (!(flipError instanceof ResourceNotFoundException$1)) this.logger.debug(maskerOrIdentity(context?.maskSecrets)(`Could not disable DeletionProtectionEnabled on ${physicalId}: ${describeAwsFailure(flipError).detail}`));
|
|
12459
12507
|
}
|
|
12460
12508
|
try {
|
|
12461
12509
|
const reArmPolls = () => {
|
|
@@ -13461,8 +13509,13 @@ var LogsLogGroupProvider = class {
|
|
|
13461
13509
|
this.logsClient = awsClients.cloudWatchLogs;
|
|
13462
13510
|
this.stsClient = awsClients.sts;
|
|
13463
13511
|
}
|
|
13464
|
-
|
|
13465
|
-
|
|
13512
|
+
wrapCaughtError(mask, error, build) {
|
|
13513
|
+
const failure = describeAwsFailure(error);
|
|
13514
|
+
if (!failure.redacted) return wrapMaskedAwsError(mask, error, build);
|
|
13515
|
+
this.logger.debug(mask(build(mask(failure.detail)).message));
|
|
13516
|
+
const relay = isAuxiliaryFailure(error) ? "" : relayedNameCollision(failure.detail);
|
|
13517
|
+
const wrapped = build(`${mask(failure.summary)}${relay}`);
|
|
13518
|
+
return error instanceof Error ? markRedactedCause(wrapped) : wrapped;
|
|
13466
13519
|
}
|
|
13467
13520
|
generatedCreateName(_resourceType, logicalId, properties) {
|
|
13468
13521
|
if (properties["LogGroupName"]) return void 0;
|
|
@@ -13580,7 +13633,7 @@ var LogsLogGroupProvider = class {
|
|
|
13580
13633
|
} catch (error) {
|
|
13581
13634
|
const cause = error instanceof Error ? error : void 0;
|
|
13582
13635
|
const mask = maskerOrIdentity(context?.maskSecrets);
|
|
13583
|
-
const thrown = this.
|
|
13636
|
+
const thrown = this.wrapCaughtError(mask, error, (text) => new ProvisioningError(`Failed to create log group ${logicalId}: ${text}`, resourceType, logicalId, logGroupName, cause));
|
|
13584
13637
|
if (leftBehind) markCreatedBeforeFailure(thrown, logicalId, resourceType, logGroupName);
|
|
13585
13638
|
throw thrown;
|
|
13586
13639
|
}
|
|
@@ -13596,7 +13649,7 @@ var LogsLogGroupProvider = class {
|
|
|
13596
13649
|
if (error instanceof CdkdError) throw error;
|
|
13597
13650
|
const cause = error instanceof Error ? error : void 0;
|
|
13598
13651
|
const mask = maskerOrIdentity(context?.maskSecrets);
|
|
13599
|
-
throw this.
|
|
13652
|
+
throw this.wrapCaughtError(mask, error, (text) => new ProvisioningError(`Failed to update log group ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
13600
13653
|
}
|
|
13601
13654
|
}
|
|
13602
13655
|
async applyUpdate(logicalId, physicalId, resourceType, properties, previousProperties, context) {
|
|
@@ -13748,6 +13801,7 @@ var LogsLogGroupProvider = class {
|
|
|
13748
13801
|
flip,
|
|
13749
13802
|
logger: this.logger,
|
|
13750
13803
|
physicalId,
|
|
13804
|
+
mask: context?.maskSecrets,
|
|
13751
13805
|
guardName: "DeletionProtectionEnabled",
|
|
13752
13806
|
observe: async () => {
|
|
13753
13807
|
return ((await this.logsClient.send(new DescribeLogGroupsCommand({ logGroupNamePrefix: physicalId }))).logGroups?.find((g) => g.logGroupName === physicalId))?.deletionProtectionEnabled === true;
|
|
@@ -13761,7 +13815,7 @@ var LogsLogGroupProvider = class {
|
|
|
13761
13815
|
});
|
|
13762
13816
|
this.logger.debug(`Disabled DeletionProtectionEnabled on log group ${logicalId} before delete`);
|
|
13763
13817
|
} catch (flipError) {
|
|
13764
|
-
this.logger.debug(`Could not disable DeletionProtectionEnabled on ${physicalId}: ${describeAwsFailure(flipError).detail}`);
|
|
13818
|
+
this.logger.debug(maskerOrIdentity(context?.maskSecrets)(`Could not disable DeletionProtectionEnabled on ${physicalId}: ${describeAwsFailure(flipError).detail}`));
|
|
13765
13819
|
}
|
|
13766
13820
|
try {
|
|
13767
13821
|
await this.logsClient.send(new DeleteLogGroupCommand({ logGroupName: physicalId }));
|
|
@@ -13775,7 +13829,7 @@ var LogsLogGroupProvider = class {
|
|
|
13775
13829
|
return;
|
|
13776
13830
|
}
|
|
13777
13831
|
const cause = error instanceof Error ? error : void 0;
|
|
13778
|
-
throw new ProvisioningError(`Failed to delete log group ${logicalId}: ${
|
|
13832
|
+
throw this.wrapCaughtError(maskerOrIdentity(context?.maskSecrets), error, (text) => new ProvisioningError(`Failed to delete log group ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
13779
13833
|
}
|
|
13780
13834
|
}
|
|
13781
13835
|
logGoneOnDelete(logicalId, physicalId, context) {
|
|
@@ -14784,6 +14838,17 @@ var SSMParameterProvider = class SSMParameterProvider {
|
|
|
14784
14838
|
"Policies",
|
|
14785
14839
|
"DataType"
|
|
14786
14840
|
])]]);
|
|
14841
|
+
removalHandledInUpdate = /* @__PURE__ */ new Map([["AWS::SSM::Parameter", /* @__PURE__ */ new Set([
|
|
14842
|
+
"Name",
|
|
14843
|
+
"Type",
|
|
14844
|
+
"Value",
|
|
14845
|
+
"Description",
|
|
14846
|
+
"Tags",
|
|
14847
|
+
"AllowedPattern",
|
|
14848
|
+
"Tier",
|
|
14849
|
+
"Policies",
|
|
14850
|
+
"DataType"
|
|
14851
|
+
])]]);
|
|
14787
14852
|
constructor() {
|
|
14788
14853
|
const awsClients = getAwsClients();
|
|
14789
14854
|
this.ssmClient = awsClients.ssm;
|
|
@@ -20355,53 +20420,24 @@ var ApiGatewayProvider = class ApiGatewayProvider {
|
|
|
20355
20420
|
}));
|
|
20356
20421
|
try {
|
|
20357
20422
|
const integration = properties["Integration"];
|
|
20358
|
-
if (integration) await this.apiGatewayClient.send(new PutIntegrationCommand({
|
|
20423
|
+
if (integration) await this.apiGatewayClient.send(new PutIntegrationCommand(putIntegrationInput({
|
|
20359
20424
|
restApiId,
|
|
20360
20425
|
resourceId,
|
|
20361
|
-
httpMethod
|
|
20362
|
-
|
|
20363
|
-
integrationHttpMethod: integration["IntegrationHttpMethod"],
|
|
20364
|
-
uri: integration["Uri"],
|
|
20365
|
-
connectionType: integration["ConnectionType"],
|
|
20366
|
-
connectionId: integration["ConnectionId"],
|
|
20367
|
-
credentials: integration["Credentials"],
|
|
20368
|
-
requestParameters: integration["RequestParameters"],
|
|
20369
|
-
requestTemplates: integration["RequestTemplates"],
|
|
20370
|
-
passthroughBehavior: integration["PassthroughBehavior"],
|
|
20371
|
-
contentHandling: integration["ContentHandling"],
|
|
20372
|
-
timeoutInMillis: integration["TimeoutInMillis"],
|
|
20373
|
-
cacheNamespace: integration["CacheNamespace"],
|
|
20374
|
-
cacheKeyParameters: integration["CacheKeyParameters"],
|
|
20375
|
-
tlsConfig: integration["TlsConfig"] ? { insecureSkipVerification: integration["TlsConfig"]["InsecureSkipVerification"] } : void 0,
|
|
20376
|
-
responseTransferMode: integration["ResponseTransferMode"]
|
|
20377
|
-
}));
|
|
20426
|
+
httpMethod
|
|
20427
|
+
}, integration)));
|
|
20378
20428
|
const methodResponses = properties["MethodResponses"];
|
|
20379
|
-
if (methodResponses) for (const resp of methodResponses) {
|
|
20380
|
-
|
|
20381
|
-
|
|
20382
|
-
|
|
20383
|
-
|
|
20384
|
-
httpMethod,
|
|
20385
|
-
statusCode,
|
|
20386
|
-
responseModels: resp["ResponseModels"],
|
|
20387
|
-
responseParameters: resp["ResponseParameters"]
|
|
20388
|
-
}));
|
|
20389
|
-
}
|
|
20429
|
+
if (methodResponses) for (const resp of methodResponses) await this.apiGatewayClient.send(new PutMethodResponseCommand(putMethodResponseInput({
|
|
20430
|
+
restApiId,
|
|
20431
|
+
resourceId,
|
|
20432
|
+
httpMethod
|
|
20433
|
+
}, resp)));
|
|
20390
20434
|
if (integration) {
|
|
20391
20435
|
const integrationResponses = integration["IntegrationResponses"];
|
|
20392
|
-
if (integrationResponses) for (const ir of integrationResponses) {
|
|
20393
|
-
|
|
20394
|
-
|
|
20395
|
-
|
|
20396
|
-
|
|
20397
|
-
httpMethod,
|
|
20398
|
-
statusCode,
|
|
20399
|
-
selectionPattern: ir["SelectionPattern"],
|
|
20400
|
-
responseParameters: ir["ResponseParameters"],
|
|
20401
|
-
responseTemplates: ir["ResponseTemplates"],
|
|
20402
|
-
contentHandling: ir["ContentHandling"]
|
|
20403
|
-
}));
|
|
20404
|
-
}
|
|
20436
|
+
if (integrationResponses) for (const ir of integrationResponses) await this.apiGatewayClient.send(new PutIntegrationResponseCommand(putIntegrationResponseInput({
|
|
20437
|
+
restApiId,
|
|
20438
|
+
resourceId,
|
|
20439
|
+
httpMethod
|
|
20440
|
+
}, ir)));
|
|
20405
20441
|
}
|
|
20406
20442
|
} catch (innerError) {
|
|
20407
20443
|
try {
|
|
@@ -20474,7 +20510,12 @@ var ApiGatewayProvider = class ApiGatewayProvider {
|
|
|
20474
20510
|
path: "/authorizationScopes",
|
|
20475
20511
|
value: (newScopes ?? []).join(",")
|
|
20476
20512
|
});
|
|
20477
|
-
|
|
20513
|
+
const childCalls = methodChildCalls({
|
|
20514
|
+
restApiId,
|
|
20515
|
+
resourceId,
|
|
20516
|
+
httpMethod
|
|
20517
|
+
}, properties, previousProperties);
|
|
20518
|
+
if (patchOperations.length === 0 && childCalls.length === 0) {
|
|
20478
20519
|
log.debug(`No changes detected for API Gateway Method ${logicalId}`);
|
|
20479
20520
|
return {
|
|
20480
20521
|
physicalId,
|
|
@@ -20482,13 +20523,18 @@ var ApiGatewayProvider = class ApiGatewayProvider {
|
|
|
20482
20523
|
};
|
|
20483
20524
|
}
|
|
20484
20525
|
try {
|
|
20485
|
-
await this.apiGatewayClient.send(new UpdateMethodCommand({
|
|
20526
|
+
if (patchOperations.length > 0) await this.apiGatewayClient.send(new UpdateMethodCommand({
|
|
20486
20527
|
restApiId,
|
|
20487
20528
|
resourceId,
|
|
20488
20529
|
httpMethod,
|
|
20489
20530
|
patchOperations
|
|
20490
20531
|
}));
|
|
20491
|
-
|
|
20532
|
+
for (const call of childCalls) try {
|
|
20533
|
+
await this.apiGatewayClient.send(call.command);
|
|
20534
|
+
} catch (error) {
|
|
20535
|
+
if (!(call.kind === "delete" && error instanceof NotFoundException$1)) throw error;
|
|
20536
|
+
}
|
|
20537
|
+
log.debug(`Successfully updated API Gateway Method ${logicalId} (${patchOperations.length} patch ops, ${childCalls.length} sub-resource calls)`);
|
|
20492
20538
|
return {
|
|
20493
20539
|
physicalId,
|
|
20494
20540
|
wasReplaced: false
|
|
@@ -20848,6 +20894,127 @@ function appendMapPatchOps(ops, basePath, next, prev) {
|
|
|
20848
20894
|
path: `${basePath}/${escape(key)}`
|
|
20849
20895
|
});
|
|
20850
20896
|
}
|
|
20897
|
+
function putIntegrationInput(ids, integration) {
|
|
20898
|
+
return {
|
|
20899
|
+
...ids,
|
|
20900
|
+
type: integration["Type"],
|
|
20901
|
+
integrationHttpMethod: integration["IntegrationHttpMethod"],
|
|
20902
|
+
uri: integration["Uri"],
|
|
20903
|
+
connectionType: integration["ConnectionType"],
|
|
20904
|
+
connectionId: integration["ConnectionId"],
|
|
20905
|
+
credentials: integration["Credentials"],
|
|
20906
|
+
requestParameters: integration["RequestParameters"],
|
|
20907
|
+
requestTemplates: integration["RequestTemplates"],
|
|
20908
|
+
passthroughBehavior: integration["PassthroughBehavior"],
|
|
20909
|
+
contentHandling: integration["ContentHandling"],
|
|
20910
|
+
timeoutInMillis: integration["TimeoutInMillis"],
|
|
20911
|
+
cacheNamespace: integration["CacheNamespace"],
|
|
20912
|
+
cacheKeyParameters: integration["CacheKeyParameters"],
|
|
20913
|
+
tlsConfig: integration["TlsConfig"] ? { insecureSkipVerification: integration["TlsConfig"]["InsecureSkipVerification"] } : void 0,
|
|
20914
|
+
responseTransferMode: integration["ResponseTransferMode"]
|
|
20915
|
+
};
|
|
20916
|
+
}
|
|
20917
|
+
function putMethodResponseInput(ids, resp) {
|
|
20918
|
+
return {
|
|
20919
|
+
...ids,
|
|
20920
|
+
statusCode: String(resp["StatusCode"]),
|
|
20921
|
+
responseModels: resp["ResponseModels"],
|
|
20922
|
+
responseParameters: resp["ResponseParameters"]
|
|
20923
|
+
};
|
|
20924
|
+
}
|
|
20925
|
+
function putIntegrationResponseInput(ids, ir) {
|
|
20926
|
+
return {
|
|
20927
|
+
...ids,
|
|
20928
|
+
statusCode: String(ir["StatusCode"]),
|
|
20929
|
+
selectionPattern: ir["SelectionPattern"],
|
|
20930
|
+
responseParameters: ir["ResponseParameters"],
|
|
20931
|
+
responseTemplates: ir["ResponseTemplates"],
|
|
20932
|
+
contentHandling: ir["ContentHandling"]
|
|
20933
|
+
};
|
|
20934
|
+
}
|
|
20935
|
+
function isCfnMethodChildShape(props) {
|
|
20936
|
+
const integration = integrationBlock(props["Integration"]);
|
|
20937
|
+
if (integration !== void 0 && !("Type" in integration)) return false;
|
|
20938
|
+
const responses = props["MethodResponses"];
|
|
20939
|
+
return responses === void 0 || Array.isArray(responses);
|
|
20940
|
+
}
|
|
20941
|
+
function responsesByStatus(value) {
|
|
20942
|
+
const out = /* @__PURE__ */ new Map();
|
|
20943
|
+
if (!Array.isArray(value)) return out;
|
|
20944
|
+
for (const entry of value) if (entry !== null && typeof entry === "object" && !Array.isArray(entry)) {
|
|
20945
|
+
const record = entry;
|
|
20946
|
+
out.set(String(record["StatusCode"]), record);
|
|
20947
|
+
}
|
|
20948
|
+
return out;
|
|
20949
|
+
}
|
|
20950
|
+
function integrationBlock(value) {
|
|
20951
|
+
return value !== null && typeof value === "object" && !Array.isArray(value) && Object.keys(value).length > 0 ? value : void 0;
|
|
20952
|
+
}
|
|
20953
|
+
function methodChildCalls(ids, desired, previous) {
|
|
20954
|
+
if (!isCfnMethodChildShape(desired) || !isCfnMethodChildShape(previous)) return [];
|
|
20955
|
+
const newInt = integrationBlock(desired["Integration"]);
|
|
20956
|
+
const oldInt = integrationBlock(previous["Integration"]);
|
|
20957
|
+
const newMr = responsesByStatus(desired["MethodResponses"]);
|
|
20958
|
+
const oldMr = responsesByStatus(previous["MethodResponses"]);
|
|
20959
|
+
const newIr = responsesByStatus(newInt?.["IntegrationResponses"]);
|
|
20960
|
+
const oldIr = responsesByStatus(oldInt?.["IntegrationResponses"]);
|
|
20961
|
+
const withoutResponses = (b) => {
|
|
20962
|
+
if (b === void 0) return void 0;
|
|
20963
|
+
const { IntegrationResponses: _dropped, ...rest } = b;
|
|
20964
|
+
return rest;
|
|
20965
|
+
};
|
|
20966
|
+
const integrationChanged = !isDeepStrictEqual(withoutResponses(newInt), withoutResponses(oldInt));
|
|
20967
|
+
const mrGoing = [...oldMr.keys()].filter((code) => !newMr.has(code) || !isDeepStrictEqual(newMr.get(code), oldMr.get(code)));
|
|
20968
|
+
const mrComing = [...newMr.keys()].filter((code) => !oldMr.has(code) || !isDeepStrictEqual(newMr.get(code), oldMr.get(code)));
|
|
20969
|
+
const calls = [];
|
|
20970
|
+
const liveIr = new Map(oldInt === void 0 ? [] : oldIr);
|
|
20971
|
+
if (oldInt !== void 0 && newInt === void 0) {
|
|
20972
|
+
calls.push({
|
|
20973
|
+
kind: "delete",
|
|
20974
|
+
command: new DeleteIntegrationCommand(ids)
|
|
20975
|
+
});
|
|
20976
|
+
liveIr.clear();
|
|
20977
|
+
} else if (oldInt !== void 0) {
|
|
20978
|
+
for (const code of oldIr.keys()) if (!newIr.has(code) || mrGoing.includes(code)) {
|
|
20979
|
+
calls.push({
|
|
20980
|
+
kind: "delete",
|
|
20981
|
+
command: new DeleteIntegrationResponseCommand({
|
|
20982
|
+
...ids,
|
|
20983
|
+
statusCode: code
|
|
20984
|
+
})
|
|
20985
|
+
});
|
|
20986
|
+
liveIr.delete(code);
|
|
20987
|
+
}
|
|
20988
|
+
}
|
|
20989
|
+
for (const code of mrGoing) calls.push({
|
|
20990
|
+
kind: "delete",
|
|
20991
|
+
command: new DeleteMethodResponseCommand({
|
|
20992
|
+
...ids,
|
|
20993
|
+
statusCode: code
|
|
20994
|
+
})
|
|
20995
|
+
});
|
|
20996
|
+
for (const code of mrComing) calls.push({
|
|
20997
|
+
kind: "put",
|
|
20998
|
+
command: new PutMethodResponseCommand(putMethodResponseInput(ids, newMr.get(code)))
|
|
20999
|
+
});
|
|
21000
|
+
if (newInt !== void 0) {
|
|
21001
|
+
if (integrationChanged) {
|
|
21002
|
+
calls.push({
|
|
21003
|
+
kind: "put",
|
|
21004
|
+
command: new PutIntegrationCommand(putIntegrationInput(ids, newInt))
|
|
21005
|
+
});
|
|
21006
|
+
liveIr.clear();
|
|
21007
|
+
}
|
|
21008
|
+
for (const [code, ir] of newIr) {
|
|
21009
|
+
if (liveIr.has(code) && isDeepStrictEqual(liveIr.get(code), ir)) continue;
|
|
21010
|
+
calls.push({
|
|
21011
|
+
kind: "put",
|
|
21012
|
+
command: new PutIntegrationResponseCommand(putIntegrationResponseInput(ids, ir))
|
|
21013
|
+
});
|
|
21014
|
+
}
|
|
21015
|
+
}
|
|
21016
|
+
return calls;
|
|
21017
|
+
}
|
|
20851
21018
|
|
|
20852
21019
|
//#endregion
|
|
20853
21020
|
//#region src/provisioning/providers/apigatewayv2-provider.ts
|
|
@@ -21272,7 +21439,7 @@ var ApiGatewayV2Provider = class {
|
|
|
21272
21439
|
const apiId = properties?.["ApiId"];
|
|
21273
21440
|
if (!apiId) throw new ProvisioningError(`ApiId is required to delete Integration ${logicalId}`, resourceType, logicalId, physicalId);
|
|
21274
21441
|
try {
|
|
21275
|
-
await this.getClient().send(new DeleteIntegrationCommand({
|
|
21442
|
+
await this.getClient().send(new DeleteIntegrationCommand$1({
|
|
21276
21443
|
ApiId: apiId,
|
|
21277
21444
|
IntegrationId: physicalId
|
|
21278
21445
|
}));
|
|
@@ -22591,6 +22758,14 @@ const CACHE_BEHAVIOR_QUANTITY_FIELDS = [
|
|
|
22591
22758
|
var CloudFrontDistributionProvider = class {
|
|
22592
22759
|
cloudFrontClient;
|
|
22593
22760
|
logger = getLogger().child("CloudFrontDistributionProvider");
|
|
22761
|
+
wrapCaughtError(mask, error, build) {
|
|
22762
|
+
const m = maskerOrIdentity(mask);
|
|
22763
|
+
const failure = describeAwsFailure(error);
|
|
22764
|
+
if (!failure.redacted) return wrapMaskedAwsError(m, error, build);
|
|
22765
|
+
this.logger.debug(m(build(m(failure.detail)).message));
|
|
22766
|
+
const wrapped = build(`${m(failure.summary)}${relayedNameCollision(failure.detail)}`);
|
|
22767
|
+
return error instanceof Error ? markRedactedCause(wrapped) : wrapped;
|
|
22768
|
+
}
|
|
22594
22769
|
handledProperties = /* @__PURE__ */ new Map([["AWS::CloudFront::Distribution", /* @__PURE__ */ new Set(["DistributionConfig", "Tags"])]]);
|
|
22595
22770
|
constructor() {
|
|
22596
22771
|
const awsClients = getAwsClients();
|
|
@@ -22635,7 +22810,7 @@ var CloudFrontDistributionProvider = class {
|
|
|
22635
22810
|
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));
|
|
22636
22811
|
}
|
|
22637
22812
|
const cause = error instanceof Error ? error : void 0;
|
|
22638
|
-
throw new ProvisioningError(`Failed to create CloudFront Distribution ${logicalId}: ${
|
|
22813
|
+
throw this.wrapCaughtError(maskSecrets, error, (text) => new ProvisioningError(`Failed to create CloudFront Distribution ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
|
|
22639
22814
|
}
|
|
22640
22815
|
}
|
|
22641
22816
|
orphanSearchHint(properties, maskSecrets) {
|
|
@@ -22667,7 +22842,7 @@ var CloudFrontDistributionProvider = class {
|
|
|
22667
22842
|
const getResponse = await this.cloudFrontClient.send(new GetDistributionCommand({ Id: physicalId }));
|
|
22668
22843
|
const domainName = getResponse.Distribution?.DomainName;
|
|
22669
22844
|
const arn = getResponse.Distribution?.ARN;
|
|
22670
|
-
await this.applyTagDiff(arn, previousProperties["Tags"], properties["Tags"], physicalId, logicalId, resourceType);
|
|
22845
|
+
await this.applyTagDiff(arn, previousProperties["Tags"], properties["Tags"], physicalId, logicalId, resourceType, context?.maskSecrets);
|
|
22671
22846
|
await this.settleDistribution(logicalId, physicalId);
|
|
22672
22847
|
this.logger.debug(`Updated CloudFront Distribution ${physicalId}`);
|
|
22673
22848
|
return {
|
|
@@ -22682,7 +22857,7 @@ var CloudFrontDistributionProvider = class {
|
|
|
22682
22857
|
} catch (error) {
|
|
22683
22858
|
if (error instanceof CdkdError) throw error;
|
|
22684
22859
|
const cause = error instanceof Error ? error : void 0;
|
|
22685
|
-
throw new ProvisioningError(`Failed to update CloudFront Distribution ${logicalId}: ${
|
|
22860
|
+
throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to update CloudFront Distribution ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
22686
22861
|
}
|
|
22687
22862
|
}
|
|
22688
22863
|
async delete(logicalId, physicalId, resourceType, _properties, context) {
|
|
@@ -22733,7 +22908,7 @@ var CloudFrontDistributionProvider = class {
|
|
|
22733
22908
|
return;
|
|
22734
22909
|
}
|
|
22735
22910
|
const cause = error instanceof Error ? error : void 0;
|
|
22736
|
-
const failure = new ProvisioningError(`Failed to delete CloudFront Distribution ${logicalId}: ${
|
|
22911
|
+
const failure = this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to delete CloudFront Distribution ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
22737
22912
|
throw stripped ? markDeleteStarted(failure) : failure;
|
|
22738
22913
|
}
|
|
22739
22914
|
}
|
|
@@ -23130,7 +23305,7 @@ var CloudFrontDistributionProvider = class {
|
|
|
23130
23305
|
upserts
|
|
23131
23306
|
};
|
|
23132
23307
|
}
|
|
23133
|
-
async applyTagDiff(arn, previousTags, newTags, physicalId, logicalId, resourceType) {
|
|
23308
|
+
async applyTagDiff(arn, previousTags, newTags, physicalId, logicalId, resourceType, mask) {
|
|
23134
23309
|
const { removed, upserts } = this.computeTagDiff(previousTags, newTags, resourceType, logicalId);
|
|
23135
23310
|
if (removed.length === 0 && upserts.length === 0) return;
|
|
23136
23311
|
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);
|
|
@@ -23151,7 +23326,7 @@ var CloudFrontDistributionProvider = class {
|
|
|
23151
23326
|
}
|
|
23152
23327
|
} catch (err) {
|
|
23153
23328
|
const cause = err instanceof Error ? err : void 0;
|
|
23154
|
-
throw new ProvisioningError(`CloudFront Distribution ${physicalId}: tag diff failed (removed=${removed.length}, upserts=${upserts.length}): ${
|
|
23329
|
+
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));
|
|
23155
23330
|
}
|
|
23156
23331
|
}
|
|
23157
23332
|
async import(input) {
|
|
@@ -26131,6 +26306,7 @@ var ELBv2Provider = class {
|
|
|
26131
26306
|
flip,
|
|
26132
26307
|
logger: this.logger,
|
|
26133
26308
|
physicalId,
|
|
26309
|
+
mask: context?.maskSecrets,
|
|
26134
26310
|
guardName: "deletion_protection.enabled",
|
|
26135
26311
|
observe: async () => {
|
|
26136
26312
|
return ((await this.getClient().send(new DescribeLoadBalancerAttributesCommand({ LoadBalancerArn: physicalId }))).Attributes ?? []).some((a) => a.Key === "deletion_protection.enabled" && a.Value === "true");
|
|
@@ -26147,7 +26323,7 @@ var ELBv2Provider = class {
|
|
|
26147
26323
|
});
|
|
26148
26324
|
this.logger.debug(`Disabled deletion_protection.enabled on LoadBalancer ${logicalId} before delete`);
|
|
26149
26325
|
} catch (flipError) {
|
|
26150
|
-
if (!this.isNotFoundError(flipError)) this.logger.debug(`Could not disable deletion_protection.enabled on ${physicalId}: ${describeAwsFailure(flipError).detail}`);
|
|
26326
|
+
if (!this.isNotFoundError(flipError)) this.logger.debug(maskerOrIdentity(context?.maskSecrets)(`Could not disable deletion_protection.enabled on ${physicalId}: ${describeAwsFailure(flipError).detail}`));
|
|
26151
26327
|
}
|
|
26152
26328
|
try {
|
|
26153
26329
|
await this.getClient().send(new DeleteLoadBalancerCommand({ LoadBalancerArn: physicalId }));
|
|
@@ -28073,6 +28249,14 @@ async function attachDocDBTags(client, logger, result, arn) {
|
|
|
28073
28249
|
|
|
28074
28250
|
//#endregion
|
|
28075
28251
|
//#region src/provisioning/providers/docdb-provider.ts
|
|
28252
|
+
function masterUserPasswordToSend(properties, previousProperties, context) {
|
|
28253
|
+
const desired = properties["MasterUserPassword"];
|
|
28254
|
+
if (desired === void 0 || desired === null) return void 0;
|
|
28255
|
+
const changedProperties = context?.changedProperties;
|
|
28256
|
+
if (changedProperties !== void 0) return changedProperties.has("MasterUserPassword") ? desired : void 0;
|
|
28257
|
+
const recorded = previousProperties["MasterUserPassword"];
|
|
28258
|
+
return typeof desired === "string" && typeof recorded === "string" && recorded === desired && dynamicReferenceTokens(recorded).length === 0 && recorded !== "***" ? void 0 : desired;
|
|
28259
|
+
}
|
|
28076
28260
|
function clusterAttributes(cluster) {
|
|
28077
28261
|
return definedAttributes({
|
|
28078
28262
|
Endpoint: cluster?.Endpoint,
|
|
@@ -28097,6 +28281,8 @@ function instanceAttributes(instance) {
|
|
|
28097
28281
|
function isDbIdentifier(id) {
|
|
28098
28282
|
return id.length <= 63 && /^[A-Za-z](?:-?[A-Za-z0-9])*$/.test(id);
|
|
28099
28283
|
}
|
|
28284
|
+
const FINAL_SNAPSHOT_SETTLE_WAIT_MS = 9e5;
|
|
28285
|
+
const FINAL_SNAPSHOT_COMPENSATION_MARGIN_MS = 6e4;
|
|
28100
28286
|
var DocDBProvider = class {
|
|
28101
28287
|
docdbClient;
|
|
28102
28288
|
createClient;
|
|
@@ -28153,9 +28339,9 @@ var DocDBProvider = class {
|
|
|
28153
28339
|
default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId);
|
|
28154
28340
|
}
|
|
28155
28341
|
}
|
|
28156
|
-
async update(logicalId, physicalId, resourceType, properties, previousProperties,
|
|
28342
|
+
async update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
|
|
28157
28343
|
switch (resourceType) {
|
|
28158
|
-
case "AWS::DocDB::DBCluster": return this.updateDBCluster(logicalId, physicalId, resourceType, properties, previousProperties);
|
|
28344
|
+
case "AWS::DocDB::DBCluster": return this.updateDBCluster(logicalId, physicalId, resourceType, properties, previousProperties, context);
|
|
28159
28345
|
case "AWS::DocDB::DBInstance": return this.updateDBInstance(logicalId, physicalId, resourceType, properties, previousProperties);
|
|
28160
28346
|
default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId, physicalId);
|
|
28161
28347
|
}
|
|
@@ -28207,7 +28393,7 @@ var DocDBProvider = class {
|
|
|
28207
28393
|
throw thrown;
|
|
28208
28394
|
}
|
|
28209
28395
|
}
|
|
28210
|
-
async updateDBCluster(logicalId, physicalId, resourceType, properties, previousProperties) {
|
|
28396
|
+
async updateDBCluster(logicalId, physicalId, resourceType, properties, previousProperties, context) {
|
|
28211
28397
|
this.logger.debug(`Updating DocDB DBCluster ${logicalId}: ${physicalId}`);
|
|
28212
28398
|
refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId, physicalId);
|
|
28213
28399
|
try {
|
|
@@ -28222,12 +28408,16 @@ var DocDBProvider = class {
|
|
|
28222
28408
|
PreferredMaintenanceWindow: properties["PreferredMaintenanceWindow"],
|
|
28223
28409
|
DBClusterParameterGroupName: properties["DBClusterParameterGroupName"],
|
|
28224
28410
|
...sendVpcSgIds && { VpcSecurityGroupIds: vpcSgIds },
|
|
28225
|
-
MasterUserPassword: properties
|
|
28411
|
+
MasterUserPassword: masterUserPasswordToSend(properties, previousProperties, context),
|
|
28226
28412
|
Port: properties["Port"] != null ? Number(properties["Port"]) : void 0,
|
|
28227
28413
|
ApplyImmediately: true
|
|
28228
28414
|
}));
|
|
28229
28415
|
this.logger.debug(`Successfully updated DocDB DBCluster ${logicalId}`);
|
|
28230
28416
|
const described = await this.describeDBCluster(physicalId);
|
|
28417
|
+
if (process.env["CDKD_NO_WAIT"] !== "true" && securityGroupListChanged(sendVpcSgIds ? vpcSgIds : void 0, previousProperties["VpcSecurityGroupIds"])) {
|
|
28418
|
+
await this.waitForSecurityGroupsApplied(physicalId, logicalId, (sendVpcSgIds ? vpcSgIds : void 0) ?? []);
|
|
28419
|
+
for (const member of described?.DBClusterMembers ?? []) if (member.DBInstanceIdentifier) await this.waitForMemberAfterSecurityGroupChange(member.DBInstanceIdentifier);
|
|
28420
|
+
}
|
|
28231
28421
|
if (described?.DBClusterArn) await applyDocDBTagDiff(this.getClient(), this.logger, described.DBClusterArn, resourceType, logicalId, previousProperties["Tags"], properties["Tags"]);
|
|
28232
28422
|
return {
|
|
28233
28423
|
physicalId,
|
|
@@ -28275,6 +28465,7 @@ var DocDBProvider = class {
|
|
|
28275
28465
|
flip,
|
|
28276
28466
|
logger: this.logger,
|
|
28277
28467
|
physicalId,
|
|
28468
|
+
mask: context?.maskSecrets,
|
|
28278
28469
|
guardName: "DeletionProtection",
|
|
28279
28470
|
observe: async () => (await this.describeDBCluster(physicalId))?.DeletionProtection === true,
|
|
28280
28471
|
disable: async () => {
|
|
@@ -28287,9 +28478,10 @@ var DocDBProvider = class {
|
|
|
28287
28478
|
});
|
|
28288
28479
|
this.logger.debug(`Disabled DeletionProtection on DocDB DBCluster ${logicalId} before delete`);
|
|
28289
28480
|
} catch (disableError) {
|
|
28290
|
-
if (!isDocDBNotFoundError(disableError, "DBClusterNotFoundFault")) this.logger.debug(`Could not disable deletion protection for DocDB DBCluster ${logicalId}: ${describeAwsFailure(disableError).detail}`);
|
|
28481
|
+
if (!isDocDBNotFoundError(disableError, "DBClusterNotFoundFault")) this.logger.debug(maskerOrIdentity(context?.maskSecrets)(`Could not disable deletion protection for DocDB DBCluster ${logicalId}: ${describeAwsFailure(disableError).detail}`));
|
|
28291
28482
|
}
|
|
28292
28483
|
const finalSnapshotId = context?.finalSnapshotIdentifier;
|
|
28484
|
+
if (finalSnapshotId && flip.flippedOffByThisRun && !flip.deleteAccepted) await this.waitForProtectionOffBeforeFinalSnapshot(logicalId, physicalId);
|
|
28293
28485
|
await this.getClient().send(new DeleteDBClusterCommand$1({
|
|
28294
28486
|
DBClusterIdentifier: physicalId,
|
|
28295
28487
|
...finalSnapshotId ? {
|
|
@@ -28442,6 +28634,54 @@ var DocDBProvider = class {
|
|
|
28442
28634
|
if (typeof found.resourceId !== "string" || found.resourceId === "") throw new Error(`${api} returned no resource id`);
|
|
28443
28635
|
return found.resourceId;
|
|
28444
28636
|
}
|
|
28637
|
+
async waitForMemberAfterSecurityGroupChange(dbInstanceIdentifier, maxWaitMs = 18e5) {
|
|
28638
|
+
const startTime = Date.now();
|
|
28639
|
+
let delay = 5e3;
|
|
28640
|
+
while (Date.now() - startTime < maxWaitMs) {
|
|
28641
|
+
let status;
|
|
28642
|
+
try {
|
|
28643
|
+
status = (await this.describeDBInstance(dbInstanceIdentifier))?.DBInstanceStatus;
|
|
28644
|
+
} catch (error) {
|
|
28645
|
+
if (isDocDBNotFoundError(error, "DBInstanceNotFoundFault")) return;
|
|
28646
|
+
throw error;
|
|
28647
|
+
}
|
|
28648
|
+
if (status !== "modifying") return;
|
|
28649
|
+
await this.sleep(delay);
|
|
28650
|
+
delay = Math.min(delay * 2, 1e4);
|
|
28651
|
+
}
|
|
28652
|
+
throw new Error(`Timed out waiting for a member instance of the cluster to finish applying its new VPC security groups`);
|
|
28653
|
+
}
|
|
28654
|
+
async waitForSecurityGroupsApplied(dbClusterIdentifier, logicalId, expected, maxWaitMs = 18e5) {
|
|
28655
|
+
const want = [...new Set(expected)].sort().join(" ");
|
|
28656
|
+
const startTime = Date.now();
|
|
28657
|
+
let delay = 5e3;
|
|
28658
|
+
while (Date.now() - startTime < maxWaitMs) {
|
|
28659
|
+
const cluster = await this.describeDBCluster(dbClusterIdentifier);
|
|
28660
|
+
const groups = cluster?.VpcSecurityGroups ?? [];
|
|
28661
|
+
const ids = groups.map((group) => group.VpcSecurityGroupId ?? "").sort().join(" ");
|
|
28662
|
+
if (cluster !== void 0 && cluster.Status !== "modifying" && groups.every((group) => group.Status === "active") && ids === want) return;
|
|
28663
|
+
this.logger.debug(safeMsg`DocDB DBCluster ${logicalId} security groups not settled yet (status ${cluster?.Status ?? "unknown"})`);
|
|
28664
|
+
await this.sleep(delay);
|
|
28665
|
+
delay = Math.min(delay * 2, 1e4);
|
|
28666
|
+
}
|
|
28667
|
+
throw new Error(`Timed out waiting for DocDB DBCluster ${logicalId} to apply its new VPC security groups`);
|
|
28668
|
+
}
|
|
28669
|
+
async waitForProtectionOffBeforeFinalSnapshot(logicalId, physicalId, maxWaitMs = FINAL_SNAPSHOT_SETTLE_WAIT_MS) {
|
|
28670
|
+
const budgetMs = Math.min(maxWaitMs, enclosingDeadlineRemainingMs() - FINAL_SNAPSHOT_COMPENSATION_MARGIN_MS);
|
|
28671
|
+
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`);
|
|
28672
|
+
const startTime = Date.now();
|
|
28673
|
+
let delay = 5e3;
|
|
28674
|
+
for (;;) {
|
|
28675
|
+
const current = await this.describeDBCluster(physicalId);
|
|
28676
|
+
if (current === void 0) return;
|
|
28677
|
+
if (current.DeletionProtection === false && current.Status !== "modifying") return;
|
|
28678
|
+
if (Date.now() - startTime + delay >= budgetMs) break;
|
|
28679
|
+
this.logger.debug(safeMsg`DocDB DBCluster ${logicalId}: waiting for the DeletionProtection change to settle before the final snapshot (status ${current.Status ?? "unknown"})`);
|
|
28680
|
+
await this.sleep(delay);
|
|
28681
|
+
delay = Math.min(delay * 2, 1e4);
|
|
28682
|
+
}
|
|
28683
|
+
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'`);
|
|
28684
|
+
}
|
|
28445
28685
|
async waitForClusterAvailable(dbClusterIdentifier, maxWaitMs = 18e5) {
|
|
28446
28686
|
const startTime = Date.now();
|
|
28447
28687
|
let delay = 5e3;
|
|
@@ -28594,6 +28834,11 @@ var DocDBProvider = class {
|
|
|
28594
28834
|
return null;
|
|
28595
28835
|
}
|
|
28596
28836
|
};
|
|
28837
|
+
function securityGroupListChanged(sent, previous) {
|
|
28838
|
+
if (sent === void 0) return false;
|
|
28839
|
+
const before = Array.isArray(previous) ? previous.filter((id) => typeof id === "string") : [];
|
|
28840
|
+
return [...sent].sort().join(" ") !== [...before].sort().join(" ");
|
|
28841
|
+
}
|
|
28597
28842
|
|
|
28598
28843
|
//#endregion
|
|
28599
28844
|
//#region src/provisioning/providers/docdb-subnet-group-provider.ts
|
|
@@ -30511,6 +30756,15 @@ var CognitoUserPoolProvider = class {
|
|
|
30511
30756
|
protectionFlips = new ProtectionFlipRegistry();
|
|
30512
30757
|
preFlipPools = /* @__PURE__ */ new WeakMap();
|
|
30513
30758
|
emailOmittedFlips = /* @__PURE__ */ new WeakMap();
|
|
30759
|
+
wrapCaughtError(mask, error, build) {
|
|
30760
|
+
const failure = describeAwsFailure(error);
|
|
30761
|
+
const m = maskerOrIdentity(mask);
|
|
30762
|
+
if (!failure.redacted) return wrapMaskedAwsError(m, error, build);
|
|
30763
|
+
this.logger.debug(m(build(m(failure.detail)).message));
|
|
30764
|
+
const relay = isAuxiliaryFailure(error) ? "" : relayedNameCollision(failure.detail);
|
|
30765
|
+
const wrapped = build(`${m(failure.summary)}${relay}`);
|
|
30766
|
+
return error instanceof Error ? markRedactedCause(wrapped) : wrapped;
|
|
30767
|
+
}
|
|
30514
30768
|
handledProperties = /* @__PURE__ */ new Map([["AWS::Cognito::UserPool", /* @__PURE__ */ new Set([
|
|
30515
30769
|
"UserPoolName",
|
|
30516
30770
|
"AutoVerifiedAttributes",
|
|
@@ -30661,11 +30915,13 @@ var CognitoUserPoolProvider = class {
|
|
|
30661
30915
|
this.logger.debug(`Rolled back partially-created Cognito User Pool ${createdUserPoolId}`);
|
|
30662
30916
|
} catch (rollbackError) {
|
|
30663
30917
|
poolLeftBehind = true;
|
|
30664
|
-
|
|
30918
|
+
const rollbackFailure = describeAwsFailure(rollbackError);
|
|
30919
|
+
if (rollbackFailure.redacted) this.logger.debug(maskerOrIdentity(context?.maskSecrets)(`Rollback of partially-created Cognito User Pool ${createdUserPoolId} failed: ${rollbackFailure.detail}`));
|
|
30920
|
+
this.logger.warn(`Failed to roll back partially-created Cognito User Pool ${createdUserPoolId}: ${rollbackFailure.summary}`);
|
|
30665
30921
|
}
|
|
30666
30922
|
}
|
|
30667
30923
|
const cause = error instanceof Error ? error : void 0;
|
|
30668
|
-
const thrown = new ProvisioningError(`Failed to create Cognito User Pool ${logicalId}: ${
|
|
30924
|
+
const thrown = this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to create Cognito User Pool ${logicalId}: ${text}`, resourceType, logicalId, poolName, cause));
|
|
30669
30925
|
if (poolLeftBehind && createdUserPoolId) {
|
|
30670
30926
|
markCreatedBeforeFailure(thrown, logicalId, resourceType, createdUserPoolId);
|
|
30671
30927
|
markNonRetryable(thrown);
|
|
@@ -30887,7 +31143,7 @@ var CognitoUserPoolProvider = class {
|
|
|
30887
31143
|
} catch (error) {
|
|
30888
31144
|
if (error instanceof ResourceUpdateNotSupportedError || error instanceof ProvisioningError) throw error;
|
|
30889
31145
|
const cause = error instanceof Error ? error : void 0;
|
|
30890
|
-
throw new ProvisioningError(`Failed to update Cognito User Pool ${logicalId}: ${
|
|
31146
|
+
throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to update Cognito User Pool ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
30891
31147
|
}
|
|
30892
31148
|
}
|
|
30893
31149
|
async reconcileSchemaCustomAttributes(logicalId, physicalId, resourceType, newSchema, oldSchema, deletionProtected = false) {
|
|
@@ -30985,7 +31241,8 @@ var CognitoUserPoolProvider = class {
|
|
|
30985
31241
|
failure = bareError;
|
|
30986
31242
|
}
|
|
30987
31243
|
if (readOn && !(failure instanceof ResourceNotFoundException$11)) {
|
|
30988
|
-
|
|
31244
|
+
const mask = maskerOrIdentity(context?.maskSecrets);
|
|
31245
|
+
this.logger.debug(mask(safeMsg`Writing DeletionProtection back on ${mask(physicalId)} failed: ${mask(describeAwsFailure(failure).detail)}`));
|
|
30989
31246
|
return "read-on-write-failed";
|
|
30990
31247
|
}
|
|
30991
31248
|
throw failure;
|
|
@@ -31027,6 +31284,7 @@ var CognitoUserPoolProvider = class {
|
|
|
31027
31284
|
flip,
|
|
31028
31285
|
logger: this.logger,
|
|
31029
31286
|
physicalId,
|
|
31287
|
+
mask: context?.maskSecrets,
|
|
31030
31288
|
guardName: "DeletionProtection",
|
|
31031
31289
|
observe: async () => {
|
|
31032
31290
|
observedPool = (await this.getClient().send(new DescribeUserPoolCommand({ UserPoolId: physicalId })).catch((error) => {
|
|
@@ -31053,12 +31311,12 @@ var CognitoUserPoolProvider = class {
|
|
|
31053
31311
|
return;
|
|
31054
31312
|
}
|
|
31055
31313
|
this.logger.debug(`Disabling DeletionProtection on Cognito User Pool ${physicalId} before deletion (--remove-protection)`);
|
|
31056
|
-
await this.disableUserPoolDeletionProtection(physicalId, observedPool, flip);
|
|
31314
|
+
await this.disableUserPoolDeletionProtection(physicalId, observedPool, flip, maskerOrIdentity(context?.maskSecrets));
|
|
31057
31315
|
}
|
|
31058
31316
|
});
|
|
31059
31317
|
} catch (flipError) {
|
|
31060
31318
|
if (isTransientCognitoFailure(flipError)) throw flipError;
|
|
31061
|
-
this.logger.debug(`Could not disable DeletionProtection for ${physicalId}: ${describeAwsFailure(flipError).detail}`);
|
|
31319
|
+
this.logger.debug(maskerOrIdentity(context?.maskSecrets)(`Could not disable DeletionProtection for ${physicalId}: ${describeAwsFailure(flipError).detail}`));
|
|
31062
31320
|
}
|
|
31063
31321
|
if (transientReadError !== void 0) throw transientReadError;
|
|
31064
31322
|
}
|
|
@@ -31073,7 +31331,7 @@ var CognitoUserPoolProvider = class {
|
|
|
31073
31331
|
return;
|
|
31074
31332
|
}
|
|
31075
31333
|
const cause = error instanceof Error ? error : void 0;
|
|
31076
|
-
throw new ProvisioningError(`Failed to delete Cognito User Pool ${logicalId}: ${
|
|
31334
|
+
throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to delete Cognito User Pool ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
31077
31335
|
}
|
|
31078
31336
|
}
|
|
31079
31337
|
async sendEchoedDeletionProtection(physicalId, pool, value, opts = {}) {
|
|
@@ -31096,7 +31354,7 @@ var CognitoUserPoolProvider = class {
|
|
|
31096
31354
|
return "without-email";
|
|
31097
31355
|
}
|
|
31098
31356
|
}
|
|
31099
|
-
async disableUserPoolDeletionProtection(physicalId, pool, flip) {
|
|
31357
|
+
async disableUserPoolDeletionProtection(physicalId, pool, flip, mask) {
|
|
31100
31358
|
if (this.preFlipPools.get(flip)?.ambiguous) this.preFlipPools.delete(flip);
|
|
31101
31359
|
const observedOn = pool.DeletionProtection === "ACTIVE";
|
|
31102
31360
|
try {
|
|
@@ -31111,7 +31369,7 @@ var CognitoUserPoolProvider = class {
|
|
|
31111
31369
|
if (observedOn && isAmbiguousWriteFailure(echoError)) flip.flippedOffByThisRun = true;
|
|
31112
31370
|
if (isTransientCognitoFailure(echoError)) throw echoError;
|
|
31113
31371
|
if (!isRefusedEcho(echoError)) {
|
|
31114
|
-
this.warnGuardLeftOn(physicalId, echoError);
|
|
31372
|
+
this.warnGuardLeftOn(physicalId, mask, echoError);
|
|
31115
31373
|
throw echoError;
|
|
31116
31374
|
}
|
|
31117
31375
|
try {
|
|
@@ -31132,7 +31390,7 @@ var CognitoUserPoolProvider = class {
|
|
|
31132
31390
|
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.`);
|
|
31133
31391
|
throw bareError;
|
|
31134
31392
|
}
|
|
31135
|
-
this.warnGuardLeftOn(physicalId, bareError, echoError);
|
|
31393
|
+
this.warnGuardLeftOn(physicalId, mask, bareError, echoError);
|
|
31136
31394
|
throw bareError;
|
|
31137
31395
|
}
|
|
31138
31396
|
const kept = this.preFlipPools.get(flip);
|
|
@@ -31144,15 +31402,15 @@ var CognitoUserPoolProvider = class {
|
|
|
31144
31402
|
kept.ambiguous = false;
|
|
31145
31403
|
kept.echoedSince = false;
|
|
31146
31404
|
}
|
|
31147
|
-
this.logger.debug(safeMsg`UpdateUserPool refused the echoed configuration of ${physicalId}: ${describeAwsFailure(echoError).detail}`);
|
|
31405
|
+
this.logger.debug(mask(safeMsg`UpdateUserPool refused the echoed configuration of ${mask(physicalId)}: ${mask(describeAwsFailure(echoError).detail)}`));
|
|
31148
31406
|
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.`);
|
|
31149
31407
|
}
|
|
31150
31408
|
}
|
|
31151
|
-
warnGuardLeftOn(physicalId, error, echoError) {
|
|
31409
|
+
warnGuardLeftOn(physicalId, mask, error, echoError) {
|
|
31152
31410
|
const name = typeof error === "object" && error !== null ? String(error.name) : "";
|
|
31153
31411
|
const accessHint = /AccessDenied|NotAuthorized|Unauthorized/.test(name) ? " The caller needs cognito-idp:UpdateUserPool." : "";
|
|
31154
31412
|
const echoClause = echoError === void 0 ? "" : safeMsg`; the pool's own settings sent back were refused first (${describeAwsFailure(echoError).summary})`;
|
|
31155
|
-
this.logger.debug(safeMsg`UpdateUserPool did not turn DeletionProtection off on ${physicalId}: ${describeAwsFailure(error).detail}`);
|
|
31413
|
+
this.logger.debug(mask(safeMsg`UpdateUserPool did not turn DeletionProtection off on ${mask(physicalId)}: ${mask(describeAwsFailure(error).detail)}`));
|
|
31156
31414
|
const refused = error instanceof Error && isAwsAuthoredFailure(error);
|
|
31157
31415
|
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.`);
|
|
31158
31416
|
}
|
|
@@ -31269,6 +31527,14 @@ var ElastiCacheProvider = class {
|
|
|
31269
31527
|
createClient;
|
|
31270
31528
|
providerRegion = ambientRegion();
|
|
31271
31529
|
logger = getLogger().child("ElastiCacheProvider");
|
|
31530
|
+
wrapCaughtError(mask, error, build) {
|
|
31531
|
+
const m = maskerOrIdentity(mask);
|
|
31532
|
+
const failure = describeAwsFailure(error);
|
|
31533
|
+
if (!failure.redacted) return wrapMaskedAwsError(m, error, build);
|
|
31534
|
+
this.logger.debug(m(build(m(failure.detail)).message));
|
|
31535
|
+
const wrapped = build(`${m(failure.summary)}${relayedNameCollision(failure.detail)}`);
|
|
31536
|
+
return error instanceof Error ? markRedactedCause(wrapped) : wrapped;
|
|
31537
|
+
}
|
|
31272
31538
|
handledProperties = /* @__PURE__ */ new Map([["AWS::ElastiCache::SubnetGroup", /* @__PURE__ */ new Set([
|
|
31273
31539
|
"CacheSubnetGroupName",
|
|
31274
31540
|
"CacheSubnetGroupDescription",
|
|
@@ -31318,17 +31584,19 @@ var ElastiCacheProvider = class {
|
|
|
31318
31584
|
this.getClient();
|
|
31319
31585
|
return this.createClient;
|
|
31320
31586
|
}
|
|
31321
|
-
async create(logicalId, resourceType, properties) {
|
|
31587
|
+
async create(logicalId, resourceType, properties, context) {
|
|
31588
|
+
const mask = context?.maskSecrets;
|
|
31322
31589
|
switch (resourceType) {
|
|
31323
|
-
case "AWS::ElastiCache::SubnetGroup": return this.createSubnetGroup(logicalId, resourceType, properties);
|
|
31324
|
-
case "AWS::ElastiCache::CacheCluster": return this.createCacheCluster(logicalId, resourceType, properties);
|
|
31590
|
+
case "AWS::ElastiCache::SubnetGroup": return this.createSubnetGroup(logicalId, resourceType, properties, mask);
|
|
31591
|
+
case "AWS::ElastiCache::CacheCluster": return this.createCacheCluster(logicalId, resourceType, properties, mask);
|
|
31325
31592
|
default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId);
|
|
31326
31593
|
}
|
|
31327
31594
|
}
|
|
31328
|
-
async update(logicalId, physicalId, resourceType, properties, previousProperties,
|
|
31595
|
+
async update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
|
|
31596
|
+
const mask = context?.maskSecrets;
|
|
31329
31597
|
switch (resourceType) {
|
|
31330
|
-
case "AWS::ElastiCache::SubnetGroup": return this.updateSubnetGroup(logicalId, physicalId, resourceType, properties, previousProperties);
|
|
31331
|
-
case "AWS::ElastiCache::CacheCluster": return this.updateCacheCluster(logicalId, physicalId, resourceType, properties, previousProperties);
|
|
31598
|
+
case "AWS::ElastiCache::SubnetGroup": return this.updateSubnetGroup(logicalId, physicalId, resourceType, properties, previousProperties, mask);
|
|
31599
|
+
case "AWS::ElastiCache::CacheCluster": return this.updateCacheCluster(logicalId, physicalId, resourceType, properties, previousProperties, mask);
|
|
31332
31600
|
default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId, physicalId);
|
|
31333
31601
|
}
|
|
31334
31602
|
}
|
|
@@ -31339,7 +31607,7 @@ var ElastiCacheProvider = class {
|
|
|
31339
31607
|
default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId, physicalId);
|
|
31340
31608
|
}
|
|
31341
31609
|
}
|
|
31342
|
-
async createSubnetGroup(logicalId, resourceType, properties) {
|
|
31610
|
+
async createSubnetGroup(logicalId, resourceType, properties, mask) {
|
|
31343
31611
|
this.logger.debug(`Creating CacheSubnetGroup ${logicalId}`);
|
|
31344
31612
|
const tags = refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId);
|
|
31345
31613
|
const cacheSubnetGroupName = properties["CacheSubnetGroupName"] || generatedNameFor("AWS::ElastiCache::SubnetGroup", logicalId);
|
|
@@ -31357,10 +31625,10 @@ var ElastiCacheProvider = class {
|
|
|
31357
31625
|
};
|
|
31358
31626
|
} catch (error) {
|
|
31359
31627
|
const cause = error instanceof Error ? error : void 0;
|
|
31360
|
-
throw new ProvisioningError(`Failed to create CacheSubnetGroup ${logicalId}: ${
|
|
31628
|
+
throw this.wrapCaughtError(mask, error, (text) => new ProvisioningError(`Failed to create CacheSubnetGroup ${logicalId}: ${text}`, resourceType, logicalId, cacheSubnetGroupName, cause));
|
|
31361
31629
|
}
|
|
31362
31630
|
}
|
|
31363
|
-
async updateSubnetGroup(logicalId, physicalId, resourceType, properties, previousProperties) {
|
|
31631
|
+
async updateSubnetGroup(logicalId, physicalId, resourceType, properties, previousProperties, mask) {
|
|
31364
31632
|
this.logger.debug(`Updating CacheSubnetGroup ${logicalId}: ${physicalId}`);
|
|
31365
31633
|
refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId, physicalId);
|
|
31366
31634
|
try {
|
|
@@ -31384,7 +31652,7 @@ var ElastiCacheProvider = class {
|
|
|
31384
31652
|
} catch (error) {
|
|
31385
31653
|
if (error instanceof ProvisioningError) throw error;
|
|
31386
31654
|
const cause = error instanceof Error ? error : void 0;
|
|
31387
|
-
throw new ProvisioningError(`Failed to update CacheSubnetGroup ${logicalId}: ${
|
|
31655
|
+
throw this.wrapCaughtError(mask, error, (text) => new ProvisioningError(`Failed to update CacheSubnetGroup ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
31388
31656
|
}
|
|
31389
31657
|
}
|
|
31390
31658
|
async deleteSubnetGroup(logicalId, physicalId, resourceType, context) {
|
|
@@ -31400,10 +31668,10 @@ var ElastiCacheProvider = class {
|
|
|
31400
31668
|
return;
|
|
31401
31669
|
}
|
|
31402
31670
|
const cause = error instanceof Error ? error : void 0;
|
|
31403
|
-
throw new ProvisioningError(`Failed to delete CacheSubnetGroup ${logicalId}: ${
|
|
31671
|
+
throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to delete CacheSubnetGroup ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
31404
31672
|
}
|
|
31405
31673
|
}
|
|
31406
|
-
async createCacheCluster(logicalId, resourceType, properties) {
|
|
31674
|
+
async createCacheCluster(logicalId, resourceType, properties, mask) {
|
|
31407
31675
|
this.logger.debug(`Creating CacheCluster ${logicalId}`);
|
|
31408
31676
|
const tags = refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId);
|
|
31409
31677
|
const cacheClusterId = properties["ClusterName"] || generatedNameFor("AWS::ElastiCache::CacheCluster", logicalId);
|
|
@@ -31454,12 +31722,12 @@ var ElastiCacheProvider = class {
|
|
|
31454
31722
|
attributes
|
|
31455
31723
|
};
|
|
31456
31724
|
} catch (error) {
|
|
31457
|
-
const thrown = error instanceof ProvisioningError ? error : new ProvisioningError(`Failed to create CacheCluster ${logicalId}: ${
|
|
31725
|
+
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));
|
|
31458
31726
|
if (clusterCreated) markCreatedBeforeFailure(thrown, logicalId, resourceType, cacheClusterId);
|
|
31459
31727
|
throw thrown;
|
|
31460
31728
|
}
|
|
31461
31729
|
}
|
|
31462
|
-
async updateCacheCluster(logicalId, physicalId, resourceType, properties, previousProperties) {
|
|
31730
|
+
async updateCacheCluster(logicalId, physicalId, resourceType, properties, previousProperties, mask) {
|
|
31463
31731
|
this.logger.debug(`Updating CacheCluster ${logicalId}: ${physicalId}`);
|
|
31464
31732
|
refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId, physicalId);
|
|
31465
31733
|
try {
|
|
@@ -31505,7 +31773,7 @@ var ElastiCacheProvider = class {
|
|
|
31505
31773
|
} catch (error) {
|
|
31506
31774
|
if (error instanceof ProvisioningError) throw error;
|
|
31507
31775
|
const cause = error instanceof Error ? error : void 0;
|
|
31508
|
-
throw new ProvisioningError(`Failed to update CacheCluster ${logicalId}: ${
|
|
31776
|
+
throw this.wrapCaughtError(mask, error, (text) => new ProvisioningError(`Failed to update CacheCluster ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
31509
31777
|
}
|
|
31510
31778
|
}
|
|
31511
31779
|
async deleteCacheCluster(logicalId, physicalId, resourceType, context) {
|
|
@@ -31532,7 +31800,7 @@ var ElastiCacheProvider = class {
|
|
|
31532
31800
|
return;
|
|
31533
31801
|
}
|
|
31534
31802
|
const cause = error instanceof Error ? error : void 0;
|
|
31535
|
-
throw new ProvisioningError(`Failed to delete CacheCluster ${logicalId}: ${
|
|
31803
|
+
throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to delete CacheCluster ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
31536
31804
|
}
|
|
31537
31805
|
}
|
|
31538
31806
|
buildLogDeliveryConfigurationsForUpdate(newConfigs, previousConfigs) {
|
|
@@ -31871,7 +32139,7 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
|
|
|
31871
32139
|
case "AWS::ServiceDiscovery::PrivateDnsNamespace": return this.updateNamespace(logicalId, physicalId, resourceType, properties, previousProperties, context?.maskSecrets);
|
|
31872
32140
|
case "AWS::ServiceDiscovery::HttpNamespace": return this.updateHttpNamespace(logicalId, physicalId, resourceType, properties, previousProperties, context?.maskSecrets);
|
|
31873
32141
|
case "AWS::ServiceDiscovery::PublicDnsNamespace": return this.updatePublicDnsNamespace(logicalId, physicalId, resourceType, properties, previousProperties, context?.maskSecrets);
|
|
31874
|
-
case "AWS::ServiceDiscovery::Service": return this.updateService(logicalId, physicalId, resourceType, properties, previousProperties, context?.maskSecrets);
|
|
32142
|
+
case "AWS::ServiceDiscovery::Service": return this.updateService(logicalId, physicalId, resourceType, properties, previousProperties, context?.maskSecrets, context?.changedProperties);
|
|
31875
32143
|
default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId, physicalId);
|
|
31876
32144
|
}
|
|
31877
32145
|
}
|
|
@@ -32206,11 +32474,11 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
|
|
|
32206
32474
|
throw thrown;
|
|
32207
32475
|
}
|
|
32208
32476
|
}
|
|
32209
|
-
async updateService(logicalId, physicalId, resourceType, properties, previousProperties, maskSecrets) {
|
|
32477
|
+
async updateService(logicalId, physicalId, resourceType, properties, previousProperties, maskSecrets, changedProperties) {
|
|
32210
32478
|
this.logger.debug(`Updating service discovery service ${logicalId}: ${physicalId}`);
|
|
32211
32479
|
refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId, physicalId);
|
|
32212
32480
|
const client = this.getClient();
|
|
32213
|
-
const servicePlan = this.planServiceChange(properties, previousProperties);
|
|
32481
|
+
const servicePlan = this.planServiceChange(properties, previousProperties, changedProperties);
|
|
32214
32482
|
const serviceChange = servicePlan?.change ?? {};
|
|
32215
32483
|
const newAttrs = this.normalizeServiceAttributes(properties["ServiceAttributes"]);
|
|
32216
32484
|
const oldAttrs = this.normalizeServiceAttributes(previousProperties["ServiceAttributes"]);
|
|
@@ -32296,8 +32564,9 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
|
|
|
32296
32564
|
throw this.wrapMaskedError(maskerOrIdentity(maskSecrets), error, (text) => new ProvisioningError(`Failed to update service discovery service ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
32297
32565
|
}
|
|
32298
32566
|
}
|
|
32299
|
-
planServiceChange(properties, previousProperties) {
|
|
32300
|
-
const
|
|
32567
|
+
planServiceChange(properties, previousProperties, changedProperties) {
|
|
32568
|
+
const changed = (key) => changedProperties !== void 0 ? changedProperties.has(key) : !sameAsRecorded(properties[key], previousProperties[key]);
|
|
32569
|
+
const declaredDiffers = (key) => properties[key] !== void 0 && changed(key);
|
|
32301
32570
|
const change = {};
|
|
32302
32571
|
if (properties["Description"] !== void 0) change.Description = properties["Description"];
|
|
32303
32572
|
const desiredRecords = properties["DnsConfig"]?.DnsRecords;
|
|
@@ -32308,7 +32577,7 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
|
|
|
32308
32577
|
change,
|
|
32309
32578
|
keepRemovedFromLive: false
|
|
32310
32579
|
};
|
|
32311
|
-
if (desiredRecords !== void 0 && !sameAsRecorded(desiredRecords, previousRecords)) return {
|
|
32580
|
+
if (desiredRecords !== void 0 && (changedProperties === void 0 || changedProperties.has("DnsConfig")) && !sameAsRecorded(desiredRecords, previousRecords)) return {
|
|
32312
32581
|
change,
|
|
32313
32582
|
keepRemovedFromLive: true
|
|
32314
32583
|
};
|
|
@@ -35809,6 +36078,25 @@ function pickDefined(obj) {
|
|
|
35809
36078
|
}
|
|
35810
36079
|
return out;
|
|
35811
36080
|
}
|
|
36081
|
+
const CRAWLER_LEFT_IN_PLACE_ON_REMOVAL = [
|
|
36082
|
+
"DatabaseName",
|
|
36083
|
+
"Description",
|
|
36084
|
+
"Classifiers",
|
|
36085
|
+
"TablePrefix",
|
|
36086
|
+
"Schedule",
|
|
36087
|
+
"SchemaChangePolicy",
|
|
36088
|
+
"RecrawlPolicy",
|
|
36089
|
+
"LineageConfiguration",
|
|
36090
|
+
"LakeFormationConfiguration",
|
|
36091
|
+
"Configuration",
|
|
36092
|
+
"CrawlerSecurityConfiguration"
|
|
36093
|
+
];
|
|
36094
|
+
const crawlerLeftInPlaceWarning = (logicalId, names, caller) => {
|
|
36095
|
+
const one = names.length === 1;
|
|
36096
|
+
const subject = one ? "property" : "properties";
|
|
36097
|
+
const cfnKeeps = names.includes("LineageConfiguration") ? "" : `, as CloudFormation leaves ${one ? "it" : "them"}`;
|
|
36098
|
+
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.`;
|
|
36099
|
+
};
|
|
35812
36100
|
var GlueCrawlerProvider = class {
|
|
35813
36101
|
client;
|
|
35814
36102
|
createClient;
|
|
@@ -35836,6 +36124,13 @@ var GlueCrawlerProvider = class {
|
|
|
35836
36124
|
"CrawlerSecurityConfiguration",
|
|
35837
36125
|
"Tags"
|
|
35838
36126
|
])]]);
|
|
36127
|
+
removalHandledInUpdate = /* @__PURE__ */ new Map([["AWS::Glue::Crawler", /* @__PURE__ */ new Set([
|
|
36128
|
+
"Name",
|
|
36129
|
+
"Role",
|
|
36130
|
+
"Targets",
|
|
36131
|
+
"Tags",
|
|
36132
|
+
...CRAWLER_LEFT_IN_PLACE_ON_REMOVAL
|
|
36133
|
+
])]]);
|
|
35839
36134
|
getClient() {
|
|
35840
36135
|
if (!this.client) ({client: this.client, createClient: this.createClient} = newGlueClients(this.providerRegion));
|
|
35841
36136
|
return this.client;
|
|
@@ -35901,6 +36196,12 @@ var GlueCrawlerProvider = class {
|
|
|
35901
36196
|
} else throw err;
|
|
35902
36197
|
}
|
|
35903
36198
|
await applyGlueTagDiff(this.getClient(), () => this.resourceArn(physicalId), previousProperties["Tags"], properties["Tags"], resourceType, logicalId, log.warn);
|
|
36199
|
+
if (!context?.desiredFromAwsReadback) {
|
|
36200
|
+
const removed = context?.removedProperties;
|
|
36201
|
+
const leftInPlace = [];
|
|
36202
|
+
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);
|
|
36203
|
+
if (leftInPlace.length > 0) log.warn(crawlerLeftInPlaceWarning(logicalId, leftInPlace, context?.replayingState ? "rollback" : "deploy"));
|
|
36204
|
+
}
|
|
35904
36205
|
return {
|
|
35905
36206
|
physicalId,
|
|
35906
36207
|
wasReplaced: false
|
|
@@ -37153,7 +37454,14 @@ var BudgetsBudgetProvider = class {
|
|
|
37153
37454
|
}
|
|
37154
37455
|
wrapBudgetError(mask, error, verb, logicalId, resourceType, physicalId) {
|
|
37155
37456
|
const cause = error instanceof Error ? error : void 0;
|
|
37156
|
-
return
|
|
37457
|
+
return this.wrapMaskedError(mask, error, (text) => new ProvisioningError(`Failed to ${verb} budget ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
37458
|
+
}
|
|
37459
|
+
wrapMaskedError(mask, error, build) {
|
|
37460
|
+
const failure = describeAwsFailure(error);
|
|
37461
|
+
if (!(error instanceof Error)) return build(mask(failure.detail));
|
|
37462
|
+
if (!failure.redacted) return wrapMaskedAwsError(mask, error, build);
|
|
37463
|
+
this.logger.debug(mask(build(mask(failure.detail)).message));
|
|
37464
|
+
return markRedactedCause(build(`${mask(failure.summary)}${relayedNameCollision(failure.detail)}`));
|
|
37157
37465
|
}
|
|
37158
37466
|
getCreateClient() {
|
|
37159
37467
|
this.getClient();
|
|
@@ -37316,7 +37624,8 @@ var BudgetsBudgetProvider = class {
|
|
|
37316
37624
|
try {
|
|
37317
37625
|
await this.addNotificationsOnly(accountId, physicalId, newNotifications);
|
|
37318
37626
|
} catch (error) {
|
|
37319
|
-
|
|
37627
|
+
const cause = error instanceof Error ? error : void 0;
|
|
37628
|
+
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));
|
|
37320
37629
|
}
|
|
37321
37630
|
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.`);
|
|
37322
37631
|
}
|
|
@@ -37494,7 +37803,7 @@ var BudgetsBudgetProvider = class {
|
|
|
37494
37803
|
return;
|
|
37495
37804
|
}
|
|
37496
37805
|
const cause = error instanceof Error ? error : void 0;
|
|
37497
|
-
throw new ProvisioningError(`Failed to delete budget ${logicalId}: ${
|
|
37806
|
+
throw this.wrapMaskedError(maskerOrIdentity(context?.maskSecrets), error, (text) => new ProvisioningError(`Failed to delete budget ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
37498
37807
|
}
|
|
37499
37808
|
}
|
|
37500
37809
|
async getAttribute(physicalId, resourceType, attributeName, logicalId) {
|
|
@@ -37508,7 +37817,7 @@ var BudgetsBudgetProvider = class {
|
|
|
37508
37817
|
return await this.budgetArn(accountId, physicalId);
|
|
37509
37818
|
} catch (error) {
|
|
37510
37819
|
const cause = error instanceof Error ? error : void 0;
|
|
37511
|
-
throw new ProvisioningError(`Failed to resolve Arn for budget ${physicalId}: ${
|
|
37820
|
+
throw this.wrapMaskedError(maskerOrIdentity(void 0), error, (text) => new ProvisioningError(`Failed to resolve Arn for budget ${physicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
37512
37821
|
}
|
|
37513
37822
|
}
|
|
37514
37823
|
async import(input) {
|
|
@@ -38369,6 +38678,14 @@ var SchedulerScheduleProvider = class {
|
|
|
38369
38678
|
client;
|
|
38370
38679
|
providerRegion = ambientRegion();
|
|
38371
38680
|
logger = getLogger().child("SchedulerScheduleProvider");
|
|
38681
|
+
wrapCaughtError(mask, error, build) {
|
|
38682
|
+
const m = maskerOrIdentity(mask);
|
|
38683
|
+
const failure = describeAwsFailure(error);
|
|
38684
|
+
if (!failure.redacted) return wrapMaskedAwsError(m, error, build);
|
|
38685
|
+
this.logger.debug(m(build(m(failure.detail)).message));
|
|
38686
|
+
const wrapped = build(`${m(failure.summary)}${relayedNameCollision(failure.detail)}`);
|
|
38687
|
+
return error instanceof Error ? markRedactedCause(wrapped) : wrapped;
|
|
38688
|
+
}
|
|
38372
38689
|
handledProperties = /* @__PURE__ */ new Map([["AWS::Scheduler::Schedule", /* @__PURE__ */ new Set([
|
|
38373
38690
|
"Name",
|
|
38374
38691
|
"GroupName",
|
|
@@ -38464,7 +38781,7 @@ var SchedulerScheduleProvider = class {
|
|
|
38464
38781
|
}
|
|
38465
38782
|
return result;
|
|
38466
38783
|
}
|
|
38467
|
-
async create(logicalId, resourceType, properties) {
|
|
38784
|
+
async create(logicalId, resourceType, properties, context) {
|
|
38468
38785
|
const name = properties["Name"] ?? generatedNameFor("AWS::Scheduler::Schedule", logicalId);
|
|
38469
38786
|
const groupName = this.groupNameOf(properties);
|
|
38470
38787
|
this.logger.debug(`Creating Schedule ${logicalId}: ${name}${groupName ? ` (group: ${groupName})` : ""}`);
|
|
@@ -38484,7 +38801,7 @@ var SchedulerScheduleProvider = class {
|
|
|
38484
38801
|
};
|
|
38485
38802
|
} catch (error) {
|
|
38486
38803
|
const cause = error instanceof Error ? error : void 0;
|
|
38487
|
-
throw new ProvisioningError(`Failed to create Schedule ${logicalId}: ${
|
|
38804
|
+
throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to create Schedule ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
|
|
38488
38805
|
}
|
|
38489
38806
|
}
|
|
38490
38807
|
async readIdentity(name, groupName) {
|
|
@@ -38588,7 +38905,7 @@ var SchedulerScheduleProvider = class {
|
|
|
38588
38905
|
} catch (error) {
|
|
38589
38906
|
if (error instanceof ResourceUpdateNotSupportedError) throw error;
|
|
38590
38907
|
const cause = error instanceof Error ? error : void 0;
|
|
38591
|
-
throw new ProvisioningError(`Failed to update Schedule ${logicalId}: ${
|
|
38908
|
+
throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to update Schedule ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
38592
38909
|
}
|
|
38593
38910
|
}
|
|
38594
38911
|
async deleteByRecordedIdentity(logicalId, physicalId, resourceType, recorded, context) {
|
|
@@ -38699,7 +39016,7 @@ var SchedulerScheduleProvider = class {
|
|
|
38699
39016
|
return;
|
|
38700
39017
|
}
|
|
38701
39018
|
const cause = error instanceof Error ? error : void 0;
|
|
38702
|
-
throw new ProvisioningError(`Failed to delete Schedule ${logicalId}: ${
|
|
39019
|
+
throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to delete Schedule ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
38703
39020
|
}
|
|
38704
39021
|
}
|
|
38705
39022
|
async getAttribute(physicalId, resourceType, attributeName, logicalId) {
|
|
@@ -38709,7 +39026,7 @@ var SchedulerScheduleProvider = class {
|
|
|
38709
39026
|
} catch (error) {
|
|
38710
39027
|
const cause = error instanceof Error ? error : void 0;
|
|
38711
39028
|
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." : "";
|
|
38712
|
-
throw new ProvisioningError(`Failed to resolve Arn for Schedule ${physicalId}: ${
|
|
39029
|
+
throw this.wrapCaughtError(void 0, error, (text) => new ProvisioningError(`Failed to resolve Arn for Schedule ${physicalId}: ${text}${text.endsWith(".") ? "" : "."}${customGroupHint}`, resourceType, logicalId, physicalId, cause));
|
|
38713
39030
|
}
|
|
38714
39031
|
}
|
|
38715
39032
|
async readCurrentState(physicalId, _logicalId, _resourceType, properties) {
|
|
@@ -38957,6 +39274,14 @@ var PipesPipeProvider = class {
|
|
|
38957
39274
|
createClient;
|
|
38958
39275
|
providerRegion = ambientRegion();
|
|
38959
39276
|
logger = getLogger().child("PipesPipeProvider");
|
|
39277
|
+
wrapCaughtError(mask, error, build) {
|
|
39278
|
+
const m = maskerOrIdentity(mask);
|
|
39279
|
+
const failure = describeAwsFailure(error);
|
|
39280
|
+
if (!failure.redacted) return wrapMaskedAwsError(m, error, build);
|
|
39281
|
+
this.logger.debug(m(build(m(failure.detail)).message));
|
|
39282
|
+
const wrapped = build(`${m(failure.summary)}${relayedNameCollision(failure.detail)}`);
|
|
39283
|
+
return error instanceof Error ? markRedactedCause(wrapped) : wrapped;
|
|
39284
|
+
}
|
|
38960
39285
|
options;
|
|
38961
39286
|
sleep = (ms) => this.options.sleep ? this.options.sleep(ms) : new Promise((r) => setTimeout(r, ms));
|
|
38962
39287
|
now = () => this.options.now ? this.options.now() : Date.now();
|
|
@@ -39028,7 +39353,7 @@ var PipesPipeProvider = class {
|
|
|
39028
39353
|
createdIdentity = pipeIdentityToken(name, created?.Arn, created?.CreationTime);
|
|
39029
39354
|
} catch (error) {
|
|
39030
39355
|
const cause = error instanceof Error ? error : void 0;
|
|
39031
|
-
throw new ProvisioningError(`Failed to create Pipe ${logicalId}: ${
|
|
39356
|
+
throw this.wrapCaughtError(mask, error, (text) => new ProvisioningError(`Failed to create Pipe ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
|
|
39032
39357
|
}
|
|
39033
39358
|
let settled;
|
|
39034
39359
|
try {
|
|
@@ -39100,7 +39425,7 @@ var PipesPipeProvider = class {
|
|
|
39100
39425
|
if (error instanceof ProvisioningError) throw error;
|
|
39101
39426
|
if (error instanceof NotFoundException$6) assertRegionMatch(await this.getClient().config.region(), context?.expectedRegion, resourceType, logicalId, physicalId);
|
|
39102
39427
|
const cause = error instanceof Error ? error : void 0;
|
|
39103
|
-
throw new ProvisioningError(`Failed to update Pipe ${logicalId}: ${
|
|
39428
|
+
throw this.wrapCaughtError(mask, error, (text) => new ProvisioningError(`Failed to update Pipe ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
39104
39429
|
}
|
|
39105
39430
|
return {
|
|
39106
39431
|
physicalId,
|
|
@@ -39121,7 +39446,7 @@ var PipesPipeProvider = class {
|
|
|
39121
39446
|
return;
|
|
39122
39447
|
}
|
|
39123
39448
|
const cause = error instanceof Error ? error : void 0;
|
|
39124
|
-
throw new ProvisioningError(`Failed to delete Pipe ${logicalId}: ${
|
|
39449
|
+
throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to delete Pipe ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
39125
39450
|
}
|
|
39126
39451
|
await waitForGoneAfterDelete({
|
|
39127
39452
|
what: `Pipe ${physicalId}`,
|
|
@@ -39172,13 +39497,14 @@ var PipesPipeProvider = class {
|
|
|
39172
39497
|
throw error;
|
|
39173
39498
|
}
|
|
39174
39499
|
}
|
|
39175
|
-
async getAttribute(physicalId,
|
|
39500
|
+
async getAttribute(physicalId, resourceType, attributeName, logicalId) {
|
|
39176
39501
|
let response;
|
|
39177
39502
|
try {
|
|
39178
39503
|
response = await this.describe(physicalId);
|
|
39179
39504
|
} catch (error) {
|
|
39180
39505
|
if (error instanceof NotFoundException$6) return void 0;
|
|
39181
|
-
throw error;
|
|
39506
|
+
if (!describeAwsFailure(error).redacted) throw error;
|
|
39507
|
+
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));
|
|
39182
39508
|
}
|
|
39183
39509
|
return this.attributesOf(response)[attributeName];
|
|
39184
39510
|
}
|
|
@@ -39274,8 +39600,11 @@ var PipesPipeProvider = class {
|
|
|
39274
39600
|
if (settled && (!needsEvidence || sawUnsettled || this.now() - startedAt >= PIPE_POLL_INTERVAL_MS)) return response;
|
|
39275
39601
|
if (!settled) sawUnsettled = true;
|
|
39276
39602
|
if (state !== void 0 && state.endsWith("_FAILED") && !stale) {
|
|
39277
|
-
const reason =
|
|
39278
|
-
|
|
39603
|
+
const reason = describeAwsStatusReason({ message: response.StateReason }, "");
|
|
39604
|
+
const build = (text, cause) => new ProvisioningError(`Pipe ${logicalId} ${phase} failed: AWS reports ${state}${text}`, resourceType, logicalId, name, cause);
|
|
39605
|
+
if (!reason.redacted) throw markNonRetryable(build(""));
|
|
39606
|
+
this.logger.debug(mask(build(`: ${mask(reason.detail)}`).message));
|
|
39607
|
+
throw markNonRetryable(markRedactedCause(build(`. ${reason.summary}`, new Error(reason.detail))));
|
|
39279
39608
|
}
|
|
39280
39609
|
this.logger.debug(mask(`Pipe ${name} state: ${state ?? "unknown"}, waiting to settle`));
|
|
39281
39610
|
} catch (error) {
|
|
@@ -39292,7 +39621,7 @@ var PipesPipeProvider = class {
|
|
|
39292
39621
|
}
|
|
39293
39622
|
}
|
|
39294
39623
|
async retireFailedCreate(name, logicalId, resourceType, error, mask, createdIdentity) {
|
|
39295
|
-
const original = error instanceof Error ? error :
|
|
39624
|
+
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;
|
|
39296
39625
|
const leftBehind = () => markNonRetryable(markCreatedBeforeFailure(original, logicalId, resourceType, name, createdIdentity));
|
|
39297
39626
|
const orphaned = async (why) => {
|
|
39298
39627
|
const aws = pasteableAwsCommand(mask);
|
|
@@ -41672,6 +42001,7 @@ var EMRClusterProvider = class {
|
|
|
41672
42001
|
flip,
|
|
41673
42002
|
logger: this.logger,
|
|
41674
42003
|
physicalId,
|
|
42004
|
+
mask: context?.maskSecrets,
|
|
41675
42005
|
guardName: "TerminationProtected",
|
|
41676
42006
|
observe: () => Promise.resolve(current?.TerminationProtected === true),
|
|
41677
42007
|
disable: async () => {
|
|
@@ -42726,7 +43056,8 @@ var FirehoseProvider = class {
|
|
|
42726
43056
|
ProcessingConfiguration: httpConfig["ProcessingConfiguration"],
|
|
42727
43057
|
RetryOptions: httpConfig["RetryOptions"],
|
|
42728
43058
|
S3BackupMode: httpConfig["S3BackupMode"],
|
|
42729
|
-
S3Configuration: httpConfig["S3Configuration"] ? this.mapS3DestinationConfiguration(httpConfig["S3Configuration"]) : void 0
|
|
43059
|
+
S3Configuration: httpConfig["S3Configuration"] ? this.mapS3DestinationConfiguration(httpConfig["S3Configuration"]) : void 0,
|
|
43060
|
+
SecretsManagerConfiguration: httpConfig["SecretsManagerConfiguration"]
|
|
42730
43061
|
};
|
|
42731
43062
|
}
|
|
42732
43063
|
if (properties["RedshiftDestinationConfiguration"]) {
|
|
@@ -42739,7 +43070,11 @@ var FirehoseProvider = class {
|
|
|
42739
43070
|
Password: rsConfig["Password"],
|
|
42740
43071
|
S3Configuration: rsConfig["S3Configuration"] ? this.mapS3DestinationConfiguration(rsConfig["S3Configuration"]) : void 0,
|
|
42741
43072
|
CloudWatchLoggingOptions: rsConfig["CloudWatchLoggingOptions"],
|
|
42742
|
-
ProcessingConfiguration: rsConfig["ProcessingConfiguration"]
|
|
43073
|
+
ProcessingConfiguration: rsConfig["ProcessingConfiguration"],
|
|
43074
|
+
RetryOptions: rsConfig["RetryOptions"],
|
|
43075
|
+
S3BackupMode: rsConfig["S3BackupMode"],
|
|
43076
|
+
S3BackupConfiguration: rsConfig["S3BackupConfiguration"] ? this.mapS3DestinationConfiguration(rsConfig["S3BackupConfiguration"]) : void 0,
|
|
43077
|
+
SecretsManagerConfiguration: rsConfig["SecretsManagerConfiguration"]
|
|
42743
43078
|
};
|
|
42744
43079
|
}
|
|
42745
43080
|
if (properties["ElasticsearchDestinationConfiguration"]) {
|
|
@@ -42756,7 +43091,9 @@ var FirehoseProvider = class {
|
|
|
42756
43091
|
S3BackupMode: esConfig["S3BackupMode"],
|
|
42757
43092
|
S3Configuration: esConfig["S3Configuration"] ? this.mapS3DestinationConfiguration(esConfig["S3Configuration"]) : void 0,
|
|
42758
43093
|
CloudWatchLoggingOptions: esConfig["CloudWatchLoggingOptions"],
|
|
42759
|
-
ProcessingConfiguration: esConfig["ProcessingConfiguration"]
|
|
43094
|
+
ProcessingConfiguration: esConfig["ProcessingConfiguration"],
|
|
43095
|
+
VpcConfiguration: esConfig["VpcConfiguration"],
|
|
43096
|
+
DocumentIdOptions: esConfig["DocumentIdOptions"]
|
|
42760
43097
|
};
|
|
42761
43098
|
}
|
|
42762
43099
|
if (properties["AmazonopensearchserviceDestinationConfiguration"]) {
|
|
@@ -42773,7 +43110,9 @@ var FirehoseProvider = class {
|
|
|
42773
43110
|
S3BackupMode: aosConfig["S3BackupMode"],
|
|
42774
43111
|
S3Configuration: aosConfig["S3Configuration"] ? this.mapS3DestinationConfiguration(aosConfig["S3Configuration"]) : void 0,
|
|
42775
43112
|
CloudWatchLoggingOptions: aosConfig["CloudWatchLoggingOptions"],
|
|
42776
|
-
ProcessingConfiguration: aosConfig["ProcessingConfiguration"]
|
|
43113
|
+
ProcessingConfiguration: aosConfig["ProcessingConfiguration"],
|
|
43114
|
+
VpcConfiguration: aosConfig["VpcConfiguration"],
|
|
43115
|
+
DocumentIdOptions: aosConfig["DocumentIdOptions"]
|
|
42777
43116
|
};
|
|
42778
43117
|
}
|
|
42779
43118
|
if (properties["SplunkDestinationConfiguration"]) {
|
|
@@ -42787,7 +43126,9 @@ var FirehoseProvider = class {
|
|
|
42787
43126
|
S3Configuration: splunkConfig["S3Configuration"] ? this.mapS3DestinationConfiguration(splunkConfig["S3Configuration"]) : void 0,
|
|
42788
43127
|
RetryOptions: splunkConfig["RetryOptions"],
|
|
42789
43128
|
CloudWatchLoggingOptions: splunkConfig["CloudWatchLoggingOptions"],
|
|
42790
|
-
ProcessingConfiguration: splunkConfig["ProcessingConfiguration"]
|
|
43129
|
+
ProcessingConfiguration: splunkConfig["ProcessingConfiguration"],
|
|
43130
|
+
BufferingHints: splunkConfig["BufferingHints"],
|
|
43131
|
+
SecretsManagerConfiguration: splunkConfig["SecretsManagerConfiguration"]
|
|
42791
43132
|
};
|
|
42792
43133
|
}
|
|
42793
43134
|
if (properties["AmazonOpenSearchServerlessDestinationConfiguration"]) {
|
|
@@ -42801,7 +43142,8 @@ var FirehoseProvider = class {
|
|
|
42801
43142
|
S3BackupMode: aossConfig["S3BackupMode"],
|
|
42802
43143
|
S3Configuration: aossConfig["S3Configuration"] ? this.mapS3DestinationConfiguration(aossConfig["S3Configuration"]) : void 0,
|
|
42803
43144
|
CloudWatchLoggingOptions: aossConfig["CloudWatchLoggingOptions"],
|
|
42804
|
-
ProcessingConfiguration: aossConfig["ProcessingConfiguration"]
|
|
43145
|
+
ProcessingConfiguration: aossConfig["ProcessingConfiguration"],
|
|
43146
|
+
VpcConfiguration: aossConfig["VpcConfiguration"]
|
|
42805
43147
|
};
|
|
42806
43148
|
}
|
|
42807
43149
|
if (properties["DeliveryStreamEncryptionConfigurationInput"]) {
|
|
@@ -43042,6 +43384,9 @@ var FirehoseProvider = class {
|
|
|
43042
43384
|
result.S3BackupConfiguration = this.mapS3DestinationConfiguration(backupConfig);
|
|
43043
43385
|
}
|
|
43044
43386
|
if (config["DataFormatConversionConfiguration"] !== void 0) result.DataFormatConversionConfiguration = config["DataFormatConversionConfiguration"];
|
|
43387
|
+
if (config["DynamicPartitioningConfiguration"] !== void 0) result.DynamicPartitioningConfiguration = config["DynamicPartitioningConfiguration"];
|
|
43388
|
+
if (config["FileExtension"] !== void 0) result.FileExtension = config["FileExtension"];
|
|
43389
|
+
if (config["CustomTimeZone"] !== void 0) result.CustomTimeZone = config["CustomTimeZone"];
|
|
43045
43390
|
return result;
|
|
43046
43391
|
}
|
|
43047
43392
|
mapExtendedS3ConfigToUpdate(config) {
|
|
@@ -43066,6 +43411,9 @@ var FirehoseProvider = class {
|
|
|
43066
43411
|
if (config["S3BackupMode"] !== void 0) result.S3BackupMode = config["S3BackupMode"];
|
|
43067
43412
|
if (config["S3BackupConfiguration"] !== void 0) result.S3BackupUpdate = this.mapS3ConfigToUpdate(config["S3BackupConfiguration"]);
|
|
43068
43413
|
if (config["DataFormatConversionConfiguration"] !== void 0) result.DataFormatConversionConfiguration = config["DataFormatConversionConfiguration"];
|
|
43414
|
+
if (config["DynamicPartitioningConfiguration"] !== void 0) result.DynamicPartitioningConfiguration = config["DynamicPartitioningConfiguration"];
|
|
43415
|
+
if (config["FileExtension"] !== void 0) result.FileExtension = config["FileExtension"];
|
|
43416
|
+
if (config["CustomTimeZone"] !== void 0) result.CustomTimeZone = config["CustomTimeZone"];
|
|
43069
43417
|
return result;
|
|
43070
43418
|
}
|
|
43071
43419
|
async applyRedshiftDestinationUpdate(logicalId, physicalId, nextConfig) {
|
|
@@ -43431,6 +43779,8 @@ function mapExtendedS3DescriptionToCfn(desc) {
|
|
|
43431
43779
|
out["ProcessingConfiguration"] = pickDefinedDeep(desc["ProcessingConfiguration"]) ?? {};
|
|
43432
43780
|
out["DataFormatConversionConfiguration"] = pickDefinedDeep(desc["DataFormatConversionConfiguration"]) ?? {};
|
|
43433
43781
|
out["DynamicPartitioningConfiguration"] = pickDefinedDeep(desc["DynamicPartitioningConfiguration"]) ?? {};
|
|
43782
|
+
if (desc["FileExtension"] !== void 0) out["FileExtension"] = desc["FileExtension"];
|
|
43783
|
+
if (desc["CustomTimeZone"] !== void 0) out["CustomTimeZone"] = desc["CustomTimeZone"];
|
|
43434
43784
|
if (desc["S3BackupDescription"]) out["S3BackupConfiguration"] = mapS3DescriptionToCfn(desc["S3BackupDescription"]);
|
|
43435
43785
|
else out["S3BackupConfiguration"] = {};
|
|
43436
43786
|
return out;
|
|
@@ -43531,6 +43881,14 @@ var CloudTrailProvider = class {
|
|
|
43531
43881
|
createClient;
|
|
43532
43882
|
providerRegion = ambientRegion();
|
|
43533
43883
|
logger = getLogger().child("CloudTrailProvider");
|
|
43884
|
+
wrapCaughtError(mask, error, build) {
|
|
43885
|
+
const m = maskerOrIdentity(mask);
|
|
43886
|
+
const failure = describeAwsFailure(error);
|
|
43887
|
+
if (!failure.redacted) return wrapMaskedAwsError(m, error, build);
|
|
43888
|
+
this.logger.debug(m(build(m(failure.detail)).message));
|
|
43889
|
+
const wrapped = build(`${m(failure.summary)}${relayedNameCollision(failure.detail)}`);
|
|
43890
|
+
return error instanceof Error ? markRedactedCause(wrapped) : wrapped;
|
|
43891
|
+
}
|
|
43534
43892
|
removalDefaults = /* @__PURE__ */ new Map([["AWS::CloudTrail::Trail", /* @__PURE__ */ new Map([["IsMultiRegionTrail", false], ["EnableLogFileValidation", false]])]]);
|
|
43535
43893
|
handledProperties = /* @__PURE__ */ new Map([["AWS::CloudTrail::Trail", /* @__PURE__ */ new Set([
|
|
43536
43894
|
"S3BucketName",
|
|
@@ -43566,7 +43924,7 @@ var CloudTrailProvider = class {
|
|
|
43566
43924
|
this.getClient();
|
|
43567
43925
|
return this.createClient;
|
|
43568
43926
|
}
|
|
43569
|
-
async create(logicalId, resourceType, properties) {
|
|
43927
|
+
async create(logicalId, resourceType, properties, context) {
|
|
43570
43928
|
this.logger.debug(`Creating CloudTrail Trail ${logicalId}`);
|
|
43571
43929
|
const desiredTags = refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId);
|
|
43572
43930
|
const s3BucketName = properties["S3BucketName"];
|
|
@@ -43633,7 +43991,7 @@ var CloudTrailProvider = class {
|
|
|
43633
43991
|
} catch (error) {
|
|
43634
43992
|
if (trailCreated) markAuxiliaryFailure(error, logicalId);
|
|
43635
43993
|
const cause = error instanceof Error ? error : void 0;
|
|
43636
|
-
const thrown = new ProvisioningError(`Failed to create CloudTrail Trail ${logicalId}: ${
|
|
43994
|
+
const thrown = this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to create CloudTrail Trail ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
|
|
43637
43995
|
if (createdTrailArn) markCreatedBeforeFailure(thrown, logicalId, resourceType, createdTrailArn);
|
|
43638
43996
|
throw thrown;
|
|
43639
43997
|
}
|
|
@@ -43721,7 +44079,7 @@ var CloudTrailProvider = class {
|
|
|
43721
44079
|
};
|
|
43722
44080
|
} catch (error) {
|
|
43723
44081
|
const cause = error instanceof Error ? error : void 0;
|
|
43724
|
-
throw new ProvisioningError(`Failed to update CloudTrail Trail ${logicalId}: ${
|
|
44082
|
+
throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to update CloudTrail Trail ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
43725
44083
|
}
|
|
43726
44084
|
}
|
|
43727
44085
|
async delete(logicalId, physicalId, resourceType, properties, context) {
|
|
@@ -43746,7 +44104,7 @@ var CloudTrailProvider = class {
|
|
|
43746
44104
|
return;
|
|
43747
44105
|
}
|
|
43748
44106
|
const cause = error instanceof Error ? error : void 0;
|
|
43749
|
-
const failure = new ProvisioningError(`Failed to delete CloudTrail Trail ${logicalId}: ${
|
|
44107
|
+
const failure = this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to delete CloudTrail Trail ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
43750
44108
|
throw stripped ? markDeleteStarted(failure) : failure;
|
|
43751
44109
|
}
|
|
43752
44110
|
}
|
|
@@ -44827,6 +45185,14 @@ var DLMLifecyclePolicyProvider = class {
|
|
|
44827
45185
|
createClient;
|
|
44828
45186
|
providerRegion = ambientRegion();
|
|
44829
45187
|
logger = getLogger().child("DLMLifecyclePolicyProvider");
|
|
45188
|
+
wrapCaughtError(mask, error, build) {
|
|
45189
|
+
const m = maskerOrIdentity(mask);
|
|
45190
|
+
const failure = describeAwsFailure(error);
|
|
45191
|
+
if (!failure.redacted) return wrapMaskedAwsError(m, error, build);
|
|
45192
|
+
this.logger.debug(m(build(m(failure.detail)).message));
|
|
45193
|
+
const wrapped = build(`${m(failure.summary)}${relayedNameCollision(failure.detail)}`);
|
|
45194
|
+
return error instanceof Error ? markRedactedCause(wrapped) : wrapped;
|
|
45195
|
+
}
|
|
44830
45196
|
handledProperties = /* @__PURE__ */ new Map([["AWS::DLM::LifecyclePolicy", /* @__PURE__ */ new Set([
|
|
44831
45197
|
"Description",
|
|
44832
45198
|
"ExecutionRoleArn",
|
|
@@ -44950,7 +45316,7 @@ var DLMLifecyclePolicyProvider = class {
|
|
|
44950
45316
|
};
|
|
44951
45317
|
} catch (error) {
|
|
44952
45318
|
const cause = error instanceof Error ? error : void 0;
|
|
44953
|
-
throw new ProvisioningError(`Failed to create DLM Lifecycle Policy ${logicalId}: ${
|
|
45319
|
+
throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to create DLM Lifecycle Policy ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
|
|
44954
45320
|
}
|
|
44955
45321
|
}
|
|
44956
45322
|
async update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
|
|
@@ -44997,7 +45363,7 @@ var DLMLifecyclePolicyProvider = class {
|
|
|
44997
45363
|
} catch (error) {
|
|
44998
45364
|
if (error instanceof ResourceUpdateNotSupportedError) throw error;
|
|
44999
45365
|
const cause = error instanceof Error ? error : void 0;
|
|
45000
|
-
throw new ProvisioningError(`Failed to update DLM Lifecycle Policy ${logicalId}: ${
|
|
45366
|
+
throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to update DLM Lifecycle Policy ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
45001
45367
|
}
|
|
45002
45368
|
}
|
|
45003
45369
|
async delete(logicalId, physicalId, resourceType, _properties, context) {
|
|
@@ -45013,7 +45379,7 @@ var DLMLifecyclePolicyProvider = class {
|
|
|
45013
45379
|
return;
|
|
45014
45380
|
}
|
|
45015
45381
|
const cause = error instanceof Error ? error : void 0;
|
|
45016
|
-
throw new ProvisioningError(`Failed to delete DLM Lifecycle Policy ${logicalId}: ${
|
|
45382
|
+
throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to delete DLM Lifecycle Policy ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
45017
45383
|
}
|
|
45018
45384
|
}
|
|
45019
45385
|
async getAttribute(physicalId, resourceType, attributeName, logicalId) {
|
|
@@ -45023,7 +45389,7 @@ var DLMLifecyclePolicyProvider = class {
|
|
|
45023
45389
|
return await this.fetchPolicyArn(physicalId);
|
|
45024
45390
|
} catch (error) {
|
|
45025
45391
|
const cause = error instanceof Error ? error : void 0;
|
|
45026
|
-
throw new ProvisioningError(`Failed to resolve Arn for DLM Lifecycle Policy ${physicalId}: ${
|
|
45392
|
+
throw this.wrapCaughtError(void 0, error, (text) => new ProvisioningError(`Failed to resolve Arn for DLM Lifecycle Policy ${physicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
45027
45393
|
}
|
|
45028
45394
|
}
|
|
45029
45395
|
async readCurrentState(physicalId, _logicalId, _resourceType) {
|
|
@@ -47299,4 +47665,4 @@ var ACMCertificateProvider = class {
|
|
|
47299
47665
|
|
|
47300
47666
|
//#endregion
|
|
47301
47667
|
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 };
|
|
47302
|
-
//# sourceMappingURL=provider-classes-
|
|
47668
|
+
//# sourceMappingURL=provider-classes-CUKmyCQ8.js.map
|