@intentius/chant-lexicon-terraform 0.124.84 → 0.124.86

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/dist/ci-setup.d.ts +11 -2
  2. package/dist/ci-setup.d.ts.map +1 -1
  3. package/dist/ci-setup.js +11 -6
  4. package/dist/components/capability-plugin.d.ts +12 -0
  5. package/dist/components/capability-plugin.d.ts.map +1 -1
  6. package/dist/components/capability-plugin.js +22 -4
  7. package/dist/compose.d.ts.map +1 -1
  8. package/dist/compose.js +1 -1
  9. package/dist/estate-migration.d.ts +101 -0
  10. package/dist/estate-migration.d.ts.map +1 -0
  11. package/dist/estate-migration.js +471 -0
  12. package/dist/integrity.json +2 -2
  13. package/dist/manifest.json +1 -1
  14. package/dist/op/activities/terraform.d.ts +65 -0
  15. package/dist/op/activities/terraform.d.ts.map +1 -1
  16. package/dist/op/activities/terraform.js +94 -1
  17. package/dist/state/backend.d.ts +46 -9
  18. package/dist/state/backend.d.ts.map +1 -1
  19. package/dist/state/backend.js +84 -31
  20. package/dist/state/gitlab.d.ts +1 -1
  21. package/dist/state/gitlab.d.ts.map +1 -1
  22. package/dist/state/gitlab.js +27 -14
  23. package/dist/state/index.d.ts +1 -0
  24. package/dist/state/index.d.ts.map +1 -1
  25. package/dist/state/index.js +1 -0
  26. package/dist/state/s3.d.ts +9 -3
  27. package/dist/state/s3.d.ts.map +1 -1
  28. package/dist/state/s3.js +4 -3
  29. package/dist/state/source.d.ts +92 -0
  30. package/dist/state/source.d.ts.map +1 -0
  31. package/dist/state/source.js +254 -0
  32. package/dist/state/store.d.ts +41 -4
  33. package/dist/state/store.d.ts.map +1 -1
  34. package/dist/state/store.js +125 -10
  35. package/dist/state/versions.d.ts +77 -10
  36. package/dist/state/versions.d.ts.map +1 -1
  37. package/dist/state/versions.js +118 -64
  38. package/dist/state-migration.d.ts +43 -1
  39. package/dist/state-migration.d.ts.map +1 -1
  40. package/dist/state-migration.js +251 -20
  41. package/dist/state-ops.d.ts +2 -3
  42. package/dist/state-ops.d.ts.map +1 -1
  43. package/dist/state-ops.js +4 -7
  44. package/package.json +2 -2
  45. package/src/ci-setup.test.ts +20 -0
  46. package/src/ci-setup.ts +11 -6
  47. package/src/components/capability-plugin.ts +36 -3
  48. package/src/components/terraform-apply-command-hook.test.ts +157 -0
  49. package/src/compose.ts +1 -0
  50. package/src/estate-migration.test.ts +186 -0
  51. package/src/estate-migration.ts +563 -0
  52. package/src/op/activities/terraform.ts +153 -3
  53. package/src/state/backend-verdict.test.ts +4 -3
  54. package/src/state/backend.test.ts +3 -1
  55. package/src/state/backend.ts +108 -33
  56. package/src/state/gitlab.ts +25 -12
  57. package/src/state/index.ts +1 -0
  58. package/src/state/s3.ts +5 -4
  59. package/src/state/source.ts +289 -0
  60. package/src/state/store.ts +145 -11
  61. package/src/state/versions.test.ts +365 -0
  62. package/src/state/versions.ts +148 -68
  63. package/src/state-migration-backends.test.ts +277 -0
  64. package/src/state-migration.ts +265 -23
  65. package/src/state-ops.ts +6 -8
@@ -0,0 +1,277 @@
1
+ /**
2
+ * #4806: backend moves planned by the lexicon and run by chant core's gated
3
+ * migration. The binary is faked: `init` records the backend a root's
4
+ * `backend.json` (or the override file) names into the data dir it is
5
+ * given; `state pull` and `state push` read and write that backend: a local
6
+ * file, the in-memory bucket, or an in-memory table for the backends that
7
+ * keep no versions (pg, kubernetes, whose init writes an empty state of its
8
+ * own). `plan` compares the root's `resources.txt` with its state. A TFE
9
+ * workspace is an in-memory API behind the source's fetch. No binary,
10
+ * bucket, service or git is reached.
11
+ */
12
+ import { existsSync, mkdirSync, mkdtempSync, readFileSync, writeFileSync } from "node:fs";
13
+ import { tmpdir } from "node:os";
14
+ import { join } from "node:path";
15
+ import { describe, expect, test } from "vitest";
16
+ import { fakeLedger } from "@intentius/chant/__fixtures__/gated-ledger";
17
+ import { runStateMigration } from "@intentius/chant/state-migration";
18
+ import type { BinaryExec, StateFile } from "./state/exec";
19
+ import type { StoreFetch } from "./state/object-store";
20
+ import { backendBlock, backendMoveProblems, DEFAULT_OVERRIDE_FILE, MigrationError, planTerraformMigration, stateDigest, type BackendMove } from "./state-migration";
21
+
22
+ type Answer = Awaited<ReturnType<StoreFetch>>;
23
+ const answer = (status = 200, body = "", headers: Record<string, string> = {}): Answer => {
24
+ const h = Object.fromEntries(Object.entries(headers).map(([k, v]) => [k.toLowerCase(), v]));
25
+ return { ok: status < 300, status, text: async () => body, headers: { get: (n: string) => h[n.toLowerCase()] ?? null, forEach: (fn: (v: string, k: string) => void) => Object.entries(h).forEach(([k, v]) => fn(v, k)) } as Answer["headers"] };
26
+ };
27
+
28
+ /** A versioned bucket in memory at http://s3.test, and a TFE API at https://tfe.test with one workspace, acme/legacy. */
29
+ function fakeServices() {
30
+ const versions = new Map<string, Array<{ id: string; body: string }>>();
31
+ let n = 0;
32
+ const put = (key: string, body: string) => versions.set(key, [...(versions.get(key) ?? []), { id: `v${++n}`, body }]);
33
+ const latest = (key: string) => versions.get(key)?.at(-1);
34
+ const tfe = { state: "" as string, sv: "sv-1", locked: false, calls: [] as string[] };
35
+ const fetch: StoreFetch = async (url, init) => {
36
+ const u = new URL(url);
37
+ if (u.host === "tfe.test") {
38
+ tfe.calls.push(`${init.method ?? "GET"} ${u.pathname}`);
39
+ if (u.pathname === "/.well-known/terraform.json") return answer(200, JSON.stringify({ "tfe.v2": "/api/v2/" }));
40
+ if (u.pathname === "/api/v2/organizations/acme/workspaces/legacy") return answer(200, JSON.stringify({ data: { id: "ws-1" } }));
41
+ if (u.pathname === "/api/v2/workspaces/ws-1/current-state-version") return answer(200, JSON.stringify({ data: { id: tfe.sv, attributes: { "hosted-state-download-url": "/download/state" } } }));
42
+ if (u.pathname === "/download/state") return answer(200, tfe.state);
43
+ if (u.pathname === "/api/v2/workspaces/ws-1/actions/lock") {
44
+ if (tfe.locked) return answer(409);
45
+ tfe.locked = true;
46
+ return answer(200, JSON.stringify({ data: { id: "ws-1" } }));
47
+ }
48
+ if (u.pathname === "/api/v2/workspaces/ws-1/actions/unlock") {
49
+ tfe.locked = false;
50
+ return answer(200, "{}");
51
+ }
52
+ return answer(404);
53
+ }
54
+ const key = decodeURIComponent(u.pathname.slice(1));
55
+ const vid = u.searchParams.get("versionId");
56
+ const all = versions.get(key) ?? [];
57
+ if (init.method === "PUT") {
58
+ if (init.headers["if-none-match"] === "*" && all.length) return answer(412);
59
+ put(key, String(init.body));
60
+ return answer(200);
61
+ }
62
+ if (init.method === "DELETE") {
63
+ versions.delete(key);
64
+ return answer(204);
65
+ }
66
+ const v = vid ? all.find((x) => x.id === vid) : all.at(-1);
67
+ if (!v) return answer(404);
68
+ return answer(200, init.method === "HEAD" ? "" : v.body, { "x-amz-version-id": v.id });
69
+ };
70
+ return { versions, fetch, put, latest, tfe };
71
+ }
72
+
73
+ const ENV = { AWS_ACCESS_KEY_ID: "AK", AWS_SECRET_ACCESS_KEY: "SK", AWS_REGION: "us-east-1", TF_TOKEN_tfe_test: "tok" };
74
+ const s3Backend = (key: string) => ({ type: "s3", config: { bucket: "acme", key, use_lockfile: true, endpoints: { s3: "http://s3.test" } } });
75
+
76
+ /** The override file's backend block, read back as the binary would. */
77
+ function parseBlock(text: string): { type: string; config: Record<string, unknown> } {
78
+ const type = /backend "([^"]+)"/.exec(text)![1]!;
79
+ const config: Record<string, unknown> = {};
80
+ for (const m of text.matchAll(/^ {4}(\w+) = (.*)$/gm)) {
81
+ try {
82
+ config[m[1]!] = JSON.parse(m[2]!);
83
+ } catch {
84
+ config[m[1]!] = m[2];
85
+ }
86
+ }
87
+ return { type, config };
88
+ }
89
+
90
+ /** The binary, over the fake bucket, local files and the tables of the backends that keep no versions. */
91
+ function fakeBinary(svc: ReturnType<typeof fakeServices>) {
92
+ const calls: string[] = [];
93
+ const plans = new Map<string, string[]>();
94
+ const tables = new Map<string, string>();
95
+ const tableKey = (b: { type: string; config: Record<string, unknown> }) => `${b.type}:${String(b.config.conn_str ?? b.config.secret_suffix)}`;
96
+ const backendOf = (env: NodeJS.ProcessEnv) => (JSON.parse(readFileSync(join(env.TF_DATA_DIR!, "terraform.tfstate"), "utf-8")) as { backend: { type: string; config: Record<string, unknown> } }).backend;
97
+ const read = (dir: string, env: NodeJS.ProcessEnv): string => {
98
+ const b = backendOf(env);
99
+ if (b.type === "local") {
100
+ const p = String(b.config.path);
101
+ const at = p.startsWith("/") ? p : join(dir, p);
102
+ return existsSync(at) ? readFileSync(at, "utf-8") : "";
103
+ }
104
+ if (b.type === "s3") return svc.latest(`acme/${b.config.key}`)?.body ?? "";
105
+ return tables.get(tableKey(b)) ?? "";
106
+ };
107
+ const exec: BinaryExec = async (_bin, args, dir, env) => {
108
+ const name = dir.split("/").at(-1)!;
109
+ calls.push(`${name}: ${args.join(" ")}`);
110
+ if (args[0] === "init") {
111
+ const override = join(dir, DEFAULT_OVERRIDE_FILE);
112
+ const backend = existsSync(override) ? parseBlock(readFileSync(override, "utf-8")) : JSON.parse(readFileSync(join(dir, "backend.json"), "utf-8"));
113
+ mkdirSync(env.TF_DATA_DIR!, { recursive: true });
114
+ writeFileSync(join(env.TF_DATA_DIR!, "terraform.tfstate"), JSON.stringify({ version: 3, backend }));
115
+ // A kubernetes backend writes an empty state of its own lineage at init.
116
+ if (backend.type === "kubernetes" && !tables.has(tableKey(backend))) tables.set(tableKey(backend), JSON.stringify({ version: 4, serial: 1, lineage: "k8s-own", outputs: {}, resources: [] }));
117
+ return { code: 0, stdout: "", out: "" };
118
+ }
119
+ if (args[0] === "state" && args[1] === "pull") return { code: 0, stdout: read(dir, env), out: "" };
120
+ if (args[0] === "state" && args[1] === "push") {
121
+ const b = backendOf(env);
122
+ const body = readFileSync(args.at(-1)!, "utf-8");
123
+ if (b.type === "s3") svc.put(`acme/${b.config.key}`, body);
124
+ else {
125
+ const was = tables.get(tableKey(b));
126
+ if (was && (JSON.parse(was) as StateFile).lineage !== (JSON.parse(body) as StateFile).lineage && !args.includes("-force")) return { code: 1, stdout: "", out: "Failed to write state: lineage differs" };
127
+ tables.set(tableKey(b), body);
128
+ }
129
+ return { code: 0, stdout: "", out: "" };
130
+ }
131
+ if (args[0] === "plan") {
132
+ const text = read(dir, env);
133
+ const have = new Set(text ? (JSON.parse(text) as StateFile).resources.map((r) => `${r.type}.${r.name}`) : []);
134
+ const code = new Set(readFileSync(join(dir, "resources.txt"), "utf-8").split("\n").filter(Boolean));
135
+ const changes = [...[...code].filter((a) => !have.has(a)).map((a) => `${a}=create`), ...[...have].filter((a) => !code.has(a)).map((a) => `${a}=delete`)];
136
+ plans.set(args.find((a) => a.startsWith("-out="))!.slice(5), changes);
137
+ return { code: 0, stdout: "", out: changes.length ? `Plan: ${changes.length} to change.` : "No changes." };
138
+ }
139
+ if (args[0] === "show") {
140
+ const changes = plans.get(args.at(-1)!) ?? [];
141
+ return { code: 0, stdout: JSON.stringify({ resource_changes: changes.map((c) => ({ address: c.split("=")[0], change: { actions: [c.split("=")[1]] } })) }), out: "" };
142
+ }
143
+ return { code: 1, stdout: "", out: `unexpected ${args.join(" ")}` };
144
+ };
145
+ return { exec, calls, tables };
146
+ }
147
+
148
+ const resource = (type: string, name: string) => ({ mode: "managed", type, name, provider: 'provider["registry.terraform.io/hashicorp/aws"]', instances: [{ attributes: { id: name } }] });
149
+ const state = (serial: number, resources: ReturnType<typeof resource>[], lineage = "l-app"): StateFile => ({ version: 4, terraform_version: "1.10.0", serial, lineage, outputs: {}, resources, check_results: null });
150
+
151
+ /** One root, app, whose code holds the queue and now names `backend`. */
152
+ function setup(backend: { type: string; config: Record<string, unknown> } = s3Backend("app.tfstate")) {
153
+ const repo = mkdtempSync(join(tmpdir(), "chant-backend-move-"));
154
+ const svc = fakeServices();
155
+ const dir = join(repo, "app");
156
+ mkdirSync(dir, { recursive: true });
157
+ writeFileSync(join(dir, "backend.json"), JSON.stringify(backend));
158
+ writeFileSync(join(dir, "resources.txt"), "aws_sqs_queue.jobs");
159
+ writeFileSync(join(dir, "old.tfstate"), JSON.stringify(state(7, [resource("aws_sqs_queue", "jobs")])));
160
+ const bin = fakeBinary(svc);
161
+ const work = mkdtempSync(join(tmpdir(), "chant-backend-move-work-"));
162
+ return { repo, dir, svc, bin, work, roots: [{ root: "app", dir, binary: "tofu", env: ENV }] };
163
+ }
164
+
165
+ const gated = (ledger: ReturnType<typeof fakeLedger>, planned: Awaited<ReturnType<typeof planTerraformMigration>>) => ({ name: "to-s3", by: "ana", roots: planned.roots, engine: planned.engine, words: { op: "tf-migrate" }, rules: { mode: "ledger" as const }, ledger });
166
+
167
+ const fromLocal: BackendMove[] = [{ root: "app", from: { backend: "local", config: { path: "old.tfstate" } } }];
168
+
169
+ describe("backend moves", () => {
170
+ test("a state read from the backend it was in is proved, bound with its source, and written to the backend the code names", async () => {
171
+ const { svc, bin, work, roots, repo, dir } = setup();
172
+ const ledger = fakeLedger();
173
+ const planned = await planTerraformMigration({ name: "to-s3", backends: fromLocal, roots, work, repo, exec: bin.exec, fetch: svc.fetch });
174
+ const was = JSON.parse(readFileSync(join(dir, "old.tfstate"), "utf-8")) as StateFile;
175
+ expect(planned.roots).toEqual([expect.objectContaining({ root: "app", location: "s3://acme/app.tfstate", before: { digest: null }, after: { digest: stateDigest(was) }, source: { location: "old.tfstate", digest: stateDigest(was) }, proof: { changes: [], summary: "No changes." } })]);
176
+ expect(existsSync(join(dir, DEFAULT_OVERRIDE_FILE))).toBe(false);
177
+ expect((await runStateMigration(gated(ledger, planned))).status).toBe("waiting");
178
+ ledger.approve("bo");
179
+ const r = await runStateMigration(gated(ledger, planned));
180
+ expect(r).toMatchObject({ status: "applied", exit: 0 });
181
+ expect(JSON.parse(svc.latest("acme/app.tfstate")!.body)).toEqual(was);
182
+ expect(readFileSync(join(dir, "old.tfstate"), "utf-8")).toBe(JSON.stringify(was));
183
+ expect(ledger.details[0]).toMatchObject({ result: "applied", "app.source": "old.tfstate", "app.after": svc.latest("acme/app.tfstate")!.id });
184
+ });
185
+
186
+ test("a source written after the plan refuses the write under the lock", async () => {
187
+ const { svc, bin, work, roots, repo, dir } = setup();
188
+ const ledger = fakeLedger();
189
+ ledger.approve("bo");
190
+ const planned = await planTerraformMigration({ name: "to-s3", backends: fromLocal, roots, work, repo, exec: bin.exec, fetch: svc.fetch });
191
+ writeFileSync(join(dir, "old.tfstate"), JSON.stringify(state(8, [resource("aws_sqs_queue", "jobs"), resource("aws_sqs_queue", "more")])));
192
+ const r = await runStateMigration(gated(ledger, planned));
193
+ expect(r).toMatchObject({ status: "moved", exit: 4, result: { moved: ["app"] } });
194
+ expect(svc.latest("acme/app.tfstate")).toBeUndefined();
195
+ });
196
+
197
+ test("a workspace's state is read over the TFE API under the workspace's own lock, which is released", async () => {
198
+ const { svc, bin, work, roots, repo } = setup();
199
+ svc.tfe.state = JSON.stringify(state(3, [resource("aws_sqs_queue", "jobs")], "l-tfe"));
200
+ const ledger = fakeLedger();
201
+ ledger.approve("bo");
202
+ const backends: BackendMove[] = [{ root: "app", from: { backend: "remote", config: { hostname: "tfe.test", organization: "acme", workspaces: { name: "legacy" } } } }];
203
+ const planned = await planTerraformMigration({ name: "to-s3", backends, roots, work, repo, exec: bin.exec, fetch: svc.fetch });
204
+ expect(planned.roots[0]!.source).toMatchObject({ location: "remote://tfe.test/acme/legacy", version_id: "sv-1" });
205
+ const r = await runStateMigration(gated(ledger, planned));
206
+ expect(r.status).toBe("applied");
207
+ expect(svc.tfe.calls.filter((c) => c.includes("actions/"))).toEqual(["POST /api/v2/workspaces/ws-1/actions/lock", "POST /api/v2/workspaces/ws-1/actions/unlock"]);
208
+ expect((JSON.parse(svc.latest("acme/app.tfstate")!.body) as StateFile).lineage).toBe("l-tfe");
209
+ });
210
+
211
+ test("a workspace another run holds the lock of fails the migration with nothing written", async () => {
212
+ const { svc, bin, work, roots, repo } = setup();
213
+ svc.tfe.state = JSON.stringify(state(3, [resource("aws_sqs_queue", "jobs")], "l-tfe"));
214
+ svc.tfe.locked = true;
215
+ const ledger = fakeLedger();
216
+ ledger.approve("bo");
217
+ const backends: BackendMove[] = [{ root: "app", from: { backend: "cloud", config: { hostname: "tfe.test", organization: "acme", workspaces: { name: "legacy" } } } }];
218
+ const planned = await planTerraformMigration({ name: "to-s3", backends, roots, work, repo, exec: bin.exec, fetch: svc.fetch });
219
+ const r = await runStateMigration(gated(ledger, planned));
220
+ expect(r.status === "failed" && r.error).toMatch(/workspace .*cloud:\/\/tfe.test\/acme\/legacy.* is locked/);
221
+ expect(svc.latest("acme/app.tfstate")).toBeUndefined();
222
+ });
223
+
224
+ test("an exported state file moves to a pg backend through the binary, under the backend's own lock", async () => {
225
+ const pg = { type: "pg", config: { conn_str: "postgres://db.test/states" } };
226
+ const { svc, bin, work, roots, repo } = setup(pg);
227
+ writeFileSync(join(repo, "export.json"), JSON.stringify(state(2, [resource("aws_sqs_queue", "jobs")], "l-export")));
228
+ const ledger = fakeLedger();
229
+ ledger.approve("bo");
230
+ const planned = await planTerraformMigration({ name: "to-pg", backends: [{ root: "app", from: { backend: "file", config: { path: "export.json" } } }], roots, work, repo, exec: bin.exec, fetch: svc.fetch });
231
+ expect(planned.roots[0]).toMatchObject({ location: "pg:db.test/states/terraform_remote_state.states", source: { location: "export.json" } });
232
+ const r = await runStateMigration({ ...gated(ledger, planned), name: "to-pg" });
233
+ expect(r.status).toBe("applied");
234
+ const push = bin.calls.find((c) => c.includes("state push"))!;
235
+ expect(push).not.toContain("-lock=false");
236
+ expect(push).not.toContain("-force");
237
+ expect((JSON.parse(bin.tables.get("pg:postgres://db.test/states")!) as StateFile).lineage).toBe("l-export");
238
+ });
239
+
240
+ test("a kubernetes backend's empty state from init is replaced with -force; one that holds resources is refused", async () => {
241
+ const k8s = { type: "kubernetes", config: { secret_suffix: "app", namespace: "infra" } };
242
+ const { svc, bin, work, roots, repo } = setup(k8s);
243
+ const ledger = fakeLedger();
244
+ ledger.approve("bo");
245
+ const planned = await planTerraformMigration({ name: "to-k8s", backends: fromLocal, roots, work, repo, exec: bin.exec, fetch: svc.fetch });
246
+ expect(planned.roots[0]!.before.digest).not.toBeNull();
247
+ const r = await runStateMigration({ ...gated(ledger, planned), name: "to-k8s" });
248
+ expect(r.status).toBe("applied");
249
+ expect(bin.calls.find((c) => c.includes("state push"))).toContain("-force");
250
+ await expect(planTerraformMigration({ name: "again", backends: fromLocal, roots, work: mkdtempSync(join(tmpdir(), "w-")), repo, exec: bin.exec, fetch: svc.fetch })).rejects.toThrow(/already holds a state/);
251
+ });
252
+
253
+ test("a source the code still names, and a source with no state, are refused at plan", async () => {
254
+ const { svc, bin, work, roots, repo } = setup();
255
+ await expect(planTerraformMigration({ name: "m", backends: [{ root: "app", from: { backend: "s3", config: { bucket: "acme", key: "app.tfstate", use_lockfile: true, endpoints: { s3: "http://s3.test" } } } }], roots, work, repo, exec: bin.exec, fetch: svc.fetch })).rejects.toThrow(/code names the backend it moves from/);
256
+ await expect(planTerraformMigration({ name: "m", backends: [{ root: "app", from: { backend: "local", config: { path: "none.tfstate" } } }], roots, work, repo, exec: bin.exec, fetch: svc.fetch })).rejects.toBeInstanceOf(MigrationError);
257
+ });
258
+
259
+ test("backendMoveProblems names a credential in the repo, a root that moves twice and a config that names no state", () => {
260
+ expect(
261
+ backendMoveProblems([
262
+ { root: "a", from: { backend: "pg", config: { conn_str: "postgres://u:secret@db/x" } } },
263
+ { root: "a", from: { backend: "s3", config: { bucket: "b" } } },
264
+ { root: "c", from: { backend: "swift", config: {} } },
265
+ ]),
266
+ ).toEqual([
267
+ "backends[0].from.config.conn_str holds a password, which does not belong in the repo; the job gives it in PGPASSWORD",
268
+ "backends[1]: a moves twice",
269
+ "backends[1].from.config must name the bucket and key of the state",
270
+ expect.stringMatching(/^backends\[2\]\.from\.backend must be s3, gcs, azurerm, local, http, pg, kubernetes, consul, remote, cloud, file$/),
271
+ ]);
272
+ });
273
+
274
+ test("backendBlock writes the configuration as HCL", () => {
275
+ expect(backendBlock("s3", { bucket: "b", use_lockfile: true, endpoints: { s3: "http://x" }, skip: null })).toBe('terraform {\n backend "s3" {\n bucket = "b"\n use_lockfile = true\n endpoints = { s3 = "http://x" }\n }\n}\n');
276
+ });
277
+ });