@go-to-k/cdkd 0.281.12 → 0.281.13
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-JZvPyCEp.js → asg-provider-CsY1ahKM.js} +2 -2
- package/dist/{asg-provider-JZvPyCEp.js.map → asg-provider-CsY1ahKM.js.map} +1 -1
- package/dist/cli.js +89 -12
- package/dist/cli.js.map +1 -1
- package/dist/{deploy-engine-CPDPlPQN.js → deploy-engine-BWM9RxAW.js} +51 -10
- package/dist/deploy-engine-BWM9RxAW.js.map +1 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/deploy-engine-CPDPlPQN.js.map +0 -1
|
@@ -10522,10 +10522,13 @@ const REF_RETURNS_SEGMENT_AT_INDEX = /* @__PURE__ */ new Map([["AWS::Route53::Re
|
|
|
10522
10522
|
*
|
|
10523
10523
|
* Value: the attribute keys to try, in order.
|
|
10524
10524
|
*
|
|
10525
|
-
* Degradation is deliberate and matches the sibling recoveries
|
|
10526
|
-
*
|
|
10527
|
-
*
|
|
10528
|
-
*
|
|
10525
|
+
* Degradation is deliberate and matches the sibling recoveries: when the
|
|
10526
|
+
* attribute is absent the raw compound id is returned rather than a fabricated
|
|
10527
|
+
* ARN. Since issue #1728 an IMPORTED child records the same attribute set
|
|
10528
|
+
* `create()` does (`AppSyncProvider.childImportAttributes`), so the miss is no
|
|
10529
|
+
* longer the normal case for an adopted resource — it is now reached by a
|
|
10530
|
+
* record written before #1681/#1728, or by an import whose ARN build failed and
|
|
10531
|
+
* warned.
|
|
10529
10532
|
*/
|
|
10530
10533
|
const REF_RETURNS_ARN_FROM_STATE = /* @__PURE__ */ new Map([
|
|
10531
10534
|
["AWS::AppSync::ApiKey", ["Arn"]],
|
|
@@ -10722,13 +10725,15 @@ async function getAccountInfo(overrideRegion) {
|
|
|
10722
10725
|
const logger = getLogger().child("IntrinsicFunctionResolver");
|
|
10723
10726
|
const stsClient = getAwsClients().sts;
|
|
10724
10727
|
try {
|
|
10725
|
-
const
|
|
10728
|
+
const response = await stsClient.send(new GetCallerIdentityCommand({}));
|
|
10729
|
+
const accountId = response.Account || "123456789012";
|
|
10726
10730
|
const region = overrideRegion || process.env["AWS_REGION"] || "us-east-1";
|
|
10727
10731
|
const partition = "aws";
|
|
10728
10732
|
cachedAccountInfo = {
|
|
10729
10733
|
accountId,
|
|
10730
10734
|
region,
|
|
10731
|
-
partition
|
|
10735
|
+
partition,
|
|
10736
|
+
...response.Account ? {} : { fabricated: true }
|
|
10732
10737
|
};
|
|
10733
10738
|
logger.debug(`Retrieved AWS account info: ${accountId}, ${region}, ${partition}`);
|
|
10734
10739
|
if (overrideRegion && overrideRegion !== region) return {
|
|
@@ -10741,7 +10746,8 @@ async function getAccountInfo(overrideRegion) {
|
|
|
10741
10746
|
cachedAccountInfo = {
|
|
10742
10747
|
accountId: process.env["AWS_ACCOUNT_ID"] || "123456789012",
|
|
10743
10748
|
region: overrideRegion || process.env["AWS_REGION"] || "us-east-1",
|
|
10744
|
-
partition: "aws"
|
|
10749
|
+
partition: "aws",
|
|
10750
|
+
...process.env["AWS_ACCOUNT_ID"] ? {} : { fabricated: true }
|
|
10745
10751
|
};
|
|
10746
10752
|
return cachedAccountInfo;
|
|
10747
10753
|
}
|
|
@@ -11111,6 +11117,7 @@ var IntrinsicFunctionResolver = class {
|
|
|
11111
11117
|
if (!(resource.resourceType === "AWS::EC2::VPC" && attributeName === "Ipv6CidrBlocks") && resource.attributes !== void 0) {
|
|
11112
11118
|
const flatValue = resource.attributes[attributeName];
|
|
11113
11119
|
if (flatValue !== void 0) {
|
|
11120
|
+
this.rejectPlaceholderArnAttribute(resource, attributeName, flatValue, logicalId);
|
|
11114
11121
|
this.logger.debug(`Resolved Fn::GetAtt from attributes: ${logicalId}.${attributeName} -> ${stringifyAttributeForLog(attributeName, flatValue)}`);
|
|
11115
11122
|
return flatValue;
|
|
11116
11123
|
}
|
|
@@ -11133,6 +11140,40 @@ var IntrinsicFunctionResolver = class {
|
|
|
11133
11140
|
return value;
|
|
11134
11141
|
}
|
|
11135
11142
|
/**
|
|
11143
|
+
* Refuse a pre-#1681 PLACEHOLDER ARN served from the cached attribute map
|
|
11144
|
+
* (issue #1729) — the `Fn::GetAtt` half of the guard
|
|
11145
|
+
* {@link cfnRefValueFromPhysicalId} applies to `Ref`.
|
|
11146
|
+
*
|
|
11147
|
+
* `Ref` and `Fn::GetAtt` read the SAME recorded attribute, and #1681 treated
|
|
11148
|
+
* only the `Ref` side: for an `AWS::AppSync::*` child created by a pre-#1681
|
|
11149
|
+
* binary, `{"Fn::GetAtt": ["MyDataSource", "DataSourceArn"]}` still resolved
|
|
11150
|
+
* to `arn:aws:appsync:*:*:apis/.../datasources/...` — structurally valid,
|
|
11151
|
+
* unusable, and indistinguishable downstream from a real ARN.
|
|
11152
|
+
*
|
|
11153
|
+
* Scoped to the {@link REF_RETURNS_ARN_FROM_STATE} types AND their declared
|
|
11154
|
+
* ARN attribute names, the narrowest form of the fix: a wildcard-bearing ARN
|
|
11155
|
+
* is only KNOWN to be a placeholder for these three attributes, and some
|
|
11156
|
+
* other type could legitimately cache an ARN-shaped string carrying a `*` in
|
|
11157
|
+
* a position {@link isPlaceholderArn} inspects. Every other attribute of
|
|
11158
|
+
* these same types (`AWS::AppSync::ApiKey`'s `ApiKey`,
|
|
11159
|
+
* `AWS::AppSync::DataSource`'s `Name`) is untouched.
|
|
11160
|
+
*
|
|
11161
|
+
* THROWS rather than degrading, which is where it diverges from the `Ref`
|
|
11162
|
+
* half, and deliberately: `Ref`'s fallback is the raw compound id, whereas
|
|
11163
|
+
* the value here is requested under an ARN-suffixed attribute name, so
|
|
11164
|
+
* handing back a non-ARN would be exactly the shape mismatch
|
|
11165
|
+
* {@link guardedPhysicalIdFallback} already hard-fails on (the #1103 class —
|
|
11166
|
+
* a green deploy that ships a wrong value into stack Outputs / an IAM
|
|
11167
|
+
* policy). A resource in this state has no correct value to serve, so the
|
|
11168
|
+
* honest answer is to say so and name the remedy: the record heals on the
|
|
11169
|
+
* resource's next in-place update (#1727).
|
|
11170
|
+
*/
|
|
11171
|
+
rejectPlaceholderArnAttribute(resource, attributeName, value, logicalId) {
|
|
11172
|
+
if (!REF_RETURNS_ARN_FROM_STATE.get(resource.resourceType)?.includes(attributeName)) return;
|
|
11173
|
+
if (typeof value !== "string" || !isPlaceholderArn(value)) return;
|
|
11174
|
+
throw new Error(`Cannot resolve Fn::GetAtt [${logicalId}, ${attributeName}] for ${resource.resourceType}: the recorded value "${value}" is a placeholder written by a cdkd version older than issue #1681 — its region and account fields are literal wildcards, so it is not a usable ARN. Deploy the stack again so the resource's next update heals the record (cdkd now records the real ARN), or re-import the resource.`);
|
|
11175
|
+
}
|
|
11176
|
+
/**
|
|
11136
11177
|
* Construct resource attribute value based on resource type
|
|
11137
11178
|
*
|
|
11138
11179
|
* Many CloudFormation attributes are not returned by Cloud Control API,
|
|
@@ -13167,7 +13208,7 @@ var CloudControlProvider = class {
|
|
|
13167
13208
|
if (context?.finalSnapshotIdentifier !== void 0) throw new ProvisioningError(`${logicalId} (${resourceType}) requires a final snapshot (DeletionPolicy: Snapshot), but the Cloud Control API delete route has no final-snapshot parameter. Re-run with --skip-final-snapshot after snapshotting manually, or retain the resource.`, resourceType, logicalId, physicalId);
|
|
13168
13209
|
if (context?.removeProtection === true && resourceType === "AWS::AutoScaling::AutoScalingGroup") {
|
|
13169
13210
|
this.logger.debug(`Delegating protected AutoScalingGroup ${logicalId} delete to the SDK ASGProvider (Cloud Control cannot force-delete a protected ASG)`);
|
|
13170
|
-
const { ASGProvider } = await import("./asg-provider-
|
|
13211
|
+
const { ASGProvider } = await import("./asg-provider-CsY1ahKM.js").then((n) => n.n);
|
|
13171
13212
|
await new ASGProvider().delete(logicalId, physicalId, resourceType, _properties, context);
|
|
13172
13213
|
return;
|
|
13173
13214
|
}
|
|
@@ -20041,7 +20082,7 @@ const FLUSH_INTERVAL_MS = 2e3;
|
|
|
20041
20082
|
const FLUSH_EVENT_THRESHOLD = 50;
|
|
20042
20083
|
/** Build-time cdkd version, with a dev fallback for non-built contexts. */
|
|
20043
20084
|
function getCdkdVersion() {
|
|
20044
|
-
return "0.281.
|
|
20085
|
+
return "0.281.13";
|
|
20045
20086
|
}
|
|
20046
20087
|
/**
|
|
20047
20088
|
* Generate a time-sortable unique run id, e.g.
|
|
@@ -22210,4 +22251,4 @@ var DeployEngine = class {
|
|
|
22210
22251
|
|
|
22211
22252
|
//#endregion
|
|
22212
22253
|
export { replayWarn as $, uploadCfnTemplate as $t, green as A, normalizeAwsError as An, formatDockerLoginError as At, slowCcOperationTimeoutMs as B, resolveApp as Bt, MULTI_REGION_RECREATE_BLOCKED_TYPES as C, ResourceUpdateNotSupportedError as Cn, BOOTSTRAP_MARKER_PREFIX as Ct, bold as D, SynthesisError as Dn, validateAssetBucketName as Dt, formatResourceLine as E, StateError as En, parseBootstrapMarker as Et, clearOnUpdateRemoval as F, getDockerImageBySourceHash as Ft, getAccountInfo as G, resolveStateBucketWithDefaultAndSource as Gt, isTerminationProtectionPropagationError as H, resolveCaptureObservedState as Ht, ProviderRegistry as I, Synthesizer as It, normalizeAwsTagsToCfn as J, warnDeprecatedNoPrefixCliFlag as Jt, refStateLookupFromResource as K, resolveUseCdkBootstrapAssets as Kt, findActionableSilentDrops as L, synthesisStatusMessage as Lt, yellow as M, __exportAll as Mn, runDockerForeground as Mt, IAMRoleProvider as N, runDockerStreaming as Nt, cyan as O, formatError as On, validateContainerRepoName as Ot, collectInlinePolicyNamesManagedBySiblings as P, AssetManifestLoader as Pt, readConfigString as Q, findLargeInlineResources as Qt, findSilentDropProperties as R, getDefaultStateBucketName as Rt, extractDeploymentEventError as S, ResourceTimeoutError as Sn, AssetModeResolver as St, renderStatefulReason as T, StackTerminationProtectionError as Tn, getBootstrapMarkerKey as Tt, IntrinsicFunctionResolver as U, resolveSkipPrefix as Ut, disableInstanceApiTermination as V, resolveAutoAssetStorage as Vt, cfnRefValueFromPhysicalId as W, resolveStateBucketWithDefault as Wt, assertRegionMatch as X, CFN_TEMPLATE_URL_LIMIT as Xt, resolveExplicitPhysicalId as Y, CFN_TEMPLATE_BODY_LIMIT as Yt, configStringRefusal as Z, MIGRATE_TMP_PREFIX as Zt, createPreDeleteFinalSnapshot as _, LockError as _n, WorkGraph as _t, DeploymentEventsStore as a, AwsClients as an, describeTypeWithThrottleRetry as at, unsupportedFinalSnapshotError as b, PartialFailureError as bn, loadPublishableAssetManifest as bt, replayFailedOperations as c, setAwsClients as cn, isThrottlingError as ct, IMPLICIT_DELETE_DEPENDENCIES as d, ConfigError as dn, LockManager as dt, expectedOwnerParam as en, requireConfigArray as et, computeImplicitDeleteEdges as f, DependencyError as fn, S3StateBackend as ft, ccRoutedFinalSnapshotError as g, LocalStartServiceError as gn, stringifyValue as gt, buildFinalSnapshotIdentifier as h, LocalMigrateError as hn, AssetPublisher as ht, DeploymentEventsReader as i, resolveBucketRegion as in, DiffCalculator as it, red as j, withErrorHandling as jn, getDockerCmd as jt, gray as k, isCdkdError as kn, buildDockerImage as kt, replayRollback as l, AssetError as ln, DagBuilder as lt, PRE_DELETE_SNAPSHOT_TYPES as m, LocalInvokeBuildError as mn, shouldRetainResource as mt, DEFAULT_RESOURCE_WARN_AFTER_MS as n, processStackMessages as nn, requireConfigString as nt, planFailedOps as o, getAwsClients as on, withRetry as ot, ATOMIC_FINAL_SNAPSHOT_TYPES as p, DeployCancelledError as pn, rebuildClientForBucketRegion as pt, WAFv2WebACLProvider as q, stateBucketExistenceConfirmed as qt, DeployEngine as r, clearBucketRegionCache as rn, applyRoleArnIfSet as rt, planRollback as s, resetAwsClients as sn, isRetryableTransientError as st, DEFAULT_RESOURCE_TIMEOUT_MS as t, AssemblyReader as tn, requireConfigObject as tt, withResourceDeadline as u, CdkdError as un, TemplateParser as ut, isFinalSnapshotError as v, MissingCdkCliError as vn, buildAssetRedirectMap as vt, isStatefulRecreateTargetSync as w, StackHasActiveImportsError as wn, ensureAssetStorage as wt, makeCanonicalizePropertiesFn as x, ProvisioningError as xn, rewriteTemplateAssetReferences as xt, refusesFinalSnapshot as y, NestedStackChildDirectDestroyError as yn, createAssetRedirectResolver as yt, CloudControlProvider as z, getLegacyStateBucketName as zt };
|
|
22213
|
-
//# sourceMappingURL=deploy-engine-
|
|
22254
|
+
//# sourceMappingURL=deploy-engine-BWM9RxAW.js.map
|