@go-to-k/cdkd 0.296.6 → 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 (25) hide show
  1. package/dist/{asg-provider-C1TlpooI.js → asg-provider-BDJ1qN0J.js} +2 -2
  2. package/dist/{asg-provider-C1TlpooI.js.map → asg-provider-BDJ1qN0J.js.map} +1 -1
  3. package/dist/cli.js +2 -2
  4. package/dist/{deploy-engine-BPcBCyUE.js → deploy-engine-iXgQFHYR.js} +594 -408
  5. package/dist/deploy-engine-iXgQFHYR.js.map +1 -0
  6. package/dist/{iam-role-provider-CVIClaZV.js → iam-role-provider-B1Ma2zVK.js} +117 -6
  7. package/dist/iam-role-provider-B1Ma2zVK.js.map +1 -0
  8. package/dist/index.d.ts +19 -1
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +2 -2
  11. package/dist/{neptune-provider-CvY6ekmg.js → neptune-provider-C-WMp2hQ.js} +2 -2
  12. package/dist/{neptune-provider-CvY6ekmg.js.map → neptune-provider-C-WMp2hQ.js.map} +1 -1
  13. package/dist/{program-CAlg2KEF.js → program-CPziYRDp.js} +130 -78
  14. package/dist/program-CPziYRDp.js.map +1 -0
  15. package/dist/{provider-classes-oRTqcSCp.js → provider-classes-CxXTKgEM.js} +177 -117
  16. package/dist/provider-classes-CxXTKgEM.js.map +1 -0
  17. package/dist/{rds-provider-DeGFzOUc.js → rds-provider-C193wAF8.js} +2 -2
  18. package/dist/{rds-provider-DeGFzOUc.js.map → rds-provider-C193wAF8.js.map} +1 -1
  19. package/dist/{version-BgqcIKdb.js → version-Br6yDF8t.js} +2 -2
  20. package/dist/{version-BgqcIKdb.js.map → version-Br6yDF8t.js.map} +1 -1
  21. package/package.json +1 -1
  22. package/dist/deploy-engine-BPcBCyUE.js.map +0 -1
  23. package/dist/iam-role-provider-CVIClaZV.js.map +0 -1
  24. package/dist/program-CAlg2KEF.js.map +0 -1
  25. package/dist/provider-classes-oRTqcSCp.js.map +0 -1
@@ -1,13 +1,13 @@
1
1
  import { r as getAwsClients } from "./aws-clients-CnmtbrxD.js";
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, y as getCurrentStackName } from "./logger-DAaB7GFO.js";
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, Ka as hasMaskableValues, 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, 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, ar as isTerminationProtectionPropagationError, ba as toCfnInteger, c as renderNestedTemplateTreeDefect, ca as withoutSilentDropProperties, co as dynamicReferenceTokens, cr as reEnableInstanceApiTermination, dc as renderAssemblyPathEscape, dt as getNestedRevertRun, er as withIndeterminateGuard, fc as resolveAssemblyPath, fo as carriesSecretMask, io as redactSecretsForState, 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, nr as markWaitAbandoned, o as isAbsoluteAssetPath, oa as findSilentDropProperties, oo as recoverMaskedOutput, or as observeThenDisableInstanceApiTermination, qi as refuseMalformedResourcesForDestroy, qr as passedParameterClassesOf, ro as markSameGenerationBag, s as listNestedTemplateRows, sr as reDisableInstanceApiTermination, t as DeployEngine, tr as isWaitAbandonedError, uc as displayAssemblyPath, 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-BPcBCyUE.js";
6
- import { n as collectInlinePolicyNamesManagedBySiblings, t as IAMRoleProvider } from "./iam-role-provider-CVIClaZV.js";
7
- import { a as canonicalizeIpProtocolValue, i as resolveSecretDerivedPrincipals, n as runDestroyForStack, o as resolvedResourceTimeoutMs, r as isResolvableSecretPrincipalList, t as canonicalizeIpv4Cidr } from "./program-CAlg2KEF.js";
8
- import { RDSProvider } from "./rds-provider-DeGFzOUc.js";
9
- import { NeptuneProvider } from "./neptune-provider-CvY6ekmg.js";
10
- import { ASGProvider } from "./asg-provider-C1TlpooI.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";
@@ -573,6 +573,7 @@ const PRINCIPAL_NAMES = "group / role / user names";
573
573
  const AWS_MANAGED_POLICY_ARN_RE = /^arn:aws[a-z0-9-]*:iam::aws:/;
574
574
  var IAMManagedPolicyProvider = class {
575
575
  iamClient;
576
+ createClient = new IamCreateClientCache(() => this.iamClient);
576
577
  logger = getLogger().child("IAMManagedPolicyProvider");
577
578
  wrapMaskedError(mask, error, build) {
578
579
  return wrapMaskedAwsError(mask, error, build);
@@ -611,7 +612,7 @@ var IAMManagedPolicyProvider = class {
611
612
  if (properties["Description"]) createParams.Description = properties["Description"];
612
613
  if (properties["Path"]) createParams.Path = properties["Path"];
613
614
  if (tags.length > 0) createParams.Tags = tags;
614
- const policyArn = (await this.iamClient.send(new CreatePolicyCommand(createParams))).Policy?.Arn;
615
+ const policyArn = (await (await this.createClient.get()).send(new CreatePolicyCommand(createParams))).Policy?.Arn;
615
616
  if (!policyArn) throw new ProvisioningError(`CreatePolicy succeeded but no Arn returned for ${logicalId}`, resourceType, logicalId, policyName);
616
617
  leftBehindArn = policyArn;
617
618
  log.debug(`Created IAM managed policy: ${v(policyArn)}`);
@@ -1113,6 +1114,7 @@ function recordedNonRootPath(arn) {
1113
1114
  //#region src/provisioning/providers/iam-instance-profile-provider.ts
1114
1115
  var IAMInstanceProfileProvider = class {
1115
1116
  iamClient;
1117
+ createClient = new IamCreateClientCache(() => this.iamClient);
1116
1118
  logger = getLogger().child("IAMInstanceProfileProvider");
1117
1119
  wrapMaskedError(mask, error, build) {
1118
1120
  return wrapMaskedAwsError(mask, error, build);
@@ -1137,7 +1139,7 @@ var IAMInstanceProfileProvider = class {
1137
1139
  const roles = principals.lists.Roles;
1138
1140
  let leftBehind = false;
1139
1141
  try {
1140
- const response = await this.iamClient.send(new CreateInstanceProfileCommand({
1142
+ const response = await (await this.createClient.get()).send(new CreateInstanceProfileCommand({
1141
1143
  InstanceProfileName: instanceProfileName,
1142
1144
  Path: path
1143
1145
  }));
@@ -1318,6 +1320,7 @@ var IAMInstanceProfileProvider = class {
1318
1320
  const CREATE_DATE_SKEW_MARGIN_MS = 5e3;
1319
1321
  var IAMAccessKeyProvider = class {
1320
1322
  iamClient;
1323
+ createClient = new IamCreateClientCache(() => this.iamClient);
1321
1324
  logger = getLogger().child("IAMAccessKeyProvider");
1322
1325
  wrapMaskedError(mask, error, build) {
1323
1326
  return wrapMaskedAwsError(mask, error, build);
@@ -1349,7 +1352,7 @@ var IAMAccessKeyProvider = class {
1349
1352
  const baseline = await this.tryListAccessKeyIds(userName, logicalId, log);
1350
1353
  let leftBehindKeyId;
1351
1354
  try {
1352
- const response = await this.iamClient.send(new CreateAccessKeyCommand({ UserName: userName }));
1355
+ const response = await (await this.createClient.get()).send(new CreateAccessKeyCommand({ UserName: userName }));
1353
1356
  const accessKeyId = response.AccessKey?.AccessKeyId;
1354
1357
  const secretAccessKey = response.AccessKey?.SecretAccessKey;
1355
1358
  leftBehindKeyId = accessKeyId;
@@ -1632,6 +1635,7 @@ function derivedNamePairs(resourceType, logicalId, properties) {
1632
1635
  }
1633
1636
  var IAMUserGroupProvider = class {
1634
1637
  iamClient;
1638
+ createClient = new IamCreateClientCache(() => this.iamClient);
1635
1639
  logger = getLogger().child("IAMUserGroupProvider");
1636
1640
  wrapMaskedError(mask, error, build) {
1637
1641
  return wrapMaskedAwsError(mask, error, build);
@@ -1700,7 +1704,7 @@ var IAMUserGroupProvider = class {
1700
1704
  const createParams = { UserName: userName };
1701
1705
  if (properties["Path"]) createParams.Path = properties["Path"];
1702
1706
  if (properties["Tags"] !== void 0 && properties["Tags"] !== null) createParams.Tags = desiredTags;
1703
- const response = await this.iamClient.send(new CreateUserCommand(createParams));
1707
+ const response = await (await this.createClient.get()).send(new CreateUserCommand(createParams));
1704
1708
  leftBehind = true;
1705
1709
  try {
1706
1710
  const permissionsBoundary = properties["PermissionsBoundary"];
@@ -2078,7 +2082,7 @@ var IAMUserGroupProvider = class {
2078
2082
  try {
2079
2083
  const createParams = { GroupName: groupName };
2080
2084
  if (properties["Path"]) createParams.Path = properties["Path"];
2081
- const response = await this.iamClient.send(new CreateGroupCommand(createParams));
2085
+ const response = await (await this.createClient.get()).send(new CreateGroupCommand(createParams));
2082
2086
  leftBehind = true;
2083
2087
  try {
2084
2088
  const managedPolicyArns = properties["ManagedPolicyArns"];
@@ -6943,6 +6947,28 @@ function canonicalPolicy(text) {
6943
6947
  }
6944
6948
  }
6945
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
+
6946
6972
  //#endregion
6947
6973
  //#region src/provisioning/providers/lambda-function-provider.ts
6948
6974
  const SELF_NEEDLE_MIN_LENGTH$1 = 3;
@@ -7090,6 +7116,7 @@ function inlineCodeFileNameForRuntime(runtime) {
7090
7116
  }
7091
7117
  var LambdaFunctionProvider = class {
7092
7118
  lambdaClient;
7119
+ createClient = new LambdaCreateClientCache(() => this.lambdaClient);
7093
7120
  ec2Client;
7094
7121
  logger = getLogger().child("LambdaFunctionProvider");
7095
7122
  handledProperties = /* @__PURE__ */ new Map([["AWS::Lambda::Function", /* @__PURE__ */ new Set([
@@ -7209,7 +7236,7 @@ var LambdaFunctionProvider = class {
7209
7236
  CodeSigningConfigArn: properties["CodeSigningConfigArn"],
7210
7237
  Tags: tags
7211
7238
  };
7212
- const response = await this.lambdaClient.send(new CreateFunctionCommand(createParams));
7239
+ const response = await (await this.createClient.get()).send(new CreateFunctionCommand(createParams));
7213
7240
  functionCreated = true;
7214
7241
  createdFunctionName = response.FunctionName || functionName;
7215
7242
  const recursiveLoop = properties["RecursiveLoop"];
@@ -7847,6 +7874,7 @@ function functionNamePairs(value) {
7847
7874
  }
7848
7875
  var LambdaPermissionProvider = class {
7849
7876
  lambdaClient;
7877
+ createClient = new LambdaCreateClientCache(() => this.lambdaClient);
7850
7878
  logger = getLogger().child("LambdaPermissionProvider");
7851
7879
  handledProperties = /* @__PURE__ */ new Map([["AWS::Lambda::Permission", /* @__PURE__ */ new Set([
7852
7880
  "FunctionName",
@@ -7899,7 +7927,7 @@ var LambdaPermissionProvider = class {
7899
7927
  if (properties["EventSourceToken"]) addParams.EventSourceToken = properties["EventSourceToken"];
7900
7928
  if (properties["FunctionUrlAuthType"]) addParams.FunctionUrlAuthType = properties["FunctionUrlAuthType"];
7901
7929
  if (properties["InvokedViaFunctionUrl"] !== void 0) addParams.InvokedViaFunctionUrl = properties["InvokedViaFunctionUrl"];
7902
- await this.lambdaClient.send(new AddPermissionCommand(addParams));
7930
+ await (await this.createClient.get()).send(new AddPermissionCommand(addParams));
7903
7931
  log.debug(`Successfully created Lambda permission ${logicalId}: ${statementId}`);
7904
7932
  return {
7905
7933
  physicalId: statementId,
@@ -8056,6 +8084,7 @@ var LambdaPermissionProvider = class {
8056
8084
  //#region src/provisioning/providers/lambda-url-provider.ts
8057
8085
  var LambdaUrlProvider = class {
8058
8086
  lambdaClient;
8087
+ createClient = new LambdaCreateClientCache(() => this.lambdaClient);
8059
8088
  logger = getLogger().child("LambdaUrlProvider");
8060
8089
  handledProperties = /* @__PURE__ */ new Map([["AWS::Lambda::Url", /* @__PURE__ */ new Set([
8061
8090
  "TargetFunctionArn",
@@ -8090,7 +8119,7 @@ var LambdaUrlProvider = class {
8090
8119
  if (properties["Qualifier"]) createParams.Qualifier = properties["Qualifier"];
8091
8120
  if (properties["InvokeMode"]) createParams.InvokeMode = properties["InvokeMode"];
8092
8121
  if (cors) createParams.Cors = this.buildCorsConfig(cors);
8093
- const response = await this.lambdaClient.send(new CreateFunctionUrlConfigCommand(createParams));
8122
+ const response = await (await this.createClient.get()).send(new CreateFunctionUrlConfigCommand(createParams));
8094
8123
  const functionUrl = response.FunctionUrl;
8095
8124
  const functionArn = response.FunctionArn;
8096
8125
  log.debug(`Successfully created Lambda URL ${logicalId}: ${functionUrl}`);
@@ -8256,93 +8285,6 @@ var LambdaUrlProvider = class {
8256
8285
  }
8257
8286
  };
8258
8287
 
8259
- //#endregion
8260
- //#region src/provisioning/providers/ambiguous-create.ts
8261
- const CREATION_DATE_SKEW_MARGIN_MS = 5e3;
8262
- const AMBIGUOUS_LATCH_TTL_MS = 18e5;
8263
- const MAX_TRACKED = 1e4;
8264
- const createAttemptKey = (scope, logicalId) => injectiveKey(scope, ambientRegion() ?? "", getCurrentStackName() ?? "", logicalId);
8265
- const setBounded = (map, key, value) => {
8266
- if (!map.has(key) && map.size >= MAX_TRACKED) {
8267
- const oldest = map.keys().next();
8268
- if (!oldest.done) map.delete(oldest.value);
8269
- }
8270
- map.set(key, value);
8271
- };
8272
- const mergeWindow = (existing, next, armedAtMs) => existing === void 0 ? {
8273
- floorMs: next.floorMs,
8274
- ceilingMs: next.ceilingMs,
8275
- armedAtMs
8276
- } : {
8277
- floorMs: Math.min(existing.floorMs, next.floorMs),
8278
- ceilingMs: Math.max(existing.ceilingMs, next.ceilingMs),
8279
- armedAtMs: Math.max(existing.armedAtMs, armedAtMs)
8280
- };
8281
- var AmbiguousCreateLatch = class {
8282
- entries = /* @__PURE__ */ new Map();
8283
- scope;
8284
- constructor(scope) {
8285
- this.scope = scope;
8286
- }
8287
- noteFailure(logicalId, error, attemptStartMs, carried) {
8288
- if (!isAmbiguousOutcomeError(error)) return;
8289
- const key = createAttemptKey(this.scope, logicalId);
8290
- const now = Date.now();
8291
- let entry = mergeWindow(this.entries.get(key), {
8292
- floorMs: attemptStartMs - CREATION_DATE_SKEW_MARGIN_MS,
8293
- ceilingMs: now + CREATION_DATE_SKEW_MARGIN_MS
8294
- }, now);
8295
- if (carried !== void 0) entry = mergeWindow(entry, carried, now);
8296
- setBounded(this.entries, key, entry);
8297
- }
8298
- take(logicalId) {
8299
- const key = createAttemptKey(this.scope, logicalId);
8300
- const entry = this.entries.get(key);
8301
- this.entries.delete(key);
8302
- if (entry === void 0 || Date.now() - entry.armedAtMs > 18e5) return;
8303
- return {
8304
- floorMs: entry.floorMs,
8305
- ceilingMs: entry.ceilingMs
8306
- };
8307
- }
8308
- resetForTests() {
8309
- this.entries.clear();
8310
- }
8311
- };
8312
- const isInsideWindow = (date, window) => date !== void 0 && date.getTime() >= window.floorMs && date.getTime() <= window.ceilingMs;
8313
- var RecentIdSet = class {
8314
- ids = /* @__PURE__ */ new Map();
8315
- add(id) {
8316
- setBounded(this.ids, id, true);
8317
- }
8318
- has(id) {
8319
- return this.ids.has(id);
8320
- }
8321
- resetForTests() {
8322
- this.ids.clear();
8323
- }
8324
- };
8325
- const isRetryStrategyV2 = (value) => typeof value === "object" && value !== null && typeof value.acquireInitialRetryToken === "function" && typeof value.refreshRetryTokenForRetry === "function" && typeof value.recordSuccess === "function";
8326
- function withoutServerErrorRetries(client) {
8327
- const config = client.config;
8328
- const base = config?.retryStrategy;
8329
- if (config === void 0 || typeof base !== "function") return client;
8330
- const resolveBase = base;
8331
- config.retryStrategy = async () => {
8332
- const strategy = await resolveBase();
8333
- if (!isRetryStrategyV2(strategy)) return strategy;
8334
- return {
8335
- acquireInitialRetryToken: (scope) => strategy.acquireInitialRetryToken(scope),
8336
- refreshRetryTokenForRetry: (token, errorInfo) => {
8337
- if (isTransientServerError(errorInfo.error) && isAmbiguousOutcomeError(errorInfo.error)) return Promise.reject(/* @__PURE__ */ new Error("cdkd: no SDK retry of a 5xx on a tokenless create"));
8338
- return strategy.refreshRetryTokenForRetry(token, errorInfo);
8339
- },
8340
- recordSuccess: (token) => strategy.recordSuccess(token)
8341
- };
8342
- };
8343
- return client;
8344
- }
8345
-
8346
8288
  //#endregion
8347
8289
  //#region src/provisioning/providers/orphan-report.ts
8348
8290
  async function orphanCommandRegionArg(client, aws) {
@@ -13460,6 +13402,19 @@ var EventBridgeBusProvider = class {
13460
13402
  constructor() {
13461
13403
  this.eventBridgeClient = getAwsClients().eventBridge;
13462
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
+ }
13463
13418
  async create(logicalId, resourceType, properties) {
13464
13419
  const tags = refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId);
13465
13420
  const name = properties["Name"];
@@ -13474,7 +13429,7 @@ var EventBridgeBusProvider = class {
13474
13429
  const dlcCreate = sanitizeDeadLetterConfig(properties["DeadLetterConfig"]);
13475
13430
  if (dlcCreate) createParams.DeadLetterConfig = dlcCreate;
13476
13431
  if (properties["LogConfig"] !== void 0) createParams.LogConfig = properties["LogConfig"];
13477
- const response = await this.eventBridgeClient.send(new CreateEventBusCommand(createParams));
13432
+ const response = await (await this.getCreateClient()).send(new CreateEventBusCommand(createParams));
13478
13433
  if (properties["Policy"]) {}
13479
13434
  return {
13480
13435
  physicalId: name,
@@ -13766,6 +13721,22 @@ function isEc2NotFoundCode(error) {
13766
13721
  const name = error?.name;
13767
13722
  return typeof name === "string" && name.endsWith(".NotFound");
13768
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
+ }
13769
13740
  const createVpcLatch = new AmbiguousCreateLatch("ec2:CreateVpc");
13770
13741
  const createSubnetLatch = new AmbiguousCreateLatch("ec2:CreateSubnet");
13771
13742
  const createInternetGatewayLatch = new AmbiguousCreateLatch("ec2:CreateInternetGateway");
@@ -14097,6 +14068,51 @@ var EC2Provider = class {
14097
14068
  default: return;
14098
14069
  }
14099
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
+ }
14100
14116
  async createVpc(logicalId, resourceType, properties, context) {
14101
14117
  this.logger.debug(`Creating VPC ${logicalId}`);
14102
14118
  const desiredTags = refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId);
@@ -14610,7 +14626,8 @@ var EC2Provider = class {
14610
14626
  if (this.isNotFoundError(error)) {
14611
14627
  const clientRegion = await this.ec2Client.config.region();
14612
14628
  assertRegionMatch(clientRegion, context?.expectedRegion, resourceType, logicalId, physicalId);
14613
- 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`);
14614
14631
  return;
14615
14632
  }
14616
14633
  const cause = error instanceof Error ? error : void 0;
@@ -14742,7 +14759,8 @@ var EC2Provider = class {
14742
14759
  if (this.isNotFoundError(error)) {
14743
14760
  const clientRegion = await this.ec2Client.config.region();
14744
14761
  assertRegionMatch(clientRegion, context?.expectedRegion, resourceType, logicalId, physicalId);
14745
- 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`);
14746
14764
  return;
14747
14765
  }
14748
14766
  const cause = error instanceof Error ? error : void 0;
@@ -34469,8 +34487,12 @@ function comparableRecordSize(value, mask) {
34469
34487
  }
34470
34488
  const KINESIS_DELETE_POLL_INTERVAL_MS = 2e3;
34471
34489
  const KINESIS_DELETE_MAX_WAIT_MS = 3e5;
34490
+ function isStreamName(id) {
34491
+ return /^[a-zA-Z0-9_.-]{1,128}$/.test(id);
34492
+ }
34472
34493
  var KinesisStreamProvider = class {
34473
34494
  client;
34495
+ createClient;
34474
34496
  providerRegion = ambientRegion();
34475
34497
  logger = getLogger().child("KinesisProvider");
34476
34498
  handledProperties = /* @__PURE__ */ new Map([["AWS::Kinesis::Stream", /* @__PURE__ */ new Set([
@@ -34490,6 +34512,13 @@ var KinesisStreamProvider = class {
34490
34512
  });
34491
34513
  return this.client;
34492
34514
  }
34515
+ getCreateClient() {
34516
+ if (!this.createClient) this.createClient = withoutServerErrorRetries(new KinesisClient({
34517
+ ...ambientClientDefaults(),
34518
+ ...this.providerRegion ? { region: this.providerRegion } : {}
34519
+ }));
34520
+ return this.createClient;
34521
+ }
34493
34522
  async create(logicalId, resourceType, properties, context) {
34494
34523
  const mask = maskerOrIdentity(context?.maskSecrets);
34495
34524
  const warn = (message) => this.logger.warn(mask(message));
@@ -34519,7 +34548,7 @@ var KinesisStreamProvider = class {
34519
34548
  const streamMode = readConfigString(streamModeDetails, "StreamMode", "PROVISIONED", "AWS::Kinesis::Stream StreamModeDetails");
34520
34549
  const shardCount = streamMode === "PROVISIONED" ? Number(properties["ShardCount"] ?? 1) : void 0;
34521
34550
  const maxRecordSizeInKiB = maxRecordRead.kind === "usable" ? maxRecordRead.size : void 0;
34522
- await this.getClient().send(new CreateStreamCommand({
34551
+ await this.getCreateClient().send(new CreateStreamCommand({
34523
34552
  StreamName: streamName,
34524
34553
  ...shardCount !== void 0 && { ShardCount: shardCount },
34525
34554
  StreamModeDetails: { StreamMode: streamMode },
@@ -34716,7 +34745,8 @@ var KinesisStreamProvider = class {
34716
34745
  if (error instanceof ResourceNotFoundException$10) {
34717
34746
  const clientRegion = await this.getClient().config.region();
34718
34747
  assertRegionMatch(clientRegion, context?.expectedRegion, resourceType, logicalId, physicalId);
34719
- this.logger.debug(`Kinesis stream ${physicalId} does not exist, skipping deletion`);
34748
+ if (context?.failedCreateOrphan === true) this.logger.info(safeMsg` Kinesis stream ${physicalId} (${logicalId}), which a failed deploy created, is already gone; nothing to delete`);
34749
+ else this.logger.debug(`Kinesis stream ${physicalId} does not exist, skipping deletion`);
34720
34750
  return;
34721
34751
  }
34722
34752
  const cause = error instanceof Error ? error : void 0;
@@ -34732,6 +34762,28 @@ var KinesisStreamProvider = class {
34732
34762
  });
34733
34763
  this.logger.debug(`Successfully deleted Kinesis stream ${logicalId}`);
34734
34764
  }
34765
+ async isSameResource(journaledPhysicalId, record, _resourceType, context) {
34766
+ if (!isStreamName(journaledPhysicalId) || !isStreamName(record.physicalId)) return "unknown";
34767
+ if (journaledPhysicalId === record.physicalId) return "same";
34768
+ if (await this.getClient().config.region() !== context.expectedRegion) return "unknown";
34769
+ const recordArn = await this.readStreamArnIfExists(record.physicalId);
34770
+ if (recordArn === void 0) return "unknown";
34771
+ const journaledArn = await this.readStreamArnIfExists(journaledPhysicalId);
34772
+ if (journaledArn === void 0) return "different";
34773
+ return journaledArn === recordArn ? "same" : "different";
34774
+ }
34775
+ async readStreamArnIfExists(streamName) {
34776
+ let response;
34777
+ try {
34778
+ response = await this.getClient().send(new DescribeStreamSummaryCommand({ StreamName: streamName }));
34779
+ } catch (error) {
34780
+ if (error instanceof ResourceNotFoundException$10) return void 0;
34781
+ throw error;
34782
+ }
34783
+ const arn = response.StreamDescriptionSummary?.StreamARN;
34784
+ if (typeof arn !== "string" || arn === "") throw new Error("DescribeStreamSummary returned no StreamARN");
34785
+ return arn;
34786
+ }
34735
34787
  async readStreamStatusForDelete(streamName) {
34736
34788
  try {
34737
34789
  return (await this.getClient().send(new DescribeStreamSummaryCommand({ StreamName: streamName }))).StreamDescriptionSummary?.StreamStatus ?? "UNKNOWN";
@@ -42656,6 +42708,7 @@ var S3TablesProvider = class {
42656
42708
  //#region src/provisioning/providers/ecr-provider.ts
42657
42709
  var ECRProvider = class {
42658
42710
  client;
42711
+ createClient;
42659
42712
  providerRegion = ambientRegion();
42660
42713
  logger = getLogger().child("ECRProvider");
42661
42714
  handledProperties = /* @__PURE__ */ new Map([["AWS::ECR::Repository", /* @__PURE__ */ new Set([
@@ -42676,6 +42729,13 @@ var ECRProvider = class {
42676
42729
  });
42677
42730
  return this.client;
42678
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
+ }
42679
42739
  toSdkScanningConfig(cfn) {
42680
42740
  if (!cfn) return void 0;
42681
42741
  return { scanOnPush: Boolean(cfn["ScanOnPush"]) };
@@ -42715,7 +42775,7 @@ var ECRProvider = class {
42715
42775
  const scanningConfig = this.toSdkScanningConfig(properties["ImageScanningConfiguration"]);
42716
42776
  const encryptionConfig = this.toSdkEncryptionConfig(properties["EncryptionConfiguration"]);
42717
42777
  const exclusionFilters = this.toSdkTagMutabilityExclusionFilters(properties["ImageTagMutabilityExclusionFilters"]);
42718
- const response = await this.getClient().send(new CreateRepositoryCommand({
42778
+ const response = await this.getCreateClient().send(new CreateRepositoryCommand({
42719
42779
  repositoryName,
42720
42780
  ...scanningConfig ? { imageScanningConfiguration: scanningConfig } : {},
42721
42781
  ...properties["ImageTagMutability"] ? { imageTagMutability: properties["ImageTagMutability"] } : {},
@@ -42974,7 +43034,7 @@ var NestedStackProvider = class {
42974
43034
  const ctx = this.requireContext();
42975
43035
  this.requireDeployContext(ctx, "create");
42976
43036
  const childTemplatePath = ctx.nestedTemplates[logicalId];
42977
- if (!childTemplatePath) throw new Error(`Nested template file not found for AWS::CloudFormation::Stack ${displayIdent(logicalId)} under parent ${displayStackName(ctx.parentStackName)}. Verify the synth output emits Metadata['aws:asset:path'] on this resource (CDK 2.x cdk.NestedStack does so by default).`);
43037
+ if (!childTemplatePath) throw markNonRetryable(/* @__PURE__ */ new Error(`Nested template file not found for AWS::CloudFormation::Stack ${displayIdent(logicalId)} under parent ${displayStackName(ctx.parentStackName)}. Verify the synth output emits Metadata['aws:asset:path'] on this resource (CDK 2.x cdk.NestedStack does so by default).`));
42978
43038
  this.refuseMalformedNestedTemplateTree(ctx, logicalId, childTemplatePath);
42979
43039
  const { template: childTemplate, grandchildTemplates } = this.readChildTemplate(childTemplatePath, ctx.assetRedirect);
42980
43040
  const childStackName = this.deriveChildStackName(ctx.parentStackName, logicalId);
@@ -43009,7 +43069,7 @@ var NestedStackProvider = class {
43009
43069
  if (context?.replayingState === true) return this.revertFromChildJournal(ctx, logicalId, physicalId);
43010
43070
  this.requireDeployContext(ctx, "update");
43011
43071
  const childTemplatePath = ctx.nestedTemplates[logicalId];
43012
- if (!childTemplatePath) throw new Error(`Nested template file not found for AWS::CloudFormation::Stack ${displayIdent(logicalId)} on update.`);
43072
+ if (!childTemplatePath) throw markNonRetryable(/* @__PURE__ */ new Error(`Nested template file not found for AWS::CloudFormation::Stack ${displayIdent(logicalId)} on update.`));
43013
43073
  this.refuseMalformedNestedTemplateTree(ctx, logicalId, childTemplatePath);
43014
43074
  const { template: childTemplate, grandchildTemplates } = this.readChildTemplate(childTemplatePath, ctx.assetRedirect);
43015
43075
  const childStackName = this.deriveChildStackName(ctx.parentStackName, logicalId);
@@ -43103,7 +43163,7 @@ var NestedStackProvider = class {
43103
43163
  opts: { plainIdent: true }
43104
43164
  }]);
43105
43165
  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")));
43106
- throw childResult.interrupted ? markNonRetryable(failure) : failure;
43166
+ throw markNonRetryable(failure);
43107
43167
  }
43108
43168
  if (childResult.skippedCount > 0 || childResult.interrupted) {
43109
43169
  const causes = [];
@@ -43116,7 +43176,7 @@ var NestedStackProvider = class {
43116
43176
  }
43117
43177
  }
43118
43178
  async getAttribute(_physicalId, _resourceType, attributeName) {
43119
- throw new Error(`AWS::CloudFormation::Stack: attribute ${displayIdent(attributeName)} is not in the recorded Outputs map. Only 'Outputs.<Key>' references to declared Output names on the child template are supported.`);
43179
+ throw markNonRetryable(/* @__PURE__ */ new Error(`AWS::CloudFormation::Stack: attribute ${displayIdent(attributeName)} is not in the recorded Outputs map. Only 'Outputs.<Key>' references to declared Output names on the child template are supported.`));
43120
43180
  }
43121
43181
  async runChildDeploy(parentCtx, logicalId, childStackName, childRegion, childTemplate, childParameters, grandchildTemplates) {
43122
43182
  const inheritedSecrets = getCurrentResourceSecrets();
@@ -43150,7 +43210,7 @@ var NestedStackProvider = class {
43150
43210
  }
43151
43211
  async readChildOutputsAsAttributes(ctx, childStackName, childRegion) {
43152
43212
  const childStateData = await ctx.stateBackend.getState(childStackName, childRegion);
43153
- if (!childStateData) throw new Error(`Child stack state ${displayStackName(childStackName)} not found after deploy — NestedStackProvider invariant violated.`);
43213
+ if (!childStateData) throw markNonRetryable(/* @__PURE__ */ new Error(`Child stack state ${displayStackName(childStackName)} not found after deploy — NestedStackProvider invariant violated.`));
43154
43214
  refuseMalformedNestedChildOutputs(childStateData.state, childStackName, childRegion);
43155
43215
  const attributes = this.buildOutputsAttributes(childStateData.state.outputs ?? {});
43156
43216
  const noEchoAttributeNames = [];
@@ -43174,7 +43234,7 @@ var NestedStackProvider = class {
43174
43234
  return ctx;
43175
43235
  }
43176
43236
  requireDeployContext(ctx, op) {
43177
- if (!ctx.nestedTemplates || !ctx.dagBuilder || !ctx.diffCalculator) throw new Error(`NestedStackProvider.${op}: deploy-mode context fields (nestedTemplates / dagBuilder / diffCalculator) are missing. This usually means a destroy-mode entry point called into create/update by mistake.`);
43237
+ if (!ctx.nestedTemplates || !ctx.dagBuilder || !ctx.diffCalculator) throw markNonRetryable(/* @__PURE__ */ new Error(`NestedStackProvider.${op}: deploy-mode context fields (nestedTemplates / dagBuilder / diffCalculator) are missing. This usually means a destroy-mode entry point called into create/update by mistake.`));
43178
43238
  }
43179
43239
  refuseMalformedNestedTemplateTree(ctx, logicalId, childTemplatePath) {
43180
43240
  const defect = findNestedTemplateTreeDefect({ [logicalId]: childTemplatePath });
@@ -43201,7 +43261,7 @@ var NestedStackProvider = class {
43201
43261
  return result;
43202
43262
  }
43203
43263
  refuseNonScalarParameter(k, offender, where) {
43204
- throw new Error(`NestedStackProvider: child Parameter ${displayIdent(k)}${where} resolved to a non-scalar value (type=${offender === null ? "null" : typeof offender}). Parameters must be scalars (string / number / boolean), or an ARRAY of them from a list-typed parameter, by the time they reach the provider — an unresolved intrinsic here means IntrinsicFunctionResolver upstream did not handle the value, which is a bug. Surface the unresolved input rather than silently coercing to '[object Object]'.`);
43264
+ throw markNonRetryable(/* @__PURE__ */ new Error(`NestedStackProvider: child Parameter ${displayIdent(k)}${where} resolved to a non-scalar value (type=${offender === null ? "null" : typeof offender}). Parameters must be scalars (string / number / boolean), or an ARRAY of them from a list-typed parameter, by the time they reach the provider — an unresolved intrinsic here means IntrinsicFunctionResolver upstream did not handle the value, which is a bug. Surface the unresolved input rather than silently coercing to '[object Object]'.`));
43205
43265
  }
43206
43266
  readChildTemplate(templatePath, assetRedirect) {
43207
43267
  let raw;
@@ -43214,7 +43274,7 @@ var NestedStackProvider = class {
43214
43274
  try {
43215
43275
  template = JSON.parse(raw);
43216
43276
  } catch (err) {
43217
- throw new Error(`Failed to parse nested template at ${displayAssemblyPath(templatePath)}: ${describeFileReadFailure(err, templatePath)}`);
43277
+ throw markNonRetryable(/* @__PURE__ */ new Error(`Failed to parse nested template at ${displayAssemblyPath(templatePath)}: ${describeFileReadFailure(err, templatePath)}`));
43218
43278
  }
43219
43279
  const grandchildTemplates = this.indexGrandchildTemplates(template, templatePath);
43220
43280
  if (assetRedirect) {
@@ -43625,4 +43685,4 @@ var ACMCertificateProvider = class {
43625
43685
 
43626
43686
  //#endregion
43627
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 };
43628
- //# sourceMappingURL=provider-classes-oRTqcSCp.js.map
43688
+ //# sourceMappingURL=provider-classes-CxXTKgEM.js.map