@go-to-k/cdkd 0.296.28 → 0.296.30
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-B3zcS87C.js → asg-provider-BaabA371.js} +3 -3
- package/dist/{asg-provider-B3zcS87C.js.map → asg-provider-BaabA371.js.map} +1 -1
- package/dist/cli.js +2 -2
- package/dist/{deploy-engine-D4FdwPCi.js → deploy-engine-BuPc2Dfc.js} +1951 -60
- package/dist/deploy-engine-BuPc2Dfc.js.map +1 -0
- package/dist/{iam-policy-targets-B61e5_Sk.js → iam-policy-targets-Cz2tPxXk.js} +2 -2
- package/dist/{iam-policy-targets-B61e5_Sk.js.map → iam-policy-targets-Cz2tPxXk.js.map} +1 -1
- package/dist/{iam-role-provider-0U4kMuzh.js → iam-role-provider-CAiMUBcP.js} +3 -3
- package/dist/{iam-role-provider-0U4kMuzh.js.map → iam-role-provider-CAiMUBcP.js.map} +1 -1
- package/dist/index.d.ts +121 -55
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/{neptune-provider-DF6Eh4Tl.js → neptune-provider-5yc_bOJ-.js} +3 -3
- package/dist/{neptune-provider-DF6Eh4Tl.js.map → neptune-provider-5yc_bOJ-.js.map} +1 -1
- package/dist/{program-v_QNBjtZ.js → program-CIxuz2zX.js} +557 -41
- package/dist/program-CIxuz2zX.js.map +1 -0
- package/dist/{provider-classes-wbKBBEol.js → provider-classes-DmZ0J68L.js} +216 -26
- package/dist/provider-classes-DmZ0J68L.js.map +1 -0
- package/dist/{rds-provider-BfQsw4hw.js → rds-provider-IBY6fDvN.js} +3 -3
- package/dist/{rds-provider-BfQsw4hw.js.map → rds-provider-IBY6fDvN.js.map} +1 -1
- package/dist/{version-B0JEGOLV.js → version-B__YmKBy.js} +2 -2
- package/dist/{version-B0JEGOLV.js.map → version-B__YmKBy.js.map} +1 -1
- package/package.json +1 -1
- package/dist/deploy-engine-D4FdwPCi.js.map +0 -1
- package/dist/program-v_QNBjtZ.js.map +0 -1
- package/dist/provider-classes-wbKBBEol.js.map +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { r as getAwsClients } from "./aws-clients-CnmtbrxD.js";
|
|
2
2
|
import { F as displayStackName, I as isPasteableIdent, N as displayIdent, O as SECRET_REF_MAX_CODE_POINTS, P as displaySafe, R as plainIdentOr, a as getLogger, b as generateResourceNameWithFallback, n as isAwsAuthoredFailure, r as safeStringify, t as describeAwsFailure, y as generateResourceName, z as safeMsg } from "./aws-failure-text-BaWeCWRz.js";
|
|
3
|
-
import { $ as protectedReplacementAdvice, $t as
|
|
3
|
+
import { $ as protectedReplacementAdvice, $n as isAmbiguousOutcomeError, $t as credentialFingerprint, A as isQuotableImportValue, B as isTerminalDeleteFailure, Bn as withheldTargetClause, C as setBounded, D as VALUE_NOT_SHOWN, E as assertRegionMatch, F as resolveExplicitPhysicalId, Gt as injectiveKeyPrefix, H as observeThenDisableProtection, In as plainOrDescribed, L as ProtectionFlipRegistry, M as quotedRemedyLogicalId, Mn as hasClauseBreak, Mt as markCreatedBeforeFailure, N as refusalTypeShown, Nn as isInertUnquoted, O as isPlainImportJson, P as remedyLogicalId, Pn as pasteableCommand, Q as pasteableAwsCommand, Qt as clientDefaultsFor, S as replayedSendWindow, St as withDerivedNameMasks, T as RESOURCE_NOT_FOUND, Tt as clearCreatedBeforeFailure, U as protectionFlipKey, V as logGroupProtectionSite, W as rdsFamilyProtectionSite, Wt as injectiveKey, X as WITHHELD_AWS_COMMAND, Xn as markReplayMayCollide, Xt as ambientClientDefaults, Y as UNNAMEABLE_ID_CLAUSE, Yn as markNameCollision, Yt as withPasteableAwsProfile, Z as isAwsCliLiteral, Zt as ambientCredentialConfig, _ as RecentIdSet, _t as createMaskedLogSinks, a as onlySecretDerived, ar as isMarkedNonRetryable, at as startInterruptWatch, b as isInsideWindow, bt as maskDeep, c as recordedPrincipalsRepair, cr as markRedactedCause, ct as canonicalizeRoute53QueryName, dt as compositeIdSkipResult, en as AccountIdUnavailableError, et as renderDisableCommand, ft as logicalIdShown, g as AmbiguousCreateLatch, gn as ProvisioningError, gt as stateOrphanRecordRemedy, h as AMBIGUOUS_LATCH_TTL_MS, ht as segmentAfterAnchor, i as holdsSecretDerivedEntry, ir as THROTTLING_ERROR_NAMES, it as isInterruptedWaitError, j as normalizeAwsTagsToCfn, jn as commandHole, jt as markAuxiliaryFailure, k as isPlainImportValue, lr as wrapMaskedAwsError, lt as compositeIdFormatMessage, nn as CdkdError, nr as isTransientServerError, o as readPrincipalLists, or as isThrottlingError, ot as ElapsedBudgetRegistry, p as withRemovalDefaults, pt as packCompositeId, q as userPoolProtectionSite, r as SECRET_DERIVED_READ_LIVE, sr as markNonRetryable, tr as isRetryableTransientError, u as clearOnUpdateRemoval, ut as compositeIdSeparatorRefusal, v as ambiguousAttemptLead, vn as ResourceUpdateNotSupportedError, vt as createMaskedRetryLogger, w as withoutServerErrorRetries, x as replayFollowedAmbiguousAttempt, xt as maskerOrIdentity, y as createAttemptKey, yt as isSecretDerivedValue, z as deleteWithProtectionCompensation, zn as shellQuote } from "./iam-policy-targets-Cz2tPxXk.js";
|
|
4
4
|
import { s as ambientRegion } from "./aws-client-defaults-D0q0z4dG.js";
|
|
5
|
-
import { $
|
|
6
|
-
import { n as collectInlinePolicyNamesManagedBySiblings, r as IamCreateClientCache, t as IAMRoleProvider } from "./iam-role-provider-
|
|
7
|
-
import { a as canonicalizeIpProtocolValue, i as resolveSecretDerivedPrincipals, n as runDestroyForStack, o as resolvedResourceTimeoutMs, r as isResolvableSecretPrincipalList, 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 { $ as getPriorAttempts, $a as configBooleanRefusal, $n as acquireIdempotencyToken, $o as recoverMaskedOutput, $r as s3BucketArn, Ar as ec2InstanceProtectionSite, B as beginDeleteWait, Dr as isWaitAbandonedError, Dt as withNestedStackContext, Ei as accountArgs, Er as withIndeterminateGuard, Et as getCurrentNestedStackContext, Fa as findSilentDropProperties, G as DELETE_INDEX_WAIT_PROCEED_NOTE, H as deleteBudgetKey, J as waitForIndexesSettled, Ja as isWarmThroughputDecrease, Jc as derivePartitionAndUrlSuffix, K as INDEX_SETTLE_POLL_INTERVAL_MS, Ka as WARM_THROUGHPUT_MEMBERS, La as withoutSilentDropProperties, Lt as awaitInFlightSibling, Mo as hasMaskableValues, Mr as observeThenDisableInstanceApiTermination, Na as withheldAccountClause, Nr as reDisableInstanceApiTermination, Or as markWaitAbandoned, Pr as reEnableInstanceApiTermination, Q as isTruthyCfnBoolean, Qa as coerceCfnInteger, Qr as isSettledInstanceState, R as DynamoDBGlobalTableProvider, St as revertNestedChildFromJournal, To as passedNoEchoParametersOf, Tr as deleteSkipReason, U as resolveDynamoDbDeleteBudgetClock, Uo as markSameGenerationBag, V as compensateRemovedDeletionProtection, W as resolveDynamoDbDeleteBudgetMs, Wc as decodeListingKey, Wo as redactSecretsForState, Ws as rewriteTemplateAssetReferences, X as S3_AUTO_DELETE_OBJECTS_TAG, Xa as toFiniteNumber, Y as ECR_AUTO_DELETE_IMAGES_TAG, Ya as toCfnInteger, Yn as earliestDefined, Z as hasCdkAutoDeleteTag, Za as coerceCfnBoolean, Zn as reserveStackCreateToken, _i as parseWebACLArn, _r as getCurrentResourceSecrets, a as findNestedTemplateTreeDefect, al as displayAssemblyPath, an as redactedDeleteAddressFields, ao as requireConfigObject, ar as tagMapAsList, b as lookupEachName, bi as passedParameterClassesOf, br as slowCcOperationTimeoutMs, c as renderNestedTemplateTreeDefect, cr as stringifyIfAssigned, do as canonicalLambdaFunctionName, ei as s3BucketDomainName, eo as configIntegerRefusal, er as DBPROXY_TAGS_WHAT, es as carriesSecretMask, et as markRefusedBeforeApplying, fo as lambdaFunctionNameForMask, il as describeFileReadFailure, in as isRedactedRecordedValue, io as requireConfigArray, ir as refuseMalformedDesiredTags, jr as isTerminationProtectionPropagationError, ni as s3BucketRegionalDomainName, no as readConfigString, nr as planTagDiff, o as isAbsoluteAssetPath, ol as renderAssemblyPathEscape, on as redactedDeleteAddressSkip, oo as requireConfigString, or as tagPlanWarning, po as sameLambdaFunctionAddress, q as deleteTableWithIndexBusyRetry, qa as coerceWarmThroughput$1, qc as canonicalizeRegion, qo as dynamicReferenceTokens, ri as s3BucketWebsiteUrl, rn as REDACTED_DELETE_ADDRESS_SKIP_REASON, ro as replayWarn, rr as readTagList, s as listNestedTemplateRows, si as getAccountInfo, sl as resolveAssemblyPath, sr as definedAttributes, t as DeployEngine, ta as refuseMalformedNestedChildOutputs, ti as s3BucketDualStackDomainName, tn as getCurrentProducerRegions, to as configStringRefusal, tr as DBPROXY_TAG_OPTIONS, uo as withRetry, v as chunks, x as withApiLimit, xa as refuseMalformedResourcesForDestroy, xr as unchangedBehindSecretReference, y as isAccessDeniedError, yt as getNestedRevertRun, z as DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS, zs as stringifyValue, zt as getStackRecords } from "./deploy-engine-BuPc2Dfc.js";
|
|
6
|
+
import { n as collectInlinePolicyNamesManagedBySiblings, r as IamCreateClientCache, t as IAMRoleProvider } from "./iam-role-provider-CAiMUBcP.js";
|
|
7
|
+
import { a as canonicalizeIpProtocolValue, i as resolveSecretDerivedPrincipals, n as runDestroyForStack, o as resolvedResourceTimeoutMs, r as isResolvableSecretPrincipalList, t as canonicalizeIpv4Cidr } from "./program-CIxuz2zX.js";
|
|
8
|
+
import { RDSProvider } from "./rds-provider-IBY6fDvN.js";
|
|
9
|
+
import { NeptuneProvider } from "./neptune-provider-5yc_bOJ-.js";
|
|
10
|
+
import { ASGProvider } from "./asg-provider-BaabA371.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";
|
|
@@ -4375,11 +4375,7 @@ var S3BucketProvider = class S3BucketProvider {
|
|
|
4375
4375
|
this.logger.debug(`Creating S3 bucket ${displaySafe(logicalId)}`);
|
|
4376
4376
|
const desiredTags = refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId);
|
|
4377
4377
|
const explicitBucketName = Boolean(properties["BucketName"]);
|
|
4378
|
-
const bucketName = properties["BucketName"] ||
|
|
4379
|
-
maxLength: 63,
|
|
4380
|
-
lowercase: true,
|
|
4381
|
-
allowedPattern: /[^a-z0-9.-]/g
|
|
4382
|
-
});
|
|
4378
|
+
const bucketName = properties["BucketName"] || this.generatedCreateName(resourceType, logicalId, properties);
|
|
4383
4379
|
let bucketLeftBehind = false;
|
|
4384
4380
|
let ambiguousWindow;
|
|
4385
4381
|
let windowSpent = false;
|
|
@@ -5128,6 +5124,14 @@ var S3BucketProvider = class S3BucketProvider {
|
|
|
5128
5124
|
if (created instanceof Date && !Number.isNaN(created.getTime())) return `${physicalId}|${want}|${created.toISOString()}`;
|
|
5129
5125
|
}
|
|
5130
5126
|
}
|
|
5127
|
+
generatedCreateName(_resourceType, logicalId, properties) {
|
|
5128
|
+
if (properties["BucketName"]) return void 0;
|
|
5129
|
+
return generateResourceName(logicalId, {
|
|
5130
|
+
maxLength: 63,
|
|
5131
|
+
lowercase: true,
|
|
5132
|
+
allowedPattern: /[^a-z0-9.-]/g
|
|
5133
|
+
});
|
|
5134
|
+
}
|
|
5131
5135
|
async import(input) {
|
|
5132
5136
|
const explicit = resolveExplicitPhysicalId(input, "BucketName");
|
|
5133
5137
|
if (explicit) try {
|
|
@@ -5468,10 +5472,32 @@ var SQSQueueProvider = class {
|
|
|
5468
5472
|
this.sqsClient = awsClients.sqs;
|
|
5469
5473
|
this.stsClient = awsClients.sts;
|
|
5470
5474
|
}
|
|
5475
|
+
generatedCreateName(_resourceType, logicalId, properties) {
|
|
5476
|
+
if (properties["QueueName"]) return void 0;
|
|
5477
|
+
return generateResourceName(logicalId, { maxLength: 80 });
|
|
5478
|
+
}
|
|
5479
|
+
async holderCreatedAt(_resourceType, physicalId) {
|
|
5480
|
+
const resp = await this.sqsClient.send(new GetQueueAttributesCommand({
|
|
5481
|
+
QueueUrl: physicalId,
|
|
5482
|
+
AttributeNames: ["CreatedTimestamp"]
|
|
5483
|
+
}));
|
|
5484
|
+
const seconds = Number(resp.Attributes?.["CreatedTimestamp"]);
|
|
5485
|
+
return Number.isFinite(seconds) && seconds > 0 ? seconds * 1e3 : void 0;
|
|
5486
|
+
}
|
|
5487
|
+
async lookupNames(_resourceType, names) {
|
|
5488
|
+
return lookupEachName(names, "sqs:GetQueueUrl", 10, async (name) => {
|
|
5489
|
+
try {
|
|
5490
|
+
return (await this.sqsClient.send(new GetQueueUrlCommand({ QueueName: name }))).QueueUrl;
|
|
5491
|
+
} catch (err) {
|
|
5492
|
+
if (err instanceof QueueDoesNotExist) return void 0;
|
|
5493
|
+
throw err;
|
|
5494
|
+
}
|
|
5495
|
+
});
|
|
5496
|
+
}
|
|
5471
5497
|
async create(logicalId, resourceType, properties) {
|
|
5472
5498
|
this.logger.debug(`Creating SQS queue ${logicalId}`);
|
|
5473
5499
|
const desiredTags = refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId);
|
|
5474
|
-
const queueName = properties["QueueName"] ||
|
|
5500
|
+
const queueName = properties["QueueName"] || this.generatedCreateName(resourceType, logicalId, properties);
|
|
5475
5501
|
try {
|
|
5476
5502
|
const attributes = {};
|
|
5477
5503
|
for (const [cdkKey, sqsKey] of Object.entries(CDK_TO_SQS_ATTRIBUTES)) if (properties[cdkKey] !== void 0) {
|
|
@@ -6210,7 +6236,7 @@ var SNSTopicProvider = class {
|
|
|
6210
6236
|
const warn = (message) => this.logger.warn(maskSecrets(message));
|
|
6211
6237
|
this.logger.debug(`Creating SNS topic ${logicalId}`);
|
|
6212
6238
|
const desiredTags = refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId);
|
|
6213
|
-
const topicName = properties["TopicName"] ||
|
|
6239
|
+
const topicName = properties["TopicName"] || this.generatedCreateName(resourceType, logicalId, properties);
|
|
6214
6240
|
let leftBehindArn;
|
|
6215
6241
|
try {
|
|
6216
6242
|
const topicAttributes = {};
|
|
@@ -6535,6 +6561,10 @@ var SNSTopicProvider = class {
|
|
|
6535
6561
|
getDriftUnknownPaths() {
|
|
6536
6562
|
return [];
|
|
6537
6563
|
}
|
|
6564
|
+
generatedCreateName(_resourceType, logicalId, properties) {
|
|
6565
|
+
if (properties["TopicName"]) return void 0;
|
|
6566
|
+
return generateResourceName(logicalId, { maxLength: 256 });
|
|
6567
|
+
}
|
|
6538
6568
|
async import(input) {
|
|
6539
6569
|
if (input.knownPhysicalId) try {
|
|
6540
6570
|
await this.snsClient.send(new GetTopicAttributesCommand({ TopicArn: input.knownPhysicalId }));
|
|
@@ -11811,12 +11841,45 @@ var LogsLogGroupProvider = class {
|
|
|
11811
11841
|
wrapMaskedError(mask, error, build) {
|
|
11812
11842
|
return wrapMaskedAwsError(mask, error, build);
|
|
11813
11843
|
}
|
|
11814
|
-
|
|
11815
|
-
|
|
11816
|
-
|
|
11844
|
+
generatedCreateName(_resourceType, logicalId, properties) {
|
|
11845
|
+
if (properties["LogGroupName"]) return void 0;
|
|
11846
|
+
return `/cdkd/${generateResourceName(logicalId, {
|
|
11817
11847
|
maxLength: 506,
|
|
11818
11848
|
allowedPattern: /[^a-zA-Z0-9-/_]/g
|
|
11819
11849
|
})}`;
|
|
11850
|
+
}
|
|
11851
|
+
async holderCreatedAt(_resourceType, physicalId) {
|
|
11852
|
+
const group = (await this.logsClient.send(new DescribeLogGroupsCommand({ logGroupNamePrefix: physicalId }))).logGroups?.find((g) => g.logGroupName === physicalId);
|
|
11853
|
+
return typeof group?.creationTime === "number" ? group.creationTime : void 0;
|
|
11854
|
+
}
|
|
11855
|
+
async lookupNames(_resourceType, names) {
|
|
11856
|
+
try {
|
|
11857
|
+
const found = /* @__PURE__ */ new Map();
|
|
11858
|
+
const wanted = new Set(names);
|
|
11859
|
+
await Promise.all(chunks(names, 50).map((chunk) => withApiLimit("logs:DescribeLogGroups", 3, async () => {
|
|
11860
|
+
const resp = await this.logsClient.send(new DescribeLogGroupsCommand({ logGroupIdentifiers: chunk }));
|
|
11861
|
+
for (const group of resp.logGroups ?? []) {
|
|
11862
|
+
const name = group.logGroupName;
|
|
11863
|
+
if (name !== void 0 && wanted.has(name)) found.set(name, name);
|
|
11864
|
+
}
|
|
11865
|
+
})));
|
|
11866
|
+
return found;
|
|
11867
|
+
} catch (err) {
|
|
11868
|
+
const name = err?.name;
|
|
11869
|
+
if (!isAccessDeniedError(err) && name !== "InvalidParameterException" && name !== "ValidationException") throw err;
|
|
11870
|
+
}
|
|
11871
|
+
return lookupEachName(names, "logs:DescribeLogGroups", 3, async (logGroupName) => {
|
|
11872
|
+
try {
|
|
11873
|
+
return (await this.logsClient.send(new DescribeLogGroupsCommand({ logGroupNamePrefix: logGroupName }))).logGroups?.some((g) => g.logGroupName === logGroupName) ? logGroupName : void 0;
|
|
11874
|
+
} catch (err) {
|
|
11875
|
+
if (err instanceof ResourceNotFoundException$5) return void 0;
|
|
11876
|
+
throw err;
|
|
11877
|
+
}
|
|
11878
|
+
});
|
|
11879
|
+
}
|
|
11880
|
+
async create(logicalId, resourceType, properties, context) {
|
|
11881
|
+
this.logger.debug(`Creating log group ${logicalId}`);
|
|
11882
|
+
const logGroupName = properties["LogGroupName"] || this.generatedCreateName(resourceType, logicalId, properties);
|
|
11820
11883
|
const desiredTags = refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId);
|
|
11821
11884
|
let leftBehind = false;
|
|
11822
11885
|
try {
|
|
@@ -12216,7 +12279,7 @@ var CloudWatchAlarmProvider = class {
|
|
|
12216
12279
|
async create(logicalId, resourceType, properties) {
|
|
12217
12280
|
this.logger.debug(`Creating CloudWatch alarm ${logicalId}`);
|
|
12218
12281
|
const desiredTags = refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId);
|
|
12219
|
-
const alarmName = properties["AlarmName"] ||
|
|
12282
|
+
const alarmName = properties["AlarmName"] || this.generatedCreateName(resourceType, logicalId, properties);
|
|
12220
12283
|
try {
|
|
12221
12284
|
const createParams = this.buildAlarmParams(alarmName, properties);
|
|
12222
12285
|
if (desiredTags.length > 0) createParams.Tags = desiredTags.map(({ Key, Value }) => ({
|
|
@@ -12234,8 +12297,9 @@ var CloudWatchAlarmProvider = class {
|
|
|
12234
12297
|
throw new ProvisioningError(`Failed to create CloudWatch alarm ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, void 0, cause);
|
|
12235
12298
|
}
|
|
12236
12299
|
}
|
|
12237
|
-
async update(logicalId, physicalId, resourceType, properties, previousProperties) {
|
|
12300
|
+
async update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
|
|
12238
12301
|
this.logger.debug(`Updating CloudWatch alarm ${logicalId}: ${physicalId}`);
|
|
12302
|
+
assertRegionMatch(context?.expectedRegion ? await this.cloudWatchClient.config.region() : void 0, context?.expectedRegion, resourceType, logicalId, physicalId, "pre-update");
|
|
12239
12303
|
refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId, physicalId);
|
|
12240
12304
|
try {
|
|
12241
12305
|
await this.sendWithThrottleRetry("PutMetricAlarm", logicalId, () => this.cloudWatchClient.send(new PutMetricAlarmCommand(this.buildAlarmParams(physicalId, properties))));
|
|
@@ -12428,6 +12492,26 @@ var CloudWatchAlarmProvider = class {
|
|
|
12428
12492
|
}
|
|
12429
12493
|
return result;
|
|
12430
12494
|
}
|
|
12495
|
+
generatedCreateName(_resourceType, logicalId, properties) {
|
|
12496
|
+
if (properties["AlarmName"]) return void 0;
|
|
12497
|
+
return generateResourceName(logicalId, { maxLength: 256 });
|
|
12498
|
+
}
|
|
12499
|
+
async lookupNames(_resourceType, names) {
|
|
12500
|
+
const wanted = new Set(names);
|
|
12501
|
+
const found = /* @__PURE__ */ new Map();
|
|
12502
|
+
await Promise.all(chunks(names, 100).map((chunk) => withApiLimit("cloudwatch:DescribeAlarms", 3, async () => {
|
|
12503
|
+
const resp = await this.cloudWatchClient.send(new DescribeAlarmsCommand({
|
|
12504
|
+
AlarmNames: chunk,
|
|
12505
|
+
AlarmTypes: ["MetricAlarm", "CompositeAlarm"],
|
|
12506
|
+
MaxRecords: 100
|
|
12507
|
+
}));
|
|
12508
|
+
for (const alarm of [...resp.MetricAlarms ?? [], ...resp.CompositeAlarms ?? []]) {
|
|
12509
|
+
const name = alarm.AlarmName;
|
|
12510
|
+
if (name !== void 0 && wanted.has(name)) found.set(name, name);
|
|
12511
|
+
}
|
|
12512
|
+
})));
|
|
12513
|
+
return found;
|
|
12514
|
+
}
|
|
12431
12515
|
async import(input) {
|
|
12432
12516
|
const explicit = resolveExplicitPhysicalId(input, "AlarmName");
|
|
12433
12517
|
if (explicit) try {
|
|
@@ -13417,7 +13501,7 @@ var EventBridgeRuleProvider = class {
|
|
|
13417
13501
|
const mask = maskerOrIdentity(context?.maskSecrets);
|
|
13418
13502
|
this.logger.debug(`Creating EventBridge rule ${logicalId}`);
|
|
13419
13503
|
const desiredTags = refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId);
|
|
13420
|
-
const ruleName = properties["Name"] ||
|
|
13504
|
+
const ruleName = properties["Name"] || this.generatedCreateName(resourceType, logicalId, properties);
|
|
13421
13505
|
const targets = properties["Targets"];
|
|
13422
13506
|
let leftLiveArn;
|
|
13423
13507
|
try {
|
|
@@ -13646,6 +13730,43 @@ var EventBridgeRuleProvider = class {
|
|
|
13646
13730
|
}
|
|
13647
13731
|
return result;
|
|
13648
13732
|
}
|
|
13733
|
+
generatedCreateName(_resourceType, logicalId, properties) {
|
|
13734
|
+
if (properties["Name"]) return void 0;
|
|
13735
|
+
return generateResourceName(logicalId, { maxLength: 64 });
|
|
13736
|
+
}
|
|
13737
|
+
lookupNeedsResolvedProperties(_resourceType, properties) {
|
|
13738
|
+
const bus = properties["EventBusName"];
|
|
13739
|
+
return bus !== void 0 && bus !== null && bus !== "" && typeof bus !== "string";
|
|
13740
|
+
}
|
|
13741
|
+
async lookupNames(_resourceType, names, context) {
|
|
13742
|
+
const busOf = (name) => {
|
|
13743
|
+
const bus = context.propertiesByName.get(name)?.["EventBusName"];
|
|
13744
|
+
if (bus === void 0 || bus === null || bus === "") return void 0;
|
|
13745
|
+
if (typeof bus !== "string") throw new Error(`EventBusName of rule ${name} is not resolved`);
|
|
13746
|
+
return bus;
|
|
13747
|
+
};
|
|
13748
|
+
const byBus = /* @__PURE__ */ new Map();
|
|
13749
|
+
for (const name of names) {
|
|
13750
|
+
const bus = busOf(name);
|
|
13751
|
+
byBus.set(bus, [...byBus.get(bus) ?? [], name]);
|
|
13752
|
+
}
|
|
13753
|
+
const found = /* @__PURE__ */ new Map();
|
|
13754
|
+
await Promise.all([...byBus].map(async ([bus, group]) => {
|
|
13755
|
+
const each = await lookupEachName(group, "events:DescribeRule", 5, async (name) => {
|
|
13756
|
+
try {
|
|
13757
|
+
return (await this.eventBridgeClient.send(new DescribeRuleCommand({
|
|
13758
|
+
Name: name,
|
|
13759
|
+
...bus !== void 0 && { EventBusName: bus }
|
|
13760
|
+
}))).Arn;
|
|
13761
|
+
} catch (err) {
|
|
13762
|
+
if (err instanceof ResourceNotFoundException$2) return void 0;
|
|
13763
|
+
throw err;
|
|
13764
|
+
}
|
|
13765
|
+
});
|
|
13766
|
+
for (const [name, arn] of each) found.set(name, arn);
|
|
13767
|
+
}));
|
|
13768
|
+
return found;
|
|
13769
|
+
}
|
|
13649
13770
|
async import(input) {
|
|
13650
13771
|
const eventBusName = input.properties["EventBusName"];
|
|
13651
13772
|
if (input.knownPhysicalId) try {
|
|
@@ -21670,7 +21791,7 @@ var StepFunctionsProvider = class {
|
|
|
21670
21791
|
async create(logicalId, resourceType, properties) {
|
|
21671
21792
|
this.logger.debug(`Creating Step Functions state machine ${logicalId}`);
|
|
21672
21793
|
const desiredTags = refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId);
|
|
21673
|
-
const stateMachineName = properties["StateMachineName"] ||
|
|
21794
|
+
const stateMachineName = properties["StateMachineName"] || this.generatedCreateName(resourceType, logicalId, properties);
|
|
21674
21795
|
const roleArn = properties["RoleArn"];
|
|
21675
21796
|
if (!roleArn) throw new ProvisioningError(`RoleArn is required for Step Functions state machine ${logicalId}`, resourceType, logicalId);
|
|
21676
21797
|
try {
|
|
@@ -21809,9 +21930,18 @@ var StepFunctionsProvider = class {
|
|
|
21809
21930
|
}
|
|
21810
21931
|
return result;
|
|
21811
21932
|
}
|
|
21933
|
+
generatedCreateName(_resourceType, logicalId, properties) {
|
|
21934
|
+
if (properties["StateMachineName"]) return void 0;
|
|
21935
|
+
return generateResourceName(logicalId, { maxLength: 80 });
|
|
21936
|
+
}
|
|
21937
|
+
async holderCreatedAt(_resourceType, physicalId) {
|
|
21938
|
+
const resp = await this.getClient().send(new DescribeStateMachineCommand({ stateMachineArn: physicalId }));
|
|
21939
|
+
return resp.creationDate instanceof Date ? resp.creationDate.getTime() : void 0;
|
|
21940
|
+
}
|
|
21812
21941
|
async import(input) {
|
|
21813
21942
|
if (input.knownPhysicalId) try {
|
|
21814
21943
|
const resp = await this.getClient().send(new DescribeStateMachineCommand({ stateMachineArn: input.knownPhysicalId }));
|
|
21944
|
+
if (resp.status === "DELETING") return null;
|
|
21815
21945
|
return {
|
|
21816
21946
|
physicalId: input.knownPhysicalId,
|
|
21817
21947
|
attributes: definedAttributes({
|
|
@@ -22217,7 +22347,7 @@ var ECSProvider = class {
|
|
|
22217
22347
|
log.debug(`Creating ECS cluster ${logicalId}`);
|
|
22218
22348
|
const desiredTags = refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId);
|
|
22219
22349
|
const client = this.getClient();
|
|
22220
|
-
const clusterName = properties["ClusterName"] ||
|
|
22350
|
+
const clusterName = properties["ClusterName"] || this.generatedCreateName(resourceType, logicalId, properties);
|
|
22221
22351
|
try {
|
|
22222
22352
|
const cluster = (await client.send(new CreateClusterCommand({
|
|
22223
22353
|
clusterName,
|
|
@@ -23320,6 +23450,25 @@ var ECSProvider = class {
|
|
|
23320
23450
|
result["Tags"] = normalizeAwsTagsToCfn(resp.tags);
|
|
23321
23451
|
return result;
|
|
23322
23452
|
}
|
|
23453
|
+
generatedCreateName(resourceType, logicalId, properties) {
|
|
23454
|
+
if (resourceType !== "AWS::ECS::Cluster" || properties["ClusterName"]) return void 0;
|
|
23455
|
+
return generateResourceName(logicalId, { maxLength: 255 });
|
|
23456
|
+
}
|
|
23457
|
+
async lookupNames(resourceType, names) {
|
|
23458
|
+
const found = /* @__PURE__ */ new Map();
|
|
23459
|
+
if (resourceType !== "AWS::ECS::Cluster") return found;
|
|
23460
|
+
const wanted = new Set(names);
|
|
23461
|
+
await Promise.all(chunks(names, 100).map((chunk) => withApiLimit("ecs:DescribeClusters", 5, async () => {
|
|
23462
|
+
const resp = await this.getClient().send(new DescribeClustersCommand({ clusters: chunk }));
|
|
23463
|
+
const unanswered = (resp.failures ?? []).find((f) => f.reason !== "MISSING");
|
|
23464
|
+
if (unanswered !== void 0) throw new Error(`DescribeClusters did not answer: ${displaySafe(unanswered.reason ?? "no reason given")}`);
|
|
23465
|
+
for (const cluster of resp.clusters ?? []) {
|
|
23466
|
+
const name = cluster.clusterName;
|
|
23467
|
+
if (name !== void 0 && wanted.has(name) && cluster.status !== "INACTIVE") found.set(name, name);
|
|
23468
|
+
}
|
|
23469
|
+
})));
|
|
23470
|
+
return found;
|
|
23471
|
+
}
|
|
23323
23472
|
async import(input) {
|
|
23324
23473
|
switch (input.resourceType) {
|
|
23325
23474
|
case "AWS::ECS::Cluster": return this.importCluster(input);
|
|
@@ -24625,6 +24774,31 @@ var ELBv2Provider = class {
|
|
|
24625
24774
|
this.logger.debug(`ELBv2 DescribeTags(${arn}) failed: ${describeAwsFailure(err).detail}`);
|
|
24626
24775
|
}
|
|
24627
24776
|
}
|
|
24777
|
+
generatedCreateName(resourceType, logicalId, properties) {
|
|
24778
|
+
if (resourceType !== "AWS::ElasticLoadBalancingV2::LoadBalancer" && resourceType !== "AWS::ElasticLoadBalancingV2::TargetGroup") return;
|
|
24779
|
+
const declared = properties["Name"];
|
|
24780
|
+
if (declared !== void 0 && declared !== null && declared !== "") return void 0;
|
|
24781
|
+
return sentElbv2Name(properties, logicalId);
|
|
24782
|
+
}
|
|
24783
|
+
async holderCreatedAt(resourceType, physicalId) {
|
|
24784
|
+
if (resourceType !== "AWS::ElasticLoadBalancingV2::LoadBalancer") return void 0;
|
|
24785
|
+
const created = (await this.getClient().send(new DescribeLoadBalancersCommand({ LoadBalancerArns: [physicalId] }))).LoadBalancers?.[0]?.CreatedTime;
|
|
24786
|
+
return created instanceof Date ? created.getTime() : void 0;
|
|
24787
|
+
}
|
|
24788
|
+
async lookupNames(resourceType, names) {
|
|
24789
|
+
const lb = resourceType === "AWS::ElasticLoadBalancingV2::LoadBalancer";
|
|
24790
|
+
if (!lb && resourceType !== "AWS::ElasticLoadBalancingV2::TargetGroup") return /* @__PURE__ */ new Map();
|
|
24791
|
+
return lookupEachName(names, lb ? "elbv2:DescribeLoadBalancers" : "elbv2:DescribeTargetGroups", 3, async (name) => {
|
|
24792
|
+
try {
|
|
24793
|
+
if (lb) return onlyNamedMatch((await this.getClient().send(new DescribeLoadBalancersCommand({ Names: [name] }))).LoadBalancers, (l) => l.LoadBalancerArn, "load balancer").arn;
|
|
24794
|
+
return onlyNamedMatch((await this.getClient().send(new DescribeTargetGroupsCommand({ Names: [name] }))).TargetGroups, (t) => t.TargetGroupArn, "target group").arn;
|
|
24795
|
+
} catch (err) {
|
|
24796
|
+
const errName = err.name;
|
|
24797
|
+
if (errName === "LoadBalancerNotFoundException" || errName === "TargetGroupNotFoundException") return;
|
|
24798
|
+
throw err;
|
|
24799
|
+
}
|
|
24800
|
+
});
|
|
24801
|
+
}
|
|
24628
24802
|
async import(input) {
|
|
24629
24803
|
switch (input.resourceType) {
|
|
24630
24804
|
case "AWS::ElasticLoadBalancingV2::LoadBalancer": return this.importLoadBalancer(input);
|
|
@@ -34077,7 +34251,8 @@ var KMSProvider = class {
|
|
|
34077
34251
|
default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId);
|
|
34078
34252
|
}
|
|
34079
34253
|
}
|
|
34080
|
-
async update(logicalId, physicalId, resourceType, properties, _previousProperties) {
|
|
34254
|
+
async update(logicalId, physicalId, resourceType, properties, _previousProperties, context) {
|
|
34255
|
+
assertRegionMatch(context?.expectedRegion ? await this.getClient().config.region() : void 0, context?.expectedRegion, resourceType, logicalId, physicalId, "pre-update");
|
|
34081
34256
|
switch (resourceType) {
|
|
34082
34257
|
case "AWS::KMS::Key": return this.updateKey(logicalId, physicalId, resourceType, properties, _previousProperties);
|
|
34083
34258
|
case "AWS::KMS::Alias": return this.updateAlias(logicalId, physicalId, resourceType, properties);
|
|
@@ -41399,8 +41574,9 @@ var CodeBuildProvider = class {
|
|
|
41399
41574
|
throw new ProvisioningError(`Failed to create CodeBuild Project ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, void 0, cause);
|
|
41400
41575
|
}
|
|
41401
41576
|
}
|
|
41402
|
-
async update(logicalId, physicalId, resourceType, properties, previousProperties) {
|
|
41577
|
+
async update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
|
|
41403
41578
|
this.logger.debug(`Updating CodeBuild Project ${logicalId}: ${physicalId}`);
|
|
41579
|
+
assertRegionMatch(context?.expectedRegion ? await this.getClient().config.region() : void 0, context?.expectedRegion, resourceType, logicalId, physicalId, "pre-update");
|
|
41404
41580
|
try {
|
|
41405
41581
|
const input = this.mapProperties(logicalId, properties);
|
|
41406
41582
|
input.name = physicalId;
|
|
@@ -43690,8 +43866,9 @@ var ECRProvider = class {
|
|
|
43690
43866
|
throw thrown;
|
|
43691
43867
|
}
|
|
43692
43868
|
}
|
|
43693
|
-
async update(logicalId, physicalId, resourceType, properties, previousProperties) {
|
|
43869
|
+
async update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
|
|
43694
43870
|
this.logger.debug(`Updating ECR Repository ${logicalId} (${physicalId})`);
|
|
43871
|
+
assertRegionMatch(context?.expectedRegion ? await this.getClient().config.region() : void 0, context?.expectedRegion, resourceType, logicalId, physicalId, "pre-update");
|
|
43695
43872
|
refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId, physicalId);
|
|
43696
43873
|
try {
|
|
43697
43874
|
const newScanConfig = properties["ImageScanningConfiguration"];
|
|
@@ -44046,6 +44223,18 @@ var NestedStackProvider = class {
|
|
|
44046
44223
|
const failure = new Error(nestedStackChildFailureMessage(plainOrDescribed(childStackName, "stack name"), childResult.errorCount, childResult.skippedCount, childResult.interrupted, inspect.command, withheldTargetClause(inspect, "stack", "cdkd state show", "The child stack's name") + (accountClause === "" ? "" : ` ${accountClause}`)));
|
|
44047
44224
|
throw markNonRetryable(failure);
|
|
44048
44225
|
}
|
|
44226
|
+
const orphanSkips = childResult.journaledOrphanSkips;
|
|
44227
|
+
if (deleteContext?.stackDestroy === true && childResult.stateDeleted && orphanSkips > 0) {
|
|
44228
|
+
const slot = ctx.childUnaddressed;
|
|
44229
|
+
if (slot) slot.last = {
|
|
44230
|
+
deleteSkipped: orphanSkips,
|
|
44231
|
+
updatePartial: 0
|
|
44232
|
+
};
|
|
44233
|
+
return {
|
|
44234
|
+
outcome: "deleted",
|
|
44235
|
+
leftInPlace: `nested stack ${plainOrDescribed(childStackName, "stack name")} left ${orphanSkips} resource(s) a failed deploy created in AWS`
|
|
44236
|
+
};
|
|
44237
|
+
}
|
|
44049
44238
|
if (childResult.skippedCount > 0 || childResult.interrupted) {
|
|
44050
44239
|
const causes = [];
|
|
44051
44240
|
if (childResult.skippedCount > 0) causes.push(`skipped ${childResult.skippedCount} resource(s)`);
|
|
@@ -44065,6 +44254,7 @@ var NestedStackProvider = class {
|
|
|
44065
44254
|
const childEngine = new DeployEngine(parentCtx.stateBackend, parentCtx.lockManager, parentCtx.dagBuilder, parentCtx.diffCalculator, parentCtx.providerRegistry, {
|
|
44066
44255
|
...parentCtx.options ?? {},
|
|
44067
44256
|
parameters: childParameters,
|
|
44257
|
+
onDestructivePlan: void 0,
|
|
44068
44258
|
...inheritedSecrets && hasMaskableValues(inheritedSecrets) && { inheritedSecrets },
|
|
44069
44259
|
...passedClasses && { passedParameterClasses: passedClasses },
|
|
44070
44260
|
passedNoEchoParameters: passedNoEchoParametersOf(inheritedSecrets),
|
|
@@ -44574,4 +44764,4 @@ var ACMCertificateProvider = class {
|
|
|
44574
44764
|
|
|
44575
44765
|
//#endregion
|
|
44576
44766
|
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, LambdaPermissionProvider, LambdaUrlProvider, 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 };
|
|
44577
|
-
//# sourceMappingURL=provider-classes-
|
|
44767
|
+
//# sourceMappingURL=provider-classes-DmZ0J68L.js.map
|