@go-to-k/cdkd 0.284.17 → 0.284.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{asg-provider-BbLu5LGL.js → asg-provider-CuSoYdf6.js} +2 -2
- package/dist/{asg-provider-BbLu5LGL.js.map → asg-provider-CuSoYdf6.js.map} +1 -1
- package/dist/cli.js +132 -72
- package/dist/cli.js.map +1 -1
- package/dist/{deploy-engine-Bnu1WuRI.js → deploy-engine-Bh_LPdju.js} +95 -11
- package/dist/deploy-engine-Bh_LPdju.js.map +1 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/deploy-engine-Bnu1WuRI.js.map +0 -1
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $ as isTerminationProtectionPropagationError, $n as
|
|
2
|
+
import { $ as isTerminationProtectionPropagationError, $n as ResourceTimeoutError, $t as readBootstrapMarkerBody, A as renderStatefulReason, An as canonicalizeRegion, At as INTRINSIC_KEYS, B as exportAliasCollisionScrubWarning, Bt as stringifyValue, C as isFinalSnapshotError, Cn as CFN_TEMPLATE_BODY_LIMIT, Ct as s3BucketArn, D as extractDeploymentEventError, Dn as uploadCfnTemplate, Dt as s3BucketWebsiteUrl, E as makeCanonicalizePropertiesFn, En as findLargeInlineResources, Et as s3BucketRegionalDomainName, F as green, Fn as resolveBucketRegion, Ft as LockManager, G as collectInlinePolicyNamesManagedBySiblings, Gn as LocalInvokeBuildError$1, Gt as rewriteTemplateAssetReferences, H as secretBearingStateKeyWarning, Ht as buildAssetRedirectMap, I as red, In as AwsClients, It as S3StateBackend, J as findActionableSilentDrops, Jt as AssetModeResolver, K as clearOnUpdateRemoval, Kn as LocalMigrateError, Kt as escapeRegExp, L as yellow, Ln as getAwsClients, Lt as rebuildClientForBucketRegion, M as bold, Mn as AssemblyReader, Mt as withRetry, N as cyan, Nn as processStackMessages, Nt as DagBuilder, O as MULTI_REGION_RECREATE_BLOCKED_TYPES, On as expectedOwnerParam, Ot as applyRoleArnIfSet, P as gray, Pt as TemplateParser, Q as disableInstanceApiTermination, Qn as ProvisioningError, Qt as parseBootstrapMarker, R as collectDeclaredOutputNames, Rn as resetAwsClients, Rt as shouldRetainResource, S as createPreDeleteFinalSnapshot, Sn as warnDeprecatedNoPrefixCliFlag, St as scrubResourceRecord, T as unsupportedFinalSnapshotError, Tn as MIGRATE_TMP_PREFIX, Tt as s3BucketDualStackDomainName, U as stateKeySecretExposure, Ut as createAssetRedirectResolver, V as isExportAliasCollision, Vn as CdkdError, Vt as WorkGraph, W as IAMRoleProvider, Wn as DeployCancelledError, Wt as loadPublishableAssetManifest, X as CloudControlProvider, Xn as NestedStackChildDirectDestroyError, Xt as ensureAssetStorage, Y as findSilentDropProperties, Yn as MissingCdkCliError, Yt as BOOTSTRAP_MARKER_PREFIX, Z as slowCcOperationTimeoutMs, Zn as PartialFailureError, Zt as getBootstrapMarkerKey, _ as computeImplicitDeleteEdges, _n as resolveSkipPrefix, _t as STATE_SOURCED_READBACK_RULES, a as DeploymentEventsStore, an as getDockerCmd, at as normalizeAwsTagsToCfn, b as buildFinalSnapshotIdentifier, bn as resolveUseCdkBootstrapAssets, bt as maskSecretsInText, c as replayFailedOperations, cn as AssetManifestLoader, cr as withErrorHandling, ct as coerceCfnBoolean, d as updatePartialReason, dn as synthesisStatusMessage, dr as isThrottlingError, dt as readConfigString, en as validateAssetBucketName, er as ResourceUpdateNotSupportedError, et as IntrinsicFunctionResolver, f as UNSPECIFIED_SKIP_REASON, fn as getDefaultStateBucketName, fr as markNonRetryable, ft as replayWarn, g as IMPLICIT_DELETE_DEPENDENCIES, gn as resolveCaptureObservedState, gt as STATE_SOURCED_CROSS_GENERATION_RULES, h as maskingRetryLogger, hn as resolveAutoAssetStorage, ht as requireConfigString, i as DeploymentEventsReader, in as formatDockerLoginError, it as WAFv2WebACLProvider, j as formatResourceLine, jn as derivePartitionAndUrlSuffix, jt as describeTypeWithThrottleRetry, k as isStatefulRecreateTargetSync, kn as PARTITION_TABLE, kt as DiffCalculator, l as replayRollback, ln as getDockerImageBySourceHash, lr as isMarkedNonRetryable, lt as configBooleanRefusal, m as withResourceDeadline, mn as resolveApp, mt as requireConfigObject, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nn as buildDenyExternalAccessPolicy, nr as StackTerminationProtectionError, nt as getAccountInfo, o as planFailedOps, on as runDockerForeground, ot as resolveExplicitPhysicalId, p as deleteSkipReason, pn as getLegacyStateBucketName, pt as requireConfigArray, q as ProviderRegistry, qn as LocalStartServiceError, qt as stripControlChars, r as DeployEngine, rn as buildDockerImage, rt as refStateLookupFromResource, s as planRollback, sn as runDockerStreaming, sr as normalizeAwsError, st as assertRegionMatch, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as validateContainerRepoName, tr as StackHasActiveImportsError, tt as cfnRefValueFromPhysicalId, u as updatePartialMessage, un as Synthesizer, ur as isRetryableTransientError, ut as configStringRefusal, v as ATOMIC_FINAL_SNAPSHOT_TYPES, vn as resolveStateBucketWithDefault, vt as TEMPLATE_SOURCED_RULES, w as refusesFinalSnapshot, wn as CFN_TEMPLATE_URL_LIMIT, wt as s3BucketDomainName, x as ccRoutedFinalSnapshotError, xn as stateBucketExistenceConfirmed, xt as redactSecretsForState, y as PRE_DELETE_SNAPSHOT_TYPES, yn as resolveStateBucketWithDefaultAndSource, yt as createSecretMasker, z as collectPublishedOutputNames, zn as setAwsClients, zt as AssetPublisher } from "./deploy-engine-Bh_LPdju.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-
|
|
4
|
+
import { t as ASGProvider } from "./asg-provider-CuSoYdf6.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";
|
|
@@ -1096,14 +1096,9 @@ async function bootstrapDestroyCommand(options) {
|
|
|
1096
1096
|
let markerBody;
|
|
1097
1097
|
let resolvedMarkerKey = markerKey;
|
|
1098
1098
|
try {
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
if (markerBody !== null) {
|
|
1103
|
-
resolvedMarkerKey = rawMarkerKey;
|
|
1104
|
-
logger.debug(`Bootstrap marker found at the un-folded key '${rawMarkerKey}' (none at '${markerKey}') — an upper-cased region was used at 'cdkd bootstrap' time.`);
|
|
1105
|
-
}
|
|
1106
|
-
}
|
|
1099
|
+
const read = await readBootstrapMarkerBody(stateBackend, rawRegion);
|
|
1100
|
+
markerBody = read.body;
|
|
1101
|
+
resolvedMarkerKey = read.resolvedKey;
|
|
1107
1102
|
} catch (error) {
|
|
1108
1103
|
if (error.name === "NoSuchBucket") {
|
|
1109
1104
|
logger.info(`State bucket '${bucketName}' does not exist — this account/region was never bootstrapped; nothing to delete.`);
|
|
@@ -34753,10 +34748,18 @@ var ELBv2Provider = class {
|
|
|
34753
34748
|
* `withRetry`, whose per-attempt `debug` line and give-up `warn` summary
|
|
34754
34749
|
* interpolate the AWS message verbatim — and that payload is built from
|
|
34755
34750
|
* RESOLVED template properties. See {@link maskedRetryLogger}.
|
|
34751
|
+
*
|
|
34752
|
+
* The LoadBalancer arm receives it too (issue #2063). It runs no `withRetry`,
|
|
34753
|
+
* but it has the two surfaces that do not need one: the `ProvisioningError`
|
|
34754
|
+
* its catch throws (printed at ERROR — DEFAULT verbosity — by
|
|
34755
|
+
* `deploy-engine.ts`) and its partial-create cleanup `warn`. Its payload is
|
|
34756
|
+
* `Name` / `Subnets` / `SecurityGroups` / `LoadBalancerAttributes` values /
|
|
34757
|
+
* `Tags` values straight out of the resolved bag, and AWS quotes a rejected
|
|
34758
|
+
* value back.
|
|
34756
34759
|
*/
|
|
34757
34760
|
async create(logicalId, resourceType, properties, context) {
|
|
34758
34761
|
switch (resourceType) {
|
|
34759
|
-
case "AWS::ElasticLoadBalancingV2::LoadBalancer": return this.createLoadBalancer(logicalId, resourceType, properties);
|
|
34762
|
+
case "AWS::ElasticLoadBalancingV2::LoadBalancer": return this.createLoadBalancer(logicalId, resourceType, properties, context?.maskSecrets);
|
|
34760
34763
|
case "AWS::ElasticLoadBalancingV2::TargetGroup": return this.createTargetGroup(logicalId, resourceType, properties, context?.maskSecrets);
|
|
34761
34764
|
case "AWS::ElasticLoadBalancingV2::Listener": return this.createListener(logicalId, resourceType, properties, context?.maskSecrets);
|
|
34762
34765
|
default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId);
|
|
@@ -34765,6 +34768,15 @@ var ELBv2Provider = class {
|
|
|
34765
34768
|
/**
|
|
34766
34769
|
* `context` is read for ONE thing today: `maskSecrets` (issue #2050) — the
|
|
34767
34770
|
* update-path twin of the `create()` note above.
|
|
34771
|
+
*
|
|
34772
|
+
* The catch below is the LoadBalancer arm's masking site (issue #2063), and
|
|
34773
|
+
* the reason that arm needs no `maskSecrets` parameter of its own.
|
|
34774
|
+
* `updateLoadBalancer` has no try/catch: its `ModifyLoadBalancerAttributes` /
|
|
34775
|
+
* `SetSubnets` / `SetSecurityGroups` / `AddTags` rejections — every one of
|
|
34776
|
+
* them built from the resolved `properties` bag — propagate RAW to here.
|
|
34777
|
+
* The sibling arms wrap their own errors into a `ProvisioningError` first,
|
|
34778
|
+
* so the `CdkdError` passthrough short-circuits them and this frame masks
|
|
34779
|
+
* only what actually escapes unwrapped.
|
|
34768
34780
|
*/
|
|
34769
34781
|
async update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
|
|
34770
34782
|
try {
|
|
@@ -34772,12 +34784,12 @@ var ELBv2Provider = class {
|
|
|
34772
34784
|
} catch (error) {
|
|
34773
34785
|
if (error instanceof CdkdError) throw error;
|
|
34774
34786
|
const cause = error instanceof Error ? error : void 0;
|
|
34775
|
-
throw new ProvisioningError(`Failed to update ELBv2 resource ${logicalId}: ${
|
|
34787
|
+
throw new ProvisioningError(`Failed to update ELBv2 resource ${logicalId}: ${this.maskErrorMessage(error, context?.maskSecrets)}`, resourceType, logicalId, physicalId, cause);
|
|
34776
34788
|
}
|
|
34777
34789
|
}
|
|
34778
34790
|
async applyUpdate(logicalId, physicalId, resourceType, properties, previousProperties, context) {
|
|
34779
34791
|
switch (resourceType) {
|
|
34780
|
-
case "AWS::ElasticLoadBalancingV2::LoadBalancer": return this.updateLoadBalancer(logicalId, physicalId, resourceType, properties, previousProperties);
|
|
34792
|
+
case "AWS::ElasticLoadBalancingV2::LoadBalancer": return this.updateLoadBalancer(logicalId, physicalId, resourceType, properties, previousProperties, context?.maskSecrets);
|
|
34781
34793
|
case "AWS::ElasticLoadBalancingV2::TargetGroup": return this.updateTargetGroup(logicalId, physicalId, resourceType, properties, previousProperties, context?.maskSecrets);
|
|
34782
34794
|
case "AWS::ElasticLoadBalancingV2::Listener": return this.updateListener(logicalId, physicalId, resourceType, properties, previousProperties, context?.maskSecrets);
|
|
34783
34795
|
default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId, physicalId);
|
|
@@ -34791,7 +34803,7 @@ var ELBv2Provider = class {
|
|
|
34791
34803
|
default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId, physicalId);
|
|
34792
34804
|
}
|
|
34793
34805
|
}
|
|
34794
|
-
async createLoadBalancer(logicalId, resourceType, properties) {
|
|
34806
|
+
async createLoadBalancer(logicalId, resourceType, properties, maskSecrets) {
|
|
34795
34807
|
this.logger.debug(`Creating LoadBalancer ${logicalId}`);
|
|
34796
34808
|
try {
|
|
34797
34809
|
const tags = this.extractTags(properties);
|
|
@@ -34838,7 +34850,7 @@ var ELBv2Provider = class {
|
|
|
34838
34850
|
SecurityGroups: properties["SecurityGroups"] ?? [],
|
|
34839
34851
|
EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic: enforcePrivateLink
|
|
34840
34852
|
}));
|
|
34841
|
-
this.logger.debug(`Applied EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic=${enforcePrivateLink} for ${logicalId}`);
|
|
34853
|
+
this.logger.debug(`Applied EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic=${maskerOrIdentity(maskSecrets)(String(enforcePrivateLink))} for ${logicalId}`);
|
|
34842
34854
|
}
|
|
34843
34855
|
const minCapacity = properties["MinimumLoadBalancerCapacity"];
|
|
34844
34856
|
if (minCapacity?.CapacityUnits !== void 0) {
|
|
@@ -34846,7 +34858,7 @@ var ELBv2Provider = class {
|
|
|
34846
34858
|
LoadBalancerArn: lbArn,
|
|
34847
34859
|
MinimumLoadBalancerCapacity: { CapacityUnits: Number(minCapacity.CapacityUnits) }
|
|
34848
34860
|
}));
|
|
34849
|
-
this.logger.debug(`Requested capacity reservation of ${minCapacity.CapacityUnits} LCU for ${logicalId}`);
|
|
34861
|
+
this.logger.debug(`Requested capacity reservation of ${maskerOrIdentity(maskSecrets)(String(minCapacity.CapacityUnits))} LCU for ${logicalId}`);
|
|
34850
34862
|
if (isTruthyCfnBoolean(properties["EnableCapacityReservationProvisionStabilize"]) && process.env["CDKD_NO_WAIT"] !== "true") await this.waitForCapacityReservationProvisioned(lbArn, logicalId);
|
|
34851
34863
|
}
|
|
34852
34864
|
} catch (innerError) {
|
|
@@ -34854,7 +34866,7 @@ var ELBv2Provider = class {
|
|
|
34854
34866
|
await this.getClient().send(new DeleteLoadBalancerCommand({ LoadBalancerArn: lbArn }));
|
|
34855
34867
|
this.logger.debug(`Cleaned up partially-created LoadBalancer ${logicalId} (${lbArn}) after wiring failure`);
|
|
34856
34868
|
} catch (cleanupError) {
|
|
34857
|
-
this.logger.warn(`Failed to clean up partially-created LoadBalancer ${logicalId} (${lbArn}): ${
|
|
34869
|
+
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
34870
|
}
|
|
34859
34871
|
throw innerError;
|
|
34860
34872
|
}
|
|
@@ -34870,10 +34882,10 @@ var ELBv2Provider = class {
|
|
|
34870
34882
|
};
|
|
34871
34883
|
} catch (error) {
|
|
34872
34884
|
const cause = error instanceof Error ? error : void 0;
|
|
34873
|
-
throw new ProvisioningError(`Failed to create LoadBalancer ${logicalId}: ${
|
|
34885
|
+
throw new ProvisioningError(`Failed to create LoadBalancer ${logicalId}: ${this.maskErrorMessage(error, maskSecrets)}`, resourceType, logicalId, void 0, cause);
|
|
34874
34886
|
}
|
|
34875
34887
|
}
|
|
34876
|
-
async updateLoadBalancer(logicalId, physicalId, _resourceType, properties, previousProperties) {
|
|
34888
|
+
async updateLoadBalancer(logicalId, physicalId, _resourceType, properties, previousProperties, maskSecrets) {
|
|
34877
34889
|
const handledKeys = /* @__PURE__ */ new Set([
|
|
34878
34890
|
"LoadBalancerAttributes",
|
|
34879
34891
|
"Subnets",
|
|
@@ -34955,7 +34967,7 @@ var ELBv2Provider = class {
|
|
|
34955
34967
|
LoadBalancerArn: physicalId,
|
|
34956
34968
|
...newCapacityUnits !== void 0 ? { MinimumLoadBalancerCapacity: { CapacityUnits: newCapacityUnits } } : { ResetCapacityReservation: true }
|
|
34957
34969
|
}));
|
|
34958
|
-
this.logger.debug(newCapacityUnits !== void 0 ? `Requested capacity reservation of ${
|
|
34970
|
+
this.logger.debug(newCapacityUnits !== void 0 ? `Requested capacity reservation of ${maskerOrIdentity(maskSecrets)(String(newCapacity?.CapacityUnits))} LCU for ${logicalId}` : `Reset capacity reservation for ${logicalId}`);
|
|
34959
34971
|
if (newCapacityUnits !== void 0 && isTruthyCfnBoolean(properties["EnableCapacityReservationProvisionStabilize"]) && process.env["CDKD_NO_WAIT"] !== "true") await this.waitForCapacityReservationProvisioned(physicalId, logicalId);
|
|
34960
34972
|
}
|
|
34961
34973
|
await this.applyTagDiff(physicalId, previousProperties["Tags"], properties["Tags"]);
|
|
@@ -34973,6 +34985,16 @@ var ELBv2Provider = class {
|
|
|
34973
34985
|
* a timeout WARNS and continues (the reservation keeps provisioning
|
|
34974
34986
|
* asynchronously and the ModifyCapacityReservation was accepted), while a
|
|
34975
34987
|
* `failed` zonal state throws — that reservation will never provision.
|
|
34988
|
+
*
|
|
34989
|
+
* Takes NO masker, deliberately (issue #2063 audit). Its only request is
|
|
34990
|
+
* `DescribeCapacityReservation({ LoadBalancerArn })` with an AWS-issued ARN,
|
|
34991
|
+
* so no resolved template value is in the payload for AWS to quote back into
|
|
34992
|
+
* the transient-failure `debug` line; the timeout `warn` and the `failed`
|
|
34993
|
+
* throw are assembled from a logical id, a count and an AWS-supplied zonal
|
|
34994
|
+
* reason. A structural reason, not a likelihood judgement — add the
|
|
34995
|
+
* parameter if this ever sends a template-derived member. The `failed` throw
|
|
34996
|
+
* is an ordinary `Error`, so it lands in `createLoadBalancer`'s masked catch
|
|
34997
|
+
* on the create path and in `update()`'s on the update path either way.
|
|
34976
34998
|
*/
|
|
34977
34999
|
async waitForCapacityReservationProvisioned(lbArn, logicalId) {
|
|
34978
35000
|
const maxAttempts = 40;
|
|
@@ -42214,25 +42236,38 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
|
|
|
42214
42236
|
* `context` is read for ONE thing today: `maskSecrets` (issue #2050). The
|
|
42215
42237
|
* Service create path runs a post-create `UpdateServiceAttributes` through
|
|
42216
42238
|
* `withRetry` — see {@link maskedRetryLogger}.
|
|
42239
|
+
*
|
|
42240
|
+
* EVERY arm receives it, not just the Service one (issue #2063). The three
|
|
42241
|
+
* namespace arms build their `Create*NamespaceCommand` payload out of the
|
|
42242
|
+
* RESOLVED `properties` bag — `Name`, `Description`, `Tags` — and each has
|
|
42243
|
+
* two disclosure surfaces for it: the `ProvisioningError` its catch throws
|
|
42244
|
+
* (printed at ERROR, i.e. DEFAULT verbosity, by `deploy-engine.ts`) and the
|
|
42245
|
+
* AWS `ErrorMessage` that {@link pollOperation} raises for a FAILED
|
|
42246
|
+
* operation. Cloud Map's create is operation-based, so the second one is the
|
|
42247
|
+
* NORMAL rejection path for those arms, not an edge case.
|
|
42217
42248
|
*/
|
|
42218
42249
|
async create(logicalId, resourceType, properties, context) {
|
|
42219
42250
|
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);
|
|
42251
|
+
case "AWS::ServiceDiscovery::PrivateDnsNamespace": return this.createNamespace(logicalId, resourceType, properties, context?.maskSecrets);
|
|
42252
|
+
case "AWS::ServiceDiscovery::HttpNamespace": return this.createHttpNamespace(logicalId, resourceType, properties, context?.maskSecrets);
|
|
42253
|
+
case "AWS::ServiceDiscovery::PublicDnsNamespace": return this.createPublicDnsNamespace(logicalId, resourceType, properties, context?.maskSecrets);
|
|
42223
42254
|
case "AWS::ServiceDiscovery::Service": return this.createService(logicalId, resourceType, properties, context?.maskSecrets);
|
|
42224
42255
|
default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId);
|
|
42225
42256
|
}
|
|
42226
42257
|
}
|
|
42227
42258
|
/**
|
|
42228
42259
|
* `context` is read for ONE thing today: `maskSecrets` (issue #2050) — the
|
|
42229
|
-
* update-path twin of the `create()` note above
|
|
42260
|
+
* update-path twin of the `create()` note above, and threaded into every arm
|
|
42261
|
+
* for the same reason (issue #2063). The namespace update arms carry one
|
|
42262
|
+
* payload surface the create arms do not: {@link syncNamespaceTags} sends
|
|
42263
|
+
* `TagResource` with the resolved `Tags` VALUES, whose rejection lands in
|
|
42264
|
+
* the arm's own catch.
|
|
42230
42265
|
*/
|
|
42231
42266
|
update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
|
|
42232
42267
|
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);
|
|
42268
|
+
case "AWS::ServiceDiscovery::PrivateDnsNamespace": return this.updateNamespace(logicalId, physicalId, resourceType, properties, previousProperties, context?.maskSecrets);
|
|
42269
|
+
case "AWS::ServiceDiscovery::HttpNamespace": return this.updateHttpNamespace(logicalId, physicalId, resourceType, properties, previousProperties, context?.maskSecrets);
|
|
42270
|
+
case "AWS::ServiceDiscovery::PublicDnsNamespace": return this.updatePublicDnsNamespace(logicalId, physicalId, resourceType, properties, previousProperties, context?.maskSecrets);
|
|
42236
42271
|
case "AWS::ServiceDiscovery::Service": return this.updateService(logicalId, physicalId, resourceType, properties, previousProperties, context?.maskSecrets);
|
|
42237
42272
|
default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId, physicalId);
|
|
42238
42273
|
}
|
|
@@ -42246,7 +42281,7 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
|
|
|
42246
42281
|
default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId, physicalId);
|
|
42247
42282
|
}
|
|
42248
42283
|
}
|
|
42249
|
-
async createNamespace(logicalId, resourceType, properties) {
|
|
42284
|
+
async createNamespace(logicalId, resourceType, properties, maskSecrets) {
|
|
42250
42285
|
this.logger.debug(`Creating private DNS namespace ${logicalId}`);
|
|
42251
42286
|
const client = this.getClient();
|
|
42252
42287
|
const name = properties["Name"];
|
|
@@ -42265,7 +42300,7 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
|
|
|
42265
42300
|
...inputProperties && { Properties: inputProperties }
|
|
42266
42301
|
}))).OperationId;
|
|
42267
42302
|
if (!operationId) throw new Error("CreatePrivateDnsNamespace did not return OperationId");
|
|
42268
|
-
const namespaceId = await this.pollOperation(operationId, logicalId, resourceType);
|
|
42303
|
+
const namespaceId = await this.pollOperation(operationId, logicalId, resourceType, maskSecrets);
|
|
42269
42304
|
const arn = await this.buildNamespaceArn(namespaceId);
|
|
42270
42305
|
this.logger.debug(`Successfully created private DNS namespace ${logicalId}: ${namespaceId}`);
|
|
42271
42306
|
return {
|
|
@@ -42278,7 +42313,7 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
|
|
|
42278
42313
|
} catch (error) {
|
|
42279
42314
|
if (error instanceof ProvisioningError) throw error;
|
|
42280
42315
|
const cause = error instanceof Error ? error : void 0;
|
|
42281
|
-
throw new ProvisioningError(`Failed to create private DNS namespace ${logicalId}: ${
|
|
42316
|
+
throw new ProvisioningError(`Failed to create private DNS namespace ${logicalId}: ${this.maskErrorMessage(error, maskSecrets)}`, resourceType, logicalId, void 0, cause);
|
|
42282
42317
|
}
|
|
42283
42318
|
}
|
|
42284
42319
|
/**
|
|
@@ -42304,7 +42339,7 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
|
|
|
42304
42339
|
* kind's Cloud Map default ({@link PRIVATE_DNS_NAMESPACE_DEFAULT_SOA_TTL}) —
|
|
42305
42340
|
* the CFn-parity shape, live A/B'd 2026-08-11 on the private kind itself.
|
|
42306
42341
|
*/
|
|
42307
|
-
async updateNamespace(logicalId, physicalId, resourceType, properties, previousProperties) {
|
|
42342
|
+
async updateNamespace(logicalId, physicalId, resourceType, properties, previousProperties, maskSecrets) {
|
|
42308
42343
|
this.logger.debug(`Updating private DNS namespace ${logicalId}: ${physicalId}`);
|
|
42309
42344
|
const client = this.getClient();
|
|
42310
42345
|
const namespaceChange = {};
|
|
@@ -42318,7 +42353,7 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
|
|
|
42318
42353
|
Id: physicalId,
|
|
42319
42354
|
Namespace: namespaceChange
|
|
42320
42355
|
}))).OperationId;
|
|
42321
|
-
if (operationId) await this.pollOperation(operationId, logicalId, resourceType);
|
|
42356
|
+
if (operationId) await this.pollOperation(operationId, logicalId, resourceType, maskSecrets);
|
|
42322
42357
|
} else this.logger.debug(`No mutable namespace-body diff for PrivateDnsNamespace ${logicalId}`);
|
|
42323
42358
|
await this.syncNamespaceTags(logicalId, physicalId, properties, previousProperties);
|
|
42324
42359
|
this.logger.debug(`Successfully updated private DNS namespace ${logicalId}`);
|
|
@@ -42329,7 +42364,7 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
|
|
|
42329
42364
|
} catch (error) {
|
|
42330
42365
|
if (error instanceof ProvisioningError) throw error;
|
|
42331
42366
|
const cause = error instanceof Error ? error : void 0;
|
|
42332
|
-
throw new ProvisioningError(`Failed to update private DNS namespace ${logicalId}: ${
|
|
42367
|
+
throw new ProvisioningError(`Failed to update private DNS namespace ${logicalId}: ${this.maskErrorMessage(error, maskSecrets)}`, resourceType, logicalId, physicalId, cause);
|
|
42333
42368
|
}
|
|
42334
42369
|
}
|
|
42335
42370
|
/**
|
|
@@ -42363,7 +42398,7 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
|
|
|
42363
42398
|
throw new ProvisioningError(`Failed to delete Cloud Map namespace ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, physicalId, cause);
|
|
42364
42399
|
}
|
|
42365
42400
|
}
|
|
42366
|
-
async createHttpNamespace(logicalId, resourceType, properties) {
|
|
42401
|
+
async createHttpNamespace(logicalId, resourceType, properties, maskSecrets) {
|
|
42367
42402
|
this.logger.debug(`Creating HTTP namespace ${logicalId}`);
|
|
42368
42403
|
const client = this.getClient();
|
|
42369
42404
|
const name = properties["Name"];
|
|
@@ -42377,7 +42412,7 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
|
|
|
42377
42412
|
...tags && tags.length > 0 && { Tags: tags }
|
|
42378
42413
|
}))).OperationId;
|
|
42379
42414
|
if (!operationId) throw new Error("CreateHttpNamespace did not return OperationId");
|
|
42380
|
-
const namespaceId = await this.pollOperation(operationId, logicalId, resourceType);
|
|
42415
|
+
const namespaceId = await this.pollOperation(operationId, logicalId, resourceType, maskSecrets);
|
|
42381
42416
|
const arn = await this.resolveNamespaceArn(namespaceId);
|
|
42382
42417
|
this.logger.debug(`Successfully created HTTP namespace ${logicalId}: ${namespaceId}`);
|
|
42383
42418
|
return {
|
|
@@ -42390,7 +42425,7 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
|
|
|
42390
42425
|
} catch (error) {
|
|
42391
42426
|
if (error instanceof ProvisioningError) throw error;
|
|
42392
42427
|
const cause = error instanceof Error ? error : void 0;
|
|
42393
|
-
throw new ProvisioningError(`Failed to create HTTP namespace ${logicalId}: ${
|
|
42428
|
+
throw new ProvisioningError(`Failed to create HTTP namespace ${logicalId}: ${this.maskErrorMessage(error, maskSecrets)}`, resourceType, logicalId, void 0, cause);
|
|
42394
42429
|
}
|
|
42395
42430
|
}
|
|
42396
42431
|
/**
|
|
@@ -42411,7 +42446,7 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
|
|
|
42411
42446
|
* the template must be cleared explicitly via the `''` sentinel — the
|
|
42412
42447
|
* CFn-parity shape, live A/B'd 2026-08-11 on this exact kind.
|
|
42413
42448
|
*/
|
|
42414
|
-
async updateHttpNamespace(logicalId, physicalId, resourceType, properties, previousProperties) {
|
|
42449
|
+
async updateHttpNamespace(logicalId, physicalId, resourceType, properties, previousProperties, maskSecrets) {
|
|
42415
42450
|
this.logger.debug(`Updating HTTP namespace ${logicalId}: ${physicalId}`);
|
|
42416
42451
|
const client = this.getClient();
|
|
42417
42452
|
const description = clearOnUpdateRemoval(properties["Description"], previousProperties["Description"], "");
|
|
@@ -42422,7 +42457,7 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
|
|
|
42422
42457
|
Id: physicalId,
|
|
42423
42458
|
Namespace: namespaceChange
|
|
42424
42459
|
}))).OperationId;
|
|
42425
|
-
if (operationId) await this.pollOperation(operationId, logicalId, resourceType);
|
|
42460
|
+
if (operationId) await this.pollOperation(operationId, logicalId, resourceType, maskSecrets);
|
|
42426
42461
|
}
|
|
42427
42462
|
await this.syncNamespaceTags(logicalId, physicalId, properties, previousProperties);
|
|
42428
42463
|
this.logger.debug(`Successfully updated HTTP namespace ${logicalId}`);
|
|
@@ -42433,10 +42468,10 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
|
|
|
42433
42468
|
} catch (error) {
|
|
42434
42469
|
if (error instanceof ProvisioningError) throw error;
|
|
42435
42470
|
const cause = error instanceof Error ? error : void 0;
|
|
42436
|
-
throw new ProvisioningError(`Failed to update HTTP namespace ${logicalId}: ${
|
|
42471
|
+
throw new ProvisioningError(`Failed to update HTTP namespace ${logicalId}: ${this.maskErrorMessage(error, maskSecrets)}`, resourceType, logicalId, physicalId, cause);
|
|
42437
42472
|
}
|
|
42438
42473
|
}
|
|
42439
|
-
async createPublicDnsNamespace(logicalId, resourceType, properties) {
|
|
42474
|
+
async createPublicDnsNamespace(logicalId, resourceType, properties, maskSecrets) {
|
|
42440
42475
|
this.logger.debug(`Creating public DNS namespace ${logicalId}`);
|
|
42441
42476
|
const client = this.getClient();
|
|
42442
42477
|
const name = properties["Name"];
|
|
@@ -42452,7 +42487,7 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
|
|
|
42452
42487
|
...inputProperties && { Properties: inputProperties }
|
|
42453
42488
|
}))).OperationId;
|
|
42454
42489
|
if (!operationId) throw new Error("CreatePublicDnsNamespace did not return OperationId");
|
|
42455
|
-
const namespaceId = await this.pollOperation(operationId, logicalId, resourceType);
|
|
42490
|
+
const namespaceId = await this.pollOperation(operationId, logicalId, resourceType, maskSecrets);
|
|
42456
42491
|
let arn;
|
|
42457
42492
|
let hostedZoneId;
|
|
42458
42493
|
try {
|
|
@@ -42475,7 +42510,7 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
|
|
|
42475
42510
|
} catch (error) {
|
|
42476
42511
|
if (error instanceof ProvisioningError) throw error;
|
|
42477
42512
|
const cause = error instanceof Error ? error : void 0;
|
|
42478
|
-
throw new ProvisioningError(`Failed to create public DNS namespace ${logicalId}: ${
|
|
42513
|
+
throw new ProvisioningError(`Failed to create public DNS namespace ${logicalId}: ${this.maskErrorMessage(error, maskSecrets)}`, resourceType, logicalId, void 0, cause);
|
|
42479
42514
|
}
|
|
42480
42515
|
}
|
|
42481
42516
|
/**
|
|
@@ -42493,7 +42528,7 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
|
|
|
42493
42528
|
* kind's Cloud Map default ({@link PUBLIC_DNS_NAMESPACE_DEFAULT_SOA_TTL}) —
|
|
42494
42529
|
* the CFn-parity shape, live A/B'd 2026-08-11 on this exact kind.
|
|
42495
42530
|
*/
|
|
42496
|
-
async updatePublicDnsNamespace(logicalId, physicalId, resourceType, properties, previousProperties) {
|
|
42531
|
+
async updatePublicDnsNamespace(logicalId, physicalId, resourceType, properties, previousProperties, maskSecrets) {
|
|
42497
42532
|
this.logger.debug(`Updating public DNS namespace ${logicalId}: ${physicalId}`);
|
|
42498
42533
|
const client = this.getClient();
|
|
42499
42534
|
const namespaceChange = {};
|
|
@@ -42507,7 +42542,7 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
|
|
|
42507
42542
|
Id: physicalId,
|
|
42508
42543
|
Namespace: namespaceChange
|
|
42509
42544
|
}))).OperationId;
|
|
42510
|
-
if (operationId) await this.pollOperation(operationId, logicalId, resourceType);
|
|
42545
|
+
if (operationId) await this.pollOperation(operationId, logicalId, resourceType, maskSecrets);
|
|
42511
42546
|
}
|
|
42512
42547
|
await this.syncNamespaceTags(logicalId, physicalId, properties, previousProperties);
|
|
42513
42548
|
this.logger.debug(`Successfully updated public DNS namespace ${logicalId}`);
|
|
@@ -42518,7 +42553,7 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
|
|
|
42518
42553
|
} catch (error) {
|
|
42519
42554
|
if (error instanceof ProvisioningError) throw error;
|
|
42520
42555
|
const cause = error instanceof Error ? error : void 0;
|
|
42521
|
-
throw new ProvisioningError(`Failed to update public DNS namespace ${logicalId}: ${
|
|
42556
|
+
throw new ProvisioningError(`Failed to update public DNS namespace ${logicalId}: ${this.maskErrorMessage(error, maskSecrets)}`, resourceType, logicalId, physicalId, cause);
|
|
42522
42557
|
}
|
|
42523
42558
|
}
|
|
42524
42559
|
async createService(logicalId, resourceType, properties, maskSecrets) {
|
|
@@ -42624,7 +42659,7 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
|
|
|
42624
42659
|
Id: physicalId,
|
|
42625
42660
|
Service: serviceChange
|
|
42626
42661
|
}))).OperationId;
|
|
42627
|
-
if (operationId) await this.pollOperation(operationId, logicalId, resourceType);
|
|
42662
|
+
if (operationId) await this.pollOperation(operationId, logicalId, resourceType, maskSecrets);
|
|
42628
42663
|
}
|
|
42629
42664
|
if (hasAttrUpsert) {
|
|
42630
42665
|
await withRetry(() => client.send(new UpdateServiceAttributesCommand({
|
|
@@ -42695,6 +42730,15 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
|
|
|
42695
42730
|
* Resolve a namespace's ARN — authoritative via `GetNamespace`, with a
|
|
42696
42731
|
* deterministic STS-based construction as fallback so a transient read
|
|
42697
42732
|
* failure right after create does not fail the whole resource.
|
|
42733
|
+
*
|
|
42734
|
+
* Takes NO masker, deliberately (issue #2063 audit). Its request is
|
|
42735
|
+
* `GetNamespace({ Id })` with an AWS-issued namespace id — no resolved
|
|
42736
|
+
* template value is in the payload, so the AWS error text it logs cannot
|
|
42737
|
+
* echo one back. That is a structural reason, not an assessment of
|
|
42738
|
+
* likelihood; add the parameter if this call ever grows a template-derived
|
|
42739
|
+
* member. The `TagResource` / `UntagResource` calls in
|
|
42740
|
+
* {@link syncNamespaceTags} DO carry resolved values, but they throw rather
|
|
42741
|
+
* than log, and the throw lands in the calling arm's masked catch.
|
|
42698
42742
|
*/
|
|
42699
42743
|
async resolveNamespaceArn(namespaceId) {
|
|
42700
42744
|
try {
|
|
@@ -42737,8 +42781,39 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
|
|
|
42737
42781
|
/**
|
|
42738
42782
|
* Poll a Service Discovery operation until it completes.
|
|
42739
42783
|
* Returns the target resource ID from the operation result.
|
|
42740
|
-
|
|
42741
|
-
|
|
42784
|
+
*
|
|
42785
|
+
* MASKS `Operation.ErrorMessage` (issue #2063), and this is the only place
|
|
42786
|
+
* that can. Cloud Map's create / update are operation-based: the caller's
|
|
42787
|
+
* `Create*Namespace` / `Update*` request carried the RESOLVED `properties`
|
|
42788
|
+
* bag — `Name`, `Description`, `Tags`, `DnsConfig` — and AWS reports its
|
|
42789
|
+
* rejection here rather than by rejecting the submit call, quoting the
|
|
42790
|
+
* offending value back in `ErrorMessage`. A FAILED operation is therefore
|
|
42791
|
+
* the NORMAL rejection path for these arms, not an edge case.
|
|
42792
|
+
*
|
|
42793
|
+
* Why not leave it to the arms' own catch: every namespace arm and
|
|
42794
|
+
* `updateService` open with `if (error instanceof ProvisioningError) throw
|
|
42795
|
+
* error;`, so a `ProvisioningError` raised here is re-thrown VERBATIM and
|
|
42796
|
+
* never reaches their `maskErrorMessage`. `deploy-engine.ts` then prints it
|
|
42797
|
+
* at ERROR — DEFAULT verbosity. That passthrough is correct (it preserves
|
|
42798
|
+
* the resource/logical-id context this frame added), which is exactly why
|
|
42799
|
+
* the mask has to be applied at the point of construction.
|
|
42800
|
+
*
|
|
42801
|
+
* `errorMessage` is masked RAW, before any interpolation. Stating precisely
|
|
42802
|
+
* what that buys, because the obvious phrasing over-claims (issue #2063
|
|
42803
|
+
* review): `maskSecretsInText`'s WHOLE-VALUE arm fires only when
|
|
42804
|
+
* `secrets.has(text)` — i.e. when the text IS the secret in its entirety —
|
|
42805
|
+
* so masking raw covers the case where AWS returns the offending value as
|
|
42806
|
+
* the whole `ErrorMessage`, at ANY length, including below the substring
|
|
42807
|
+
* arm's 4-character `MIN_NEEDLE_LENGTH` floor. When AWS instead quotes the
|
|
42808
|
+
* value INSIDE a sentence, the substring arm handles it and that floor
|
|
42809
|
+
* applies either way, raw or not. So masking here is strictly better than
|
|
42810
|
+
* masking the assembled message, but it is not general sub-4-character
|
|
42811
|
+
* coverage. See `SecretMaskingContext` in `src/types/resource.ts`.
|
|
42812
|
+
*
|
|
42813
|
+
* The `operationId` / timeout message below carries no template-derived
|
|
42814
|
+
* value (an AWS-issued opaque id), so it is left as-is.
|
|
42815
|
+
*/
|
|
42816
|
+
async pollOperation(operationId, logicalId, resourceType, maskSecrets) {
|
|
42742
42817
|
const client = this.getClient();
|
|
42743
42818
|
const maxAttempts = 60;
|
|
42744
42819
|
let delay = 1e3;
|
|
@@ -42750,7 +42825,7 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
|
|
|
42750
42825
|
if (targets) return targets["NAMESPACE"] || targets["SERVICE"] || operationId;
|
|
42751
42826
|
return operationId;
|
|
42752
42827
|
}
|
|
42753
|
-
if (status === "FAIL") throw new ProvisioningError(`Operation failed for ${logicalId}: ${result.Operation?.ErrorMessage || "Unknown error"}`, resourceType, logicalId);
|
|
42828
|
+
if (status === "FAIL") throw new ProvisioningError(`Operation failed for ${logicalId}: ${maskerOrIdentity(maskSecrets)(result.Operation?.ErrorMessage || "Unknown error")}`, resourceType, logicalId);
|
|
42754
42829
|
await new Promise((resolve) => setTimeout(resolve, delay));
|
|
42755
42830
|
delay = Math.min(delay * 2, 1e4);
|
|
42756
42831
|
}
|
|
@@ -71839,14 +71914,9 @@ async function gcCommand(options) {
|
|
|
71839
71914
|
let markerBody;
|
|
71840
71915
|
let resolvedMarkerKey = markerKey;
|
|
71841
71916
|
try {
|
|
71842
|
-
|
|
71843
|
-
|
|
71844
|
-
|
|
71845
|
-
if (markerBody !== null) {
|
|
71846
|
-
resolvedMarkerKey = rawMarkerKey;
|
|
71847
|
-
logger.debug(`Bootstrap marker found at the un-folded key '${rawMarkerKey}' (none at '${markerKey}') — an upper-cased region was used at 'cdkd bootstrap' time.`);
|
|
71848
|
-
}
|
|
71849
|
-
}
|
|
71917
|
+
const read = await readBootstrapMarkerBody(stateBackend, rawRegion);
|
|
71918
|
+
markerBody = read.body;
|
|
71919
|
+
resolvedMarkerKey = read.resolvedKey;
|
|
71850
71920
|
} catch (error) {
|
|
71851
71921
|
if (error.name === "NoSuchBucket") {
|
|
71852
71922
|
logger.info(`State bucket '${bucketName}' does not exist — this account was never bootstrapped; nothing to garbage-collect.`);
|
|
@@ -74046,23 +74116,13 @@ async function loadBootstrapContainerRepo(synthRegion, opts) {
|
|
|
74046
74116
|
bucket: stateBucket,
|
|
74047
74117
|
prefix: opts.statePrefix
|
|
74048
74118
|
};
|
|
74049
|
-
const
|
|
74119
|
+
const { body, resolvedKey } = await readBootstrapMarkerBody(new S3StateBackend(awsClients.s3, stateConfig, {
|
|
74050
74120
|
...clientRegion !== void 0 && { region: clientRegion },
|
|
74051
74121
|
...opts.profile !== void 0 && { profile: opts.profile }
|
|
74052
|
-
});
|
|
74053
|
-
const markerKey = getBootstrapMarkerKey(region);
|
|
74054
|
-
let resolvedKey = markerKey;
|
|
74055
|
-
let body = await stateBackend.getRawObject(markerKey);
|
|
74056
|
-
if (body === null && rawRegion !== region) {
|
|
74057
|
-
const rawKey = getBootstrapMarkerKey(rawRegion);
|
|
74058
|
-
body = await stateBackend.getRawObject(rawKey);
|
|
74059
|
-
if (body !== null) {
|
|
74060
|
-
resolvedKey = rawKey;
|
|
74061
|
-
logger.debug(`${prefix}: bootstrap marker found at the un-folded key '${rawKey}' (no '${markerKey}') — an upper-cased region was used at 'cdkd bootstrap' time.`);
|
|
74062
|
-
}
|
|
74063
|
-
}
|
|
74122
|
+
}), rawRegion, { logPrefix: prefix });
|
|
74064
74123
|
if (body === null) {
|
|
74065
|
-
|
|
74124
|
+
const rawKey = getBootstrapMarkerKey(rawRegion);
|
|
74125
|
+
logger.debug(`${prefix}: no bootstrap marker at '${resolvedKey}'${rawKey !== resolvedKey ? ` (nor '${rawKey}')` : ""} in bucket '${stateBucket}' — assuming conventional asset-repo names.`);
|
|
74066
74126
|
return;
|
|
74067
74127
|
}
|
|
74068
74128
|
const marker = parseBootstrapMarker(body, resolvedKey);
|
|
@@ -83690,7 +83750,7 @@ function createMigrateCommand() {
|
|
|
83690
83750
|
*/
|
|
83691
83751
|
function buildProgram() {
|
|
83692
83752
|
const program = new Command();
|
|
83693
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.284.
|
|
83753
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.284.19");
|
|
83694
83754
|
program.hook("preAction", (_thisCommand, actionCommand) => {
|
|
83695
83755
|
const { profile } = actionCommand.optsWithGlobals();
|
|
83696
83756
|
if (profile !== void 0) process.env["AWS_PROFILE"] = profile;
|