@go-to-k/cdkd 0.296.7 → 0.296.9
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-BU0YONBp.js → asg-provider-B0IrI6EW.js} +3 -3
- package/dist/{asg-provider-BU0YONBp.js.map → asg-provider-B0IrI6EW.js.map} +1 -1
- package/dist/cli.js +2 -2
- package/dist/{deploy-engine-wyaJUA8V.js → deploy-engine-B-oaHd2t.js} +142 -96
- package/dist/deploy-engine-B-oaHd2t.js.map +1 -0
- package/dist/{iam-policy-targets-td1X_kKN.js → iam-policy-targets-BREzwsG6.js} +9 -8
- package/dist/iam-policy-targets-BREzwsG6.js.map +1 -0
- package/dist/{iam-role-provider-obY72uH2.js → iam-role-provider-DsJM0NT3.js} +3 -3
- package/dist/{iam-role-provider-obY72uH2.js.map → iam-role-provider-DsJM0NT3.js.map} +1 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/{neptune-provider-C3f-vDOh.js → neptune-provider-DGaKBQxm.js} +3 -3
- package/dist/{neptune-provider-C3f-vDOh.js.map → neptune-provider-DGaKBQxm.js.map} +1 -1
- package/dist/{program-DEnDp4o0.js → program-DTXVCX29.js} +226 -121
- package/dist/program-DTXVCX29.js.map +1 -0
- package/dist/{provider-classes-CsF7Ia5F.js → provider-classes-y-yYsSvB.js} +137 -23
- package/dist/provider-classes-y-yYsSvB.js.map +1 -0
- package/dist/{rds-provider-Cf5P2so_.js → rds-provider-B0YTjZKU.js} +3 -3
- package/dist/{rds-provider-Cf5P2so_.js.map → rds-provider-B0YTjZKU.js.map} +1 -1
- package/dist/{version-LalLOhpQ.js → version-Dqnp1Xj8.js} +2 -2
- package/dist/{version-LalLOhpQ.js.map → version-Dqnp1Xj8.js.map} +1 -1
- package/package.json +1 -1
- package/dist/deploy-engine-wyaJUA8V.js.map +0 -1
- package/dist/iam-policy-targets-td1X_kKN.js.map +0 -1
- package/dist/program-DEnDp4o0.js.map +0 -1
- package/dist/provider-classes-CsF7Ia5F.js.map +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { r as getAwsClients } from "./aws-clients-CnmtbrxD.js";
|
|
2
2
|
import { A as displayIdent, F as plainIdentOr, I as safeMsg, M as displayStackName, N as isPasteableIdent, T as SECRET_REF_MAX_CODE_POINTS, _ as generateResourceNameWithFallback, g as generateResourceName, j as displaySafe, n as getLogger } from "./logger-DAaB7GFO.js";
|
|
3
|
-
import { $ as compositeIdFormatMessage, $n as markRedactedCause, A as isTerminalDeleteFailure, B as WITHHELD_AWS_COMMAND, C as refusalTypeShown, D as ProtectionFlipRegistry, Dn as shellQuote, H as pasteableAwsCommand, Ht as AccountIdUnavailableError, J as isInterruptedWaitError, Jn as safeStringify, Kn as describeAwsFailure, L as userPoolProtectionSite, Ln as markNameCollision, Lt as withPasteableAwsProfile, M as observeThenDisableProtection, Mt as injectiveKey, N as protectionFlipKey, Nt as injectiveKeyPrefix, On as withheldTargetClause, P as rdsFamilyProtectionSite, Q as canonicalizeRoute53QueryName, Qn as markNonRetryable, Rn as markReplayMayCollide, Rt as ambientClientDefaults, S as quotedRemedyLogicalId, Sn as pasteableCommand, T as resolveExplicitPhysicalId, U as protectedReplacementAdvice, Un as isRetryableTransientError, V as isAwsCliLiteral, Vn as isAmbiguousOutcomeError, Vt as credentialFingerprint, W as renderDisableCommand, Wn as isTransientServerError, Wt as CdkdError, X as ElapsedBudgetRegistry, Xn as isMarkedNonRetryable, Y as startInterruptWatch, Yn as THROTTLING_ERROR_NAMES, Zn as isThrottlingError, _ as VALUE_NOT_SHOWN, a as onlySecretDerived, at as segmentAfterAnchor, b as isQuotableImportValue, bn as hasClauseBreak, bt as markAuxiliaryFailure, c as recordedPrincipalsRepair, ct as createMaskedRetryLogger, dt as maskerOrIdentity, er as wrapMaskedAwsError, et as compositeIdSeparatorRefusal, ft as withDerivedNameMasks, g as assertRegionMatch, h as RESOURCE_NOT_FOUND, ht as clearCreatedBeforeFailure, i as holdsSecretDerivedEntry, in as ProvisioningError, j as logGroupProtectionSite, k as deleteWithProtectionCompensation, lt as isSecretDerivedValue, nt as logicalIdShown, o as readPrincipalLists, on as ResourceUpdateNotSupportedError, ot as stateOrphanRecordRemedy, p as withRemovalDefaults, qn as isAwsAuthoredFailure, r as SECRET_DERIVED_READ_LIVE, rt as packCompositeId, st as createMaskedLogSinks, tt as compositeIdSkipResult, u as clearOnUpdateRemoval, ut as maskDeep, v as isPlainImportJson, w as remedyLogicalId, wn as plainOrDescribed, x as normalizeAwsTagsToCfn, xn as isInertUnquoted, xt as markCreatedBeforeFailure, y as isPlainImportValue, yn as commandHole, z as UNNAMEABLE_ID_CLAUSE, zt as ambientCredentialConfig } from "./iam-policy-targets-
|
|
3
|
+
import { $ as compositeIdFormatMessage, $n as markRedactedCause, A as isTerminalDeleteFailure, B as WITHHELD_AWS_COMMAND, C as refusalTypeShown, D as ProtectionFlipRegistry, Dn as shellQuote, H as pasteableAwsCommand, Ht as AccountIdUnavailableError, J as isInterruptedWaitError, Jn as safeStringify, Kn as describeAwsFailure, L as userPoolProtectionSite, Ln as markNameCollision, Lt as withPasteableAwsProfile, M as observeThenDisableProtection, Mt as injectiveKey, N as protectionFlipKey, Nt as injectiveKeyPrefix, On as withheldTargetClause, P as rdsFamilyProtectionSite, Q as canonicalizeRoute53QueryName, Qn as markNonRetryable, Rn as markReplayMayCollide, Rt as ambientClientDefaults, S as quotedRemedyLogicalId, Sn as pasteableCommand, T as resolveExplicitPhysicalId, U as protectedReplacementAdvice, Un as isRetryableTransientError, V as isAwsCliLiteral, Vn as isAmbiguousOutcomeError, Vt as credentialFingerprint, W as renderDisableCommand, Wn as isTransientServerError, Wt as CdkdError, X as ElapsedBudgetRegistry, Xn as isMarkedNonRetryable, Y as startInterruptWatch, Yn as THROTTLING_ERROR_NAMES, Zn as isThrottlingError, _ as VALUE_NOT_SHOWN, a as onlySecretDerived, at as segmentAfterAnchor, b as isQuotableImportValue, bn as hasClauseBreak, bt as markAuxiliaryFailure, c as recordedPrincipalsRepair, ct as createMaskedRetryLogger, dt as maskerOrIdentity, er as wrapMaskedAwsError, et as compositeIdSeparatorRefusal, ft as withDerivedNameMasks, g as assertRegionMatch, h as RESOURCE_NOT_FOUND, ht as clearCreatedBeforeFailure, i as holdsSecretDerivedEntry, in as ProvisioningError, j as logGroupProtectionSite, k as deleteWithProtectionCompensation, lt as isSecretDerivedValue, nt as logicalIdShown, o as readPrincipalLists, on as ResourceUpdateNotSupportedError, ot as stateOrphanRecordRemedy, p as withRemovalDefaults, qn as isAwsAuthoredFailure, r as SECRET_DERIVED_READ_LIVE, rt as packCompositeId, st as createMaskedLogSinks, tt as compositeIdSkipResult, u as clearOnUpdateRemoval, ut as maskDeep, v as isPlainImportJson, w as remedyLogicalId, wn as plainOrDescribed, x as normalizeAwsTagsToCfn, xn as isInertUnquoted, xt as markCreatedBeforeFailure, y as isPlainImportValue, yn as commandHole, z as UNNAMEABLE_ID_CLAUSE, zt as ambientCredentialConfig } from "./iam-policy-targets-BREzwsG6.js";
|
|
4
4
|
import { s as ambientRegion } from "./aws-client-defaults-D0q0z4dG.js";
|
|
5
|
-
import { $n as deleteSkipReason, $
|
|
6
|
-
import { a as AmbiguousCreateLatch, c as isInsideWindow, i as AMBIGUOUS_LATCH_TTL_MS, l as setBounded, n as collectInlinePolicyNamesManagedBySiblings, o as RecentIdSet, r as IamCreateClientCache, s as createAttemptKey, t as IAMRoleProvider, u as withoutServerErrorRetries } 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 { $n as deleteSkipReason, $r as accountArgs, A as resolveDynamoDbDeleteBudgetClock, Aa as replayWarn, An as acquireIdempotencyToken, Ar as s3BucketWebsiteUrl, B as getPriorAttempts, Ba as sameLambdaFunctionAddress, Ca as toFiniteNumber, Ct as getStackRecords, D as beginDeleteWait, Da as configIntegerRefusal, Dr as s3BucketDomainName, E as DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS, Ea as configBooleanRefusal, En as earliestDefined, Er as s3BucketArn, F as waitForIndexesSettled, Fn as refuseMalformedDesiredTags, Gn as getCurrentResourceSecrets, I as ECR_AUTO_DELETE_IMAGES_TAG, In as tagMapAsList, It as REDACTED_DELETE_ADDRESS_SKIP_REASON, Ji as refuseMalformedResourcesForDestroy, Jn as slowCcOperationTimeoutMs, Ka as hasMaskableValues, Ko as stringifyValue, L as S3_AUTO_DELETE_OBJECTS_TAG, La as withRetry, Ln as tagPlanWarning, Lt as isRedactedRecordedValue, M as DELETE_INDEX_WAIT_PROCEED_NOTE, Ma as requireConfigObject, Mn as DBPROXY_TAG_OPTIONS, N as INDEX_SETTLE_POLL_INTERVAL_MS, Na as requireConfigString, Nn as planTagDiff, O as compensateRemovedDeletionProtection, Oa as configStringRefusal, Oi as refuseMalformedNestedChildOutputs, On as reserveStackCreateToken, Or as s3BucketDualStackDomainName, P as deleteTableWithIndexBusyRetry, Pn as readTagList, Pr as getAccountInfo, Pt as getCurrentProducerRegions, R as hasCdkAutoDeleteTag, Ra as canonicalLambdaFunctionName, Rn as definedAttributes, Rt as redactedDeleteAddressFields, Sa as toCfnInteger, T as DynamoDBGlobalTableProvider, Ta as coerceCfnInteger, Tr as isSettledInstanceState, V as markRefusedBeforeApplying, Wr as parseWebACLArn, Xn as unchangedBehindSecretReference, Zo as rewriteTemplateAssetReferences, Zs as decodeListingKey, _t as getCurrentNestedStackContext, a as findNestedTemplateTreeDefect, ar as isTerminationProtectionPropagationError, ba as coerceWarmThroughput$1, c as renderNestedTemplateTreeDefect, ca as findSilentDropProperties, cr as reEnableInstanceApiTermination, dc as describeFileReadFailure, dt as getNestedRevertRun, ec as canonicalizeRegion, er as withIndeterminateGuard, fc as displayAssemblyPath, fo as recoverMaskedOutput, io as redactSecretsForState, ir as ec2InstanceProtectionSite, j as resolveDynamoDbDeleteBudgetMs, ja as requireConfigArray, jn as DBPROXY_TAGS_WHAT, k as deleteBudgetKey, ka as readConfigString, kr as s3BucketRegionalDomainName, mc as resolveAssemblyPath, mo as carriesSecretMask, mt as revertNestedChildFromJournal, nr as markWaitAbandoned, o as isAbsoluteAssetPath, oa as withheldAccountClause, or as observeThenDisableInstanceApiTermination, pc as renderAssemblyPathEscape, qr as passedParameterClassesOf, ro as markSameGenerationBag, s as listNestedTemplateRows, so as dynamicReferenceTokens, sr as reDisableInstanceApiTermination, t as DeployEngine, tc as derivePartitionAndUrlSuffix, tr as isWaitAbandonedError, ua as withoutSilentDropProperties, vt as withNestedStackContext, wa as coerceCfnBoolean, xa as isWarmThroughputDecrease, xt as awaitInFlightSibling, ya as WARM_THROUGHPUT_MEMBERS, z as isTruthyCfnBoolean, za as lambdaFunctionNameForMask, zn as stringifyIfAssigned, zt as redactedDeleteAddressSkip } from "./deploy-engine-B-oaHd2t.js";
|
|
6
|
+
import { a as AmbiguousCreateLatch, c as isInsideWindow, i as AMBIGUOUS_LATCH_TTL_MS, l as setBounded, n as collectInlinePolicyNamesManagedBySiblings, o as RecentIdSet, r as IamCreateClientCache, s as createAttemptKey, t as IAMRoleProvider, u as withoutServerErrorRetries } from "./iam-role-provider-DsJM0NT3.js";
|
|
7
|
+
import { a as canonicalizeIpProtocolValue, i as resolveSecretDerivedPrincipals, n as runDestroyForStack, o as resolvedResourceTimeoutMs, r as isResolvableSecretPrincipalList, t as canonicalizeIpv4Cidr } from "./program-DTXVCX29.js";
|
|
8
|
+
import { RDSProvider } from "./rds-provider-B0YTjZKU.js";
|
|
9
|
+
import { NeptuneProvider } from "./neptune-provider-DGaKBQxm.js";
|
|
10
|
+
import { ASGProvider } from "./asg-provider-B0IrI6EW.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, 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";
|
|
@@ -6947,6 +6947,28 @@ function canonicalPolicy(text) {
|
|
|
6947
6947
|
}
|
|
6948
6948
|
}
|
|
6949
6949
|
|
|
6950
|
+
//#endregion
|
|
6951
|
+
//#region src/provisioning/providers/lambda-create-client.ts
|
|
6952
|
+
var LambdaCreateClientCache = class {
|
|
6953
|
+
client;
|
|
6954
|
+
shared;
|
|
6955
|
+
constructor(shared) {
|
|
6956
|
+
this.shared = shared;
|
|
6957
|
+
}
|
|
6958
|
+
get() {
|
|
6959
|
+
const shared = this.shared();
|
|
6960
|
+
if (!(shared instanceof LambdaClient)) return Promise.resolve(shared);
|
|
6961
|
+
this.client ??= shared.config.region().then((region) => withoutServerErrorRetries(new LambdaClient({
|
|
6962
|
+
...ambientClientDefaults(),
|
|
6963
|
+
region
|
|
6964
|
+
})), (error) => {
|
|
6965
|
+
this.client = void 0;
|
|
6966
|
+
throw error;
|
|
6967
|
+
});
|
|
6968
|
+
return this.client;
|
|
6969
|
+
}
|
|
6970
|
+
};
|
|
6971
|
+
|
|
6950
6972
|
//#endregion
|
|
6951
6973
|
//#region src/provisioning/providers/lambda-function-provider.ts
|
|
6952
6974
|
const SELF_NEEDLE_MIN_LENGTH$1 = 3;
|
|
@@ -7094,6 +7116,7 @@ function inlineCodeFileNameForRuntime(runtime) {
|
|
|
7094
7116
|
}
|
|
7095
7117
|
var LambdaFunctionProvider = class {
|
|
7096
7118
|
lambdaClient;
|
|
7119
|
+
createClient = new LambdaCreateClientCache(() => this.lambdaClient);
|
|
7097
7120
|
ec2Client;
|
|
7098
7121
|
logger = getLogger().child("LambdaFunctionProvider");
|
|
7099
7122
|
handledProperties = /* @__PURE__ */ new Map([["AWS::Lambda::Function", /* @__PURE__ */ new Set([
|
|
@@ -7213,7 +7236,7 @@ var LambdaFunctionProvider = class {
|
|
|
7213
7236
|
CodeSigningConfigArn: properties["CodeSigningConfigArn"],
|
|
7214
7237
|
Tags: tags
|
|
7215
7238
|
};
|
|
7216
|
-
const response = await this.
|
|
7239
|
+
const response = await (await this.createClient.get()).send(new CreateFunctionCommand(createParams));
|
|
7217
7240
|
functionCreated = true;
|
|
7218
7241
|
createdFunctionName = response.FunctionName || functionName;
|
|
7219
7242
|
const recursiveLoop = properties["RecursiveLoop"];
|
|
@@ -7851,6 +7874,7 @@ function functionNamePairs(value) {
|
|
|
7851
7874
|
}
|
|
7852
7875
|
var LambdaPermissionProvider = class {
|
|
7853
7876
|
lambdaClient;
|
|
7877
|
+
createClient = new LambdaCreateClientCache(() => this.lambdaClient);
|
|
7854
7878
|
logger = getLogger().child("LambdaPermissionProvider");
|
|
7855
7879
|
handledProperties = /* @__PURE__ */ new Map([["AWS::Lambda::Permission", /* @__PURE__ */ new Set([
|
|
7856
7880
|
"FunctionName",
|
|
@@ -7903,7 +7927,7 @@ var LambdaPermissionProvider = class {
|
|
|
7903
7927
|
if (properties["EventSourceToken"]) addParams.EventSourceToken = properties["EventSourceToken"];
|
|
7904
7928
|
if (properties["FunctionUrlAuthType"]) addParams.FunctionUrlAuthType = properties["FunctionUrlAuthType"];
|
|
7905
7929
|
if (properties["InvokedViaFunctionUrl"] !== void 0) addParams.InvokedViaFunctionUrl = properties["InvokedViaFunctionUrl"];
|
|
7906
|
-
await this.
|
|
7930
|
+
await (await this.createClient.get()).send(new AddPermissionCommand(addParams));
|
|
7907
7931
|
log.debug(`Successfully created Lambda permission ${logicalId}: ${statementId}`);
|
|
7908
7932
|
return {
|
|
7909
7933
|
physicalId: statementId,
|
|
@@ -8060,6 +8084,7 @@ var LambdaPermissionProvider = class {
|
|
|
8060
8084
|
//#region src/provisioning/providers/lambda-url-provider.ts
|
|
8061
8085
|
var LambdaUrlProvider = class {
|
|
8062
8086
|
lambdaClient;
|
|
8087
|
+
createClient = new LambdaCreateClientCache(() => this.lambdaClient);
|
|
8063
8088
|
logger = getLogger().child("LambdaUrlProvider");
|
|
8064
8089
|
handledProperties = /* @__PURE__ */ new Map([["AWS::Lambda::Url", /* @__PURE__ */ new Set([
|
|
8065
8090
|
"TargetFunctionArn",
|
|
@@ -8094,7 +8119,7 @@ var LambdaUrlProvider = class {
|
|
|
8094
8119
|
if (properties["Qualifier"]) createParams.Qualifier = properties["Qualifier"];
|
|
8095
8120
|
if (properties["InvokeMode"]) createParams.InvokeMode = properties["InvokeMode"];
|
|
8096
8121
|
if (cors) createParams.Cors = this.buildCorsConfig(cors);
|
|
8097
|
-
const response = await this.
|
|
8122
|
+
const response = await (await this.createClient.get()).send(new CreateFunctionUrlConfigCommand(createParams));
|
|
8098
8123
|
const functionUrl = response.FunctionUrl;
|
|
8099
8124
|
const functionArn = response.FunctionArn;
|
|
8100
8125
|
log.debug(`Successfully created Lambda URL ${logicalId}: ${functionUrl}`);
|
|
@@ -13377,6 +13402,19 @@ var EventBridgeBusProvider = class {
|
|
|
13377
13402
|
constructor() {
|
|
13378
13403
|
this.eventBridgeClient = getAwsClients().eventBridge;
|
|
13379
13404
|
}
|
|
13405
|
+
createClient;
|
|
13406
|
+
getCreateClient() {
|
|
13407
|
+
const shared = this.eventBridgeClient;
|
|
13408
|
+
if (!(shared instanceof EventBridgeClient)) return Promise.resolve(shared);
|
|
13409
|
+
this.createClient ??= shared.config.region().then((region) => withoutServerErrorRetries(new EventBridgeClient({
|
|
13410
|
+
...ambientClientDefaults(),
|
|
13411
|
+
region
|
|
13412
|
+
})), (error) => {
|
|
13413
|
+
this.createClient = void 0;
|
|
13414
|
+
throw error;
|
|
13415
|
+
});
|
|
13416
|
+
return this.createClient;
|
|
13417
|
+
}
|
|
13380
13418
|
async create(logicalId, resourceType, properties) {
|
|
13381
13419
|
const tags = refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId);
|
|
13382
13420
|
const name = properties["Name"];
|
|
@@ -13391,7 +13429,7 @@ var EventBridgeBusProvider = class {
|
|
|
13391
13429
|
const dlcCreate = sanitizeDeadLetterConfig(properties["DeadLetterConfig"]);
|
|
13392
13430
|
if (dlcCreate) createParams.DeadLetterConfig = dlcCreate;
|
|
13393
13431
|
if (properties["LogConfig"] !== void 0) createParams.LogConfig = properties["LogConfig"];
|
|
13394
|
-
const response = await this.
|
|
13432
|
+
const response = await (await this.getCreateClient()).send(new CreateEventBusCommand(createParams));
|
|
13395
13433
|
if (properties["Policy"]) {}
|
|
13396
13434
|
return {
|
|
13397
13435
|
physicalId: name,
|
|
@@ -13683,6 +13721,22 @@ function isEc2NotFoundCode(error) {
|
|
|
13683
13721
|
const name = error?.name;
|
|
13684
13722
|
return typeof name === "string" && name.endsWith(".NotFound");
|
|
13685
13723
|
}
|
|
13724
|
+
function isNamedError(error, names) {
|
|
13725
|
+
const name = error?.name;
|
|
13726
|
+
return typeof name === "string" && names.has(name);
|
|
13727
|
+
}
|
|
13728
|
+
const NAT_GATEWAY_NOT_FOUND_NAMES = /* @__PURE__ */ new Set(["NatGatewayNotFound"]);
|
|
13729
|
+
const EIP_ALLOCATION_NOT_FOUND_NAMES = /* @__PURE__ */ new Set(["InvalidAllocationID.NotFound"]);
|
|
13730
|
+
const NAT_GATEWAY_ID_PATTERN = /^nat-[0-9a-f]+$/;
|
|
13731
|
+
const EIP_ALLOCATION_ID_PATTERN = /^eipalloc-[0-9a-f]+$/;
|
|
13732
|
+
function natGatewayIdentity(physicalId) {
|
|
13733
|
+
return NAT_GATEWAY_ID_PATTERN.test(physicalId) ? physicalId : void 0;
|
|
13734
|
+
}
|
|
13735
|
+
function eipAllocationIdentity(physicalId) {
|
|
13736
|
+
const segments = physicalId.split("|");
|
|
13737
|
+
const allocationId = segments.length === 1 ? segments[0] : segments.length === 2 ? segments[1] : void 0;
|
|
13738
|
+
return allocationId !== void 0 && EIP_ALLOCATION_ID_PATTERN.test(allocationId) ? allocationId : void 0;
|
|
13739
|
+
}
|
|
13686
13740
|
const createVpcLatch = new AmbiguousCreateLatch("ec2:CreateVpc");
|
|
13687
13741
|
const createSubnetLatch = new AmbiguousCreateLatch("ec2:CreateSubnet");
|
|
13688
13742
|
const createInternetGatewayLatch = new AmbiguousCreateLatch("ec2:CreateInternetGateway");
|
|
@@ -14014,6 +14068,51 @@ var EC2Provider = class {
|
|
|
14014
14068
|
default: return;
|
|
14015
14069
|
}
|
|
14016
14070
|
}
|
|
14071
|
+
async isSameResource(journaledPhysicalId, record, resourceType, context) {
|
|
14072
|
+
let read;
|
|
14073
|
+
let journaledId;
|
|
14074
|
+
let recordId;
|
|
14075
|
+
if (resourceType === "AWS::EC2::NatGateway") {
|
|
14076
|
+
journaledId = natGatewayIdentity(journaledPhysicalId);
|
|
14077
|
+
recordId = natGatewayIdentity(record.physicalId);
|
|
14078
|
+
read = (id) => this.readNatGatewayIdIfLive(id);
|
|
14079
|
+
} else if (resourceType === "AWS::EC2::EIP") {
|
|
14080
|
+
journaledId = eipAllocationIdentity(journaledPhysicalId);
|
|
14081
|
+
recordId = eipAllocationIdentity(record.physicalId);
|
|
14082
|
+
read = (id) => this.readEipAllocationIdIfExists(id);
|
|
14083
|
+
} else return "unknown";
|
|
14084
|
+
if (journaledId === void 0 || recordId === void 0) return "unknown";
|
|
14085
|
+
if (journaledId === recordId) return "same";
|
|
14086
|
+
if (resourceType === "AWS::EC2::EIP" && journaledPhysicalId === journaledId) return "unknown";
|
|
14087
|
+
if (await this.ec2Client.config.region() !== context.expectedRegion) return "unknown";
|
|
14088
|
+
if (await read(recordId) !== recordId) return "unknown";
|
|
14089
|
+
return await read(journaledId) === recordId ? "same" : "different";
|
|
14090
|
+
}
|
|
14091
|
+
async readNatGatewayIdIfLive(natGatewayId) {
|
|
14092
|
+
let response;
|
|
14093
|
+
try {
|
|
14094
|
+
response = await this.ec2Client.send(new DescribeNatGatewaysCommand({ NatGatewayIds: [natGatewayId] }));
|
|
14095
|
+
} catch (error) {
|
|
14096
|
+
if (isNamedError(error, NAT_GATEWAY_NOT_FOUND_NAMES)) return void 0;
|
|
14097
|
+
throw error;
|
|
14098
|
+
}
|
|
14099
|
+
const gateways = response.NatGateways ?? [];
|
|
14100
|
+
if (gateways.length !== 1 || typeof gateways[0]?.NatGatewayId !== "string") throw new Error("DescribeNatGateways did not return exactly the gateway asked for");
|
|
14101
|
+
const gateway = gateways[0];
|
|
14102
|
+
return gateway.State === "pending" || gateway.State === "available" ? gateway.NatGatewayId : void 0;
|
|
14103
|
+
}
|
|
14104
|
+
async readEipAllocationIdIfExists(allocationId) {
|
|
14105
|
+
let response;
|
|
14106
|
+
try {
|
|
14107
|
+
response = await this.ec2Client.send(new DescribeAddressesCommand({ AllocationIds: [allocationId] }));
|
|
14108
|
+
} catch (error) {
|
|
14109
|
+
if (isNamedError(error, EIP_ALLOCATION_NOT_FOUND_NAMES)) return void 0;
|
|
14110
|
+
throw error;
|
|
14111
|
+
}
|
|
14112
|
+
const addresses = response.Addresses ?? [];
|
|
14113
|
+
if (addresses.length !== 1 || typeof addresses[0]?.AllocationId !== "string") throw new Error("DescribeAddresses did not return exactly the address asked for");
|
|
14114
|
+
return addresses[0].AllocationId;
|
|
14115
|
+
}
|
|
14017
14116
|
async createVpc(logicalId, resourceType, properties, context) {
|
|
14018
14117
|
this.logger.debug(`Creating VPC ${logicalId}`);
|
|
14019
14118
|
const desiredTags = refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId);
|
|
@@ -14527,7 +14626,8 @@ var EC2Provider = class {
|
|
|
14527
14626
|
if (this.isNotFoundError(error)) {
|
|
14528
14627
|
const clientRegion = await this.ec2Client.config.region();
|
|
14529
14628
|
assertRegionMatch(clientRegion, context?.expectedRegion, resourceType, logicalId, physicalId);
|
|
14530
|
-
this.logger.
|
|
14629
|
+
if (context?.failedCreateOrphan === true) this.logger.info(safeMsg` Elastic IP ${physicalId} (${logicalId}), which a failed deploy created, is already gone; nothing to delete`);
|
|
14630
|
+
else this.logger.debug(`EIP ${physicalId} does not exist, skipping deletion`);
|
|
14531
14631
|
return;
|
|
14532
14632
|
}
|
|
14533
14633
|
const cause = error instanceof Error ? error : void 0;
|
|
@@ -14659,7 +14759,8 @@ var EC2Provider = class {
|
|
|
14659
14759
|
if (this.isNotFoundError(error)) {
|
|
14660
14760
|
const clientRegion = await this.ec2Client.config.region();
|
|
14661
14761
|
assertRegionMatch(clientRegion, context?.expectedRegion, resourceType, logicalId, physicalId);
|
|
14662
|
-
this.logger.
|
|
14762
|
+
if (context?.failedCreateOrphan === true) this.logger.info(safeMsg` NAT gateway ${physicalId} (${logicalId}), which a failed deploy created, is already gone; nothing to delete`);
|
|
14763
|
+
else this.logger.debug(`NatGateway ${physicalId} does not exist, skipping deletion`);
|
|
14663
14764
|
return;
|
|
14664
14765
|
}
|
|
14665
14766
|
const cause = error instanceof Error ? error : void 0;
|
|
@@ -42607,6 +42708,7 @@ var S3TablesProvider = class {
|
|
|
42607
42708
|
//#region src/provisioning/providers/ecr-provider.ts
|
|
42608
42709
|
var ECRProvider = class {
|
|
42609
42710
|
client;
|
|
42711
|
+
createClient;
|
|
42610
42712
|
providerRegion = ambientRegion();
|
|
42611
42713
|
logger = getLogger().child("ECRProvider");
|
|
42612
42714
|
handledProperties = /* @__PURE__ */ new Map([["AWS::ECR::Repository", /* @__PURE__ */ new Set([
|
|
@@ -42627,6 +42729,13 @@ var ECRProvider = class {
|
|
|
42627
42729
|
});
|
|
42628
42730
|
return this.client;
|
|
42629
42731
|
}
|
|
42732
|
+
getCreateClient() {
|
|
42733
|
+
if (!this.createClient) this.createClient = withoutServerErrorRetries(new ECRClient({
|
|
42734
|
+
...ambientClientDefaults(),
|
|
42735
|
+
...this.providerRegion ? { region: this.providerRegion } : {}
|
|
42736
|
+
}));
|
|
42737
|
+
return this.createClient;
|
|
42738
|
+
}
|
|
42630
42739
|
toSdkScanningConfig(cfn) {
|
|
42631
42740
|
if (!cfn) return void 0;
|
|
42632
42741
|
return { scanOnPush: Boolean(cfn["ScanOnPush"]) };
|
|
@@ -42666,7 +42775,7 @@ var ECRProvider = class {
|
|
|
42666
42775
|
const scanningConfig = this.toSdkScanningConfig(properties["ImageScanningConfiguration"]);
|
|
42667
42776
|
const encryptionConfig = this.toSdkEncryptionConfig(properties["EncryptionConfiguration"]);
|
|
42668
42777
|
const exclusionFilters = this.toSdkTagMutabilityExclusionFilters(properties["ImageTagMutabilityExclusionFilters"]);
|
|
42669
|
-
const response = await this.
|
|
42778
|
+
const response = await this.getCreateClient().send(new CreateRepositoryCommand({
|
|
42670
42779
|
repositoryName,
|
|
42671
42780
|
...scanningConfig ? { imageScanningConfiguration: scanningConfig } : {},
|
|
42672
42781
|
...properties["ImageTagMutability"] ? { imageTagMutability: properties["ImageTagMutability"] } : {},
|
|
@@ -43012,11 +43121,7 @@ var NestedStackProvider = class {
|
|
|
43012
43121
|
this.logger.debug(`Nested stack ${displaySafe(childStackName)} has no state — treating delete as idempotent success.`);
|
|
43013
43122
|
return;
|
|
43014
43123
|
}
|
|
43015
|
-
refuseMalformedResourcesForDestroy(childStateData.state, childStackName, childRegion,
|
|
43016
|
-
profile: ctx.destroyOptions?.profile,
|
|
43017
|
-
stateBucket: ctx.stateBucket,
|
|
43018
|
-
statePrefix: ctx.destroyOptions?.statePrefix
|
|
43019
|
-
});
|
|
43124
|
+
refuseMalformedResourcesForDestroy(childStateData.state, childStackName, childRegion, runAccountOf(ctx));
|
|
43020
43125
|
const resourceCount = Object.keys(childStateData.state.resources).length;
|
|
43021
43126
|
this.logger.info(`Destroying nested stack ${displaySafe(childStackName)} (logicalId=${displaySafe(logicalId)}, ${resourceCount} resource(s))`);
|
|
43022
43127
|
const childCtx = {
|
|
@@ -43048,12 +43153,14 @@ var NestedStackProvider = class {
|
|
|
43048
43153
|
...ctx.destroyOptions?.resourceTimeoutByType && { resourceTimeoutByType: ctx.destroyOptions.resourceTimeoutByType }
|
|
43049
43154
|
}));
|
|
43050
43155
|
if (childResult.errorCount > 0) {
|
|
43156
|
+
const account = runAccountOf(ctx);
|
|
43157
|
+
const accountClause = withheldAccountClause(account, "the command below prints").trimEnd();
|
|
43051
43158
|
const inspect = pasteableCommand("cdkd state show", [{
|
|
43052
43159
|
value: childStackName,
|
|
43053
43160
|
hole: "stack",
|
|
43054
43161
|
opts: { plainIdent: true }
|
|
43055
|
-
}]);
|
|
43056
|
-
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")));
|
|
43162
|
+
}, ...accountArgs(account)]);
|
|
43163
|
+
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}`)));
|
|
43057
43164
|
throw markNonRetryable(failure);
|
|
43058
43165
|
}
|
|
43059
43166
|
if (childResult.skippedCount > 0 || childResult.interrupted) {
|
|
@@ -43102,7 +43209,7 @@ var NestedStackProvider = class {
|
|
|
43102
43209
|
async readChildOutputsAsAttributes(ctx, childStackName, childRegion) {
|
|
43103
43210
|
const childStateData = await ctx.stateBackend.getState(childStackName, childRegion);
|
|
43104
43211
|
if (!childStateData) throw markNonRetryable(/* @__PURE__ */ new Error(`Child stack state ${displayStackName(childStackName)} not found after deploy — NestedStackProvider invariant violated.`));
|
|
43105
|
-
refuseMalformedNestedChildOutputs(childStateData.state, childStackName, childRegion);
|
|
43212
|
+
refuseMalformedNestedChildOutputs(childStateData.state, childStackName, childRegion, runAccountOf(ctx));
|
|
43106
43213
|
const attributes = this.buildOutputsAttributes(childStateData.state.outputs ?? {});
|
|
43107
43214
|
const noEchoAttributeNames = [];
|
|
43108
43215
|
const identity = credentialFingerprint(ambientCredentialConfig());
|
|
@@ -43197,6 +43304,13 @@ var NestedStackProvider = class {
|
|
|
43197
43304
|
return attributes;
|
|
43198
43305
|
}
|
|
43199
43306
|
};
|
|
43307
|
+
function runAccountOf(ctx) {
|
|
43308
|
+
return {
|
|
43309
|
+
profile: ctx.destroyOptions?.profile,
|
|
43310
|
+
stateBucket: ctx.stateBucket,
|
|
43311
|
+
statePrefix: ctx.destroyOptions?.statePrefix
|
|
43312
|
+
};
|
|
43313
|
+
}
|
|
43200
43314
|
|
|
43201
43315
|
//#endregion
|
|
43202
43316
|
//#region src/provisioning/providers/wait-condition-handle-provider.ts
|
|
@@ -43576,4 +43690,4 @@ var ACMCertificateProvider = class {
|
|
|
43576
43690
|
|
|
43577
43691
|
//#endregion
|
|
43578
43692
|
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 };
|
|
43579
|
-
//# sourceMappingURL=provider-classes-
|
|
43693
|
+
//# sourceMappingURL=provider-classes-y-yYsSvB.js.map
|