@intentius/chant-lexicon-aws 0.124.52 → 0.124.54
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/codegen/generate-lexicon.d.ts +2 -0
- package/dist/codegen/generate-lexicon.d.ts.map +1 -1
- package/dist/codegen/generate-lexicon.js +1 -0
- package/dist/components/__tests__/mock-cloud-executor.d.ts +4 -0
- package/dist/components/__tests__/mock-cloud-executor.d.ts.map +1 -1
- package/dist/components/__tests__/mock-cloud-executor.js +18 -1
- package/dist/components/apply.d.ts +44 -2
- package/dist/components/apply.d.ts.map +1 -1
- package/dist/components/apply.js +260 -29
- package/dist/components/cfn-adopt.d.ts +99 -0
- package/dist/components/cfn-adopt.d.ts.map +1 -0
- package/dist/components/cfn-adopt.js +278 -0
- package/dist/components/cfn-imports.d.ts +84 -0
- package/dist/components/cfn-imports.d.ts.map +1 -0
- package/dist/components/cfn-imports.js +239 -0
- package/dist/components/cloud-executor.d.ts +31 -2
- package/dist/components/cloud-executor.d.ts.map +1 -1
- package/dist/components/cloud-executor.js +64 -2
- package/dist/importable.d.ts +30 -0
- package/dist/importable.d.ts.map +1 -0
- package/dist/importable.js +72 -0
- package/dist/index-identity.d.ts +19 -0
- package/dist/index-identity.d.ts.map +1 -0
- package/dist/index-identity.js +79 -0
- package/dist/index-import.d.ts +17 -0
- package/dist/index-import.d.ts.map +1 -0
- package/dist/index-import.js +115 -0
- package/dist/integrity.json +3 -3
- package/dist/listed-types.d.ts +11 -0
- package/dist/listed-types.d.ts.map +1 -0
- package/dist/listed-types.js +52 -0
- package/dist/manifest.json +1 -1
- package/dist/meta.json +13206 -1237
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +9 -0
- package/dist/reference-catalog.d.ts.map +1 -1
- package/dist/reference-catalog.js +62 -20
- package/dist/spec/fetch.d.ts +5 -0
- package/dist/spec/fetch.d.ts.map +1 -1
- package/dist/spec/parse.d.ts +8 -0
- package/dist/spec/parse.d.ts.map +1 -1
- package/dist/spec/parse.js +3 -0
- package/package.json +2 -2
- package/src/codegen/generate-lexicon.ts +3 -0
- package/src/components/__tests__/mock-cloud-executor.ts +20 -1
- package/src/components/apply.ts +282 -29
- package/src/components/cfn-adopt.test.ts +284 -0
- package/src/components/cfn-adopt.ts +340 -0
- package/src/components/cfn-exports-in-use.test.ts +146 -0
- package/src/components/cfn-imports-preview.test.ts +178 -0
- package/src/components/cfn-imports-three-stacks.test.ts +107 -0
- package/src/components/cfn-imports.test.ts +213 -0
- package/src/components/cfn-imports.ts +246 -0
- package/src/components/cfn-plan-shape-conformance.test.ts +83 -0
- package/src/components/cloud-executor.ts +102 -5
- package/src/components/demo-composed-stacks-floci.e2e.test.ts +235 -0
- package/src/derived-edges.test.ts +142 -0
- package/src/generated/lexicon-aws.json +13206 -1237
- package/src/importable.test.ts +86 -0
- package/src/importable.ts +83 -0
- package/src/index-identity.test.ts +134 -0
- package/src/index-identity.ts +98 -0
- package/src/index-import.test.ts +242 -0
- package/src/index-import.ts +140 -0
- package/src/index-search.test.ts +87 -0
- package/src/listed-types.test.ts +97 -0
- package/src/listed-types.ts +56 -0
- package/src/plugin.ts +10 -0
- package/src/reference-catalog.ts +63 -20
- package/src/spec/fetch.ts +5 -0
- package/src/spec/parse.test.ts +15 -0
- package/src/spec/parse.ts +12 -0
- package/src/testdata/indexed/identity.listing.json +65 -0
- package/src/testdata/indexed/import.listing.json +126 -0
- package/src/testdata/indexed/listing.json +69 -0
- package/src/testdata/indexed/topology.listing.json +350 -0
- package/src/testdata/three-cloud/dns.graph.json +336 -0
- package/src/three-cloud-parity.test.ts +49 -0
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `Fn::ImportValue` between stacks (#4466): which exports a template
|
|
3
|
+
* declares, which it imports, and the names they go by.
|
|
4
|
+
*
|
|
5
|
+
* A stack that imports another stack's export reads that stack, the way a
|
|
6
|
+
* CDK app wires its stacks. The read sits inside the template, so core does
|
|
7
|
+
* not see it in the step. `cfn-deploy`'s `declaredReads` finds it here: an
|
|
8
|
+
* import of a name another `cfn-deploy` step's template exports is a read of
|
|
9
|
+
* `<component>.<output>`, which core writes into the importer's step under
|
|
10
|
+
* `imports` (`CfnDeployInput.imports`) and orders, holds and lists like any
|
|
11
|
+
* other read.
|
|
12
|
+
*
|
|
13
|
+
* A name is a string, or an `Fn::Sub` (or `Fn::Join`, or `Ref`) over
|
|
14
|
+
* parameters and pseudo parameters. It resolves where the values it reads
|
|
15
|
+
* are known: a parameter with a plain value in the step's `inputs` or a
|
|
16
|
+
* `Default` in the template, `AWS::StackName`, and the region's pseudo
|
|
17
|
+
* parameters when `AWS_REGION` or `AWS_DEFAULT_REGION` names the region.
|
|
18
|
+
* Anything else (`AWS::AccountId`, a resource attribute, a parameter wired
|
|
19
|
+
* from another stack, an intrinsic this does not follow) leaves the name
|
|
20
|
+
* unresolved, and the plan says so in a hole.
|
|
21
|
+
*/
|
|
22
|
+
import { createHash } from "node:crypto";
|
|
23
|
+
import { readFileSync } from "node:fs";
|
|
24
|
+
import { isAbsolute, resolve } from "node:path";
|
|
25
|
+
/** The template at `path`, read against `root` when relative, as JSON; `undefined` for one that cannot be read or parsed, or an archive reference. */
|
|
26
|
+
export function readCfnTemplate(path, root) {
|
|
27
|
+
if (typeof path !== "string" || path.startsWith("archive:"))
|
|
28
|
+
return undefined;
|
|
29
|
+
try {
|
|
30
|
+
const parsed = JSON.parse(readFileSync(root && !isAbsolute(path) ? resolve(root, path) : path, "utf8"));
|
|
31
|
+
return parsed !== null && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : undefined;
|
|
32
|
+
}
|
|
33
|
+
catch {
|
|
34
|
+
return undefined;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
/** The region the plan runs against, when the environment names it. */
|
|
38
|
+
function regionOf(env) {
|
|
39
|
+
return env.AWS_REGION || env.AWS_DEFAULT_REGION || undefined;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* The pseudo parameters this plan knows for `stack`: `AWS::StackName`, and
|
|
43
|
+
* `AWS::Region`, `AWS::Partition` and `AWS::URLSuffix` when the region is
|
|
44
|
+
* named. `AWS::AccountId` and `AWS::StackId` are not known before apply.
|
|
45
|
+
*/
|
|
46
|
+
export function cfnPseudoParameters(stack, env = process.env) {
|
|
47
|
+
const out = { "AWS::StackName": stack };
|
|
48
|
+
const region = regionOf(env);
|
|
49
|
+
if (region) {
|
|
50
|
+
out["AWS::Region"] = region;
|
|
51
|
+
out["AWS::Partition"] = region.startsWith("cn-") ? "aws-cn" : region.startsWith("us-gov-") ? "aws-us-gov" : "aws";
|
|
52
|
+
out["AWS::URLSuffix"] = region.startsWith("cn-") ? "amazonaws.com.cn" : "amazonaws.com";
|
|
53
|
+
}
|
|
54
|
+
return out;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* The values a name in `template` can read for `stack`: each parameter's
|
|
58
|
+
* `Default`, overlaid by the step's plain inputs (a string, a number or a
|
|
59
|
+
* boolean; a wired reference or `undefined` is not known), and the pseudo
|
|
60
|
+
* parameters.
|
|
61
|
+
*/
|
|
62
|
+
export function cfnKnownValues(template, stack, inputs, env = process.env) {
|
|
63
|
+
const out = {};
|
|
64
|
+
const plain = (v) => typeof v === "string" ? v : typeof v === "number" || typeof v === "boolean" ? String(v) : undefined;
|
|
65
|
+
const params = (template?.Parameters ?? {});
|
|
66
|
+
for (const [k, p] of Object.entries(params)) {
|
|
67
|
+
const d = plain(p?.Default);
|
|
68
|
+
if (d !== undefined)
|
|
69
|
+
out[k] = d;
|
|
70
|
+
}
|
|
71
|
+
for (const [k, v] of Object.entries(inputs ?? {})) {
|
|
72
|
+
const s = plain(v);
|
|
73
|
+
if (s !== undefined)
|
|
74
|
+
out[k] = s;
|
|
75
|
+
}
|
|
76
|
+
return { ...out, ...cfnPseudoParameters(stack, env) };
|
|
77
|
+
}
|
|
78
|
+
/** Why a variable a name reads has no value here. */
|
|
79
|
+
function unknownVariable(v, known) {
|
|
80
|
+
if (v in known)
|
|
81
|
+
return undefined;
|
|
82
|
+
if (v.includes("."))
|
|
83
|
+
return `reads ${v}, a resource attribute`;
|
|
84
|
+
if (v.startsWith("AWS::"))
|
|
85
|
+
return `reads ${v}, which is known only at apply`;
|
|
86
|
+
return `reads parameter ${v}, which has no value the plan knows`;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* The name `value` resolves to against `known`, or why it does not. A
|
|
90
|
+
* string is itself; `Fn::Sub` substitutes `${X}` from `known` and its own
|
|
91
|
+
* variables (`${!X}` is the literal `${X}`); `Ref` reads `known`;
|
|
92
|
+
* `Fn::Join` joins what it resolves. Any other shape is unresolved.
|
|
93
|
+
*/
|
|
94
|
+
export function resolveCfnName(value, known) {
|
|
95
|
+
if (typeof value === "string")
|
|
96
|
+
return { name: value };
|
|
97
|
+
if (value === null || typeof value !== "object" || Array.isArray(value))
|
|
98
|
+
return { unresolved: "is not a string or an intrinsic" };
|
|
99
|
+
const entries = Object.entries(value);
|
|
100
|
+
if (entries.length !== 1)
|
|
101
|
+
return { unresolved: "is not a string or an intrinsic" };
|
|
102
|
+
const [key, arg] = entries[0];
|
|
103
|
+
if (key === "Ref") {
|
|
104
|
+
if (typeof arg !== "string")
|
|
105
|
+
return { unresolved: "is a Ref without a name" };
|
|
106
|
+
const why = unknownVariable(arg, known);
|
|
107
|
+
return why ? { unresolved: why } : { name: known[arg] };
|
|
108
|
+
}
|
|
109
|
+
if (key === "Fn::Sub") {
|
|
110
|
+
const text = typeof arg === "string" ? arg : Array.isArray(arg) && typeof arg[0] === "string" ? arg[0] : undefined;
|
|
111
|
+
if (text === undefined)
|
|
112
|
+
return { unresolved: "is an Fn::Sub this plan cannot read" };
|
|
113
|
+
const vars = { ...known };
|
|
114
|
+
if (Array.isArray(arg) && arg[1] && typeof arg[1] === "object") {
|
|
115
|
+
for (const [k, v] of Object.entries(arg[1])) {
|
|
116
|
+
const r = resolveCfnName(v, known);
|
|
117
|
+
if ("unresolved" in r)
|
|
118
|
+
return { unresolved: `its Fn::Sub variable ${k} ${r.unresolved}` };
|
|
119
|
+
vars[k] = r.name;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
let why;
|
|
123
|
+
const name = text.replace(/\$\{(!?)([^}]*)\}/g, (whole, bang, v) => {
|
|
124
|
+
if (bang)
|
|
125
|
+
return "${" + v + "}";
|
|
126
|
+
const w = unknownVariable(v, vars);
|
|
127
|
+
if (w) {
|
|
128
|
+
why ?? (why = w);
|
|
129
|
+
return whole;
|
|
130
|
+
}
|
|
131
|
+
return vars[v];
|
|
132
|
+
});
|
|
133
|
+
return why ? { unresolved: why } : { name };
|
|
134
|
+
}
|
|
135
|
+
if (key === "Fn::Join") {
|
|
136
|
+
if (!Array.isArray(arg) || typeof arg[0] !== "string" || !Array.isArray(arg[1]))
|
|
137
|
+
return { unresolved: "is an Fn::Join this plan cannot read" };
|
|
138
|
+
const parts = [];
|
|
139
|
+
for (const part of arg[1]) {
|
|
140
|
+
const r = resolveCfnName(part, known);
|
|
141
|
+
if ("unresolved" in r)
|
|
142
|
+
return r;
|
|
143
|
+
parts.push(r.name);
|
|
144
|
+
}
|
|
145
|
+
return { name: parts.join(arg[0]) };
|
|
146
|
+
}
|
|
147
|
+
return { unresolved: `uses ${key}, which this plan does not follow` };
|
|
148
|
+
}
|
|
149
|
+
/** Every export `template` declares (`Outputs.<name>.Export.Name`), by output, sorted. */
|
|
150
|
+
export function cfnExports(template, known) {
|
|
151
|
+
const outputs = (template?.Outputs ?? {});
|
|
152
|
+
const out = [];
|
|
153
|
+
for (const [output, o] of Object.entries(outputs).sort(([a], [b]) => a.localeCompare(b))) {
|
|
154
|
+
if (o?.Export === undefined)
|
|
155
|
+
continue;
|
|
156
|
+
out.push({ output, ...resolveCfnName(o.Export.Name, known) });
|
|
157
|
+
}
|
|
158
|
+
return out;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Every `Fn::ImportValue` in `template`'s resources, outputs and conditions,
|
|
162
|
+
* with where it sits and the name it imports, in template order. An import
|
|
163
|
+
* whose argument is itself an import is listed once, unresolved.
|
|
164
|
+
*/
|
|
165
|
+
export function cfnImports(template, known) {
|
|
166
|
+
const out = [];
|
|
167
|
+
const walk = (v, path, logicalId) => {
|
|
168
|
+
if (Array.isArray(v))
|
|
169
|
+
return v.forEach((x, i) => walk(x, `${path}.${i}`, logicalId));
|
|
170
|
+
if (v === null || typeof v !== "object")
|
|
171
|
+
return;
|
|
172
|
+
for (const [k, x] of Object.entries(v)) {
|
|
173
|
+
if (k === "Fn::ImportValue") {
|
|
174
|
+
out.push({ at: path, logicalId, ...resolveCfnName(x, known) });
|
|
175
|
+
continue;
|
|
176
|
+
}
|
|
177
|
+
walk(x, `${path}.${k}`, logicalId);
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
for (const section of ["Resources", "Outputs", "Conditions"]) {
|
|
181
|
+
const s = template?.[section];
|
|
182
|
+
if (s === null || typeof s !== "object")
|
|
183
|
+
continue;
|
|
184
|
+
for (const [id, body] of Object.entries(s))
|
|
185
|
+
walk(body, `${section}.${id}`, id);
|
|
186
|
+
}
|
|
187
|
+
return out;
|
|
188
|
+
}
|
|
189
|
+
/** The JSON Pointer `CfnDeployInput.imports[name]` sits at in a `cfn-deploy` step. */
|
|
190
|
+
export function cfnImportPointer(name) {
|
|
191
|
+
return "/imports/" + name.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
192
|
+
}
|
|
193
|
+
/** The stand-in parameter that takes an import's place in a preview: `ChantImport`, the name's letters and digits, and a short digest so two names never share one. */
|
|
194
|
+
export function cfnStandInParameter(name) {
|
|
195
|
+
return `ChantImport${name.replace(/[^A-Za-z0-9]/g, "").slice(0, 200)}${createHash("sha256").update(name).digest("hex").slice(0, 8)}`;
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* A copy of `template` for a preview (#4466b): each `Fn::ImportValue` of a
|
|
199
|
+
* name in `names` is a `Ref` to a stand-in `String` parameter, which the
|
|
200
|
+
* preview fills with `cfnPlaceholder`. CloudFormation refuses a change set
|
|
201
|
+
* that imports an export that does not exist yet, so the importer of a stack
|
|
202
|
+
* the same change creates is planned against this copy. `standIns` maps each
|
|
203
|
+
* stand-in parameter to the export it stands for; a name the template never
|
|
204
|
+
* imports gets none.
|
|
205
|
+
*/
|
|
206
|
+
export function cfnTemplateWithStandIns(template, names, known) {
|
|
207
|
+
const wanted = new Set(names);
|
|
208
|
+
const standIns = {};
|
|
209
|
+
const swap = (v) => {
|
|
210
|
+
if (Array.isArray(v))
|
|
211
|
+
return v.map(swap);
|
|
212
|
+
if (v === null || typeof v !== "object")
|
|
213
|
+
return v;
|
|
214
|
+
const entries = Object.entries(v);
|
|
215
|
+
if (entries.length === 1 && entries[0][0] === "Fn::ImportValue") {
|
|
216
|
+
const r = resolveCfnName(entries[0][1], known);
|
|
217
|
+
if ("name" in r && wanted.has(r.name)) {
|
|
218
|
+
const param = cfnStandInParameter(r.name);
|
|
219
|
+
standIns[param] = r.name;
|
|
220
|
+
return { Ref: param };
|
|
221
|
+
}
|
|
222
|
+
return v;
|
|
223
|
+
}
|
|
224
|
+
return Object.fromEntries(entries.map(([k, x]) => [k, swap(x)]));
|
|
225
|
+
};
|
|
226
|
+
const out = { ...template };
|
|
227
|
+
for (const section of ["Resources", "Outputs", "Conditions"]) {
|
|
228
|
+
if (template[section] !== undefined)
|
|
229
|
+
out[section] = swap(template[section]);
|
|
230
|
+
}
|
|
231
|
+
if (Object.keys(standIns).length > 0) {
|
|
232
|
+
const params = { ...(template.Parameters ?? {}) };
|
|
233
|
+
for (const [param, name] of Object.entries(standIns).sort(([a], [b]) => a.localeCompare(b))) {
|
|
234
|
+
params[param] = { Type: "String", Description: `chant preview: stands in for Fn::ImportValue ${name}, known after its stack applies` };
|
|
235
|
+
}
|
|
236
|
+
out.Parameters = params;
|
|
237
|
+
}
|
|
238
|
+
return { template: out, standIns };
|
|
239
|
+
}
|
|
@@ -67,8 +67,8 @@ export interface CfnChangeSet {
|
|
|
67
67
|
statusReason?: string;
|
|
68
68
|
/** True the first time this stack is created (no prior stack exists). */
|
|
69
69
|
isCreate: boolean;
|
|
70
|
-
/** The change set's type: CREATE for a stack that does not exist yet or was never executed, else UPDATE. */
|
|
71
|
-
changeSetType?: "CREATE" | "UPDATE";
|
|
70
|
+
/** The change set's type: CREATE for a stack that does not exist yet or was never executed, else UPDATE; IMPORT for an adoption (#4536). */
|
|
71
|
+
changeSetType?: "CREATE" | "UPDATE" | "IMPORT";
|
|
72
72
|
/**
|
|
73
73
|
* True when no stack existed before this change set, so CloudFormation made
|
|
74
74
|
* an empty `REVIEW_IN_PROGRESS` stack to hold it. A plan that deletes the
|
|
@@ -83,6 +83,16 @@ export interface CfnCreateChangeSetArgs {
|
|
|
83
83
|
templatePath: string;
|
|
84
84
|
parameters?: Record<string, string>;
|
|
85
85
|
}
|
|
86
|
+
/** One existing resource an IMPORT change set brings under a stack (#4536). */
|
|
87
|
+
export interface CfnResourceToImport {
|
|
88
|
+
resourceType: string;
|
|
89
|
+
logicalResourceId: string;
|
|
90
|
+
/** The type's primary identifier properties and their values (`{ BucketName: "logs" }`). */
|
|
91
|
+
resourceIdentifier: Record<string, string>;
|
|
92
|
+
}
|
|
93
|
+
export interface CfnCreateImportChangeSetArgs extends CfnCreateChangeSetArgs {
|
|
94
|
+
resourcesToImport: CfnResourceToImport[];
|
|
95
|
+
}
|
|
86
96
|
export interface CfnExecuteChangeSetArgs {
|
|
87
97
|
stackName: string;
|
|
88
98
|
changeSetName: string;
|
|
@@ -90,10 +100,23 @@ export interface CfnExecuteChangeSetArgs {
|
|
|
90
100
|
export interface CfnStackStatus {
|
|
91
101
|
stackStatus: string;
|
|
92
102
|
outputs: Record<string, string>;
|
|
103
|
+
/** The stack's exports by export name (#4466c): the output each is and its value. Absent when it exports nothing or the backend does not say. */
|
|
104
|
+
exports?: Record<string, {
|
|
105
|
+
output: string;
|
|
106
|
+
value: string;
|
|
107
|
+
}>;
|
|
93
108
|
}
|
|
94
109
|
export interface CloudFormationClient {
|
|
95
110
|
/** Create (but do not execute) a changeset, returning its proposed changes for preview/safety checks. */
|
|
96
111
|
createChangeSet(args: CfnCreateChangeSetArgs): Promise<CfnChangeSet>;
|
|
112
|
+
/**
|
|
113
|
+
* Create (but do not execute) an IMPORT change set that brings existing
|
|
114
|
+
* resources under the stack (#4536, chant's CloudFormation adoption). A
|
|
115
|
+
* stack that does not exist yet is created by it. No stack tags are sent:
|
|
116
|
+
* chant's markers are written by the UPDATE that follows. Optional: a
|
|
117
|
+
* client without it cannot adopt.
|
|
118
|
+
*/
|
|
119
|
+
createImportChangeSet?(args: CfnCreateImportChangeSetArgs): Promise<CfnChangeSet>;
|
|
97
120
|
/** Execute a previously created changeset. */
|
|
98
121
|
executeChangeSet(args: CfnExecuteChangeSetArgs): Promise<void>;
|
|
99
122
|
/** Delete a changeset without executing it (used when a safety policy blocks the apply). */
|
|
@@ -114,6 +137,12 @@ export interface CloudFormationClient {
|
|
|
114
137
|
* empty stack, and the next CREATE change set reuses it.
|
|
115
138
|
*/
|
|
116
139
|
deleteStackShell?(stackName: string): Promise<boolean>;
|
|
140
|
+
/**
|
|
141
|
+
* The stacks that import `exportName` now (`ListImports`, #4466c), sorted;
|
|
142
|
+
* empty when none does. Optional: without it, a plan cannot say whether a
|
|
143
|
+
* change to an export is in use, and refuses nothing.
|
|
144
|
+
*/
|
|
145
|
+
listImports?(exportName: string): Promise<string[]>;
|
|
117
146
|
}
|
|
118
147
|
export interface EcsUpdateServiceArgs {
|
|
119
148
|
cluster: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloud-executor.d.ts","sourceRoot":"","sources":["../../src/components/cloud-executor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAOH,OAAO,EAAc,KAAK,YAAY,EAAE,MAAM,kDAAkD,CAAC;AAIjG,YAAY,EAAE,YAAY,EAAE,CAAC;AAM7B,MAAM,W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;YAAE,EAAE,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;KAAE,CAAA;CAAE,GAAG,MAAM,CAEvG;AAED;4EAC4E;AAC5E,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE;IAAE,YAAY,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,OAAO,EAAE,CAAA;CAAE,GAAG,SAAS,GACzF,OAAO,CAIT;AAwVD,2HAA2H;AAC3H,wBAAgB,iBAAiB,IAAI,aAAa,CAcjD;AAKD,+FAA+F;AAC/F,wBAAgB,oBAAoB,IAAI,aAAa,CAGpD;AAED,sFAAsF;AACtF,wBAAgB,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE/C"}
|
|
@@ -194,6 +194,44 @@ const realCloudFormation = {
|
|
|
194
194
|
changes: await readCfnChanges(described, describeNested),
|
|
195
195
|
};
|
|
196
196
|
},
|
|
197
|
+
async createImportChangeSet(args) {
|
|
198
|
+
const changeSetName = `cs-import-${Date.now()}`;
|
|
199
|
+
const params = Object.entries(args.parameters ?? {})
|
|
200
|
+
.map(([k, v]) => `ParameterKey=${k},ParameterValue=${v}`)
|
|
201
|
+
.join(" ");
|
|
202
|
+
const paramFlag = params ? ` --parameters ${params}` : "";
|
|
203
|
+
let body = "";
|
|
204
|
+
try {
|
|
205
|
+
body = readFileSync(args.templatePath, "utf8");
|
|
206
|
+
}
|
|
207
|
+
catch { /* unreadable template — create-change-set reports it */ }
|
|
208
|
+
const capabilities = awsDeployCapabilitiesForBody(body).join(" ");
|
|
209
|
+
const { existed } = await cfnChangeSetType(args.stackName);
|
|
210
|
+
const dir = mkdtempSync(join(tmpdir(), "chant-cfn-import-"));
|
|
211
|
+
try {
|
|
212
|
+
const resourcesFile = join(dir, "resources-to-import.json");
|
|
213
|
+
writeFileSync(resourcesFile, JSON.stringify(args.resourcesToImport.map((r) => ({ ResourceType: r.resourceType, LogicalResourceId: r.logicalResourceId, ResourceIdentifier: r.resourceIdentifier }))));
|
|
214
|
+
await run(`aws cloudformation create-change-set --stack-name ${q(args.stackName)} --change-set-name ${q(changeSetName)} ` +
|
|
215
|
+
`--change-set-type IMPORT --resources-to-import file://${resourcesFile} ` +
|
|
216
|
+
`--template-body file://${args.templatePath} --capabilities ${capabilities}${paramFlag}`);
|
|
217
|
+
}
|
|
218
|
+
finally {
|
|
219
|
+
rmSync(dir, { recursive: true, force: true });
|
|
220
|
+
}
|
|
221
|
+
await run(`aws cloudformation wait change-set-create-complete --stack-name ${q(args.stackName)} --change-set-name ${q(changeSetName)}`).catch(() => undefined);
|
|
222
|
+
const { stdout } = await run(`aws cloudformation describe-change-set --stack-name ${q(args.stackName)} --change-set-name ${q(changeSetName)}`);
|
|
223
|
+
const described = JSON.parse(stdout);
|
|
224
|
+
return {
|
|
225
|
+
changeSetName,
|
|
226
|
+
stackName: args.stackName,
|
|
227
|
+
status: described.Status,
|
|
228
|
+
statusReason: described.StatusReason ?? undefined,
|
|
229
|
+
isCreate: false,
|
|
230
|
+
changeSetType: "IMPORT",
|
|
231
|
+
stackCreated: !existed,
|
|
232
|
+
changes: await readCfnChanges(described, async () => ({ Status: "CREATE_COMPLETE" })),
|
|
233
|
+
};
|
|
234
|
+
},
|
|
197
235
|
async executeChangeSet(args) {
|
|
198
236
|
await run(`aws cloudformation execute-change-set --stack-name ${q(args.stackName)} --change-set-name ${q(args.changeSetName)}`);
|
|
199
237
|
},
|
|
@@ -205,9 +243,33 @@ const realCloudFormation = {
|
|
|
205
243
|
const described = JSON.parse(stdout);
|
|
206
244
|
const stack = described.Stacks[0];
|
|
207
245
|
const outputs = {};
|
|
208
|
-
|
|
246
|
+
const exports = {};
|
|
247
|
+
for (const o of stack?.Outputs ?? []) {
|
|
209
248
|
outputs[o.OutputKey] = o.OutputValue;
|
|
210
|
-
|
|
249
|
+
if (o.ExportName)
|
|
250
|
+
exports[o.ExportName] = { output: o.OutputKey, value: o.OutputValue };
|
|
251
|
+
}
|
|
252
|
+
return { stackStatus: stack?.StackStatus ?? "UNKNOWN", outputs, ...(Object.keys(exports).length > 0 ? { exports } : {}) };
|
|
253
|
+
},
|
|
254
|
+
async listImports(exportName) {
|
|
255
|
+
const stacks = [];
|
|
256
|
+
let token;
|
|
257
|
+
do {
|
|
258
|
+
let stdout;
|
|
259
|
+
try {
|
|
260
|
+
({ stdout } = await run(`aws cloudformation list-imports --export-name ${q(exportName)}${token ? ` --next-token ${q(token)}` : ""}`));
|
|
261
|
+
}
|
|
262
|
+
catch (err) {
|
|
263
|
+
// CloudFormation answers an export nobody imports with an error, not an empty list.
|
|
264
|
+
if (/is not imported by any stack/i.test(err instanceof Error ? err.message : String(err)))
|
|
265
|
+
return [];
|
|
266
|
+
throw err;
|
|
267
|
+
}
|
|
268
|
+
const page = JSON.parse(stdout);
|
|
269
|
+
stacks.push(...(page.Imports ?? []));
|
|
270
|
+
token = page.NextToken;
|
|
271
|
+
} while (token);
|
|
272
|
+
return [...new Set(stacks)].sort();
|
|
211
273
|
},
|
|
212
274
|
async waitForStack(stackName, opts) {
|
|
213
275
|
const intervalMs = opts?.intervalMs ?? 10000;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/** The slice of a `lexicon-aws.json` entry this module reads. */
|
|
2
|
+
export interface ImportabilityManifestEntry {
|
|
3
|
+
resourceType: string;
|
|
4
|
+
kind: string;
|
|
5
|
+
handlers?: readonly string[];
|
|
6
|
+
primaryIdentifier?: readonly string[];
|
|
7
|
+
tagging?: {
|
|
8
|
+
taggable: boolean;
|
|
9
|
+
tagOnCreate?: boolean;
|
|
10
|
+
tagUpdatable: boolean;
|
|
11
|
+
tagProperty?: string;
|
|
12
|
+
tagShape?: "list" | "map";
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
/** Legacy types (no handlers in the registry schema) that AWS documents as importable. */
|
|
16
|
+
export declare const LEGACY_IMPORTABLE_TYPES: ReadonlySet<string>;
|
|
17
|
+
/** Types with create and read handlers that AWS documents as not importable. */
|
|
18
|
+
export declare const NOT_IMPORTABLE_TYPES: ReadonlySet<string>;
|
|
19
|
+
/** The generated registry keyed by type, or an empty map in a checkout that has not generated. */
|
|
20
|
+
export declare function importabilityManifest(): ReadonlyMap<string, ImportabilityManifestEntry>;
|
|
21
|
+
/** Whether CloudFormation can import the type into a stack: create and read handlers, or AWS's hand list. */
|
|
22
|
+
export declare function isImportable(type: string, manifest?: ReadonlyMap<string, ImportabilityManifestEntry>): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Why chant refuses to adopt the type, or undefined when it can: not a
|
|
25
|
+
* generated type, not importable, or tags that can only be set at create
|
|
26
|
+
* (the marker UPDATE would replace the object). An untaggable type is
|
|
27
|
+
* adopted on the stack's word alone; the caller says so in its review.
|
|
28
|
+
*/
|
|
29
|
+
export declare function adoptionRefusal(type: string, manifest?: ReadonlyMap<string, ImportabilityManifestEntry>): string | undefined;
|
|
30
|
+
//# sourceMappingURL=importable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"importable.d.ts","sourceRoot":"","sources":["../src/importable.ts"],"names":[],"mappings":"AAuBA,iEAAiE;AACjE,MAAM,WAAW,0BAA0B;IACzC,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7B,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,OAAO,CAAC,EAAE;QAAE,QAAQ,EAAE,OAAO,CAAC;QAAC,WAAW,CAAC,EAAE,OAAO,CAAC;QAAC,YAAY,EAAE,OAAO,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,KAAK,CAAA;KAAE,CAAC;CAChI;AAED,0FAA0F;AAC1F,eAAO,MAAM,uBAAuB,EAAE,WAAW,CAAC,MAAM,CAA2C,CAAC;AAEpG,gFAAgF;AAChF,eAAO,MAAM,oBAAoB,EAAE,WAAW,CAAC,MAAM,CAInD,CAAC;AAIH,kGAAkG;AAClG,wBAAgB,qBAAqB,IAAI,WAAW,CAAC,MAAM,EAAE,0BAA0B,CAAC,CASvF;AAED,6GAA6G;AAC7G,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,GAAE,WAAW,CAAC,MAAM,EAAE,0BAA0B,CAA2B,GAAG,OAAO,CAKvI;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,GAAE,WAAW,CAAC,MAAM,EAAE,0BAA0B,CAA2B,GAAG,MAAM,GAAG,SAAS,CAYrJ"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which CloudFormation types chant can adopt into a stack with an IMPORT
|
|
3
|
+
* change set (#4536; ruled on INTENTIUS/choudoufu#2284 Q5, 2026-10-26).
|
|
4
|
+
*
|
|
5
|
+
* A registry type is importable when its schema has `create` and `read`
|
|
6
|
+
* handlers, which codegen keeps in `lexicon-aws.json` as `handlers`. AWS
|
|
7
|
+
* documents the exceptions on its "Resource type support" page
|
|
8
|
+
* (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resource-import-supported-resources.html),
|
|
9
|
+
* and the two short lists below are those exceptions, compared on 2026-10-26
|
|
10
|
+
* against the pinned spec (sha256:398259716cca…): one legacy type with no
|
|
11
|
+
* handlers that the page marks importable, and three types with create and
|
|
12
|
+
* read handlers that the page marks not importable.
|
|
13
|
+
*
|
|
14
|
+
* Adoption also needs to write chant's markers after the import, as a
|
|
15
|
+
* tags-only UPDATE. A type whose tags can only be set at create
|
|
16
|
+
* (`tagging.tagUpdatable` false) is refused by {@link adoptionRefusal},
|
|
17
|
+
* never replaced to mark it.
|
|
18
|
+
*/
|
|
19
|
+
import { createRequire } from "module";
|
|
20
|
+
import { moduleSourceUrl } from "@intentius/chant/module-source";
|
|
21
|
+
const require = createRequire(moduleSourceUrl(import.meta.url));
|
|
22
|
+
/** Legacy types (no handlers in the registry schema) that AWS documents as importable. */
|
|
23
|
+
export const LEGACY_IMPORTABLE_TYPES = new Set(["AWS::IoTEvents::AlarmModel"]);
|
|
24
|
+
/** Types with create and read handlers that AWS documents as not importable. */
|
|
25
|
+
export const NOT_IMPORTABLE_TYPES = new Set([
|
|
26
|
+
"AWS::AppSync::GraphQLApi",
|
|
27
|
+
"AWS::SES::ConfigurationSetEventDestination",
|
|
28
|
+
"AWS::SageMaker::Endpoint",
|
|
29
|
+
]);
|
|
30
|
+
let cachedManifest;
|
|
31
|
+
/** The generated registry keyed by type, or an empty map in a checkout that has not generated. */
|
|
32
|
+
export function importabilityManifest() {
|
|
33
|
+
if (cachedManifest)
|
|
34
|
+
return cachedManifest;
|
|
35
|
+
try {
|
|
36
|
+
const manifest = require("./generated/lexicon-aws.json");
|
|
37
|
+
cachedManifest = new Map(Object.values(manifest).filter((e) => e.kind === "resource").map((e) => [e.resourceType, e]));
|
|
38
|
+
}
|
|
39
|
+
catch {
|
|
40
|
+
cachedManifest = new Map();
|
|
41
|
+
}
|
|
42
|
+
return cachedManifest;
|
|
43
|
+
}
|
|
44
|
+
/** Whether CloudFormation can import the type into a stack: create and read handlers, or AWS's hand list. */
|
|
45
|
+
export function isImportable(type, manifest = importabilityManifest()) {
|
|
46
|
+
if (NOT_IMPORTABLE_TYPES.has(type))
|
|
47
|
+
return false;
|
|
48
|
+
if (LEGACY_IMPORTABLE_TYPES.has(type))
|
|
49
|
+
return true;
|
|
50
|
+
const handlers = manifest.get(type)?.handlers ?? [];
|
|
51
|
+
return handlers.includes("create") && handlers.includes("read");
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Why chant refuses to adopt the type, or undefined when it can: not a
|
|
55
|
+
* generated type, not importable, or tags that can only be set at create
|
|
56
|
+
* (the marker UPDATE would replace the object). An untaggable type is
|
|
57
|
+
* adopted on the stack's word alone; the caller says so in its review.
|
|
58
|
+
*/
|
|
59
|
+
export function adoptionRefusal(type, manifest = importabilityManifest()) {
|
|
60
|
+
const entry = manifest.get(type);
|
|
61
|
+
if (!entry && !LEGACY_IMPORTABLE_TYPES.has(type))
|
|
62
|
+
return `${type} is not a type this aws lexicon generated`;
|
|
63
|
+
if (!isImportable(type, manifest)) {
|
|
64
|
+
return NOT_IMPORTABLE_TYPES.has(type)
|
|
65
|
+
? `${type} is listed by AWS as not supporting resource import`
|
|
66
|
+
: `${type} has no create and read handlers, so CloudFormation cannot import it`;
|
|
67
|
+
}
|
|
68
|
+
if (entry?.tagging?.taggable && entry.tagging.tagUpdatable === false) {
|
|
69
|
+
return `${type}'s tags can only be set at create, so writing chant's markers would replace it`;
|
|
70
|
+
}
|
|
71
|
+
return undefined;
|
|
72
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { DeclaredIdentity, IndexIdentity } from "@intentius/chant/lifecycle/identity-match";
|
|
2
|
+
/** One `lexicon-aws.json` entry, the fields this rule reads. */
|
|
3
|
+
export interface IdentityManifestEntry {
|
|
4
|
+
resourceType: string;
|
|
5
|
+
kind: string;
|
|
6
|
+
primaryIdentifier?: string[];
|
|
7
|
+
/** GetAtt name -> CloudFormation attribute: the schema's `readOnlyProperties`. */
|
|
8
|
+
attrs?: Record<string, string>;
|
|
9
|
+
}
|
|
10
|
+
/** True for a type behold's lister indexes at location `global`. */
|
|
11
|
+
export declare function isGlobalAwsType(type: string): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* The identifier an aws declaration spells for the index, or why it spells
|
|
14
|
+
* none. `manifest` is the generated `lexicon-aws.json` keyed by type; a test
|
|
15
|
+
* passes a table.
|
|
16
|
+
*/
|
|
17
|
+
export declare function awsDeclaredIdentity(entityType: string, props: Record<string, unknown>, manifest?: ReadonlyMap<string, IdentityManifestEntry>): DeclaredIdentity;
|
|
18
|
+
export declare const awsIndexIdentity: IndexIdentity;
|
|
19
|
+
//# sourceMappingURL=index-identity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-identity.d.ts","sourceRoot":"","sources":["../src/index-identity.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAIjG,gEAAgE;AAChE,MAAM,WAAW,qBAAqB;IACpC,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,kFAAkF;IAClF,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChC;AAID,oEAAoE;AACpE,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAErD;AAgBD;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,QAAQ,GAAE,WAAW,CAAC,MAAM,EAAE,qBAAqB,CAAqB,GACvE,gBAAgB,CAwBlB;AAED,eAAO,MAAM,gBAAgB,EAAE,aAG9B,CAAC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The aws lexicon's identity rule for indexed resources (#4523, rule written
|
|
3
|
+
* out on INTENTIUS/behold#1025's design comment).
|
|
4
|
+
*
|
|
5
|
+
* The same evidence the stack read's identity fallback uses (#1647,
|
|
6
|
+
* ./identity-observe.ts): the CloudFormation schema's `primaryIdentifier`,
|
|
7
|
+
* which codegen compiled into `lexicon-aws.json`, read off the declared
|
|
8
|
+
* props and `|`-joined the way Cloud Control spells an identifier. behold's
|
|
9
|
+
* lister (behold#1029) writes that Cloud Control `Identifier` as each indexed
|
|
10
|
+
* node's `nativeId`, so a never-deployed bucket declared with `BucketName`
|
|
11
|
+
* and a role declared with `RoleName` match their indexed objects by value.
|
|
12
|
+
*
|
|
13
|
+
* What cannot match:
|
|
14
|
+
* - an identifier part the schema lists in `readOnlyProperties` is assigned
|
|
15
|
+
* by the service (`InstanceId` for `AWS::EC2::Instance`, `QueueUrl` for
|
|
16
|
+
* `AWS::SQS::Queue`), so no declaration states it: `no-binding`;
|
|
17
|
+
* - a part the declaration leaves out or spells with a Ref or an intrinsic:
|
|
18
|
+
* `no-binding`, "identity is not in the declaration";
|
|
19
|
+
* - a type with no primary identifier on record: `unsupported-kind`.
|
|
20
|
+
*
|
|
21
|
+
* Global types are the prefixes behold's aws lister lists once per account at
|
|
22
|
+
* location `global` (behold src/cloud-lister/aws.ts, `isGlobalAwsType`).
|
|
23
|
+
*/
|
|
24
|
+
import { createRequire } from "module";
|
|
25
|
+
import { moduleSourceUrl } from "@intentius/chant/module-source";
|
|
26
|
+
const require = createRequire(moduleSourceUrl(import.meta.url));
|
|
27
|
+
const GLOBAL_TYPE_PREFIXES = ["AWS::IAM::", "AWS::CloudFront::", "AWS::Route53::", "AWS::Organizations::", "AWS::GlobalAccelerator::"];
|
|
28
|
+
/** True for a type behold's lister indexes at location `global`. */
|
|
29
|
+
export function isGlobalAwsType(type) {
|
|
30
|
+
return GLOBAL_TYPE_PREFIXES.some((p) => type.startsWith(p));
|
|
31
|
+
}
|
|
32
|
+
let cachedManifest;
|
|
33
|
+
/** The manifest keyed by type, or an empty one in a checkout that has not generated (every type is then `unsupported-kind`). */
|
|
34
|
+
function defaultManifest() {
|
|
35
|
+
if (cachedManifest)
|
|
36
|
+
return cachedManifest;
|
|
37
|
+
try {
|
|
38
|
+
const manifest = require("./generated/lexicon-aws.json");
|
|
39
|
+
cachedManifest = new Map(Object.values(manifest).filter((e) => e.kind === "resource").map((e) => [e.resourceType, e]));
|
|
40
|
+
}
|
|
41
|
+
catch {
|
|
42
|
+
cachedManifest = new Map();
|
|
43
|
+
}
|
|
44
|
+
return cachedManifest;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* The identifier an aws declaration spells for the index, or why it spells
|
|
48
|
+
* none. `manifest` is the generated `lexicon-aws.json` keyed by type; a test
|
|
49
|
+
* passes a table.
|
|
50
|
+
*/
|
|
51
|
+
export function awsDeclaredIdentity(entityType, props, manifest = defaultManifest()) {
|
|
52
|
+
const entry = manifest.get(entityType);
|
|
53
|
+
const parts = entry?.primaryIdentifier;
|
|
54
|
+
if (!entry || entry.kind !== "resource" || !parts || parts.length === 0) {
|
|
55
|
+
return { kind: "unmatchable", reason: "unsupported-kind", detail: `${entityType} has no primary identifier on record` };
|
|
56
|
+
}
|
|
57
|
+
const readOnly = new Set(Object.values(entry.attrs ?? {}));
|
|
58
|
+
const serverAssigned = parts.filter((p) => readOnly.has(p));
|
|
59
|
+
if (serverAssigned.length > 0) {
|
|
60
|
+
return {
|
|
61
|
+
kind: "unmatchable",
|
|
62
|
+
reason: "no-binding",
|
|
63
|
+
detail: `the identity of ${entityType} (${parts.join(", ")}) is assigned by the service (${serverAssigned.join(", ")}), so no declaration states it`,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
const values = [];
|
|
67
|
+
for (const part of parts) {
|
|
68
|
+
const v = props[part];
|
|
69
|
+
if ((typeof v !== "string" && typeof v !== "number") || String(v) === "") {
|
|
70
|
+
return { kind: "unmatchable", reason: "no-binding", detail: `identity is not in the declaration (${entityType} ${part})` };
|
|
71
|
+
}
|
|
72
|
+
values.push(String(v));
|
|
73
|
+
}
|
|
74
|
+
return { kind: "identifier", listedType: entityType, identifier: values.join("|"), global: isGlobalAwsType(entityType) };
|
|
75
|
+
}
|
|
76
|
+
export const awsIndexIdentity = {
|
|
77
|
+
substrate: "aws",
|
|
78
|
+
declaredIdentity: (entityType, props) => awsDeclaredIdentity(entityType, props),
|
|
79
|
+
};
|