@go-to-k/cdkd 0.284.17 → 0.284.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- import { $ as isTerminationProtectionPropagationError, $n as ResourceUpdateNotSupportedError, $t as validateAssetBucketName, A as renderStatefulReason, An as derivePartitionAndUrlSuffix, At as INTRINSIC_KEYS, B as exportAliasCollisionScrubWarning, Bn as CdkdError, Bt as stringifyValue, C as isFinalSnapshotError, Cn as CFN_TEMPLATE_URL_LIMIT, Ct as s3BucketArn, D as extractDeploymentEventError, Dn as expectedOwnerParam, Dt as s3BucketWebsiteUrl, E as makeCanonicalizePropertiesFn, En as uploadCfnTemplate, Et as s3BucketRegionalDomainName, F as green, Fn as AwsClients, Ft as LockManager, G as collectInlinePolicyNamesManagedBySiblings, Gn as LocalMigrateError, Gt as rewriteTemplateAssetReferences, H as secretBearingStateKeyWarning, Ht as buildAssetRedirectMap, I as red, In as getAwsClients, It as S3StateBackend, J as findActionableSilentDrops, Jn as MissingCdkCliError, Jt as AssetModeResolver, K as clearOnUpdateRemoval, Kn as LocalStartServiceError, Kt as escapeRegExp, L as yellow, Ln as resetAwsClients, Lt as rebuildClientForBucketRegion, M as bold, Mn as processStackMessages, Mt as withRetry, N as cyan, Nt as DagBuilder, O as MULTI_REGION_RECREATE_BLOCKED_TYPES, On as PARTITION_TABLE, Ot as applyRoleArnIfSet, P as gray, Pn as resolveBucketRegion, Pt as TemplateParser, Q as disableInstanceApiTermination, Qn as ResourceTimeoutError, Qt as parseBootstrapMarker, R as collectDeclaredOutputNames, Rn as setAwsClients, Rt as shouldRetainResource, S as createPreDeleteFinalSnapshot, Sn as CFN_TEMPLATE_BODY_LIMIT, St as scrubResourceRecord, T as unsupportedFinalSnapshotError, Tn as findLargeInlineResources, Tt as s3BucketDualStackDomainName, U as stateKeySecretExposure, Un as DeployCancelledError, Ut as createAssetRedirectResolver, V as isExportAliasCollision, Vt as WorkGraph, W as IAMRoleProvider, Wn as LocalInvokeBuildError$1, Wt as loadPublishableAssetManifest, X as CloudControlProvider, Xn as PartialFailureError, Xt as ensureAssetStorage, Y as findSilentDropProperties, Yn as NestedStackChildDirectDestroyError, Yt as BOOTSTRAP_MARKER_PREFIX, Z as slowCcOperationTimeoutMs, Zn as ProvisioningError, Zt as getBootstrapMarkerKey, _ as computeImplicitDeleteEdges, _n as resolveStateBucketWithDefault, _t as STATE_SOURCED_READBACK_RULES, a as DeploymentEventsStore, an as runDockerForeground, at as normalizeAwsTagsToCfn, b as buildFinalSnapshotIdentifier, bn as stateBucketExistenceConfirmed, bt as maskSecretsInText, c as replayFailedOperations, cn as getDockerImageBySourceHash, cr as isMarkedNonRetryable, ct as coerceCfnBoolean, d as updatePartialReason, dn as getDefaultStateBucketName, dr as markNonRetryable, dt as readConfigString, en as validateContainerRepoName, er as StackHasActiveImportsError, et as IntrinsicFunctionResolver, f as UNSPECIFIED_SKIP_REASON, fn as getLegacyStateBucketName, ft as replayWarn, g as IMPLICIT_DELETE_DEPENDENCIES, gn as resolveSkipPrefix, gt as STATE_SOURCED_CROSS_GENERATION_RULES, h as maskingRetryLogger, hn as resolveCaptureObservedState, ht as requireConfigString, i as DeploymentEventsReader, in as getDockerCmd, it as WAFv2WebACLProvider, j as formatResourceLine, jn as AssemblyReader, jt as describeTypeWithThrottleRetry, k as isStatefulRecreateTargetSync, kn as canonicalizeRegion, kt as DiffCalculator, l as replayRollback, ln as Synthesizer, lr as isRetryableTransientError, lt as configBooleanRefusal, m as withResourceDeadline, mn as resolveAutoAssetStorage, mt as requireConfigObject, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nn as buildDockerImage, nt as getAccountInfo, o as planFailedOps, on as runDockerStreaming, or as normalizeAwsError, ot as resolveExplicitPhysicalId, p as deleteSkipReason, pn as resolveApp, pt as requireConfigArray, q as ProviderRegistry, qt as stripControlChars, r as DeployEngine, rn as formatDockerLoginError, rt as refStateLookupFromResource, s as planRollback, sn as AssetManifestLoader, sr as withErrorHandling, st as assertRegionMatch, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as buildDenyExternalAccessPolicy, tr as StackTerminationProtectionError, tt as cfnRefValueFromPhysicalId, u as updatePartialMessage, un as synthesisStatusMessage, ur as isThrottlingError, ut as configStringRefusal, v as ATOMIC_FINAL_SNAPSHOT_TYPES, vn as resolveStateBucketWithDefaultAndSource, vt as TEMPLATE_SOURCED_RULES, w as refusesFinalSnapshot, wn as MIGRATE_TMP_PREFIX, wt as s3BucketDomainName, x as ccRoutedFinalSnapshotError, xn as warnDeprecatedNoPrefixCliFlag, xt as redactSecretsForState, y as PRE_DELETE_SNAPSHOT_TYPES, yn as resolveUseCdkBootstrapAssets, yt as createSecretMasker, z as collectPublishedOutputNames, zt as AssetPublisher } from "./deploy-engine-Bnu1WuRI.js";
2
+ import { $ as isTerminationProtectionPropagationError, $n as ResourceUpdateNotSupportedError, $t as validateAssetBucketName, A as renderStatefulReason, An as derivePartitionAndUrlSuffix, At as INTRINSIC_KEYS, B as exportAliasCollisionScrubWarning, Bn as CdkdError, Bt as stringifyValue, C as isFinalSnapshotError, Cn as CFN_TEMPLATE_URL_LIMIT, Ct as s3BucketArn, D as extractDeploymentEventError, Dn as expectedOwnerParam, Dt as s3BucketWebsiteUrl, E as makeCanonicalizePropertiesFn, En as uploadCfnTemplate, Et as s3BucketRegionalDomainName, F as green, Fn as AwsClients, Ft as LockManager, G as collectInlinePolicyNamesManagedBySiblings, Gn as LocalMigrateError, Gt as rewriteTemplateAssetReferences, H as secretBearingStateKeyWarning, Ht as buildAssetRedirectMap, I as red, In as getAwsClients, It as S3StateBackend, J as findActionableSilentDrops, Jn as MissingCdkCliError, Jt as AssetModeResolver, K as clearOnUpdateRemoval, Kn as LocalStartServiceError, Kt as escapeRegExp, L as yellow, Ln as resetAwsClients, Lt as rebuildClientForBucketRegion, M as bold, Mn as processStackMessages, Mt as withRetry, N as cyan, Nt as DagBuilder, O as MULTI_REGION_RECREATE_BLOCKED_TYPES, On as PARTITION_TABLE, Ot as applyRoleArnIfSet, P as gray, Pn as resolveBucketRegion, Pt as TemplateParser, Q as disableInstanceApiTermination, Qn as ResourceTimeoutError, Qt as parseBootstrapMarker, R as collectDeclaredOutputNames, Rn as setAwsClients, Rt as shouldRetainResource, S as createPreDeleteFinalSnapshot, Sn as CFN_TEMPLATE_BODY_LIMIT, St as scrubResourceRecord, T as unsupportedFinalSnapshotError, Tn as findLargeInlineResources, Tt as s3BucketDualStackDomainName, U as stateKeySecretExposure, Un as DeployCancelledError, Ut as createAssetRedirectResolver, V as isExportAliasCollision, Vt as WorkGraph, W as IAMRoleProvider, Wn as LocalInvokeBuildError$1, Wt as loadPublishableAssetManifest, X as CloudControlProvider, Xn as PartialFailureError, Xt as ensureAssetStorage, Y as findSilentDropProperties, Yn as NestedStackChildDirectDestroyError, Yt as BOOTSTRAP_MARKER_PREFIX, Z as slowCcOperationTimeoutMs, Zn as ProvisioningError, Zt as getBootstrapMarkerKey, _ as computeImplicitDeleteEdges, _n as resolveStateBucketWithDefault, _t as STATE_SOURCED_READBACK_RULES, a as DeploymentEventsStore, an as runDockerForeground, at as normalizeAwsTagsToCfn, b as buildFinalSnapshotIdentifier, bn as stateBucketExistenceConfirmed, bt as maskSecretsInText, c as replayFailedOperations, cn as getDockerImageBySourceHash, cr as isMarkedNonRetryable, ct as coerceCfnBoolean, d as updatePartialReason, dn as getDefaultStateBucketName, dr as markNonRetryable, dt as readConfigString, en as validateContainerRepoName, er as StackHasActiveImportsError, et as IntrinsicFunctionResolver, f as UNSPECIFIED_SKIP_REASON, fn as getLegacyStateBucketName, ft as replayWarn, g as IMPLICIT_DELETE_DEPENDENCIES, gn as resolveSkipPrefix, gt as STATE_SOURCED_CROSS_GENERATION_RULES, h as maskingRetryLogger, hn as resolveCaptureObservedState, ht as requireConfigString, i as DeploymentEventsReader, in as getDockerCmd, it as WAFv2WebACLProvider, j as formatResourceLine, jn as AssemblyReader, jt as describeTypeWithThrottleRetry, k as isStatefulRecreateTargetSync, kn as canonicalizeRegion, kt as DiffCalculator, l as replayRollback, ln as Synthesizer, lr as isRetryableTransientError, lt as configBooleanRefusal, m as withResourceDeadline, mn as resolveAutoAssetStorage, mt as requireConfigObject, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nn as buildDockerImage, nt as getAccountInfo, o as planFailedOps, on as runDockerStreaming, or as normalizeAwsError, ot as resolveExplicitPhysicalId, p as deleteSkipReason, pn as resolveApp, pt as requireConfigArray, q as ProviderRegistry, qt as stripControlChars, r as DeployEngine, rn as formatDockerLoginError, rt as refStateLookupFromResource, s as planRollback, sn as AssetManifestLoader, sr as withErrorHandling, st as assertRegionMatch, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as buildDenyExternalAccessPolicy, tr as StackTerminationProtectionError, tt as cfnRefValueFromPhysicalId, u as updatePartialMessage, un as synthesisStatusMessage, ur as isThrottlingError, ut as configStringRefusal, v as ATOMIC_FINAL_SNAPSHOT_TYPES, vn as resolveStateBucketWithDefaultAndSource, vt as TEMPLATE_SOURCED_RULES, w as refusesFinalSnapshot, wn as MIGRATE_TMP_PREFIX, wt as s3BucketDomainName, x as ccRoutedFinalSnapshotError, xn as warnDeprecatedNoPrefixCliFlag, xt as redactSecretsForState, y as PRE_DELETE_SNAPSHOT_TYPES, yn as resolveUseCdkBootstrapAssets, yt as createSecretMasker, z as collectPublishedOutputNames, zt as AssetPublisher } from "./deploy-engine-HK-oROJf.js";
3
3
  import { a as getLiveRenderer, c as PATTERN_B_RESOURCE_TYPES, d as generateResourceNameWithFallback, f as getCurrentStackName, h as withStackName, i as runStackBuffered, m as withSkipPrefix, n as getLogger, o as PATTERN_B_NAME_OPTIONS, s as PATTERN_B_NAME_PROPERTIES, u as generateResourceName } from "./logger-zRrlbaQt.js";
4
- import { t as ASGProvider } from "./asg-provider-BbLu5LGL.js";
4
+ import { t as ASGProvider } from "./asg-provider-IPF2MfAC.js";
5
5
  import { AsyncLocalStorage } from "node:async_hooks";
6
6
  import { createHash, randomBytes, randomUUID } from "node:crypto";
7
7
  import { CopyObjectCommand, 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, PutObjectCommand, PutObjectLockConfigurationCommand, PutPublicAccessBlockCommand, S3Client, S3ServiceException } from "@aws-sdk/client-s3";
@@ -34753,10 +34753,18 @@ var ELBv2Provider = class {
34753
34753
  * `withRetry`, whose per-attempt `debug` line and give-up `warn` summary
34754
34754
  * interpolate the AWS message verbatim — and that payload is built from
34755
34755
  * RESOLVED template properties. See {@link maskedRetryLogger}.
34756
+ *
34757
+ * The LoadBalancer arm receives it too (issue #2063). It runs no `withRetry`,
34758
+ * but it has the two surfaces that do not need one: the `ProvisioningError`
34759
+ * its catch throws (printed at ERROR — DEFAULT verbosity — by
34760
+ * `deploy-engine.ts`) and its partial-create cleanup `warn`. Its payload is
34761
+ * `Name` / `Subnets` / `SecurityGroups` / `LoadBalancerAttributes` values /
34762
+ * `Tags` values straight out of the resolved bag, and AWS quotes a rejected
34763
+ * value back.
34756
34764
  */
34757
34765
  async create(logicalId, resourceType, properties, context) {
34758
34766
  switch (resourceType) {
34759
- case "AWS::ElasticLoadBalancingV2::LoadBalancer": return this.createLoadBalancer(logicalId, resourceType, properties);
34767
+ case "AWS::ElasticLoadBalancingV2::LoadBalancer": return this.createLoadBalancer(logicalId, resourceType, properties, context?.maskSecrets);
34760
34768
  case "AWS::ElasticLoadBalancingV2::TargetGroup": return this.createTargetGroup(logicalId, resourceType, properties, context?.maskSecrets);
34761
34769
  case "AWS::ElasticLoadBalancingV2::Listener": return this.createListener(logicalId, resourceType, properties, context?.maskSecrets);
34762
34770
  default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId);
@@ -34765,6 +34773,15 @@ var ELBv2Provider = class {
34765
34773
  /**
34766
34774
  * `context` is read for ONE thing today: `maskSecrets` (issue #2050) — the
34767
34775
  * update-path twin of the `create()` note above.
34776
+ *
34777
+ * The catch below is the LoadBalancer arm's masking site (issue #2063), and
34778
+ * the reason that arm needs no `maskSecrets` parameter of its own.
34779
+ * `updateLoadBalancer` has no try/catch: its `ModifyLoadBalancerAttributes` /
34780
+ * `SetSubnets` / `SetSecurityGroups` / `AddTags` rejections — every one of
34781
+ * them built from the resolved `properties` bag — propagate RAW to here.
34782
+ * The sibling arms wrap their own errors into a `ProvisioningError` first,
34783
+ * so the `CdkdError` passthrough short-circuits them and this frame masks
34784
+ * only what actually escapes unwrapped.
34768
34785
  */
34769
34786
  async update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
34770
34787
  try {
@@ -34772,12 +34789,12 @@ var ELBv2Provider = class {
34772
34789
  } catch (error) {
34773
34790
  if (error instanceof CdkdError) throw error;
34774
34791
  const cause = error instanceof Error ? error : void 0;
34775
- throw new ProvisioningError(`Failed to update ELBv2 resource ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, physicalId, cause);
34792
+ throw new ProvisioningError(`Failed to update ELBv2 resource ${logicalId}: ${this.maskErrorMessage(error, context?.maskSecrets)}`, resourceType, logicalId, physicalId, cause);
34776
34793
  }
34777
34794
  }
34778
34795
  async applyUpdate(logicalId, physicalId, resourceType, properties, previousProperties, context) {
34779
34796
  switch (resourceType) {
34780
- case "AWS::ElasticLoadBalancingV2::LoadBalancer": return this.updateLoadBalancer(logicalId, physicalId, resourceType, properties, previousProperties);
34797
+ case "AWS::ElasticLoadBalancingV2::LoadBalancer": return this.updateLoadBalancer(logicalId, physicalId, resourceType, properties, previousProperties, context?.maskSecrets);
34781
34798
  case "AWS::ElasticLoadBalancingV2::TargetGroup": return this.updateTargetGroup(logicalId, physicalId, resourceType, properties, previousProperties, context?.maskSecrets);
34782
34799
  case "AWS::ElasticLoadBalancingV2::Listener": return this.updateListener(logicalId, physicalId, resourceType, properties, previousProperties, context?.maskSecrets);
34783
34800
  default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId, physicalId);
@@ -34791,7 +34808,7 @@ var ELBv2Provider = class {
34791
34808
  default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId, physicalId);
34792
34809
  }
34793
34810
  }
34794
- async createLoadBalancer(logicalId, resourceType, properties) {
34811
+ async createLoadBalancer(logicalId, resourceType, properties, maskSecrets) {
34795
34812
  this.logger.debug(`Creating LoadBalancer ${logicalId}`);
34796
34813
  try {
34797
34814
  const tags = this.extractTags(properties);
@@ -34838,7 +34855,7 @@ var ELBv2Provider = class {
34838
34855
  SecurityGroups: properties["SecurityGroups"] ?? [],
34839
34856
  EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic: enforcePrivateLink
34840
34857
  }));
34841
- this.logger.debug(`Applied EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic=${enforcePrivateLink} for ${logicalId}`);
34858
+ this.logger.debug(`Applied EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic=${maskerOrIdentity(maskSecrets)(String(enforcePrivateLink))} for ${logicalId}`);
34842
34859
  }
34843
34860
  const minCapacity = properties["MinimumLoadBalancerCapacity"];
34844
34861
  if (minCapacity?.CapacityUnits !== void 0) {
@@ -34846,7 +34863,7 @@ var ELBv2Provider = class {
34846
34863
  LoadBalancerArn: lbArn,
34847
34864
  MinimumLoadBalancerCapacity: { CapacityUnits: Number(minCapacity.CapacityUnits) }
34848
34865
  }));
34849
- this.logger.debug(`Requested capacity reservation of ${minCapacity.CapacityUnits} LCU for ${logicalId}`);
34866
+ this.logger.debug(`Requested capacity reservation of ${maskerOrIdentity(maskSecrets)(String(minCapacity.CapacityUnits))} LCU for ${logicalId}`);
34850
34867
  if (isTruthyCfnBoolean(properties["EnableCapacityReservationProvisionStabilize"]) && process.env["CDKD_NO_WAIT"] !== "true") await this.waitForCapacityReservationProvisioned(lbArn, logicalId);
34851
34868
  }
34852
34869
  } catch (innerError) {
@@ -34854,7 +34871,7 @@ var ELBv2Provider = class {
34854
34871
  await this.getClient().send(new DeleteLoadBalancerCommand({ LoadBalancerArn: lbArn }));
34855
34872
  this.logger.debug(`Cleaned up partially-created LoadBalancer ${logicalId} (${lbArn}) after wiring failure`);
34856
34873
  } catch (cleanupError) {
34857
- this.logger.warn(`Failed to clean up partially-created LoadBalancer ${logicalId} (${lbArn}): ${cleanupError instanceof Error ? cleanupError.message : String(cleanupError)}. Manual deletion may be required before the next deploy: aws elbv2 delete-load-balancer --load-balancer-arn ${lbArn}`);
34874
+ this.logger.warn(`Failed to clean up partially-created LoadBalancer ${logicalId} (${lbArn}): ${this.maskErrorMessage(cleanupError, maskSecrets)}. Manual deletion may be required before the next deploy: aws elbv2 delete-load-balancer --load-balancer-arn ${lbArn}`);
34858
34875
  }
34859
34876
  throw innerError;
34860
34877
  }
@@ -34870,10 +34887,10 @@ var ELBv2Provider = class {
34870
34887
  };
34871
34888
  } catch (error) {
34872
34889
  const cause = error instanceof Error ? error : void 0;
34873
- throw new ProvisioningError(`Failed to create LoadBalancer ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, void 0, cause);
34890
+ throw new ProvisioningError(`Failed to create LoadBalancer ${logicalId}: ${this.maskErrorMessage(error, maskSecrets)}`, resourceType, logicalId, void 0, cause);
34874
34891
  }
34875
34892
  }
34876
- async updateLoadBalancer(logicalId, physicalId, _resourceType, properties, previousProperties) {
34893
+ async updateLoadBalancer(logicalId, physicalId, _resourceType, properties, previousProperties, maskSecrets) {
34877
34894
  const handledKeys = /* @__PURE__ */ new Set([
34878
34895
  "LoadBalancerAttributes",
34879
34896
  "Subnets",
@@ -34955,7 +34972,7 @@ var ELBv2Provider = class {
34955
34972
  LoadBalancerArn: physicalId,
34956
34973
  ...newCapacityUnits !== void 0 ? { MinimumLoadBalancerCapacity: { CapacityUnits: newCapacityUnits } } : { ResetCapacityReservation: true }
34957
34974
  }));
34958
- this.logger.debug(newCapacityUnits !== void 0 ? `Requested capacity reservation of ${newCapacityUnits} LCU for ${logicalId}` : `Reset capacity reservation for ${logicalId}`);
34975
+ this.logger.debug(newCapacityUnits !== void 0 ? `Requested capacity reservation of ${maskerOrIdentity(maskSecrets)(String(newCapacity?.CapacityUnits))} LCU for ${logicalId}` : `Reset capacity reservation for ${logicalId}`);
34959
34976
  if (newCapacityUnits !== void 0 && isTruthyCfnBoolean(properties["EnableCapacityReservationProvisionStabilize"]) && process.env["CDKD_NO_WAIT"] !== "true") await this.waitForCapacityReservationProvisioned(physicalId, logicalId);
34960
34977
  }
34961
34978
  await this.applyTagDiff(physicalId, previousProperties["Tags"], properties["Tags"]);
@@ -34973,6 +34990,16 @@ var ELBv2Provider = class {
34973
34990
  * a timeout WARNS and continues (the reservation keeps provisioning
34974
34991
  * asynchronously and the ModifyCapacityReservation was accepted), while a
34975
34992
  * `failed` zonal state throws — that reservation will never provision.
34993
+ *
34994
+ * Takes NO masker, deliberately (issue #2063 audit). Its only request is
34995
+ * `DescribeCapacityReservation({ LoadBalancerArn })` with an AWS-issued ARN,
34996
+ * so no resolved template value is in the payload for AWS to quote back into
34997
+ * the transient-failure `debug` line; the timeout `warn` and the `failed`
34998
+ * throw are assembled from a logical id, a count and an AWS-supplied zonal
34999
+ * reason. A structural reason, not a likelihood judgement — add the
35000
+ * parameter if this ever sends a template-derived member. The `failed` throw
35001
+ * is an ordinary `Error`, so it lands in `createLoadBalancer`'s masked catch
35002
+ * on the create path and in `update()`'s on the update path either way.
34976
35003
  */
34977
35004
  async waitForCapacityReservationProvisioned(lbArn, logicalId) {
34978
35005
  const maxAttempts = 40;
@@ -42214,25 +42241,38 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
42214
42241
  * `context` is read for ONE thing today: `maskSecrets` (issue #2050). The
42215
42242
  * Service create path runs a post-create `UpdateServiceAttributes` through
42216
42243
  * `withRetry` — see {@link maskedRetryLogger}.
42244
+ *
42245
+ * EVERY arm receives it, not just the Service one (issue #2063). The three
42246
+ * namespace arms build their `Create*NamespaceCommand` payload out of the
42247
+ * RESOLVED `properties` bag — `Name`, `Description`, `Tags` — and each has
42248
+ * two disclosure surfaces for it: the `ProvisioningError` its catch throws
42249
+ * (printed at ERROR, i.e. DEFAULT verbosity, by `deploy-engine.ts`) and the
42250
+ * AWS `ErrorMessage` that {@link pollOperation} raises for a FAILED
42251
+ * operation. Cloud Map's create is operation-based, so the second one is the
42252
+ * NORMAL rejection path for those arms, not an edge case.
42217
42253
  */
42218
42254
  async create(logicalId, resourceType, properties, context) {
42219
42255
  switch (resourceType) {
42220
- case "AWS::ServiceDiscovery::PrivateDnsNamespace": return this.createNamespace(logicalId, resourceType, properties);
42221
- case "AWS::ServiceDiscovery::HttpNamespace": return this.createHttpNamespace(logicalId, resourceType, properties);
42222
- case "AWS::ServiceDiscovery::PublicDnsNamespace": return this.createPublicDnsNamespace(logicalId, resourceType, properties);
42256
+ case "AWS::ServiceDiscovery::PrivateDnsNamespace": return this.createNamespace(logicalId, resourceType, properties, context?.maskSecrets);
42257
+ case "AWS::ServiceDiscovery::HttpNamespace": return this.createHttpNamespace(logicalId, resourceType, properties, context?.maskSecrets);
42258
+ case "AWS::ServiceDiscovery::PublicDnsNamespace": return this.createPublicDnsNamespace(logicalId, resourceType, properties, context?.maskSecrets);
42223
42259
  case "AWS::ServiceDiscovery::Service": return this.createService(logicalId, resourceType, properties, context?.maskSecrets);
42224
42260
  default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId);
42225
42261
  }
42226
42262
  }
42227
42263
  /**
42228
42264
  * `context` is read for ONE thing today: `maskSecrets` (issue #2050) — the
42229
- * update-path twin of the `create()` note above.
42265
+ * update-path twin of the `create()` note above, and threaded into every arm
42266
+ * for the same reason (issue #2063). The namespace update arms carry one
42267
+ * payload surface the create arms do not: {@link syncNamespaceTags} sends
42268
+ * `TagResource` with the resolved `Tags` VALUES, whose rejection lands in
42269
+ * the arm's own catch.
42230
42270
  */
42231
42271
  update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
42232
42272
  switch (resourceType) {
42233
- case "AWS::ServiceDiscovery::PrivateDnsNamespace": return this.updateNamespace(logicalId, physicalId, resourceType, properties, previousProperties);
42234
- case "AWS::ServiceDiscovery::HttpNamespace": return this.updateHttpNamespace(logicalId, physicalId, resourceType, properties, previousProperties);
42235
- case "AWS::ServiceDiscovery::PublicDnsNamespace": return this.updatePublicDnsNamespace(logicalId, physicalId, resourceType, properties, previousProperties);
42273
+ case "AWS::ServiceDiscovery::PrivateDnsNamespace": return this.updateNamespace(logicalId, physicalId, resourceType, properties, previousProperties, context?.maskSecrets);
42274
+ case "AWS::ServiceDiscovery::HttpNamespace": return this.updateHttpNamespace(logicalId, physicalId, resourceType, properties, previousProperties, context?.maskSecrets);
42275
+ case "AWS::ServiceDiscovery::PublicDnsNamespace": return this.updatePublicDnsNamespace(logicalId, physicalId, resourceType, properties, previousProperties, context?.maskSecrets);
42236
42276
  case "AWS::ServiceDiscovery::Service": return this.updateService(logicalId, physicalId, resourceType, properties, previousProperties, context?.maskSecrets);
42237
42277
  default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId, physicalId);
42238
42278
  }
@@ -42246,7 +42286,7 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
42246
42286
  default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId, physicalId);
42247
42287
  }
42248
42288
  }
42249
- async createNamespace(logicalId, resourceType, properties) {
42289
+ async createNamespace(logicalId, resourceType, properties, maskSecrets) {
42250
42290
  this.logger.debug(`Creating private DNS namespace ${logicalId}`);
42251
42291
  const client = this.getClient();
42252
42292
  const name = properties["Name"];
@@ -42265,7 +42305,7 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
42265
42305
  ...inputProperties && { Properties: inputProperties }
42266
42306
  }))).OperationId;
42267
42307
  if (!operationId) throw new Error("CreatePrivateDnsNamespace did not return OperationId");
42268
- const namespaceId = await this.pollOperation(operationId, logicalId, resourceType);
42308
+ const namespaceId = await this.pollOperation(operationId, logicalId, resourceType, maskSecrets);
42269
42309
  const arn = await this.buildNamespaceArn(namespaceId);
42270
42310
  this.logger.debug(`Successfully created private DNS namespace ${logicalId}: ${namespaceId}`);
42271
42311
  return {
@@ -42278,7 +42318,7 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
42278
42318
  } catch (error) {
42279
42319
  if (error instanceof ProvisioningError) throw error;
42280
42320
  const cause = error instanceof Error ? error : void 0;
42281
- throw new ProvisioningError(`Failed to create private DNS namespace ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, void 0, cause);
42321
+ throw new ProvisioningError(`Failed to create private DNS namespace ${logicalId}: ${this.maskErrorMessage(error, maskSecrets)}`, resourceType, logicalId, void 0, cause);
42282
42322
  }
42283
42323
  }
42284
42324
  /**
@@ -42304,7 +42344,7 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
42304
42344
  * kind's Cloud Map default ({@link PRIVATE_DNS_NAMESPACE_DEFAULT_SOA_TTL}) —
42305
42345
  * the CFn-parity shape, live A/B'd 2026-08-11 on the private kind itself.
42306
42346
  */
42307
- async updateNamespace(logicalId, physicalId, resourceType, properties, previousProperties) {
42347
+ async updateNamespace(logicalId, physicalId, resourceType, properties, previousProperties, maskSecrets) {
42308
42348
  this.logger.debug(`Updating private DNS namespace ${logicalId}: ${physicalId}`);
42309
42349
  const client = this.getClient();
42310
42350
  const namespaceChange = {};
@@ -42318,7 +42358,7 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
42318
42358
  Id: physicalId,
42319
42359
  Namespace: namespaceChange
42320
42360
  }))).OperationId;
42321
- if (operationId) await this.pollOperation(operationId, logicalId, resourceType);
42361
+ if (operationId) await this.pollOperation(operationId, logicalId, resourceType, maskSecrets);
42322
42362
  } else this.logger.debug(`No mutable namespace-body diff for PrivateDnsNamespace ${logicalId}`);
42323
42363
  await this.syncNamespaceTags(logicalId, physicalId, properties, previousProperties);
42324
42364
  this.logger.debug(`Successfully updated private DNS namespace ${logicalId}`);
@@ -42329,7 +42369,7 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
42329
42369
  } catch (error) {
42330
42370
  if (error instanceof ProvisioningError) throw error;
42331
42371
  const cause = error instanceof Error ? error : void 0;
42332
- throw new ProvisioningError(`Failed to update private DNS namespace ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, physicalId, cause);
42372
+ throw new ProvisioningError(`Failed to update private DNS namespace ${logicalId}: ${this.maskErrorMessage(error, maskSecrets)}`, resourceType, logicalId, physicalId, cause);
42333
42373
  }
42334
42374
  }
42335
42375
  /**
@@ -42363,7 +42403,7 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
42363
42403
  throw new ProvisioningError(`Failed to delete Cloud Map namespace ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, physicalId, cause);
42364
42404
  }
42365
42405
  }
42366
- async createHttpNamespace(logicalId, resourceType, properties) {
42406
+ async createHttpNamespace(logicalId, resourceType, properties, maskSecrets) {
42367
42407
  this.logger.debug(`Creating HTTP namespace ${logicalId}`);
42368
42408
  const client = this.getClient();
42369
42409
  const name = properties["Name"];
@@ -42377,7 +42417,7 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
42377
42417
  ...tags && tags.length > 0 && { Tags: tags }
42378
42418
  }))).OperationId;
42379
42419
  if (!operationId) throw new Error("CreateHttpNamespace did not return OperationId");
42380
- const namespaceId = await this.pollOperation(operationId, logicalId, resourceType);
42420
+ const namespaceId = await this.pollOperation(operationId, logicalId, resourceType, maskSecrets);
42381
42421
  const arn = await this.resolveNamespaceArn(namespaceId);
42382
42422
  this.logger.debug(`Successfully created HTTP namespace ${logicalId}: ${namespaceId}`);
42383
42423
  return {
@@ -42390,7 +42430,7 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
42390
42430
  } catch (error) {
42391
42431
  if (error instanceof ProvisioningError) throw error;
42392
42432
  const cause = error instanceof Error ? error : void 0;
42393
- throw new ProvisioningError(`Failed to create HTTP namespace ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, void 0, cause);
42433
+ throw new ProvisioningError(`Failed to create HTTP namespace ${logicalId}: ${this.maskErrorMessage(error, maskSecrets)}`, resourceType, logicalId, void 0, cause);
42394
42434
  }
42395
42435
  }
42396
42436
  /**
@@ -42411,7 +42451,7 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
42411
42451
  * the template must be cleared explicitly via the `''` sentinel — the
42412
42452
  * CFn-parity shape, live A/B'd 2026-08-11 on this exact kind.
42413
42453
  */
42414
- async updateHttpNamespace(logicalId, physicalId, resourceType, properties, previousProperties) {
42454
+ async updateHttpNamespace(logicalId, physicalId, resourceType, properties, previousProperties, maskSecrets) {
42415
42455
  this.logger.debug(`Updating HTTP namespace ${logicalId}: ${physicalId}`);
42416
42456
  const client = this.getClient();
42417
42457
  const description = clearOnUpdateRemoval(properties["Description"], previousProperties["Description"], "");
@@ -42422,7 +42462,7 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
42422
42462
  Id: physicalId,
42423
42463
  Namespace: namespaceChange
42424
42464
  }))).OperationId;
42425
- if (operationId) await this.pollOperation(operationId, logicalId, resourceType);
42465
+ if (operationId) await this.pollOperation(operationId, logicalId, resourceType, maskSecrets);
42426
42466
  }
42427
42467
  await this.syncNamespaceTags(logicalId, physicalId, properties, previousProperties);
42428
42468
  this.logger.debug(`Successfully updated HTTP namespace ${logicalId}`);
@@ -42433,10 +42473,10 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
42433
42473
  } catch (error) {
42434
42474
  if (error instanceof ProvisioningError) throw error;
42435
42475
  const cause = error instanceof Error ? error : void 0;
42436
- throw new ProvisioningError(`Failed to update HTTP namespace ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, physicalId, cause);
42476
+ throw new ProvisioningError(`Failed to update HTTP namespace ${logicalId}: ${this.maskErrorMessage(error, maskSecrets)}`, resourceType, logicalId, physicalId, cause);
42437
42477
  }
42438
42478
  }
42439
- async createPublicDnsNamespace(logicalId, resourceType, properties) {
42479
+ async createPublicDnsNamespace(logicalId, resourceType, properties, maskSecrets) {
42440
42480
  this.logger.debug(`Creating public DNS namespace ${logicalId}`);
42441
42481
  const client = this.getClient();
42442
42482
  const name = properties["Name"];
@@ -42452,7 +42492,7 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
42452
42492
  ...inputProperties && { Properties: inputProperties }
42453
42493
  }))).OperationId;
42454
42494
  if (!operationId) throw new Error("CreatePublicDnsNamespace did not return OperationId");
42455
- const namespaceId = await this.pollOperation(operationId, logicalId, resourceType);
42495
+ const namespaceId = await this.pollOperation(operationId, logicalId, resourceType, maskSecrets);
42456
42496
  let arn;
42457
42497
  let hostedZoneId;
42458
42498
  try {
@@ -42475,7 +42515,7 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
42475
42515
  } catch (error) {
42476
42516
  if (error instanceof ProvisioningError) throw error;
42477
42517
  const cause = error instanceof Error ? error : void 0;
42478
- throw new ProvisioningError(`Failed to create public DNS namespace ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, void 0, cause);
42518
+ throw new ProvisioningError(`Failed to create public DNS namespace ${logicalId}: ${this.maskErrorMessage(error, maskSecrets)}`, resourceType, logicalId, void 0, cause);
42479
42519
  }
42480
42520
  }
42481
42521
  /**
@@ -42493,7 +42533,7 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
42493
42533
  * kind's Cloud Map default ({@link PUBLIC_DNS_NAMESPACE_DEFAULT_SOA_TTL}) —
42494
42534
  * the CFn-parity shape, live A/B'd 2026-08-11 on this exact kind.
42495
42535
  */
42496
- async updatePublicDnsNamespace(logicalId, physicalId, resourceType, properties, previousProperties) {
42536
+ async updatePublicDnsNamespace(logicalId, physicalId, resourceType, properties, previousProperties, maskSecrets) {
42497
42537
  this.logger.debug(`Updating public DNS namespace ${logicalId}: ${physicalId}`);
42498
42538
  const client = this.getClient();
42499
42539
  const namespaceChange = {};
@@ -42507,7 +42547,7 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
42507
42547
  Id: physicalId,
42508
42548
  Namespace: namespaceChange
42509
42549
  }))).OperationId;
42510
- if (operationId) await this.pollOperation(operationId, logicalId, resourceType);
42550
+ if (operationId) await this.pollOperation(operationId, logicalId, resourceType, maskSecrets);
42511
42551
  }
42512
42552
  await this.syncNamespaceTags(logicalId, physicalId, properties, previousProperties);
42513
42553
  this.logger.debug(`Successfully updated public DNS namespace ${logicalId}`);
@@ -42518,7 +42558,7 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
42518
42558
  } catch (error) {
42519
42559
  if (error instanceof ProvisioningError) throw error;
42520
42560
  const cause = error instanceof Error ? error : void 0;
42521
- throw new ProvisioningError(`Failed to update public DNS namespace ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, physicalId, cause);
42561
+ throw new ProvisioningError(`Failed to update public DNS namespace ${logicalId}: ${this.maskErrorMessage(error, maskSecrets)}`, resourceType, logicalId, physicalId, cause);
42522
42562
  }
42523
42563
  }
42524
42564
  async createService(logicalId, resourceType, properties, maskSecrets) {
@@ -42624,7 +42664,7 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
42624
42664
  Id: physicalId,
42625
42665
  Service: serviceChange
42626
42666
  }))).OperationId;
42627
- if (operationId) await this.pollOperation(operationId, logicalId, resourceType);
42667
+ if (operationId) await this.pollOperation(operationId, logicalId, resourceType, maskSecrets);
42628
42668
  }
42629
42669
  if (hasAttrUpsert) {
42630
42670
  await withRetry(() => client.send(new UpdateServiceAttributesCommand({
@@ -42695,6 +42735,15 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
42695
42735
  * Resolve a namespace's ARN — authoritative via `GetNamespace`, with a
42696
42736
  * deterministic STS-based construction as fallback so a transient read
42697
42737
  * failure right after create does not fail the whole resource.
42738
+ *
42739
+ * Takes NO masker, deliberately (issue #2063 audit). Its request is
42740
+ * `GetNamespace({ Id })` with an AWS-issued namespace id — no resolved
42741
+ * template value is in the payload, so the AWS error text it logs cannot
42742
+ * echo one back. That is a structural reason, not an assessment of
42743
+ * likelihood; add the parameter if this call ever grows a template-derived
42744
+ * member. The `TagResource` / `UntagResource` calls in
42745
+ * {@link syncNamespaceTags} DO carry resolved values, but they throw rather
42746
+ * than log, and the throw lands in the calling arm's masked catch.
42698
42747
  */
42699
42748
  async resolveNamespaceArn(namespaceId) {
42700
42749
  try {
@@ -42737,8 +42786,39 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
42737
42786
  /**
42738
42787
  * Poll a Service Discovery operation until it completes.
42739
42788
  * Returns the target resource ID from the operation result.
42740
- */
42741
- async pollOperation(operationId, logicalId, resourceType) {
42789
+ *
42790
+ * MASKS `Operation.ErrorMessage` (issue #2063), and this is the only place
42791
+ * that can. Cloud Map's create / update are operation-based: the caller's
42792
+ * `Create*Namespace` / `Update*` request carried the RESOLVED `properties`
42793
+ * bag — `Name`, `Description`, `Tags`, `DnsConfig` — and AWS reports its
42794
+ * rejection here rather than by rejecting the submit call, quoting the
42795
+ * offending value back in `ErrorMessage`. A FAILED operation is therefore
42796
+ * the NORMAL rejection path for these arms, not an edge case.
42797
+ *
42798
+ * Why not leave it to the arms' own catch: every namespace arm and
42799
+ * `updateService` open with `if (error instanceof ProvisioningError) throw
42800
+ * error;`, so a `ProvisioningError` raised here is re-thrown VERBATIM and
42801
+ * never reaches their `maskErrorMessage`. `deploy-engine.ts` then prints it
42802
+ * at ERROR — DEFAULT verbosity. That passthrough is correct (it preserves
42803
+ * the resource/logical-id context this frame added), which is exactly why
42804
+ * the mask has to be applied at the point of construction.
42805
+ *
42806
+ * `errorMessage` is masked RAW, before any interpolation. Stating precisely
42807
+ * what that buys, because the obvious phrasing over-claims (issue #2063
42808
+ * review): `maskSecretsInText`'s WHOLE-VALUE arm fires only when
42809
+ * `secrets.has(text)` — i.e. when the text IS the secret in its entirety —
42810
+ * so masking raw covers the case where AWS returns the offending value as
42811
+ * the whole `ErrorMessage`, at ANY length, including below the substring
42812
+ * arm's 4-character `MIN_NEEDLE_LENGTH` floor. When AWS instead quotes the
42813
+ * value INSIDE a sentence, the substring arm handles it and that floor
42814
+ * applies either way, raw or not. So masking here is strictly better than
42815
+ * masking the assembled message, but it is not general sub-4-character
42816
+ * coverage. See `SecretMaskingContext` in `src/types/resource.ts`.
42817
+ *
42818
+ * The `operationId` / timeout message below carries no template-derived
42819
+ * value (an AWS-issued opaque id), so it is left as-is.
42820
+ */
42821
+ async pollOperation(operationId, logicalId, resourceType, maskSecrets) {
42742
42822
  const client = this.getClient();
42743
42823
  const maxAttempts = 60;
42744
42824
  let delay = 1e3;
@@ -42750,7 +42830,7 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
42750
42830
  if (targets) return targets["NAMESPACE"] || targets["SERVICE"] || operationId;
42751
42831
  return operationId;
42752
42832
  }
42753
- if (status === "FAIL") throw new ProvisioningError(`Operation failed for ${logicalId}: ${result.Operation?.ErrorMessage || "Unknown error"}`, resourceType, logicalId);
42833
+ if (status === "FAIL") throw new ProvisioningError(`Operation failed for ${logicalId}: ${maskerOrIdentity(maskSecrets)(result.Operation?.ErrorMessage || "Unknown error")}`, resourceType, logicalId);
42754
42834
  await new Promise((resolve) => setTimeout(resolve, delay));
42755
42835
  delay = Math.min(delay * 2, 1e4);
42756
42836
  }
@@ -83690,7 +83770,7 @@ function createMigrateCommand() {
83690
83770
  */
83691
83771
  function buildProgram() {
83692
83772
  const program = new Command();
83693
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.284.17");
83773
+ program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.284.18");
83694
83774
  program.hook("preAction", (_thisCommand, actionCommand) => {
83695
83775
  const { profile } = actionCommand.optsWithGlobals();
83696
83776
  if (profile !== void 0) process.env["AWS_PROFILE"] = profile;