@go-to-k/cdkd 0.296.7 → 0.296.8

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.
Files changed (24) hide show
  1. package/dist/{asg-provider-BU0YONBp.js → asg-provider-BDJ1qN0J.js} +2 -2
  2. package/dist/{asg-provider-BU0YONBp.js.map → asg-provider-BDJ1qN0J.js.map} +1 -1
  3. package/dist/cli.js +2 -2
  4. package/dist/{deploy-engine-wyaJUA8V.js → deploy-engine-iXgQFHYR.js} +105 -76
  5. package/dist/deploy-engine-iXgQFHYR.js.map +1 -0
  6. package/dist/{iam-role-provider-obY72uH2.js → iam-role-provider-B1Ma2zVK.js} +2 -2
  7. package/dist/{iam-role-provider-obY72uH2.js.map → iam-role-provider-B1Ma2zVK.js.map} +1 -1
  8. package/dist/index.d.ts +11 -1
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +2 -2
  11. package/dist/{neptune-provider-C3f-vDOh.js → neptune-provider-C-WMp2hQ.js} +2 -2
  12. package/dist/{neptune-provider-C3f-vDOh.js.map → neptune-provider-C-WMp2hQ.js.map} +1 -1
  13. package/dist/{program-DEnDp4o0.js → program-CPziYRDp.js} +130 -78
  14. package/dist/program-CPziYRDp.js.map +1 -0
  15. package/dist/{provider-classes-CsF7Ia5F.js → provider-classes-CxXTKgEM.js} +123 -14
  16. package/dist/provider-classes-CxXTKgEM.js.map +1 -0
  17. package/dist/{rds-provider-Cf5P2so_.js → rds-provider-C193wAF8.js} +2 -2
  18. package/dist/{rds-provider-Cf5P2so_.js.map → rds-provider-C193wAF8.js.map} +1 -1
  19. package/dist/{version-LalLOhpQ.js → version-Br6yDF8t.js} +2 -2
  20. package/dist/{version-LalLOhpQ.js.map → version-Br6yDF8t.js.map} +1 -1
  21. package/package.json +1 -1
  22. package/dist/deploy-engine-wyaJUA8V.js.map +0 -1
  23. package/dist/program-DEnDp4o0.js.map +0 -1
  24. package/dist/provider-classes-CsF7Ia5F.js.map +0 -1
@@ -2,12 +2,12 @@ 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
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-td1X_kKN.js";
4
4
  import { s as ambientRegion } from "./aws-client-defaults-D0q0z4dG.js";
5
- import { $n as deleteSkipReason, $s as derivePartitionAndUrlSuffix, A as resolveDynamoDbDeleteBudgetClock, Aa as requireConfigObject, An as acquireIdempotencyToken, Ar as s3BucketWebsiteUrl, B as getPriorAttempts, Ca as coerceCfnInteger, Ct as getStackRecords, D as beginDeleteWait, Da as readConfigString, Di as refuseMalformedNestedChildOutputs, Dr as s3BucketDomainName, E as DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS, Ea as configStringRefusal, En as earliestDefined, Er as s3BucketArn, F as waitForIndexesSettled, Fa as withRetry, Fn as refuseMalformedDesiredTags, Gn as getCurrentResourceSecrets, I as ECR_AUTO_DELETE_IMAGES_TAG, Ia as canonicalLambdaFunctionName, In as tagMapAsList, It as REDACTED_DELETE_ADDRESS_SKIP_REASON, Jn as slowCcOperationTimeoutMs, L as S3_AUTO_DELETE_OBJECTS_TAG, La as lambdaFunctionNameForMask, Ln as tagPlanWarning, Lt as isRedactedRecordedValue, M as DELETE_INDEX_WAIT_PROCEED_NOTE, Mn as DBPROXY_TAG_OPTIONS, N as INDEX_SETTLE_POLL_INTERVAL_MS, Nn as planTagDiff, O as compensateRemovedDeletionProtection, Oa as replayWarn, On as reserveStackCreateToken, Or as s3BucketDualStackDomainName, P as deleteTableWithIndexBusyRetry, Pn as readTagList, Pr as getAccountInfo, Pt as getCurrentProducerRegions, Qs as canonicalizeRegion, R as hasCdkAutoDeleteTag, Ra as sameLambdaFunctionAddress, Rn as definedAttributes, Rt as redactedDeleteAddressFields, Sa as coerceCfnBoolean, T as DynamoDBGlobalTableProvider, Ta as configIntegerRefusal, Tr as isSettledInstanceState, V as markRefusedBeforeApplying, Wa as hasMaskableValues, Wo as stringifyValue, Wr as parseWebACLArn, Xn as unchangedBehindSecretReference, Yo as rewriteTemplateAssetReferences, Ys as decodeListingKey, _a as WARM_THROUGHPUT_MEMBERS, _t as getCurrentNestedStackContext, a as findNestedTemplateTreeDefect, ao as dynamicReferenceTokens, ar as isTerminationProtectionPropagationError, ba as toCfnInteger, c as renderNestedTemplateTreeDefect, ca as withoutSilentDropProperties, cr as reEnableInstanceApiTermination, dc as renderAssemblyPathEscape, dt as getNestedRevertRun, er as withIndeterminateGuard, fc as resolveAssemblyPath, fo as carriesSecretMask, ir as ec2InstanceProtectionSite, j as resolveDynamoDbDeleteBudgetMs, ja as requireConfigString, jn as DBPROXY_TAGS_WHAT, k as deleteBudgetKey, ka as requireConfigArray, kr as s3BucketRegionalDomainName, lc as describeFileReadFailure, mt as revertNestedChildFromJournal, no as redactSecretsForState, nr as markWaitAbandoned, o as isAbsoluteAssetPath, oa as findSilentDropProperties, or as observeThenDisableInstanceApiTermination, qi as refuseMalformedResourcesForDestroy, qr as passedParameterClassesOf, s as listNestedTemplateRows, sr as reDisableInstanceApiTermination, t as DeployEngine, to as markSameGenerationBag, tr as isWaitAbandonedError, uc as displayAssemblyPath, uo as recoverMaskedOutput, va as coerceWarmThroughput$1, vt as withNestedStackContext, wa as configBooleanRefusal, xa as toFiniteNumber, xt as awaitInFlightSibling, ya as isWarmThroughputDecrease, z as isTruthyCfnBoolean, zn as stringifyIfAssigned, zt as redactedDeleteAddressSkip } from "./deploy-engine-wyaJUA8V.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-obY72uH2.js";
7
- import { a as canonicalizeIpProtocolValue, i as resolveSecretDerivedPrincipals, n as runDestroyForStack, o as resolvedResourceTimeoutMs, r as isResolvableSecretPrincipalList, t as canonicalizeIpv4Cidr } from "./program-DEnDp4o0.js";
8
- import { RDSProvider } from "./rds-provider-Cf5P2so_.js";
9
- import { NeptuneProvider } from "./neptune-provider-C3f-vDOh.js";
10
- import { ASGProvider } from "./asg-provider-BU0YONBp.js";
5
+ import { $n as deleteSkipReason, $s as derivePartitionAndUrlSuffix, A as resolveDynamoDbDeleteBudgetClock, Aa as requireConfigObject, An as acquireIdempotencyToken, Ar as s3BucketWebsiteUrl, B as getPriorAttempts, Ca as coerceCfnInteger, Ct as getStackRecords, D as beginDeleteWait, Da as readConfigString, Di as refuseMalformedNestedChildOutputs, Dr as s3BucketDomainName, E as DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS, Ea as configStringRefusal, En as earliestDefined, Er as s3BucketArn, F as waitForIndexesSettled, Fa as withRetry, Fn as refuseMalformedDesiredTags, Gn as getCurrentResourceSecrets, I as ECR_AUTO_DELETE_IMAGES_TAG, Ia as canonicalLambdaFunctionName, In as tagMapAsList, It as REDACTED_DELETE_ADDRESS_SKIP_REASON, Jn as slowCcOperationTimeoutMs, L as S3_AUTO_DELETE_OBJECTS_TAG, La as lambdaFunctionNameForMask, Ln as tagPlanWarning, Lt as isRedactedRecordedValue, M as DELETE_INDEX_WAIT_PROCEED_NOTE, Mn as DBPROXY_TAG_OPTIONS, N as INDEX_SETTLE_POLL_INTERVAL_MS, Nn as planTagDiff, O as compensateRemovedDeletionProtection, Oa as replayWarn, On as reserveStackCreateToken, Or as s3BucketDualStackDomainName, P as deleteTableWithIndexBusyRetry, Pn as readTagList, Pr as getAccountInfo, Pt as getCurrentProducerRegions, Qs as canonicalizeRegion, R as hasCdkAutoDeleteTag, Ra as sameLambdaFunctionAddress, Rn as definedAttributes, Rt as redactedDeleteAddressFields, Sa as coerceCfnBoolean, T as DynamoDBGlobalTableProvider, Ta as configIntegerRefusal, Tr as isSettledInstanceState, V as markRefusedBeforeApplying, Wa as hasMaskableValues, Wo as stringifyValue, Wr as parseWebACLArn, Xn as unchangedBehindSecretReference, Yo as rewriteTemplateAssetReferences, Ys as decodeListingKey, _a as WARM_THROUGHPUT_MEMBERS, _t as getCurrentNestedStackContext, a as findNestedTemplateTreeDefect, ao as dynamicReferenceTokens, ar as isTerminationProtectionPropagationError, ba as toCfnInteger, c as renderNestedTemplateTreeDefect, ca as withoutSilentDropProperties, cr as reEnableInstanceApiTermination, dc as renderAssemblyPathEscape, dt as getNestedRevertRun, er as withIndeterminateGuard, fc as resolveAssemblyPath, fo as carriesSecretMask, ir as ec2InstanceProtectionSite, j as resolveDynamoDbDeleteBudgetMs, ja as requireConfigString, jn as DBPROXY_TAGS_WHAT, k as deleteBudgetKey, ka as requireConfigArray, kr as s3BucketRegionalDomainName, lc as describeFileReadFailure, mt as revertNestedChildFromJournal, no as redactSecretsForState, nr as markWaitAbandoned, o as isAbsoluteAssetPath, oa as findSilentDropProperties, or as observeThenDisableInstanceApiTermination, qi as refuseMalformedResourcesForDestroy, qr as passedParameterClassesOf, s as listNestedTemplateRows, sr as reDisableInstanceApiTermination, t as DeployEngine, to as markSameGenerationBag, tr as isWaitAbandonedError, uc as displayAssemblyPath, uo as recoverMaskedOutput, va as coerceWarmThroughput$1, vt as withNestedStackContext, wa as configBooleanRefusal, xa as toFiniteNumber, xt as awaitInFlightSibling, ya as isWarmThroughputDecrease, z as isTruthyCfnBoolean, zn as stringifyIfAssigned, zt as redactedDeleteAddressSkip } from "./deploy-engine-iXgQFHYR.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-B1Ma2zVK.js";
7
+ import { a as canonicalizeIpProtocolValue, i as resolveSecretDerivedPrincipals, n as runDestroyForStack, o as resolvedResourceTimeoutMs, r as isResolvableSecretPrincipalList, t as canonicalizeIpv4Cidr } from "./program-CPziYRDp.js";
8
+ import { RDSProvider } from "./rds-provider-C193wAF8.js";
9
+ import { NeptuneProvider } from "./neptune-provider-C-WMp2hQ.js";
10
+ import { ASGProvider } from "./asg-provider-BDJ1qN0J.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.lambdaClient.send(new CreateFunctionCommand(createParams));
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.lambdaClient.send(new AddPermissionCommand(addParams));
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.lambdaClient.send(new CreateFunctionUrlConfigCommand(createParams));
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.eventBridgeClient.send(new CreateEventBusCommand(createParams));
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.debug(`EIP ${physicalId} does not exist, skipping deletion`);
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.debug(`NatGateway ${physicalId} does not exist, skipping deletion`);
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.getClient().send(new CreateRepositoryCommand({
42778
+ const response = await this.getCreateClient().send(new CreateRepositoryCommand({
42670
42779
  repositoryName,
42671
42780
  ...scanningConfig ? { imageScanningConfiguration: scanningConfig } : {},
42672
42781
  ...properties["ImageTagMutability"] ? { imageTagMutability: properties["ImageTagMutability"] } : {},
@@ -43576,4 +43685,4 @@ var ACMCertificateProvider = class {
43576
43685
 
43577
43686
  //#endregion
43578
43687
  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-CsF7Ia5F.js.map
43688
+ //# sourceMappingURL=provider-classes-CxXTKgEM.js.map