@go-to-k/cdkd 0.296.28 → 0.296.29
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-UKRukGI_.js} +3 -3
- package/dist/{asg-provider-B3zcS87C.js.map → asg-provider-UKRukGI_.js.map} +1 -1
- package/dist/cli.js +2 -2
- package/dist/{deploy-engine-D4FdwPCi.js → deploy-engine-Bt-8KvUj.js} +1913 -57
- package/dist/deploy-engine-Bt-8KvUj.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-BBFYFBLx.js} +3 -3
- package/dist/{iam-role-provider-0U4kMuzh.js.map → iam-role-provider-BBFYFBLx.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-B9InVgs6.js} +3 -3
- package/dist/{neptune-provider-DF6Eh4Tl.js.map → neptune-provider-B9InVgs6.js.map} +1 -1
- package/dist/{program-v_QNBjtZ.js → program-CN7Dqb3j.js} +513 -30
- package/dist/program-CN7Dqb3j.js.map +1 -0
- package/dist/{provider-classes-wbKBBEol.js → provider-classes-eEgFT-Vt.js} +196 -22
- package/dist/provider-classes-eEgFT-Vt.js.map +1 -0
- package/dist/{rds-provider-BfQsw4hw.js → rds-provider-DgbVxaPP.js} +3 -3
- package/dist/{rds-provider-BfQsw4hw.js.map → rds-provider-DgbVxaPP.js.map} +1 -1
- package/dist/{version-B0JEGOLV.js → version-DyV_xwRX.js} +2 -2
- package/dist/{version-B0JEGOLV.js.map → version-DyV_xwRX.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 configStringRefusal, $i as refuseMalformedNestedChildOutputs, $n as DBPROXY_TAGS_WHAT, $r as s3BucketDualStackDomainName, Ao as hasMaskableValues, Ar as observeThenDisableInstanceApiTermination, B as beginDeleteWait, Co as passedNoEchoParametersOf, Cr as deleteSkipReason, Er as markWaitAbandoned, Et as withNestedStackContext, Fa as withoutSilentDropProperties, G as DELETE_INDEX_WAIT_PROCEED_NOTE, Ga as coerceWarmThroughput$1, Gc as canonicalizeRegion, Go as dynamicReferenceTokens, H as deleteBudgetKey, Hc as decodeListingKey, Ho as redactSecretsForState, Hs as rewriteTemplateAssetReferences, It as awaitInFlightSibling, J as waitForIndexesSettled, Ja as toFiniteNumber, Jn as earliestDefined, K as INDEX_SETTLE_POLL_INTERVAL_MS, Ka as isWarmThroughputDecrease, Kc as derivePartitionAndUrlSuffix, Ls as stringifyValue, Mr as reEnableInstanceApiTermination, Na as findSilentDropProperties, Or as ec2InstanceProtectionSite, Q as isTruthyCfnBoolean, Qa as configIntegerRefusal, Qn as acquireIdempotencyToken, Qo as carriesSecretMask, Qr as s3BucketDomainName, R as DynamoDBGlobalTableProvider, Rt as getStackRecords, St as revertNestedChildFromJournal, Tr as isWaitAbandonedError, Tt as getCurrentNestedStackContext, U as resolveDynamoDbDeleteBudgetClock, V as compensateRemovedDeletionProtection, Vo as markSameGenerationBag, W as resolveDynamoDbDeleteBudgetMs, Wa as WARM_THROUGHPUT_MEMBERS, X as S3_AUTO_DELETE_OBJECTS_TAG, Xa as coerceCfnInteger, Xn as reserveStackCreateToken, Xr as isSettledInstanceState, Y as ECR_AUTO_DELETE_IMAGES_TAG, Ya as coerceCfnBoolean, Z as hasCdkAutoDeleteTag, Za as configBooleanRefusal, Zo as recoverMaskedOutput, Zr as s3BucketArn, a as findNestedTemplateTreeDefect, ai as getAccountInfo, al as resolveAssemblyPath, an as redactedDeleteAddressSkip, ar as tagPlanWarning, b as lookupEachName, br as unchangedBehindSecretReference, c as renderNestedTemplateTreeDefect, co as withRetry, do as sameLambdaFunctionAddress, ei as s3BucketRegionalDomainName, en as getCurrentProducerRegions, eo as readConfigString, er as DBPROXY_TAG_OPTIONS, et as markRefusedBeforeApplying, gr as getCurrentResourceSecrets, hi as parseWebACLArn, il as renderAssemblyPathEscape, in as redactedDeleteAddressFields, io as requireConfigString, ir as tagMapAsList, ja as withheldAccountClause, jr as reDisableInstanceApiTermination, kr as isTerminationProtectionPropagationError, lo as canonicalLambdaFunctionName, nl as describeFileReadFailure, nn as REDACTED_DELETE_ADDRESS_SKIP_REASON, no as requireConfigArray, nr as readTagList, o as isAbsoluteAssetPath, or as definedAttributes, q as deleteTableWithIndexBusyRetry, qa as toCfnInteger, rl as displayAssemblyPath, rn as isRedactedRecordedValue, ro as requireConfigObject, rr as refuseMalformedDesiredTags, s as listNestedTemplateRows, sr as stringifyIfAssigned, t as DeployEngine, ti as s3BucketWebsiteUrl, to as replayWarn, tr as planTagDiff, uo as lambdaFunctionNameForMask, v as chunks, vi as passedParameterClassesOf, wi as accountArgs, wr as withIndeterminateGuard, x as withApiLimit, y as isAccessDeniedError, ya as refuseMalformedResourcesForDestroy, yr as slowCcOperationTimeoutMs, yt as getNestedRevertRun, z as DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS } from "./deploy-engine-Bt-8KvUj.js";
|
|
6
|
+
import { n as collectInlinePolicyNamesManagedBySiblings, r as IamCreateClientCache, t as IAMRoleProvider } from "./iam-role-provider-BBFYFBLx.js";
|
|
7
|
+
import { a as canonicalizeIpProtocolValue, i as resolveSecretDerivedPrincipals, n as runDestroyForStack, o as resolvedResourceTimeoutMs, r as isResolvableSecretPrincipalList, t as canonicalizeIpv4Cidr } from "./program-CN7Dqb3j.js";
|
|
8
|
+
import { RDSProvider } from "./rds-provider-DgbVxaPP.js";
|
|
9
|
+
import { NeptuneProvider } from "./neptune-provider-B9InVgs6.js";
|
|
10
|
+
import { ASGProvider } from "./asg-provider-UKRukGI_.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 }) => ({
|
|
@@ -12428,6 +12491,26 @@ var CloudWatchAlarmProvider = class {
|
|
|
12428
12491
|
}
|
|
12429
12492
|
return result;
|
|
12430
12493
|
}
|
|
12494
|
+
generatedCreateName(_resourceType, logicalId, properties) {
|
|
12495
|
+
if (properties["AlarmName"]) return void 0;
|
|
12496
|
+
return generateResourceName(logicalId, { maxLength: 256 });
|
|
12497
|
+
}
|
|
12498
|
+
async lookupNames(_resourceType, names) {
|
|
12499
|
+
const wanted = new Set(names);
|
|
12500
|
+
const found = /* @__PURE__ */ new Map();
|
|
12501
|
+
await Promise.all(chunks(names, 100).map((chunk) => withApiLimit("cloudwatch:DescribeAlarms", 3, async () => {
|
|
12502
|
+
const resp = await this.cloudWatchClient.send(new DescribeAlarmsCommand({
|
|
12503
|
+
AlarmNames: chunk,
|
|
12504
|
+
AlarmTypes: ["MetricAlarm", "CompositeAlarm"],
|
|
12505
|
+
MaxRecords: 100
|
|
12506
|
+
}));
|
|
12507
|
+
for (const alarm of [...resp.MetricAlarms ?? [], ...resp.CompositeAlarms ?? []]) {
|
|
12508
|
+
const name = alarm.AlarmName;
|
|
12509
|
+
if (name !== void 0 && wanted.has(name)) found.set(name, name);
|
|
12510
|
+
}
|
|
12511
|
+
})));
|
|
12512
|
+
return found;
|
|
12513
|
+
}
|
|
12431
12514
|
async import(input) {
|
|
12432
12515
|
const explicit = resolveExplicitPhysicalId(input, "AlarmName");
|
|
12433
12516
|
if (explicit) try {
|
|
@@ -13417,7 +13500,7 @@ var EventBridgeRuleProvider = class {
|
|
|
13417
13500
|
const mask = maskerOrIdentity(context?.maskSecrets);
|
|
13418
13501
|
this.logger.debug(`Creating EventBridge rule ${logicalId}`);
|
|
13419
13502
|
const desiredTags = refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId);
|
|
13420
|
-
const ruleName = properties["Name"] ||
|
|
13503
|
+
const ruleName = properties["Name"] || this.generatedCreateName(resourceType, logicalId, properties);
|
|
13421
13504
|
const targets = properties["Targets"];
|
|
13422
13505
|
let leftLiveArn;
|
|
13423
13506
|
try {
|
|
@@ -13646,6 +13729,43 @@ var EventBridgeRuleProvider = class {
|
|
|
13646
13729
|
}
|
|
13647
13730
|
return result;
|
|
13648
13731
|
}
|
|
13732
|
+
generatedCreateName(_resourceType, logicalId, properties) {
|
|
13733
|
+
if (properties["Name"]) return void 0;
|
|
13734
|
+
return generateResourceName(logicalId, { maxLength: 64 });
|
|
13735
|
+
}
|
|
13736
|
+
lookupNeedsResolvedProperties(_resourceType, properties) {
|
|
13737
|
+
const bus = properties["EventBusName"];
|
|
13738
|
+
return bus !== void 0 && bus !== null && bus !== "" && typeof bus !== "string";
|
|
13739
|
+
}
|
|
13740
|
+
async lookupNames(_resourceType, names, context) {
|
|
13741
|
+
const busOf = (name) => {
|
|
13742
|
+
const bus = context.propertiesByName.get(name)?.["EventBusName"];
|
|
13743
|
+
if (bus === void 0 || bus === null || bus === "") return void 0;
|
|
13744
|
+
if (typeof bus !== "string") throw new Error(`EventBusName of rule ${name} is not resolved`);
|
|
13745
|
+
return bus;
|
|
13746
|
+
};
|
|
13747
|
+
const byBus = /* @__PURE__ */ new Map();
|
|
13748
|
+
for (const name of names) {
|
|
13749
|
+
const bus = busOf(name);
|
|
13750
|
+
byBus.set(bus, [...byBus.get(bus) ?? [], name]);
|
|
13751
|
+
}
|
|
13752
|
+
const found = /* @__PURE__ */ new Map();
|
|
13753
|
+
await Promise.all([...byBus].map(async ([bus, group]) => {
|
|
13754
|
+
const each = await lookupEachName(group, "events:DescribeRule", 5, async (name) => {
|
|
13755
|
+
try {
|
|
13756
|
+
return (await this.eventBridgeClient.send(new DescribeRuleCommand({
|
|
13757
|
+
Name: name,
|
|
13758
|
+
...bus !== void 0 && { EventBusName: bus }
|
|
13759
|
+
}))).Arn;
|
|
13760
|
+
} catch (err) {
|
|
13761
|
+
if (err instanceof ResourceNotFoundException$2) return void 0;
|
|
13762
|
+
throw err;
|
|
13763
|
+
}
|
|
13764
|
+
});
|
|
13765
|
+
for (const [name, arn] of each) found.set(name, arn);
|
|
13766
|
+
}));
|
|
13767
|
+
return found;
|
|
13768
|
+
}
|
|
13649
13769
|
async import(input) {
|
|
13650
13770
|
const eventBusName = input.properties["EventBusName"];
|
|
13651
13771
|
if (input.knownPhysicalId) try {
|
|
@@ -21670,7 +21790,7 @@ var StepFunctionsProvider = class {
|
|
|
21670
21790
|
async create(logicalId, resourceType, properties) {
|
|
21671
21791
|
this.logger.debug(`Creating Step Functions state machine ${logicalId}`);
|
|
21672
21792
|
const desiredTags = refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId);
|
|
21673
|
-
const stateMachineName = properties["StateMachineName"] ||
|
|
21793
|
+
const stateMachineName = properties["StateMachineName"] || this.generatedCreateName(resourceType, logicalId, properties);
|
|
21674
21794
|
const roleArn = properties["RoleArn"];
|
|
21675
21795
|
if (!roleArn) throw new ProvisioningError(`RoleArn is required for Step Functions state machine ${logicalId}`, resourceType, logicalId);
|
|
21676
21796
|
try {
|
|
@@ -21809,9 +21929,18 @@ var StepFunctionsProvider = class {
|
|
|
21809
21929
|
}
|
|
21810
21930
|
return result;
|
|
21811
21931
|
}
|
|
21932
|
+
generatedCreateName(_resourceType, logicalId, properties) {
|
|
21933
|
+
if (properties["StateMachineName"]) return void 0;
|
|
21934
|
+
return generateResourceName(logicalId, { maxLength: 80 });
|
|
21935
|
+
}
|
|
21936
|
+
async holderCreatedAt(_resourceType, physicalId) {
|
|
21937
|
+
const resp = await this.getClient().send(new DescribeStateMachineCommand({ stateMachineArn: physicalId }));
|
|
21938
|
+
return resp.creationDate instanceof Date ? resp.creationDate.getTime() : void 0;
|
|
21939
|
+
}
|
|
21812
21940
|
async import(input) {
|
|
21813
21941
|
if (input.knownPhysicalId) try {
|
|
21814
21942
|
const resp = await this.getClient().send(new DescribeStateMachineCommand({ stateMachineArn: input.knownPhysicalId }));
|
|
21943
|
+
if (resp.status === "DELETING") return null;
|
|
21815
21944
|
return {
|
|
21816
21945
|
physicalId: input.knownPhysicalId,
|
|
21817
21946
|
attributes: definedAttributes({
|
|
@@ -22217,7 +22346,7 @@ var ECSProvider = class {
|
|
|
22217
22346
|
log.debug(`Creating ECS cluster ${logicalId}`);
|
|
22218
22347
|
const desiredTags = refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId);
|
|
22219
22348
|
const client = this.getClient();
|
|
22220
|
-
const clusterName = properties["ClusterName"] ||
|
|
22349
|
+
const clusterName = properties["ClusterName"] || this.generatedCreateName(resourceType, logicalId, properties);
|
|
22221
22350
|
try {
|
|
22222
22351
|
const cluster = (await client.send(new CreateClusterCommand({
|
|
22223
22352
|
clusterName,
|
|
@@ -23320,6 +23449,25 @@ var ECSProvider = class {
|
|
|
23320
23449
|
result["Tags"] = normalizeAwsTagsToCfn(resp.tags);
|
|
23321
23450
|
return result;
|
|
23322
23451
|
}
|
|
23452
|
+
generatedCreateName(resourceType, logicalId, properties) {
|
|
23453
|
+
if (resourceType !== "AWS::ECS::Cluster" || properties["ClusterName"]) return void 0;
|
|
23454
|
+
return generateResourceName(logicalId, { maxLength: 255 });
|
|
23455
|
+
}
|
|
23456
|
+
async lookupNames(resourceType, names) {
|
|
23457
|
+
const found = /* @__PURE__ */ new Map();
|
|
23458
|
+
if (resourceType !== "AWS::ECS::Cluster") return found;
|
|
23459
|
+
const wanted = new Set(names);
|
|
23460
|
+
await Promise.all(chunks(names, 100).map((chunk) => withApiLimit("ecs:DescribeClusters", 5, async () => {
|
|
23461
|
+
const resp = await this.getClient().send(new DescribeClustersCommand({ clusters: chunk }));
|
|
23462
|
+
const unanswered = (resp.failures ?? []).find((f) => f.reason !== "MISSING");
|
|
23463
|
+
if (unanswered !== void 0) throw new Error(`DescribeClusters did not answer: ${displaySafe(unanswered.reason ?? "no reason given")}`);
|
|
23464
|
+
for (const cluster of resp.clusters ?? []) {
|
|
23465
|
+
const name = cluster.clusterName;
|
|
23466
|
+
if (name !== void 0 && wanted.has(name) && cluster.status !== "INACTIVE") found.set(name, name);
|
|
23467
|
+
}
|
|
23468
|
+
})));
|
|
23469
|
+
return found;
|
|
23470
|
+
}
|
|
23323
23471
|
async import(input) {
|
|
23324
23472
|
switch (input.resourceType) {
|
|
23325
23473
|
case "AWS::ECS::Cluster": return this.importCluster(input);
|
|
@@ -24625,6 +24773,31 @@ var ELBv2Provider = class {
|
|
|
24625
24773
|
this.logger.debug(`ELBv2 DescribeTags(${arn}) failed: ${describeAwsFailure(err).detail}`);
|
|
24626
24774
|
}
|
|
24627
24775
|
}
|
|
24776
|
+
generatedCreateName(resourceType, logicalId, properties) {
|
|
24777
|
+
if (resourceType !== "AWS::ElasticLoadBalancingV2::LoadBalancer" && resourceType !== "AWS::ElasticLoadBalancingV2::TargetGroup") return;
|
|
24778
|
+
const declared = properties["Name"];
|
|
24779
|
+
if (declared !== void 0 && declared !== null && declared !== "") return void 0;
|
|
24780
|
+
return sentElbv2Name(properties, logicalId);
|
|
24781
|
+
}
|
|
24782
|
+
async holderCreatedAt(resourceType, physicalId) {
|
|
24783
|
+
if (resourceType !== "AWS::ElasticLoadBalancingV2::LoadBalancer") return void 0;
|
|
24784
|
+
const created = (await this.getClient().send(new DescribeLoadBalancersCommand({ LoadBalancerArns: [physicalId] }))).LoadBalancers?.[0]?.CreatedTime;
|
|
24785
|
+
return created instanceof Date ? created.getTime() : void 0;
|
|
24786
|
+
}
|
|
24787
|
+
async lookupNames(resourceType, names) {
|
|
24788
|
+
const lb = resourceType === "AWS::ElasticLoadBalancingV2::LoadBalancer";
|
|
24789
|
+
if (!lb && resourceType !== "AWS::ElasticLoadBalancingV2::TargetGroup") return /* @__PURE__ */ new Map();
|
|
24790
|
+
return lookupEachName(names, lb ? "elbv2:DescribeLoadBalancers" : "elbv2:DescribeTargetGroups", 3, async (name) => {
|
|
24791
|
+
try {
|
|
24792
|
+
if (lb) return onlyNamedMatch((await this.getClient().send(new DescribeLoadBalancersCommand({ Names: [name] }))).LoadBalancers, (l) => l.LoadBalancerArn, "load balancer").arn;
|
|
24793
|
+
return onlyNamedMatch((await this.getClient().send(new DescribeTargetGroupsCommand({ Names: [name] }))).TargetGroups, (t) => t.TargetGroupArn, "target group").arn;
|
|
24794
|
+
} catch (err) {
|
|
24795
|
+
const errName = err.name;
|
|
24796
|
+
if (errName === "LoadBalancerNotFoundException" || errName === "TargetGroupNotFoundException") return;
|
|
24797
|
+
throw err;
|
|
24798
|
+
}
|
|
24799
|
+
});
|
|
24800
|
+
}
|
|
24628
24801
|
async import(input) {
|
|
24629
24802
|
switch (input.resourceType) {
|
|
24630
24803
|
case "AWS::ElasticLoadBalancingV2::LoadBalancer": return this.importLoadBalancer(input);
|
|
@@ -44065,6 +44238,7 @@ var NestedStackProvider = class {
|
|
|
44065
44238
|
const childEngine = new DeployEngine(parentCtx.stateBackend, parentCtx.lockManager, parentCtx.dagBuilder, parentCtx.diffCalculator, parentCtx.providerRegistry, {
|
|
44066
44239
|
...parentCtx.options ?? {},
|
|
44067
44240
|
parameters: childParameters,
|
|
44241
|
+
onDestructivePlan: void 0,
|
|
44068
44242
|
...inheritedSecrets && hasMaskableValues(inheritedSecrets) && { inheritedSecrets },
|
|
44069
44243
|
...passedClasses && { passedParameterClasses: passedClasses },
|
|
44070
44244
|
passedNoEchoParameters: passedNoEchoParametersOf(inheritedSecrets),
|
|
@@ -44574,4 +44748,4 @@ var ACMCertificateProvider = class {
|
|
|
44574
44748
|
|
|
44575
44749
|
//#endregion
|
|
44576
44750
|
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-
|
|
44751
|
+
//# sourceMappingURL=provider-classes-eEgFT-Vt.js.map
|