@go-to-k/cdkd 0.296.6 → 0.296.7

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-C1TlpooI.js → asg-provider-BU0YONBp.js} +2 -2
  2. package/dist/{asg-provider-C1TlpooI.js.map → asg-provider-BU0YONBp.js.map} +1 -1
  3. package/dist/cli.js +2 -2
  4. package/dist/{deploy-engine-BPcBCyUE.js → deploy-engine-wyaJUA8V.js} +493 -336
  5. package/dist/deploy-engine-wyaJUA8V.js.map +1 -0
  6. package/dist/{iam-role-provider-CVIClaZV.js → iam-role-provider-obY72uH2.js} +117 -6
  7. package/dist/iam-role-provider-obY72uH2.js.map +1 -0
  8. package/dist/index.d.ts +8 -0
  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-C3f-vDOh.js} +2 -2
  12. package/dist/{neptune-provider-CvY6ekmg.js.map → neptune-provider-C3f-vDOh.js.map} +1 -1
  13. package/dist/{program-CAlg2KEF.js → program-DEnDp4o0.js} +4 -4
  14. package/dist/{program-CAlg2KEF.js.map → program-DEnDp4o0.js.map} +1 -1
  15. package/dist/{provider-classes-oRTqcSCp.js → provider-classes-CsF7Ia5F.js} +61 -110
  16. package/dist/provider-classes-CsF7Ia5F.js.map +1 -0
  17. package/dist/{rds-provider-DeGFzOUc.js → rds-provider-Cf5P2so_.js} +2 -2
  18. package/dist/{rds-provider-DeGFzOUc.js.map → rds-provider-Cf5P2so_.js.map} +1 -1
  19. package/dist/{version-BgqcIKdb.js → version-LalLOhpQ.js} +2 -2
  20. package/dist/{version-BgqcIKdb.js.map → version-LalLOhpQ.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/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-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";
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"];
@@ -8256,93 +8260,6 @@ var LambdaUrlProvider = class {
8256
8260
  }
8257
8261
  };
8258
8262
 
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
8263
  //#endregion
8347
8264
  //#region src/provisioning/providers/orphan-report.ts
8348
8265
  async function orphanCommandRegionArg(client, aws) {
@@ -34469,8 +34386,12 @@ function comparableRecordSize(value, mask) {
34469
34386
  }
34470
34387
  const KINESIS_DELETE_POLL_INTERVAL_MS = 2e3;
34471
34388
  const KINESIS_DELETE_MAX_WAIT_MS = 3e5;
34389
+ function isStreamName(id) {
34390
+ return /^[a-zA-Z0-9_.-]{1,128}$/.test(id);
34391
+ }
34472
34392
  var KinesisStreamProvider = class {
34473
34393
  client;
34394
+ createClient;
34474
34395
  providerRegion = ambientRegion();
34475
34396
  logger = getLogger().child("KinesisProvider");
34476
34397
  handledProperties = /* @__PURE__ */ new Map([["AWS::Kinesis::Stream", /* @__PURE__ */ new Set([
@@ -34490,6 +34411,13 @@ var KinesisStreamProvider = class {
34490
34411
  });
34491
34412
  return this.client;
34492
34413
  }
34414
+ getCreateClient() {
34415
+ if (!this.createClient) this.createClient = withoutServerErrorRetries(new KinesisClient({
34416
+ ...ambientClientDefaults(),
34417
+ ...this.providerRegion ? { region: this.providerRegion } : {}
34418
+ }));
34419
+ return this.createClient;
34420
+ }
34493
34421
  async create(logicalId, resourceType, properties, context) {
34494
34422
  const mask = maskerOrIdentity(context?.maskSecrets);
34495
34423
  const warn = (message) => this.logger.warn(mask(message));
@@ -34519,7 +34447,7 @@ var KinesisStreamProvider = class {
34519
34447
  const streamMode = readConfigString(streamModeDetails, "StreamMode", "PROVISIONED", "AWS::Kinesis::Stream StreamModeDetails");
34520
34448
  const shardCount = streamMode === "PROVISIONED" ? Number(properties["ShardCount"] ?? 1) : void 0;
34521
34449
  const maxRecordSizeInKiB = maxRecordRead.kind === "usable" ? maxRecordRead.size : void 0;
34522
- await this.getClient().send(new CreateStreamCommand({
34450
+ await this.getCreateClient().send(new CreateStreamCommand({
34523
34451
  StreamName: streamName,
34524
34452
  ...shardCount !== void 0 && { ShardCount: shardCount },
34525
34453
  StreamModeDetails: { StreamMode: streamMode },
@@ -34716,7 +34644,8 @@ var KinesisStreamProvider = class {
34716
34644
  if (error instanceof ResourceNotFoundException$10) {
34717
34645
  const clientRegion = await this.getClient().config.region();
34718
34646
  assertRegionMatch(clientRegion, context?.expectedRegion, resourceType, logicalId, physicalId);
34719
- this.logger.debug(`Kinesis stream ${physicalId} does not exist, skipping deletion`);
34647
+ if (context?.failedCreateOrphan === true) this.logger.info(safeMsg` Kinesis stream ${physicalId} (${logicalId}), which a failed deploy created, is already gone; nothing to delete`);
34648
+ else this.logger.debug(`Kinesis stream ${physicalId} does not exist, skipping deletion`);
34720
34649
  return;
34721
34650
  }
34722
34651
  const cause = error instanceof Error ? error : void 0;
@@ -34732,6 +34661,28 @@ var KinesisStreamProvider = class {
34732
34661
  });
34733
34662
  this.logger.debug(`Successfully deleted Kinesis stream ${logicalId}`);
34734
34663
  }
34664
+ async isSameResource(journaledPhysicalId, record, _resourceType, context) {
34665
+ if (!isStreamName(journaledPhysicalId) || !isStreamName(record.physicalId)) return "unknown";
34666
+ if (journaledPhysicalId === record.physicalId) return "same";
34667
+ if (await this.getClient().config.region() !== context.expectedRegion) return "unknown";
34668
+ const recordArn = await this.readStreamArnIfExists(record.physicalId);
34669
+ if (recordArn === void 0) return "unknown";
34670
+ const journaledArn = await this.readStreamArnIfExists(journaledPhysicalId);
34671
+ if (journaledArn === void 0) return "different";
34672
+ return journaledArn === recordArn ? "same" : "different";
34673
+ }
34674
+ async readStreamArnIfExists(streamName) {
34675
+ let response;
34676
+ try {
34677
+ response = await this.getClient().send(new DescribeStreamSummaryCommand({ StreamName: streamName }));
34678
+ } catch (error) {
34679
+ if (error instanceof ResourceNotFoundException$10) return void 0;
34680
+ throw error;
34681
+ }
34682
+ const arn = response.StreamDescriptionSummary?.StreamARN;
34683
+ if (typeof arn !== "string" || arn === "") throw new Error("DescribeStreamSummary returned no StreamARN");
34684
+ return arn;
34685
+ }
34735
34686
  async readStreamStatusForDelete(streamName) {
34736
34687
  try {
34737
34688
  return (await this.getClient().send(new DescribeStreamSummaryCommand({ StreamName: streamName }))).StreamDescriptionSummary?.StreamStatus ?? "UNKNOWN";
@@ -42974,7 +42925,7 @@ var NestedStackProvider = class {
42974
42925
  const ctx = this.requireContext();
42975
42926
  this.requireDeployContext(ctx, "create");
42976
42927
  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).`);
42928
+ 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
42929
  this.refuseMalformedNestedTemplateTree(ctx, logicalId, childTemplatePath);
42979
42930
  const { template: childTemplate, grandchildTemplates } = this.readChildTemplate(childTemplatePath, ctx.assetRedirect);
42980
42931
  const childStackName = this.deriveChildStackName(ctx.parentStackName, logicalId);
@@ -43009,7 +42960,7 @@ var NestedStackProvider = class {
43009
42960
  if (context?.replayingState === true) return this.revertFromChildJournal(ctx, logicalId, physicalId);
43010
42961
  this.requireDeployContext(ctx, "update");
43011
42962
  const childTemplatePath = ctx.nestedTemplates[logicalId];
43012
- if (!childTemplatePath) throw new Error(`Nested template file not found for AWS::CloudFormation::Stack ${displayIdent(logicalId)} on update.`);
42963
+ if (!childTemplatePath) throw markNonRetryable(/* @__PURE__ */ new Error(`Nested template file not found for AWS::CloudFormation::Stack ${displayIdent(logicalId)} on update.`));
43013
42964
  this.refuseMalformedNestedTemplateTree(ctx, logicalId, childTemplatePath);
43014
42965
  const { template: childTemplate, grandchildTemplates } = this.readChildTemplate(childTemplatePath, ctx.assetRedirect);
43015
42966
  const childStackName = this.deriveChildStackName(ctx.parentStackName, logicalId);
@@ -43103,7 +43054,7 @@ var NestedStackProvider = class {
43103
43054
  opts: { plainIdent: true }
43104
43055
  }]);
43105
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")));
43106
- throw childResult.interrupted ? markNonRetryable(failure) : failure;
43057
+ throw markNonRetryable(failure);
43107
43058
  }
43108
43059
  if (childResult.skippedCount > 0 || childResult.interrupted) {
43109
43060
  const causes = [];
@@ -43116,7 +43067,7 @@ var NestedStackProvider = class {
43116
43067
  }
43117
43068
  }
43118
43069
  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.`);
43070
+ 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
43071
  }
43121
43072
  async runChildDeploy(parentCtx, logicalId, childStackName, childRegion, childTemplate, childParameters, grandchildTemplates) {
43122
43073
  const inheritedSecrets = getCurrentResourceSecrets();
@@ -43150,7 +43101,7 @@ var NestedStackProvider = class {
43150
43101
  }
43151
43102
  async readChildOutputsAsAttributes(ctx, childStackName, childRegion) {
43152
43103
  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.`);
43104
+ if (!childStateData) throw markNonRetryable(/* @__PURE__ */ new Error(`Child stack state ${displayStackName(childStackName)} not found after deploy — NestedStackProvider invariant violated.`));
43154
43105
  refuseMalformedNestedChildOutputs(childStateData.state, childStackName, childRegion);
43155
43106
  const attributes = this.buildOutputsAttributes(childStateData.state.outputs ?? {});
43156
43107
  const noEchoAttributeNames = [];
@@ -43174,7 +43125,7 @@ var NestedStackProvider = class {
43174
43125
  return ctx;
43175
43126
  }
43176
43127
  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.`);
43128
+ 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
43129
  }
43179
43130
  refuseMalformedNestedTemplateTree(ctx, logicalId, childTemplatePath) {
43180
43131
  const defect = findNestedTemplateTreeDefect({ [logicalId]: childTemplatePath });
@@ -43201,7 +43152,7 @@ var NestedStackProvider = class {
43201
43152
  return result;
43202
43153
  }
43203
43154
  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]'.`);
43155
+ 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
43156
  }
43206
43157
  readChildTemplate(templatePath, assetRedirect) {
43207
43158
  let raw;
@@ -43214,7 +43165,7 @@ var NestedStackProvider = class {
43214
43165
  try {
43215
43166
  template = JSON.parse(raw);
43216
43167
  } catch (err) {
43217
- throw new Error(`Failed to parse nested template at ${displayAssemblyPath(templatePath)}: ${describeFileReadFailure(err, templatePath)}`);
43168
+ throw markNonRetryable(/* @__PURE__ */ new Error(`Failed to parse nested template at ${displayAssemblyPath(templatePath)}: ${describeFileReadFailure(err, templatePath)}`));
43218
43169
  }
43219
43170
  const grandchildTemplates = this.indexGrandchildTemplates(template, templatePath);
43220
43171
  if (assetRedirect) {
@@ -43625,4 +43576,4 @@ var ACMCertificateProvider = class {
43625
43576
 
43626
43577
  //#endregion
43627
43578
  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
43579
+ //# sourceMappingURL=provider-classes-CsF7Ia5F.js.map