@intentius/chant-lexicon-terraform 0.106.4 → 0.107.1

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.
@@ -79,7 +79,7 @@
79
79
  * export const { op } = TerraformApplyOp({ name: "app-apply", root: "app" });
80
80
  * ```
81
81
  */
82
- import { OpResource } from "@intentius/chant/op";
82
+ import { OpResource, type GateApproval } from "@intentius/chant/op";
83
83
  /**
84
84
  * When to pause for a human before applying.
85
85
  *
@@ -118,6 +118,13 @@ export interface TerraformApplyOpConfig {
118
118
  gateTimeout?: string;
119
119
  /** Override the gate description shown to the approver. */
120
120
  gateDescription?: string;
121
+ /**
122
+ * The gate's approval block (#2508): a quorum, and a policy such as the
123
+ * cedar lexicon's starter pack (`gatePolicy("prod", starterGatePolicies())`).
124
+ * The gate binds the Plan step, so the policy reads the plan's change-set
125
+ * summary as `context.plan` with nothing more here (#3182).
126
+ */
127
+ gateApproval?: GateApproval;
121
128
  /** `-upgrade` on the Init step: re-resolve provider and module versions. */
122
129
  upgrade?: boolean;
123
130
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"terraform-apply-op.d.ts","sourceRoot":"","sources":["../../src/composites/terraform-apply-op.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgFG;AAEH,OAAO,EAA6B,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAW5E;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG,QAAQ,GAAG,OAAO,CAAC;AAElE,MAAM,WAAW,sBAAsB;IACrC,qEAAqE;IACrE,IAAI,EAAE,MAAM,CAAC;IACb,+GAA+G;IAC/G,IAAI,EAAE,MAAM,CAAC;IACb,0GAA0G;IAC1G,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,IAAI,CAAC,EAAE,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,CAAC;IAClB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qGAAqG;IACrG,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2DAA2D;IAC3D,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,4EAA4E;IAC5E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;OAKG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC7C;AAED,MAAM,WAAW,yBAAyB;IACxC,mEAAmE;IACnE,EAAE,EAAE,YAAY,CAAC,OAAO,UAAU,CAAC,CAAC;CACrC;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,sBAAsB,GAAG,yBAAyB,CAiH1F"}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "algorithm": "sha256",
3
3
  "artifacts": {
4
- "manifest.json": "4483611e0cc60f1e22dab0af592502a1971f36447fe9162b01019623a88c692f",
4
+ "manifest.json": "95ed439d5d15550de68299cd3ead94c3efb4e7d3e97fe8f15fa5318fdf01ddc0",
5
5
  "meta.json": "ca3d163bab055381827226140568f3bef7eaac187cebd76878e0b63e9e442356",
6
6
  "types/index.d.ts": "022927e6a7b351cc4cf52d5f973f60ccd140e5810e17b32fb8868965aa1db161",
7
7
  "rules/plan-before-apply.ts": "31b1b3176799fd365b2583fe3947edd187c2a863e3dc0094ed9e91ece2464c99",
@@ -56,5 +56,5 @@
56
56
  "rules/tf045.ts": "760b1f4f385fbe7a86897efe3078fdeac11bcc9bfb806285d63db50488174b7b",
57
57
  "skills/chant-terraform.md": "d9ca7b7c28aed0038ce775a3491150298492eed2858fd3651ed9bfca0e577ae8"
58
58
  },
59
- "composite": "409325b101ee6e427ae05b99cc645cdb7bc5f27a07ea66b8fd01c69f9071e3c3"
59
+ "composite": "05a137edf0f891efbc228c6d7edd27afbd27bf5cd67bcd257692078f426aea4c"
60
60
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "terraform",
3
- "version": "0.106.4",
3
+ "version": "0.107.1",
4
4
  "chantVersion": ">=0.1.0",
5
5
  "namespace": "Terraform"
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentius/chant-lexicon-terraform",
3
- "version": "0.106.4",
3
+ "version": "0.107.1",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src/",
@@ -67,7 +67,7 @@
67
67
  "access": "public"
68
68
  },
69
69
  "peerDependencies": {
70
- "@intentius/chant": "^0.106.4",
70
+ "@intentius/chant": "^0.107.1",
71
71
  "typescript": "^5.9.3",
72
72
  "zod": "^4.3.6"
73
73
  },
@@ -80,7 +80,7 @@
80
80
  * ```
81
81
  */
82
82
 
83
- import { Op, phase, gate, activity, OpResource } from "@intentius/chant/op";
83
+ import { Op, phase, gate, activity, OpResource, type GateApproval } from "@intentius/chant/op";
84
84
  import { DEFAULT_PLAN_FILE } from "../op/activities/terraform";
85
85
  import { detectLivePolicyVerbs } from "../op/activities/live-detect";
86
86
  import { resolveRootModeSync } from "../op/resolve-root-mode";
@@ -130,6 +130,13 @@ export interface TerraformApplyOpConfig {
130
130
  gateTimeout?: string;
131
131
  /** Override the gate description shown to the approver. */
132
132
  gateDescription?: string;
133
+ /**
134
+ * The gate's approval block (#2508): a quorum, and a policy such as the
135
+ * cedar lexicon's starter pack (`gatePolicy("prod", starterGatePolicies())`).
136
+ * The gate binds the Plan step, so the policy reads the plan's change-set
137
+ * summary as `context.plan` with nothing more here (#3182).
138
+ */
139
+ gateApproval?: GateApproval;
133
140
  /** `-upgrade` on the Init step: re-resolve provider and module versions. */
134
141
  upgrade?: boolean;
135
142
  /**
@@ -241,6 +248,7 @@ export function TerraformApplyOp(config: TerraformApplyOpConfig): TerraformApply
241
248
  // copies it onto the resolution, and a later run whose fresh plan
242
249
  // digests differently is refused with both digests named.
243
250
  plan: plan.out.planDigest,
251
+ ...(config.gateApproval ? { approval: config.gateApproval } : {}),
244
252
  description:
245
253
  config.gateDescription ??
246
254
  `Approve terraform apply of ${live ? "live " : ""}root "${config.root}" (gate: ${gateMode}). ` +