@go-to-k/cdkd 0.301.6 → 0.301.7
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-GNiE6dR1.js → asg-provider-C14GB-Hy.js} +3 -3
- package/dist/{asg-provider-GNiE6dR1.js.map → asg-provider-C14GB-Hy.js.map} +1 -1
- package/dist/cli.js +2 -2
- package/dist/{deploy-engine-D1z0QUsv.js → deploy-engine-zLKsm0IM.js} +182 -75
- package/dist/deploy-engine-zLKsm0IM.js.map +1 -0
- package/dist/{iam-policy-targets-BkeM7IXi.js → iam-policy-targets-LyArt3ew.js} +2 -2
- package/dist/{iam-policy-targets-BkeM7IXi.js.map → iam-policy-targets-LyArt3ew.js.map} +1 -1
- package/dist/{iam-role-provider-988BRmqF.js → iam-role-provider-BnStRZFM.js} +3 -3
- package/dist/{iam-role-provider-988BRmqF.js.map → iam-role-provider-BnStRZFM.js.map} +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/{neptune-provider-DUaw7kpj.js → neptune-provider-BlpYIZQP.js} +3 -3
- package/dist/{neptune-provider-DUaw7kpj.js.map → neptune-provider-BlpYIZQP.js.map} +1 -1
- package/dist/{program-Cqk1ZTsY.js → program-CiTz5-_D.js} +21 -10
- package/dist/program-CiTz5-_D.js.map +1 -0
- package/dist/{provider-classes-CR4DtD8M.js → provider-classes-BWo7K01p.js} +107 -52
- package/dist/provider-classes-BWo7K01p.js.map +1 -0
- package/dist/{rds-provider-DBW972HG.js → rds-provider-DagnUCn-.js} +3 -3
- package/dist/{rds-provider-DBW972HG.js.map → rds-provider-DagnUCn-.js.map} +1 -1
- package/dist/{version-CnjZ9J4l.js → version-MUc6NbW0.js} +2 -2
- package/dist/{version-CnjZ9J4l.js.map → version-MUc6NbW0.js.map} +1 -1
- package/package.json +1 -1
- package/dist/deploy-engine-D1z0QUsv.js.map +0 -1
- package/dist/program-Cqk1ZTsY.js.map +0 -1
- package/dist/provider-classes-CR4DtD8M.js.map +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { r as getAwsClients } from "./aws-clients-B_CEQGE1.js";
|
|
2
2
|
import { B as safeMsg, F as displaySafe, I as displayStackName, L as isPasteableIdent, O as SECRET_REF_MAX_CODE_POINTS, P as displayIdent, a as getLogger, b as generateResourceNameWithFallback, n as isAwsAuthoredFailure, r as safeStringify, t as describeAwsFailure, y as generateResourceName, z as plainIdentOr } from "./aws-failure-text-BEQfs6za.js";
|
|
3
|
-
import { $ as protectedReplacementAdvice, $n as
|
|
3
|
+
import { $ as protectedReplacementAdvice, $n as markReplayMayCollide, $t as ambientCredentialConfig, A as isQuotableImportValue, B as isTerminalDeleteFailure, C as setBounded, D as VALUE_NOT_SHOWN, E as assertRegionMatch, F as resolveExplicitPhysicalId, Fn as isInertUnquoted, H as observeThenDisableProtection, Hn as withheldTargetClause, In as pasteableCommand, Kt as injectiveKey, L as ProtectionFlipRegistry, M as quotedRemedyLogicalId, Mt as markCreatedBeforeFailure, N as refusalTypeShown, Nn as commandHole, Nt as markSupersedesEarlierCreate, O as isPlainImportJson, P as remedyLogicalId, Pn as hasClauseBreak, Q as pasteableAwsCommand, Qn as markNameCollision, Qt as ambientClientDefaults, Rn as plainOrDescribed, S as replayedSendWindow, St as withDerivedNameMasks, T as RESOURCE_NOT_FOUND, Tt as clearCreatedBeforeFailure, U as protectionFlipKey, V as logGroupProtectionSite, Vn as shellQuote, W as rdsFamilyProtectionSite, X as WITHHELD_AWS_COMMAND, Y as UNNAMEABLE_ID_CLAUSE, Z as isAwsCliLiteral, Zt as withPasteableAwsProfile, _ as RecentIdSet, _t as createMaskedLogSinks, a as onlySecretDerived, at as startInterruptWatch, b as isInsideWindow, bn as ResourceUpdateNotSupportedError, bt as maskDeep, c as recordedPrincipalsRepair, ct as canonicalizeRoute53QueryName, dr as isThrottlingError, dt as compositeIdSkipResult, en as clientDefaultsFor, er as explicitDenyPolicyKind, et as renderDisableCommand, fr as markNonRetryable, ft as logicalIdShown, g as AmbiguousCreateLatch, gt as stateOrphanRecordRemedy, h as AMBIGUOUS_LATCH_TTL_MS, ht as segmentAfterAnchor, i as holdsSecretDerivedEntry, in as CdkdError, ir as isExplicitDenyError, it as isInterruptedWaitError, j as normalizeAwsTagsToCfn, jt as markAuxiliaryFailure, k as isPlainImportValue, lr as THROTTLING_ERROR_NAMES, lt as compositeIdFormatMessage, mr as wrapMaskedAwsError, nn as AccountIdUnavailableError, o as readPrincipalLists, or as isRetryableTransientError, ot as ElapsedBudgetRegistry, p as withRemovalDefaults, pr as markRedactedCause, pt as packCompositeId, q as userPoolProtectionSite, qn as isNameCollisionError, qt as injectiveKeyPrefix, r as SECRET_DERIVED_READ_LIVE, rr as isAmbiguousOutcomeError, sr as isTransientServerError, tn as credentialFingerprint, u as clearOnUpdateRemoval, ur as isMarkedNonRetryable, ut as compositeIdSeparatorRefusal, v as ambiguousAttemptLead, vn as ProvisioningError, vt as createMaskedRetryLogger, w as withoutServerErrorRetries, x as replayFollowedAmbiguousAttempt, xt as maskerOrIdentity, y as createAttemptKey, yt as isSecretDerivedValue, z as deleteWithProtectionCompensation } from "./iam-policy-targets-LyArt3ew.js";
|
|
4
4
|
import { s as ambientRegion } from "./aws-client-defaults-DBXBcg0J.js";
|
|
5
|
-
import { $i as accountArgs,
|
|
6
|
-
import { n as collectInlinePolicyNamesManagedBySiblings, r as IamCreateClientCache, t as IAMRoleProvider } from "./iam-role-provider-
|
|
7
|
-
import { a as resolveSecretDerivedPrincipals, i as isResolvableSecretPrincipalList, n as runDestroyForStack, o as canonicalizeIpProtocolValue, r as holdsUnprovenSecretPrincipalToken, s as resolvedResourceTimeoutMs, t as canonicalizeIpv4Cidr } from "./program-
|
|
8
|
-
import { RDSProvider } from "./rds-provider-
|
|
9
|
-
import { NeptuneProvider } from "./neptune-provider-
|
|
10
|
-
import { ASGProvider } from "./asg-provider-
|
|
5
|
+
import { $i as accountArgs, Ao as replayWarn, Bl as displayAssemblyPath, Bo as sameLambdaFunctionAddress, C as getPriorAttempts, Cc as rewriteTemplateAssetReferences, Cn as awaitInFlightSibling, Co as toFiniteNumber, Dn as replacedDeleteFailureVerdict, Do as configIntegerRefusal, Dr as waitForLambdaFunctionActive, Dt as withApiLimit, Eo as configBooleanRefusal, Es as dynamicReferenceTokens, Et as lookupEachName, F as listNestedTemplateRows, Gr as isWaitAbandonedError, Hl as resolveAssemblyPath, I as renderNestedTemplateTreeDefect, Ja as refuseMalformedResourcesForDestroy, Jr as ec2InstanceProtectionSite, Jt as redactedDeleteAddressFields, Ki as passedParameterClassesOf, Kn as secretNamedAttributeNamesOf, Kr as markWaitAbandoned, Kt as REDACTED_DELETE_ADDRESS_SKIP_REASON, Lo as withRetry, Lr as slowCcOperationTimeoutMs, Ls as carriesSecretMask, Mo as requireConfigObject, Ms as recoverMaskedOutput, N as findNestedTemplateTreeDefect, Ni as getAccountInfo, No as requireConfigString, Ns as physicalNameCopiesOf, Oa as refuseMalformedNestedChildOutputs, Ol as canonicalizeRegion, Oo as configStringRefusal, P as isAbsoluteAssetPath, Ps as recordAttributeIdCopy, Qo as passedNoEchoParametersOf, Qr as reEnableInstanceApiTermination, Ro as canonicalLambdaFunctionName, Rr as unchangedBehindSecretReference, S as isTruthyCfnBoolean, So as toCfnInteger, Tl as decodeListingKey, Tn as getStackRecords, To as coerceCfnInteger, Tt as isAccessDeniedError, Ui as parseWebACLArn, Ur as deleteSkipReason, Vl as renderAssemblyPathEscape, Wr as withIndeterminateGuard, Wt as getCurrentProducerRegions, Xr as observeThenDisableInstanceApiTermination, Yr as isTerminationProtectionPropagationError, Yt as redactedDeleteAddressSkip, Zr as reDisableInstanceApiTermination, _ as deleteTableWithIndexBusyRetry, _r as refuseMalformedDesiredTags, ai as s3BucketDomainName, b as S3_AUTO_DELETE_OBJECTS_TAG, bo as coerceWarmThroughput$1, br as definedAttributes, bs as snapshotPassProvenance, c as DynamoDBGlobalTableProvider, ci as s3BucketWebsiteUrl, co as findSilentDropProperties, cr as reserveStackCreateToken, d as compensateRemovedDeletionProtection, dr as isRefusedByName, f as deleteBudgetKey, fr as markDeleteStarted, g as INDEX_SETTLE_POLL_INTERVAL_MS, gr as readTagList, h as DELETE_INDEX_WAIT_PROCEED_NOTE, hr as planTagDiff, ii as s3BucketArn, jo as requireConfigArray, jr as getCurrentResourceSecrets, kl as derivePartitionAndUrlSuffix, ko as readConfigString, l as DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS, lt as revertNestedChildFromJournal, m as resolveDynamoDbDeleteBudgetMs, mr as DBPROXY_TAG_OPTIONS, mt as withNestedStackContext, oi as s3BucketDualStackDomainName, oo as withheldAccountClause, or as earliestDefined, os as hasMaskableValues, ot as getNestedRevertRun, p as resolveDynamoDbDeleteBudgetClock, pi as outputReferenceProvenanceOf, pr as DBPROXY_TAGS_WHAT, pt as getCurrentNestedStackContext, qt as isRedactedRecordedValue, ri as isSettledInstanceState, si as s3BucketRegionalDomainName, t as DeployEngine, u as beginDeleteWait, uo as withoutSilentDropProperties, ur as acquireIdempotencyToken, v as waitForIndexesSettled, vc as stringifyValue, vr as tagMapAsList, vs as markSameGenerationBag, w as markRefusedBeforeApplying, wo as coerceCfnBoolean, ws as withoutPhysicalNameCopies, wt as chunks, x as hasCdkAutoDeleteTag, xo as isWarmThroughputDecrease, xr as stringifyIfAssigned, xs as redactForState, y as ECR_AUTO_DELETE_IMAGES_TAG, yo as WARM_THROUGHPUT_MEMBERS, yr as tagPlanWarning, ys as recordReferenceProvenanceEntry, zl as describeFileReadFailure, zo as lambdaFunctionNameForMask } from "./deploy-engine-zLKsm0IM.js";
|
|
6
|
+
import { n as collectInlinePolicyNamesManagedBySiblings, r as IamCreateClientCache, t as IAMRoleProvider } from "./iam-role-provider-BnStRZFM.js";
|
|
7
|
+
import { a as resolveSecretDerivedPrincipals, i as isResolvableSecretPrincipalList, n as runDestroyForStack, o as canonicalizeIpProtocolValue, r as holdsUnprovenSecretPrincipalToken, s as resolvedResourceTimeoutMs, t as canonicalizeIpv4Cidr } from "./program-CiTz5-_D.js";
|
|
8
|
+
import { RDSProvider } from "./rds-provider-DagnUCn-.js";
|
|
9
|
+
import { NeptuneProvider } from "./neptune-provider-BlpYIZQP.js";
|
|
10
|
+
import { ASGProvider } from "./asg-provider-C14GB-Hy.js";
|
|
11
11
|
import { createHash, randomUUID } from "node:crypto";
|
|
12
12
|
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
13
|
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";
|
|
@@ -18,7 +18,7 @@ import { GetCallerIdentityCommand, STSClient } from "@aws-sdk/client-sts";
|
|
|
18
18
|
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, RevokeSecurityGroupEgressCommand, RevokeSecurityGroupIngressCommand, RunInstancesCommand, TerminateInstancesCommand, UnmonitorInstancesCommand, waitUntilInstanceRunning, waitUntilInstanceTerminated, waitUntilNatGatewayAvailable, waitUntilNatGatewayDeleted } from "@aws-sdk/client-ec2";
|
|
19
19
|
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
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 { CreateEventBusCommand, DeleteEventBusCommand, DeleteRuleCommand, DescribeEventBusCommand, DescribeRuleCommand, EventBridgeClient, ListRulesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$1, ListTargetsByRuleCommand, PutRuleCommand, PutTargetsCommand, RemoveTargetsCommand, ResourceNotFoundException as ResourceNotFoundException$2, TagResourceCommand as TagResourceCommand$4, UntagResourceCommand as UntagResourceCommand$4, UpdateEventBusCommand } from "@aws-sdk/client-eventbridge";
|
|
21
|
+
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
22
|
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
23
|
import { AddTagsToResourceCommand, DeleteParameterCommand, DescribeParametersCommand, GetParameterCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$2, ParameterNotFound, PutParameterCommand, RemoveTagsFromResourceCommand, SSMClient } from "@aws-sdk/client-ssm";
|
|
24
24
|
import { CloudFrontClient, CreateCloudFrontOriginAccessIdentityCommand, CreateDistributionCommand, CreateDistributionWithTagsCommand, CreateOriginAccessControlCommand, DeleteCloudFrontOriginAccessIdentityCommand, DeleteDistributionCommand, DeleteOriginAccessControlCommand, DistributionAlreadyExists, GetCloudFrontOriginAccessIdentityCommand, GetDistributionCommand, GetDistributionConfigCommand, GetOriginAccessControlCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$3, NoSuchCloudFrontOriginAccessIdentity, NoSuchDistribution, NoSuchOriginAccessControl, TagResourceCommand as TagResourceCommand$6, UntagResourceCommand as UntagResourceCommand$6, UpdateCloudFrontOriginAccessIdentityCommand, UpdateDistributionCommand, UpdateOriginAccessControlCommand } from "@aws-sdk/client-cloudfront";
|
|
@@ -15380,6 +15380,25 @@ function sanitizeDeadLetterConfig(value) {
|
|
|
15380
15380
|
if (typeof arn !== "string" || arn.length === 0) return void 0;
|
|
15381
15381
|
return { Arn: arn };
|
|
15382
15382
|
}
|
|
15383
|
+
function policyDocument(value) {
|
|
15384
|
+
if (value === void 0 || value === null || value === "") return void 0;
|
|
15385
|
+
return typeof value === "string" ? value : JSON.stringify(value);
|
|
15386
|
+
}
|
|
15387
|
+
function policyKey(value) {
|
|
15388
|
+
const doc = policyDocument(value);
|
|
15389
|
+
if (doc === void 0) return void 0;
|
|
15390
|
+
try {
|
|
15391
|
+
return JSON.stringify(sortKeys(JSON.parse(doc)));
|
|
15392
|
+
} catch {
|
|
15393
|
+
return doc;
|
|
15394
|
+
}
|
|
15395
|
+
}
|
|
15396
|
+
function sortKeys(value) {
|
|
15397
|
+
if (Array.isArray(value)) return value.map(sortKeys);
|
|
15398
|
+
if (typeof value !== "object" || value === null) return value;
|
|
15399
|
+
const record = value;
|
|
15400
|
+
return Object.fromEntries(Object.keys(record).sort().map((key) => [key, sortKeys(record[key])]));
|
|
15401
|
+
}
|
|
15383
15402
|
var EventBridgeBusProvider = class {
|
|
15384
15403
|
eventBridgeClient;
|
|
15385
15404
|
logger = getLogger().child("EventBridgeBusProvider");
|
|
@@ -15417,11 +15436,19 @@ var EventBridgeBusProvider = class {
|
|
|
15417
15436
|
});
|
|
15418
15437
|
return this.createClient;
|
|
15419
15438
|
}
|
|
15420
|
-
|
|
15439
|
+
wrapMaskedError(mask, error, build) {
|
|
15440
|
+
const failure = describeAwsFailure(error);
|
|
15441
|
+
if (!(error instanceof Error)) return build(mask(failure.detail));
|
|
15442
|
+
if (!failure.redacted) return wrapMaskedAwsError(mask, error, build);
|
|
15443
|
+
this.logger.debug(mask(build(failure.detail).message));
|
|
15444
|
+
return markRedactedCause(build(mask(failure.summary)));
|
|
15445
|
+
}
|
|
15446
|
+
async create(logicalId, resourceType, properties, context) {
|
|
15421
15447
|
const tags = refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId);
|
|
15422
15448
|
const name = properties["Name"];
|
|
15423
15449
|
if (!name) throw new ProvisioningError(`Name is required for EventBus ${logicalId}`, resourceType, logicalId);
|
|
15424
15450
|
this.logger.debug(`Creating EventBus ${logicalId}: ${name}`);
|
|
15451
|
+
let busCreated = false;
|
|
15425
15452
|
try {
|
|
15426
15453
|
const createParams = { Name: name };
|
|
15427
15454
|
if (properties["EventSourceName"]) createParams.EventSourceName = properties["EventSourceName"];
|
|
@@ -15432,7 +15459,12 @@ var EventBridgeBusProvider = class {
|
|
|
15432
15459
|
if (dlcCreate) createParams.DeadLetterConfig = dlcCreate;
|
|
15433
15460
|
if (properties["LogConfig"] !== void 0) createParams.LogConfig = properties["LogConfig"];
|
|
15434
15461
|
const response = await (await this.getCreateClient()).send(new CreateEventBusCommand(createParams));
|
|
15435
|
-
|
|
15462
|
+
busCreated = true;
|
|
15463
|
+
const policy = policyDocument(properties["Policy"]);
|
|
15464
|
+
if (policy !== void 0) await this.eventBridgeClient.send(new PutPermissionCommand({
|
|
15465
|
+
EventBusName: name,
|
|
15466
|
+
Policy: policy
|
|
15467
|
+
}));
|
|
15436
15468
|
return {
|
|
15437
15469
|
physicalId: name,
|
|
15438
15470
|
attributes: definedAttributes({
|
|
@@ -15441,8 +15473,11 @@ var EventBridgeBusProvider = class {
|
|
|
15441
15473
|
})
|
|
15442
15474
|
};
|
|
15443
15475
|
} catch (error) {
|
|
15476
|
+
if (busCreated) markAuxiliaryFailure(error, logicalId);
|
|
15444
15477
|
const cause = error instanceof Error ? error : void 0;
|
|
15445
|
-
|
|
15478
|
+
const thrown = this.wrapMaskedError(maskerOrIdentity(context?.maskSecrets), error, (text) => new ProvisioningError(`Failed to create EventBus ${logicalId}: ${text}`, resourceType, logicalId, busCreated ? name : void 0, cause));
|
|
15479
|
+
if (busCreated) markCreatedBeforeFailure(thrown, logicalId, resourceType, name);
|
|
15480
|
+
throw thrown;
|
|
15446
15481
|
}
|
|
15447
15482
|
}
|
|
15448
15483
|
async update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
|
|
@@ -15454,7 +15489,7 @@ var EventBridgeBusProvider = class {
|
|
|
15454
15489
|
} catch (error) {
|
|
15455
15490
|
if (error instanceof CdkdError) throw error;
|
|
15456
15491
|
const cause = error instanceof Error ? error : void 0;
|
|
15457
|
-
throw new ProvisioningError(`Failed to update EventBus ${logicalId}: ${
|
|
15492
|
+
throw this.wrapMaskedError(maskerOrIdentity(context?.maskSecrets), error, (text) => new ProvisioningError(`Failed to update EventBus ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
15458
15493
|
}
|
|
15459
15494
|
}
|
|
15460
15495
|
async applyUpdate(logicalId, physicalId, resourceType, properties, previousProperties, context) {
|
|
@@ -15474,6 +15509,12 @@ var EventBridgeBusProvider = class {
|
|
|
15474
15509
|
if (properties["LogConfig"] !== void 0) updateParams.LogConfig = properties["LogConfig"];
|
|
15475
15510
|
await this.eventBridgeClient.send(new UpdateEventBusCommand(updateParams));
|
|
15476
15511
|
}
|
|
15512
|
+
const policy = policyDocument(properties["Policy"]);
|
|
15513
|
+
if (policy !== void 0 && policyKey(policy) !== policyKey(previousProperties["Policy"])) await this.eventBridgeClient.send(new PutPermissionCommand({
|
|
15514
|
+
EventBusName: physicalId,
|
|
15515
|
+
Policy: policy
|
|
15516
|
+
}));
|
|
15517
|
+
else if (policy === void 0 && (context?.removedProperties?.has("Policy") ?? policyDocument(previousProperties["Policy"]) !== void 0)) this.logger.warn(safeMsg`${logicalId} (${resourceType}): Policy was removed from the template; the bus keeps its current resource policy, as CloudFormation leaves it. Remove its statements with 'aws events remove-permission' if they should go.`);
|
|
15477
15518
|
const plan = planTagDiff(previousProperties["Tags"], properties["Tags"]);
|
|
15478
15519
|
const tagWarning = tagPlanWarning(plan, resourceType, logicalId);
|
|
15479
15520
|
if (tagWarning !== void 0) this.logger.warn(tagWarning);
|
|
@@ -15764,6 +15805,12 @@ const lostCreateNoun = (what, sent, adjective) => sent.length === 0 ? `${adjecti
|
|
|
15764
15805
|
function isCreateTagsDenial(error) {
|
|
15765
15806
|
return isNamedError(error, CREATE_TAGS_DENIAL_NAMES) && describeAwsFailure(error).detail.includes("ec2:CreateTags");
|
|
15766
15807
|
}
|
|
15808
|
+
const CDKD_NOTES = /* @__PURE__ */ new WeakMap();
|
|
15809
|
+
function redactedEc2FailureText(error, failure) {
|
|
15810
|
+
if (!(error instanceof Error)) return failure.summary;
|
|
15811
|
+
const collision = isNameCollisionError(failure.detail) ? " AWS reports that it already exists." : "";
|
|
15812
|
+
return `${failure.summary}${collision}${CDKD_NOTES.get(error) ?? ""}`;
|
|
15813
|
+
}
|
|
15767
15814
|
const CREATE_TAGS_DENIAL_NAMES = /* @__PURE__ */ new Set(["UnauthorizedOperation"]);
|
|
15768
15815
|
const IDEMPOTENT_MISMATCH_NAMES = /* @__PURE__ */ new Set(["IdempotentParameterMismatch"]);
|
|
15769
15816
|
const OWN_WRITE_READ_ATTEMPTS = 5;
|
|
@@ -16038,7 +16085,7 @@ var EC2Provider = class {
|
|
|
16038
16085
|
} catch (error) {
|
|
16039
16086
|
if (error instanceof CdkdError) throw error;
|
|
16040
16087
|
const cause = error instanceof Error ? error : void 0;
|
|
16041
|
-
throw new ProvisioningError(`Failed to update EC2 resource ${logicalId}: ${
|
|
16088
|
+
throw this.wrapCaughtError(error, (text) => new ProvisioningError(`Failed to update EC2 resource ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
16042
16089
|
}
|
|
16043
16090
|
}
|
|
16044
16091
|
async applyUpdate(logicalId, physicalId, resourceType, properties, previousProperties, context) {
|
|
@@ -16279,7 +16326,7 @@ var EC2Provider = class {
|
|
|
16279
16326
|
};
|
|
16280
16327
|
} catch (error) {
|
|
16281
16328
|
const cause = error instanceof Error ? error : void 0;
|
|
16282
|
-
const thrown = new ProvisioningError(`Failed to create VPC ${logicalId}: ${
|
|
16329
|
+
const thrown = this.wrapCaughtError(error, (text) => new ProvisioningError(`Failed to create VPC ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
|
|
16283
16330
|
if (leftBehindId !== void 0) {
|
|
16284
16331
|
markCreatedBeforeFailure(thrown, logicalId, resourceType, leftBehindId);
|
|
16285
16332
|
markNonRetryable(thrown);
|
|
@@ -16319,7 +16366,7 @@ var EC2Provider = class {
|
|
|
16319
16366
|
};
|
|
16320
16367
|
} catch (error) {
|
|
16321
16368
|
const cause = error instanceof Error ? error : void 0;
|
|
16322
|
-
throw new ProvisioningError(`Failed to update VPC ${logicalId}: ${
|
|
16369
|
+
throw this.wrapCaughtError(error, (text) => new ProvisioningError(`Failed to update VPC ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
16323
16370
|
}
|
|
16324
16371
|
}
|
|
16325
16372
|
async deleteVpc(logicalId, physicalId, resourceType, context) {
|
|
@@ -16344,7 +16391,7 @@ var EC2Provider = class {
|
|
|
16344
16391
|
continue;
|
|
16345
16392
|
}
|
|
16346
16393
|
const cause = error instanceof Error ? error : void 0;
|
|
16347
|
-
throw new ProvisioningError(`Failed to delete VPC ${logicalId}: ${
|
|
16394
|
+
throw this.wrapCaughtError(error, (text) => new ProvisioningError(`Failed to delete VPC ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
16348
16395
|
}
|
|
16349
16396
|
}
|
|
16350
16397
|
async getVpcAttribute(physicalId, attributeName) {
|
|
@@ -16439,7 +16486,7 @@ var EC2Provider = class {
|
|
|
16439
16486
|
};
|
|
16440
16487
|
} catch (error) {
|
|
16441
16488
|
const cause = error instanceof Error ? error : void 0;
|
|
16442
|
-
const thrown = new ProvisioningError(`Failed to create Subnet ${logicalId}: ${
|
|
16489
|
+
const thrown = this.wrapCaughtError(error, (text) => new ProvisioningError(`Failed to create Subnet ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
|
|
16443
16490
|
if (leftBehindId !== void 0) markCreatedBeforeFailure(thrown, logicalId, resourceType, leftBehindId);
|
|
16444
16491
|
throw thrown;
|
|
16445
16492
|
}
|
|
@@ -16475,7 +16522,7 @@ var EC2Provider = class {
|
|
|
16475
16522
|
} catch (error) {
|
|
16476
16523
|
if (error instanceof CdkdError) throw error;
|
|
16477
16524
|
const cause = error instanceof Error ? error : void 0;
|
|
16478
|
-
throw new ProvisioningError(`Failed to update Subnet ${logicalId}: ${
|
|
16525
|
+
throw this.wrapCaughtError(error, (text) => new ProvisioningError(`Failed to update Subnet ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
16479
16526
|
}
|
|
16480
16527
|
}
|
|
16481
16528
|
async waitForSubnetMapPublicIp(subnetId, expected) {
|
|
@@ -16514,7 +16561,7 @@ var EC2Provider = class {
|
|
|
16514
16561
|
continue;
|
|
16515
16562
|
}
|
|
16516
16563
|
const cause = error instanceof Error ? error : void 0;
|
|
16517
|
-
throw new ProvisioningError(`Failed to delete Subnet ${logicalId}: ${
|
|
16564
|
+
throw this.wrapCaughtError(error, (text) => new ProvisioningError(`Failed to delete Subnet ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
16518
16565
|
}
|
|
16519
16566
|
}
|
|
16520
16567
|
async cleanupSubnetLambdaEnis(subnetId) {
|
|
@@ -16583,7 +16630,7 @@ var EC2Provider = class {
|
|
|
16583
16630
|
};
|
|
16584
16631
|
} catch (error) {
|
|
16585
16632
|
const cause = error instanceof Error ? error : void 0;
|
|
16586
|
-
throw new ProvisioningError(`Failed to create InternetGateway ${logicalId}: ${
|
|
16633
|
+
throw this.wrapCaughtError(error, (text) => new ProvisioningError(`Failed to create InternetGateway ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
|
|
16587
16634
|
}
|
|
16588
16635
|
}
|
|
16589
16636
|
updateInternetGateway(logicalId, physicalId) {
|
|
@@ -16602,7 +16649,7 @@ var EC2Provider = class {
|
|
|
16602
16649
|
return;
|
|
16603
16650
|
}
|
|
16604
16651
|
const cause = error instanceof Error ? error : void 0;
|
|
16605
|
-
throw new ProvisioningError(`Failed to delete InternetGateway ${logicalId}: ${
|
|
16652
|
+
throw this.wrapCaughtError(error, (text) => new ProvisioningError(`Failed to delete InternetGateway ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
16606
16653
|
}
|
|
16607
16654
|
}
|
|
16608
16655
|
eipPhysicalId(logicalId, publicIp, allocationId, options) {
|
|
@@ -16701,7 +16748,7 @@ var EC2Provider = class {
|
|
|
16701
16748
|
this.logger.warn(safeMsg`Failed to release partially-created EIP ${logicalId} (${allocatedId}): ${describeAwsFailure(cleanupError).detail}. Manual release may be required: ${pasteableAwsCommand(context?.maskSecrets)`aws ec2 release-address --allocation-id ${allocatedId}`.render()}`);
|
|
16702
16749
|
}
|
|
16703
16750
|
const cause = error instanceof Error ? error : void 0;
|
|
16704
|
-
const thrown = new ProvisioningError(`Failed to create EIP ${logicalId}: ${
|
|
16751
|
+
const thrown = this.wrapCaughtError(error, (text) => new ProvisioningError(`Failed to create EIP ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
|
|
16705
16752
|
if (createdId !== void 0) {
|
|
16706
16753
|
markCreatedBeforeFailure(thrown, logicalId, resourceType, createdId);
|
|
16707
16754
|
markNonRetryable(thrown);
|
|
@@ -16772,7 +16819,7 @@ var EC2Provider = class {
|
|
|
16772
16819
|
return;
|
|
16773
16820
|
}
|
|
16774
16821
|
const cause = error instanceof Error ? error : void 0;
|
|
16775
|
-
throw new ProvisioningError(`Failed to delete EIP ${logicalId}: ${
|
|
16822
|
+
throw this.wrapCaughtError(error, (text) => new ProvisioningError(`Failed to delete EIP ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
16776
16823
|
}
|
|
16777
16824
|
}
|
|
16778
16825
|
async getEipAttribute(physicalId, attributeName) {
|
|
@@ -16815,7 +16862,7 @@ var EC2Provider = class {
|
|
|
16815
16862
|
};
|
|
16816
16863
|
} catch (error) {
|
|
16817
16864
|
const cause = error instanceof Error ? error : void 0;
|
|
16818
|
-
throw new ProvisioningError(`Failed to create VPCGatewayAttachment ${logicalId}: ${
|
|
16865
|
+
throw this.wrapCaughtError(error, (text) => new ProvisioningError(`Failed to create VPCGatewayAttachment ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
|
|
16819
16866
|
}
|
|
16820
16867
|
}
|
|
16821
16868
|
updateVpcGatewayAttachment(logicalId, physicalId) {
|
|
@@ -16840,7 +16887,7 @@ var EC2Provider = class {
|
|
|
16840
16887
|
return;
|
|
16841
16888
|
}
|
|
16842
16889
|
const cause = error instanceof Error ? error : void 0;
|
|
16843
|
-
throw new ProvisioningError(`Failed to delete VPCGatewayAttachment ${logicalId}: ${
|
|
16890
|
+
throw this.wrapCaughtError(error, (text) => new ProvisioningError(`Failed to delete VPCGatewayAttachment ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
16844
16891
|
}
|
|
16845
16892
|
}
|
|
16846
16893
|
async createNatGateway(logicalId, resourceType, properties) {
|
|
@@ -16886,7 +16933,7 @@ var EC2Provider = class {
|
|
|
16886
16933
|
};
|
|
16887
16934
|
} catch (error) {
|
|
16888
16935
|
const cause = error instanceof Error ? error : void 0;
|
|
16889
|
-
const thrown = new ProvisioningError(`Failed to create NatGateway ${logicalId}: ${
|
|
16936
|
+
const thrown = this.wrapCaughtError(error, (text) => new ProvisioningError(`Failed to create NatGateway ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
|
|
16890
16937
|
if (createdId !== void 0) markCreatedBeforeFailure(thrown, logicalId, resourceType, createdId);
|
|
16891
16938
|
throw thrown;
|
|
16892
16939
|
}
|
|
@@ -16907,7 +16954,7 @@ var EC2Provider = class {
|
|
|
16907
16954
|
return;
|
|
16908
16955
|
}
|
|
16909
16956
|
const cause = error instanceof Error ? error : void 0;
|
|
16910
|
-
throw new ProvisioningError(`Failed to delete NatGateway ${logicalId}: ${
|
|
16957
|
+
throw this.wrapCaughtError(error, (text) => new ProvisioningError(`Failed to delete NatGateway ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
16911
16958
|
}
|
|
16912
16959
|
this.logger.debug(`Waiting for NatGateway ${physicalId} to reach deleted state...`);
|
|
16913
16960
|
try {
|
|
@@ -16947,7 +16994,7 @@ var EC2Provider = class {
|
|
|
16947
16994
|
};
|
|
16948
16995
|
} catch (error) {
|
|
16949
16996
|
const cause = error instanceof Error ? error : void 0;
|
|
16950
|
-
throw new ProvisioningError(`Failed to create RouteTable ${logicalId}: ${
|
|
16997
|
+
throw this.wrapCaughtError(error, (text) => new ProvisioningError(`Failed to create RouteTable ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
|
|
16951
16998
|
}
|
|
16952
16999
|
}
|
|
16953
17000
|
updateRouteTable(logicalId, physicalId) {
|
|
@@ -16966,7 +17013,7 @@ var EC2Provider = class {
|
|
|
16966
17013
|
return;
|
|
16967
17014
|
}
|
|
16968
17015
|
const cause = error instanceof Error ? error : void 0;
|
|
16969
|
-
throw new ProvisioningError(`Failed to delete RouteTable ${logicalId}: ${
|
|
17016
|
+
throw this.wrapCaughtError(error, (text) => new ProvisioningError(`Failed to delete RouteTable ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
16970
17017
|
}
|
|
16971
17018
|
}
|
|
16972
17019
|
async createRoute(logicalId, resourceType, properties, onMultipleDestinations, maskSecrets) {
|
|
@@ -17021,7 +17068,7 @@ var EC2Provider = class {
|
|
|
17021
17068
|
};
|
|
17022
17069
|
} catch (error) {
|
|
17023
17070
|
const cause = error instanceof Error ? error : void 0;
|
|
17024
|
-
throw new ProvisioningError(`Failed to create Route ${logicalId}: ${
|
|
17071
|
+
throw this.wrapCaughtError(error, (text) => new ProvisioningError(`Failed to create Route ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
|
|
17025
17072
|
}
|
|
17026
17073
|
}
|
|
17027
17074
|
async updateRoute(logicalId, physicalId, resourceType, properties, previousProperties, context) {
|
|
@@ -17047,7 +17094,7 @@ var EC2Provider = class {
|
|
|
17047
17094
|
} catch (error) {
|
|
17048
17095
|
if (error instanceof CdkdError) throw error;
|
|
17049
17096
|
const cause = error instanceof Error ? error : void 0;
|
|
17050
|
-
throw new ProvisioningError(`Failed to update Route ${logicalId}: ${
|
|
17097
|
+
throw this.wrapCaughtError(error, (text) => new ProvisioningError(`Failed to update Route ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
17051
17098
|
}
|
|
17052
17099
|
}
|
|
17053
17100
|
async deleteRoute(logicalId, physicalId, resourceType, context) {
|
|
@@ -17070,7 +17117,7 @@ var EC2Provider = class {
|
|
|
17070
17117
|
return;
|
|
17071
17118
|
}
|
|
17072
17119
|
const cause = error instanceof Error ? error : void 0;
|
|
17073
|
-
throw new ProvisioningError(`Failed to delete Route ${logicalId}: ${
|
|
17120
|
+
throw this.wrapCaughtError(error, (text) => new ProvisioningError(`Failed to delete Route ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
17074
17121
|
}
|
|
17075
17122
|
}
|
|
17076
17123
|
async createSubnetRouteTableAssociation(logicalId, resourceType, properties) {
|
|
@@ -17090,7 +17137,7 @@ var EC2Provider = class {
|
|
|
17090
17137
|
};
|
|
17091
17138
|
} catch (error) {
|
|
17092
17139
|
const cause = error instanceof Error ? error : void 0;
|
|
17093
|
-
throw new ProvisioningError(`Failed to create SubnetRouteTableAssociation ${logicalId}: ${
|
|
17140
|
+
throw this.wrapCaughtError(error, (text) => new ProvisioningError(`Failed to create SubnetRouteTableAssociation ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
|
|
17094
17141
|
}
|
|
17095
17142
|
}
|
|
17096
17143
|
updateSubnetRouteTableAssociation(logicalId, physicalId) {
|
|
@@ -17109,7 +17156,7 @@ var EC2Provider = class {
|
|
|
17109
17156
|
return;
|
|
17110
17157
|
}
|
|
17111
17158
|
const cause = error instanceof Error ? error : void 0;
|
|
17112
|
-
throw new ProvisioningError(`Failed to delete SubnetRouteTableAssociation ${logicalId}: ${
|
|
17159
|
+
throw this.wrapCaughtError(error, (text) => new ProvisioningError(`Failed to delete SubnetRouteTableAssociation ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
17113
17160
|
}
|
|
17114
17161
|
}
|
|
17115
17162
|
async createSecurityGroup(logicalId, resourceType, properties) {
|
|
@@ -17160,7 +17207,7 @@ var EC2Provider = class {
|
|
|
17160
17207
|
};
|
|
17161
17208
|
} catch (error) {
|
|
17162
17209
|
const cause = error instanceof Error ? error : void 0;
|
|
17163
|
-
const thrown = new ProvisioningError(`Failed to create SecurityGroup ${logicalId}: ${
|
|
17210
|
+
const thrown = this.wrapCaughtError(error, (text) => new ProvisioningError(`Failed to create SecurityGroup ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
|
|
17164
17211
|
if (leftBehindId !== void 0) markCreatedBeforeFailure(thrown, logicalId, resourceType, leftBehindId);
|
|
17165
17212
|
throw thrown;
|
|
17166
17213
|
}
|
|
@@ -17213,7 +17260,7 @@ var EC2Provider = class {
|
|
|
17213
17260
|
};
|
|
17214
17261
|
} catch (error) {
|
|
17215
17262
|
const cause = error instanceof Error ? error : void 0;
|
|
17216
|
-
throw new ProvisioningError(`Failed to update SecurityGroup ${logicalId}: ${
|
|
17263
|
+
throw this.wrapCaughtError(error, (text) => new ProvisioningError(`Failed to update SecurityGroup ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
17217
17264
|
}
|
|
17218
17265
|
}
|
|
17219
17266
|
async deleteSecurityGroup(logicalId, physicalId, resourceType, context) {
|
|
@@ -17231,15 +17278,14 @@ var EC2Provider = class {
|
|
|
17231
17278
|
else this.logger.debug(`SecurityGroup ${physicalId} does not exist, skipping deletion`);
|
|
17232
17279
|
return;
|
|
17233
17280
|
}
|
|
17234
|
-
|
|
17235
|
-
if (msg.includes("dependent object") && attempt < maxAttempts) {
|
|
17281
|
+
if (describeAwsFailure(error).detail.includes("dependent object") && attempt < maxAttempts) {
|
|
17236
17282
|
await this.cleanupSecurityGroupLambdaEnis(physicalId);
|
|
17237
17283
|
this.logger.debug(`SecurityGroup ${physicalId} has dependent objects (attempt ${attempt}/${maxAttempts}), retrying in ${attempt * 5}s...`);
|
|
17238
17284
|
await new Promise((resolve) => setTimeout(resolve, attempt * 5e3));
|
|
17239
17285
|
continue;
|
|
17240
17286
|
}
|
|
17241
17287
|
const cause = error instanceof Error ? error : void 0;
|
|
17242
|
-
throw new ProvisioningError(`Failed to delete SecurityGroup ${logicalId}: ${
|
|
17288
|
+
throw this.wrapCaughtError(error, (text) => new ProvisioningError(`Failed to delete SecurityGroup ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
17243
17289
|
}
|
|
17244
17290
|
}
|
|
17245
17291
|
async cleanupSecurityGroupLambdaEnis(groupId) {
|
|
@@ -17368,7 +17414,7 @@ var EC2Provider = class {
|
|
|
17368
17414
|
};
|
|
17369
17415
|
}
|
|
17370
17416
|
const cause = error instanceof Error ? error : void 0;
|
|
17371
|
-
const failure = new ProvisioningError(`Failed to create SecurityGroupIngress ${logicalId}: ${
|
|
17417
|
+
const failure = this.wrapCaughtError(error, (text) => new ProvisioningError(`Failed to create SecurityGroupIngress ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
|
|
17372
17418
|
const lookup = getPriorAttempts(logicalId);
|
|
17373
17419
|
if (authorizeDefinitelyNotApplied(error) && !earlierSendAmbiguous && lookup?.possiblyLanded() !== true) markRefusedBeforeApplying(failure);
|
|
17374
17420
|
else lookup?.notePossiblyLanded();
|
|
@@ -17562,7 +17608,7 @@ var EC2Provider = class {
|
|
|
17562
17608
|
} catch (error) {
|
|
17563
17609
|
if (error instanceof CdkdError) throw error;
|
|
17564
17610
|
const cause = error instanceof Error ? error : void 0;
|
|
17565
|
-
throw new ProvisioningError(`Failed to update SecurityGroupIngress ${logicalId}: ${
|
|
17611
|
+
throw this.wrapCaughtError(error, (text) => new ProvisioningError(`Failed to update SecurityGroupIngress ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
17566
17612
|
}
|
|
17567
17613
|
}
|
|
17568
17614
|
withoutDescription(value) {
|
|
@@ -17638,7 +17684,7 @@ var EC2Provider = class {
|
|
|
17638
17684
|
return notMatched();
|
|
17639
17685
|
}
|
|
17640
17686
|
const cause = error instanceof Error ? error : void 0;
|
|
17641
|
-
throw new ProvisioningError(`Failed to delete SecurityGroupIngress ${logicalId}: ${
|
|
17687
|
+
throw this.wrapCaughtError(error, (text) => new ProvisioningError(`Failed to delete SecurityGroupIngress ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
17642
17688
|
}
|
|
17643
17689
|
}
|
|
17644
17690
|
async createInstance(logicalId, resourceType, properties, context) {
|
|
@@ -17723,7 +17769,7 @@ var EC2Provider = class {
|
|
|
17723
17769
|
throw markAuxiliaryFailure(innerError, logicalId);
|
|
17724
17770
|
}
|
|
17725
17771
|
} catch (error) {
|
|
17726
|
-
const thrown = error instanceof ProvisioningError ? error : new ProvisioningError(`Failed to create EC2 Instance ${logicalId}: ${
|
|
17772
|
+
const thrown = error instanceof ProvisioningError ? error : this.wrapCaughtError(error, (text) => new ProvisioningError(`Failed to create EC2 Instance ${logicalId}: ${text}`, resourceType, logicalId, void 0, error instanceof Error ? error : void 0));
|
|
17727
17773
|
if (leftBehindId !== void 0) markCreatedBeforeFailure(thrown, logicalId, resourceType, leftBehindId);
|
|
17728
17774
|
throw thrown;
|
|
17729
17775
|
}
|
|
@@ -17821,7 +17867,7 @@ var EC2Provider = class {
|
|
|
17821
17867
|
};
|
|
17822
17868
|
} catch (error) {
|
|
17823
17869
|
const cause = error instanceof Error ? error : void 0;
|
|
17824
|
-
throw new ProvisioningError(`Failed to update EC2 Instance ${logicalId}: ${
|
|
17870
|
+
throw this.wrapCaughtError(error, (text) => new ProvisioningError(`Failed to update EC2 Instance ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
17825
17871
|
}
|
|
17826
17872
|
}
|
|
17827
17873
|
async updateInstanceSecurityProps(physicalId, properties, previousProperties) {
|
|
@@ -17912,7 +17958,7 @@ var EC2Provider = class {
|
|
|
17912
17958
|
continue;
|
|
17913
17959
|
}
|
|
17914
17960
|
const cause = error instanceof Error ? error : void 0;
|
|
17915
|
-
throw new ProvisioningError(`Failed to terminate EC2 Instance ${logicalId}: ${
|
|
17961
|
+
throw this.wrapCaughtError(error, (text) => new ProvisioningError(`Failed to terminate EC2 Instance ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
17916
17962
|
}
|
|
17917
17963
|
}
|
|
17918
17964
|
async getInstanceAttribute(physicalId, attributeName) {
|
|
@@ -18132,7 +18178,7 @@ var EC2Provider = class {
|
|
|
18132
18178
|
};
|
|
18133
18179
|
} catch (error) {
|
|
18134
18180
|
const cause = error instanceof Error ? error : void 0;
|
|
18135
|
-
throw new ProvisioningError(`Failed to create NetworkAcl ${logicalId}: ${
|
|
18181
|
+
throw this.wrapCaughtError(error, (text) => new ProvisioningError(`Failed to create NetworkAcl ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
|
|
18136
18182
|
}
|
|
18137
18183
|
}
|
|
18138
18184
|
async deleteNetworkAcl(logicalId, physicalId, resourceType, context) {
|
|
@@ -18148,7 +18194,7 @@ var EC2Provider = class {
|
|
|
18148
18194
|
return;
|
|
18149
18195
|
}
|
|
18150
18196
|
const cause = error instanceof Error ? error : void 0;
|
|
18151
|
-
throw new ProvisioningError(`Failed to delete NetworkAcl ${logicalId}: ${
|
|
18197
|
+
throw this.wrapCaughtError(error, (text) => new ProvisioningError(`Failed to delete NetworkAcl ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
18152
18198
|
}
|
|
18153
18199
|
}
|
|
18154
18200
|
async createNetworkAclEntry(logicalId, resourceType, properties, context) {
|
|
@@ -18205,7 +18251,7 @@ var EC2Provider = class {
|
|
|
18205
18251
|
};
|
|
18206
18252
|
} catch (error) {
|
|
18207
18253
|
const cause = error instanceof Error ? error : void 0;
|
|
18208
|
-
throw new ProvisioningError(`Failed to create NetworkAclEntry ${logicalId}: ${
|
|
18254
|
+
throw this.wrapCaughtError(error, (text) => new ProvisioningError(`Failed to create NetworkAclEntry ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
|
|
18209
18255
|
}
|
|
18210
18256
|
}
|
|
18211
18257
|
async deleteNetworkAclEntry(logicalId, physicalId, resourceType, context) {
|
|
@@ -18236,7 +18282,7 @@ var EC2Provider = class {
|
|
|
18236
18282
|
return;
|
|
18237
18283
|
}
|
|
18238
18284
|
const cause = error instanceof Error ? error : void 0;
|
|
18239
|
-
throw new ProvisioningError(`Failed to delete NetworkAclEntry ${logicalId}: ${
|
|
18285
|
+
throw this.wrapCaughtError(error, (text) => new ProvisioningError(`Failed to delete NetworkAclEntry ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
|
|
18240
18286
|
}
|
|
18241
18287
|
}
|
|
18242
18288
|
async createSubnetNetworkAclAssociation(logicalId, resourceType, properties) {
|
|
@@ -18270,7 +18316,7 @@ var EC2Provider = class {
|
|
|
18270
18316
|
} catch (error) {
|
|
18271
18317
|
if (error instanceof ProvisioningError) throw error;
|
|
18272
18318
|
const cause = error instanceof Error ? error : void 0;
|
|
18273
|
-
throw new ProvisioningError(`Failed to create SubnetNetworkAclAssociation ${logicalId}: ${
|
|
18319
|
+
throw this.wrapCaughtError(error, (text) => new ProvisioningError(`Failed to create SubnetNetworkAclAssociation ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
|
|
18274
18320
|
}
|
|
18275
18321
|
}
|
|
18276
18322
|
async sendTaggedCreate(logicalId, tagResourceType, tags, send) {
|
|
@@ -18306,7 +18352,9 @@ var EC2Provider = class {
|
|
|
18306
18352
|
this.logger.debug(safeMsg`Create of ${logicalId} without tags was refused: ${untaggedDetail}`);
|
|
18307
18353
|
const explicit = isExplicitDenyError(untaggedDetail);
|
|
18308
18354
|
const kind = explicit ? explicitDenyPolicyKind(untaggedDetail) : void 0;
|
|
18309
|
-
|
|
18355
|
+
const note = ` The create without tags was refused too (UnauthorizedOperation)${explicit ? `; explicit deny${kind !== void 0 ? ` (${kind})` : ""}` : ""}.`;
|
|
18356
|
+
taggedError.message = `${taggedError.message}${note}`;
|
|
18357
|
+
CDKD_NOTES.set(taggedError, note);
|
|
18310
18358
|
if (explicit) markNonRetryable(taggedError);
|
|
18311
18359
|
throw taggedError;
|
|
18312
18360
|
}
|
|
@@ -18375,6 +18423,13 @@ var EC2Provider = class {
|
|
|
18375
18423
|
delay = Math.min(delay * 2, maxDelayMs);
|
|
18376
18424
|
}
|
|
18377
18425
|
}
|
|
18426
|
+
wrapCaughtError(error, build) {
|
|
18427
|
+
const failure = describeAwsFailure(error);
|
|
18428
|
+
if (!failure.redacted) return build(failure.detail);
|
|
18429
|
+
this.logger.debug(build(failure.detail).message);
|
|
18430
|
+
const wrapped = build(redactedEc2FailureText(error, failure));
|
|
18431
|
+
return error instanceof Error ? markRedactedCause(wrapped) : wrapped;
|
|
18432
|
+
}
|
|
18378
18433
|
isDependencyViolationError(error) {
|
|
18379
18434
|
if (!(error instanceof Error)) return false;
|
|
18380
18435
|
const code = error.Code ?? "";
|
|
@@ -46778,4 +46833,4 @@ var ACMCertificateProvider = class {
|
|
|
46778
46833
|
|
|
46779
46834
|
//#endregion
|
|
46780
46835
|
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 };
|
|
46781
|
-
//# sourceMappingURL=provider-classes-
|
|
46836
|
+
//# sourceMappingURL=provider-classes-BWo7K01p.js.map
|