@powerlines/plugin-terraform 0.1.0

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/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,305 @@
1
+ <!-- START header -->
2
+ <!-- prettier-ignore-start -->
3
+ <!-- markdownlint-disable -->
4
+
5
+
6
+ <div align="center">
7
+ <picture>
8
+ <source media="(prefers-color-scheme: dark)" srcset="https://public.storm-cdn.com/powerlines/banner-1280x640-dark.gif">
9
+ <source media="(prefers-color-scheme: light)" srcset="https://public.storm-cdn.com/powerlines/banner-1280x640-light.gif">
10
+ <img src="https://public.storm-cdn.com/powerlines/banner-1280x640-dark.gif" width="100%" alt="Powerlines" />
11
+ </picture>
12
+ </div>
13
+ <br />
14
+
15
+ <div align="center">
16
+ <b>
17
+ <a href="https://stormsoftware.com" target="_blank">Website</a> •
18
+ <a href="https://github.com/storm-software/powerlines" target="_blank">GitHub</a> •
19
+ <a href="https://discord.gg/MQ6YVzakM5">Discord</a> • <a href="https://stormstack.github.io/stormstack/" target="_blank">Docs</a> • <a href="https://stormsoftware.com/contact" target="_blank">Contact</a> •
20
+ <a href="https://github.com/storm-software/powerlines/issues/new?assignees=&labels=bug&template=bug-report.yml&title=Bug Report%3A+">Report a Bug</a>
21
+ </b>
22
+ </div>
23
+
24
+ <br />
25
+ This package is part of the <b>🔌 Powerlines</b> monorepo. Powerlines is the "any framework" framework that simplifies modern dev tool usage, generates virtual (or actual) code modules, and improves DX across the board.
26
+ <br />
27
+
28
+ <h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
29
+
30
+ [![Version](https://img.shields.io/badge/version-0.6.23-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://stormsoftware.com/projects/powerlines)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/powerlines/release.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
31
+
32
+ <!-- prettier-ignore-start -->
33
+ <!-- markdownlint-disable -->
34
+
35
+ > [!IMPORTANT]
36
+ > This repository, and the apps, libraries, and tools contained within, is still in it's initial development phase. As a result, bugs and issues are expected with it's usage. When the main development phase completes, a proper release will be performed, the packages will be available through NPM (and other distributions), and this message will be removed. However, in the meantime, please feel free to report any issues you may come across.
37
+
38
+ <!-- markdownlint-restore -->
39
+ <!-- prettier-ignore-end -->
40
+
41
+ <div align="center">
42
+ <a href="https://github.com/storm-software/powerlines" target="_blank"><b>Be sure to ⭐ this repository on GitHub so you can keep up to date with it's progress!</b></a>
43
+ </div>
44
+
45
+ <br />
46
+
47
+ <!-- markdownlint-restore -->
48
+ <!-- prettier-ignore-end -->
49
+
50
+ <!-- END header -->
51
+
52
+ # Powerlines - Terraform Plugin
53
+
54
+ A package containing a Powerlines plugin to configure infrastructure and deploy a project using [Terraform IaC](https://www.terraform.io).
55
+
56
+ <!-- START doctoc -->
57
+ <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
58
+
59
+ ## Table of Contents
60
+
61
+ - [Powerlines - Terraform Plugin](#powerlines---terraform-plugin)
62
+ - [Table of Contents](#table-of-contents)
63
+ - [Installing](#installing)
64
+ - [Reduced Package Size](#reduced-package-size)
65
+ - [Development](#development)
66
+ - [Building](#building)
67
+ - [Running unit tests](#running-unit-tests)
68
+ - [Linting](#linting)
69
+ - [Storm Workspaces](#storm-workspaces)
70
+ - [Roadmap](#roadmap)
71
+ - [Support](#support)
72
+ - [License](#license)
73
+ - [Changelog](#changelog)
74
+ - [Contributing](#contributing)
75
+ - [Contributors](#contributors)
76
+
77
+ <!-- END doctoc -->
78
+
79
+ ## Installing
80
+
81
+ Using [pnpm](http://pnpm.io):
82
+
83
+ ```bash
84
+ pnpm add @powerlines/plugin-terraform
85
+ ```
86
+
87
+ <details>
88
+ <summary>Using npm</summary>
89
+
90
+ ```bash
91
+ npm install @powerlines/plugin-terraform
92
+ ```
93
+
94
+ </details>
95
+
96
+ <details>
97
+ <summary>Using yarn</summary>
98
+
99
+ ```bash
100
+ yarn add @powerlines/plugin-terraform
101
+ ```
102
+
103
+ </details>
104
+
105
+ ## Reduced Package Size
106
+
107
+ This project uses [tsup](https://tsup.egoist.dev/) to package the source code
108
+ due to its ability to remove unused code and ship smaller javascript files
109
+ thanks to code splitting. This helps to greatly reduce the size of the package
110
+ and to make it easier to use in other projects.
111
+
112
+ ## Development
113
+
114
+ This project is built using [Nx](https://nx.dev). As a result, many of the usual
115
+ commands are available to assist in development.
116
+
117
+ ### Building
118
+
119
+ Run `nx build plugin-terraform` to build the library.
120
+
121
+ ### Running unit tests
122
+
123
+ Run `nx test plugin-terraform` to execute the unit tests via
124
+ [Jest](https://jestjs.io).
125
+
126
+ ### Linting
127
+
128
+ Run `nx lint plugin-terraform` to run
129
+ [ESLint](https://eslint.org/) on the package.
130
+
131
+ <!-- START footer -->
132
+ <!-- prettier-ignore-start -->
133
+ <!-- markdownlint-disable -->
134
+
135
+
136
+ ## Storm Workspaces
137
+
138
+ Storm workspaces are built using
139
+ <a href="https://nx.dev/" target="_blank">Nx</a>, a set of extensible dev tools
140
+ for monorepos, which helps you develop like Google, Facebook, and Microsoft.
141
+ Building on top of Nx, the Open System provides a set of tools and patterns that
142
+ help you scale your monorepo to many teams while keeping the codebase
143
+ maintainable.
144
+
145
+ <div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div>
146
+ <br />
147
+
148
+ ## Roadmap
149
+
150
+ See the [open issues](https://github.com/storm-software/powerlines/issues) for
151
+ a list of proposed features (and known issues).
152
+
153
+ - [Top Feature Requests](https://github.com/storm-software/powerlines/issues?q=label%3Aenhancement+is%3Aopen+sort%3Areactions-%2B1-desc)
154
+ (Add your votes using the 👍 reaction)
155
+ - [Top Bugs](https://github.com/storm-software/powerlines/issues?q=is%3Aissue+is%3Aopen+label%3Abug+sort%3Areactions-%2B1-desc)
156
+ (Add your votes using the 👍 reaction)
157
+ - [Newest Bugs](https://github.com/storm-software/powerlines/issues?q=is%3Aopen+is%3Aissue+label%3Abug)
158
+
159
+ <div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div>
160
+ <br />
161
+
162
+ ## Support
163
+
164
+ Reach out to the maintainer at one of the following places:
165
+
166
+ - [Contact](https://stormsoftware.com/contact)
167
+ - [GitHub discussions](https://github.com/storm-software/powerlines/discussions)
168
+ - <support@stormsoftware.com>
169
+
170
+ <div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div>
171
+ <br />
172
+
173
+ ## License
174
+
175
+ This project is licensed under the **Apache License 2.0**. Feel free to edit and
176
+ distribute this template as you like.
177
+
178
+ See [LICENSE](LICENSE) for more information.
179
+
180
+ <div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div>
181
+ <br />
182
+
183
+ ## Changelog
184
+
185
+ This project adheres to
186
+ [Semantic Versioning](https://semver.org/spec/v2.0.0.html). Every release, along
187
+ with the migration instructions, is documented in the [CHANGELOG](CHANGELOG.md)
188
+ file
189
+
190
+ <div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div>
191
+ <br />
192
+
193
+ ## Contributing
194
+
195
+ First off, thanks for taking the time to contribute! Contributions are what
196
+ makes the open-source community such an amazing place to learn, inspire, and
197
+ create. Any contributions you make will benefit everybody else and are **greatly
198
+ appreciated**.
199
+
200
+ Please try to create bug reports that are:
201
+
202
+ - _Reproducible._ Include steps to reproduce the problem.
203
+ - _Specific._ Include as much detail as possible: which version, what
204
+ environment, etc.
205
+ - _Unique._ Do not duplicate existing opened issues.
206
+ - _Scoped to a Single Bug._ One bug per report.
207
+
208
+ Please adhere to this project's [code of conduct](.github/CODE_OF_CONDUCT.md).
209
+
210
+ You can use
211
+ [markdownlint-cli](https://github.com/storm-software/powerlines/markdownlint-cli)
212
+ to check for common markdown style inconsistency.
213
+
214
+ <div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div>
215
+ <br />
216
+
217
+ ## Contributors
218
+
219
+ Thanks goes to these wonderful people
220
+ ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
221
+
222
+ <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
223
+
224
+ <table>
225
+ <tbody>
226
+ <tr>
227
+ <td align="center" valign="top" width="14.28%"><a href="http://www.sullypat.com/"><img src="https://avatars.githubusercontent.com/u/99053093?v=4?s=100" width="100px;" alt="Patrick Sullivan"/><br /><sub><b>Patrick Sullivan</b></sub></a><br /><a href="#design-sullivanpj" title="Design">🎨</a> <a href="https://github.com/storm-software/powerlines/commits?author=sullivanpj" title="Code">💻</a> <a href="#tool-sullivanpj" title="Tools">🔧</a> <a href="https://github.com/storm-software/powerlines/commits?author=sullivanpj" title="Documentation">📖</a> <a href="https://github.com/storm-software/powerlines/commits?author=sullivanpj" title="Tests">⚠️</a></td>
228
+ <td align="center" valign="top" width="14.28%"><a href="https://tylerbenning.com/"><img src="https://avatars.githubusercontent.com/u/7265547?v=4?s=100" width="100px;" alt="Tyler Benning"/><br /><sub><b>Tyler Benning</b></sub></a><br /><a href="#design-tbenning" title="Design">🎨</a></td>
229
+ <td align="center" valign="top" width="14.28%"><a href="http://stormsoftware.com"><img src="https://avatars.githubusercontent.com/u/149802440?v=4?s=100" width="100px;" alt="Stormie"/><br /><sub><b>Stormie</b></sub></a><br /><a href="#maintenance-stormie-bot" title="Maintenance">🚧</a></td>
230
+ </tr>
231
+ </tbody>
232
+ <tfoot>
233
+ <tr>
234
+ <td align="center" size="13px" colspan="7">
235
+ <img src="https://raw.githubusercontent.com/all-contributors/all-contributors-cli/1b8533af435da9854653492b1327a23a4dbd0a10/assets/logo-small.svg" alt="All Contributors">
236
+ <a href="https://all-contributors.js.org/docs/en/bot/usage">Add your contributions</a>
237
+ </img>
238
+ </td>
239
+ </tr>
240
+ </tfoot>
241
+ </table>
242
+
243
+ <!-- ALL-CONTRIBUTORS-LIST:END -->
244
+
245
+ This project follows the
246
+ [all-contributors](https://github.com/all-contributors/all-contributors)
247
+ specification. Contributions of any kind welcome!
248
+
249
+ <div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div>
250
+ <br />
251
+
252
+ <hr />
253
+ <br />
254
+
255
+ <div align="center">
256
+ <picture>
257
+ <source media="(prefers-color-scheme: dark)" srcset="https://public.storm-cdn.com/storm-software/banner-1280x320-dark.webp">
258
+ <source media="(prefers-color-scheme: light)" srcset="https://public.storm-cdn.com/storm-software/banner-1280x320-light.webp">
259
+ <img src="https://public.storm-cdn.com/storm-software/banner-1280x320-dark.webp" width="100%" alt="Storm Software" />
260
+ </picture>
261
+ </div>
262
+ <br />
263
+
264
+ <div align="center">
265
+ <a href="https://stormsoftware.com" target="_blank">Website</a> • <a href="https://stormsoftware.com/contact" target="_blank">Contact</a> • <a href="https://linkedin.com/in/patrick-sullivan-865526b0" target="_blank">LinkedIn</a> • <a href="https://medium.com/@pat.joseph.sullivan" target="_blank">Medium</a> • <a href="https://github.com/storm-software" target="_blank">GitHub</a> • <a href="https://keybase.io/sullivanp" target="_blank">OpenPGP Key</a>
266
+ </div>
267
+
268
+ <div align="center">
269
+ <b>Fingerprint:</b> 1BD2 7192 7770 2549 F4C9 F238 E6AD C420 DA5C 4C2D
270
+ </div>
271
+ <br />
272
+
273
+ Storm Software is an open source software development organization and creator
274
+ of Acidic, StormStack and StormCloud.
275
+
276
+ Our mission is to make software development more accessible. Our ideal future is
277
+ one where anyone can create software without years of prior development
278
+ experience serving as a barrier to entry. We hope to achieve this via LLMs,
279
+ Generative AI, and intuitive, high-level data modeling/programming languages.
280
+
281
+ Join us on [Discord](https://discord.gg/MQ6YVzakM5) to chat with the team,
282
+ receive release notifications, ask questions, and get involved.
283
+
284
+ If this sounds interesting, and you would like to help us in creating the next
285
+ generation of development tools, please reach out on our
286
+ [website](https://stormsoftware.com/contact) or join our
287
+ [Slack channel](https://join.slack.com/t/storm-software/shared_invite/zt-2gsmk04hs-i6yhK_r6urq0dkZYAwq2pA)!
288
+
289
+ <br />
290
+
291
+ <div align="center"><a href="https://stormsoftware.com" target="_blank"><img src="https://public.storm-cdn.com/storm-software/icon-circle-fill-dark.png" alt="Storm Software" width="200px"/></a></div>
292
+ <br />
293
+ <div align="center"><a href="https://stormsoftware.com" target="_blank"><img src="https://public.storm-cdn.com/visit-us-text.svg" alt="Visit us at stormsoftware.com" height="90px"/></a></div>
294
+
295
+ <br />
296
+
297
+ <div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div>
298
+ <br />
299
+ <br />
300
+
301
+
302
+ <!-- markdownlint-restore -->
303
+ <!-- prettier-ignore-end -->
304
+
305
+ <!-- END footer -->
@@ -0,0 +1,29 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
11
+ key = keys[i];
12
+ if (!__hasOwnProp.call(to, key) && key !== except) {
13
+ __defProp(to, key, {
14
+ get: ((k) => from[k]).bind(null, key),
15
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
+ });
17
+ }
18
+ }
19
+ }
20
+ return to;
21
+ };
22
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
23
+ value: mod,
24
+ enumerable: true
25
+ }) : target, mod));
26
+
27
+ //#endregion
28
+
29
+ exports.__toESM = __toESM;
package/dist/index.cjs ADDED
@@ -0,0 +1,90 @@
1
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
2
+ const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
3
+ let _stryke_string_format_kebab_case = require("@stryke/string-format/kebab-case");
4
+ let _stryke_type_checks = require("@stryke/type-checks");
5
+ let defu = require("defu");
6
+ defu = require_runtime.__toESM(defu, 1);
7
+ let execa = require("execa");
8
+ let powerlines_plugin_utils = require("powerlines/plugin-utils");
9
+ let shelljs = require("shelljs");
10
+
11
+ //#region src/index.ts
12
+ /**
13
+ * A package containing a Powerlines plugin to configure infrastructure and deploy a project using Terraform IaC.
14
+ *
15
+ * @see https://www.terraform.io
16
+ *
17
+ * @param options - The Terraform plugin user configuration options.
18
+ * @returns A Powerlines plugin to configure infrastructure and deploy a project using Terraform.
19
+ */
20
+ const plugin = (options = {}) => {
21
+ return [{
22
+ name: "terraform",
23
+ async config() {
24
+ return { deploy: { terraform: (0, defu.default)(options, {
25
+ autoApproval: false,
26
+ planFile: "plan.out",
27
+ formatWrite: false,
28
+ upgrade: false,
29
+ destroy: false,
30
+ migrateState: false,
31
+ lock: true,
32
+ reconfigure: false
33
+ }) } };
34
+ },
35
+ async configResolved() {
36
+ this.terraform ??= {};
37
+ const command = (0, shelljs.which)("terragrunt") ? "terragrunt" : (0, shelljs.which)("tofu") ? "tofu" : (0, shelljs.which)("terraform") ? "terraform" : null;
38
+ if (!command) throw new Error("Both OpenTofu and Terraform are not installed. Please install one of the two before running this executor.");
39
+ this.terraform.command = command;
40
+ const organizationName = (0, _stryke_string_format_kebab_case.kebabCase)((0, powerlines_plugin_utils.getOrganizationName)(this));
41
+ const workspaceName = (0, _stryke_string_format_kebab_case.kebabCase)((0, powerlines_plugin_utils.getWorkspaceName)(this));
42
+ const projectName = (0, _stryke_string_format_kebab_case.kebabCase)(this.config.name);
43
+ this.config.terraform.stackName ??= `${organizationName || workspaceName || projectName}-${workspaceName && workspaceName !== organizationName && workspaceName !== projectName ? `${workspaceName}-` : ""}${projectName}-${this.config.mode}`;
44
+ },
45
+ async deploy() {
46
+ this.info(`Creating resources for Terraform stack: ${this.config.terraform.stackName}`);
47
+ await this.$$internal.callHook("terraform:deploy", { sequential: true });
48
+ this.info(`Deploying Terraform stack: ${this.config.terraform.stackName}`);
49
+ if (this.config.terraform.destroy) await (0, execa.execaCommand)([
50
+ this.terraform.command,
51
+ this.terraform.command === "terragrunt" ? this.config.terraform.stackName : void 0,
52
+ "destroy",
53
+ this.config.terraform.autoApproval && "-auto-approve",
54
+ this.config.terraform.varFile && `--var ${this.config.terraform.varFile}`,
55
+ (0, _stryke_type_checks.isSetString)(this.config.terraform.planFile) && this.config.terraform.planFile
56
+ ].filter(Boolean).join(" "), {
57
+ preferLocal: true,
58
+ shell: true,
59
+ stdio: "inherit",
60
+ cwd: this.infrastructurePath,
61
+ env: this.config.mode === "production" ? {
62
+ TF_IN_AUTOMATION: "true",
63
+ TF_INPUT: "0"
64
+ } : {}
65
+ });
66
+ await (0, execa.execaCommand)([
67
+ this.terraform.command,
68
+ this.terraform.command === "terragrunt" ? this.config.terraform.stackName : void 0,
69
+ "apply",
70
+ this.config.terraform.autoApproval && "-auto-approve",
71
+ this.config.terraform.varFile && `--var ${this.config.terraform.varFile}`,
72
+ (0, _stryke_type_checks.isSetString)(this.config.terraform.planFile) && this.config.terraform.planFile
73
+ ].filter(Boolean).join(" "), {
74
+ preferLocal: true,
75
+ shell: true,
76
+ stdio: "inherit",
77
+ cwd: this.infrastructurePath,
78
+ env: this.config.mode === "production" ? {
79
+ TF_IN_AUTOMATION: "true",
80
+ TF_INPUT: "0"
81
+ } : {}
82
+ });
83
+ this.info(`Successfully deployed ${this.config.terraform.stackName}`);
84
+ }
85
+ }];
86
+ };
87
+
88
+ //#endregion
89
+ exports.default = plugin;
90
+ exports.plugin = plugin;
@@ -0,0 +1,36 @@
1
+ import { Resource, ResourceBody, TerraformContext } from "./types/terraform.cjs";
2
+ import { TerraformPluginContext, TerraformPluginOptions, TerraformPluginResolvedConfig, TerraformPluginUserConfig } from "./types/plugin.cjs";
3
+ import { MaybePromise } from "@stryke/types/base";
4
+ import { Plugin, PluginContext } from "powerlines";
5
+
6
+ //#region src/index.d.ts
7
+ declare module "powerlines" {
8
+ interface Config {
9
+ terraform?: TerraformPluginOptions;
10
+ }
11
+ interface BasePlugin<TContext extends PluginContext> {
12
+ terraform?: {
13
+ /**
14
+ * Run the Terraform deployment to create or update infrastructure resources defined in the Terraform program. This hook is executed after the main build process, allowing you to manage your infrastructure as code using Terraform directly from your Powerlines plugin.
15
+ *
16
+ * @remarks
17
+ * This hook will execute the Terraform program defined in the `config` hook, which should be used to define the infrastructure resources. The Terraform program will be executed sequentially, allowing you to define resources in multiple hooks if needed. The resources defined in the Terraform program will be passed to the next hook invocation, allowing you to manage dependencies between resources defined in different hooks.
18
+ *
19
+ * @param this - The plugin context.
20
+ */
21
+ deploy?: (this: TContext) => MaybePromise<void>;
22
+ };
23
+ }
24
+ }
25
+ /**
26
+ * A package containing a Powerlines plugin to configure infrastructure and deploy a project using Terraform IaC.
27
+ *
28
+ * @see https://www.terraform.io
29
+ *
30
+ * @param options - The Terraform plugin user configuration options.
31
+ * @returns A Powerlines plugin to configure infrastructure and deploy a project using Terraform.
32
+ */
33
+ declare const plugin: <TContext extends TerraformPluginContext = TerraformPluginContext>(options?: TerraformPluginOptions) => Plugin<TContext>[];
34
+ //#endregion
35
+ export { Resource, ResourceBody, TerraformContext, TerraformPluginContext, TerraformPluginOptions, TerraformPluginResolvedConfig, TerraformPluginUserConfig, plugin as default, plugin };
36
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;YAiCY,MAAA;IACR,SAAA,GAAY,sBAAA;EAAA;EAAA,UAGJ,UAAA,kBAA4B,aAAA;IACpC,SAAA;MAJY;;;;;;;;MAaV,MAAA,IAAU,IAAA,EAAM,QAAA,KAAa,YAAA;IAAA;EAAA;AAAA;;;;;;;;;cAatB,MAAA,oBACM,sBAAA,GAAyB,sBAAA,EAE1C,OAAA,GAAS,sBAAA,KACR,MAAA,CAAO,QAAA"}
@@ -0,0 +1,36 @@
1
+ import { Resource, ResourceBody, TerraformContext } from "./types/terraform.mjs";
2
+ import { TerraformPluginContext, TerraformPluginOptions, TerraformPluginResolvedConfig, TerraformPluginUserConfig } from "./types/plugin.mjs";
3
+ import { MaybePromise } from "@stryke/types/base";
4
+ import { Plugin, PluginContext } from "powerlines";
5
+
6
+ //#region src/index.d.ts
7
+ declare module "powerlines" {
8
+ interface Config {
9
+ terraform?: TerraformPluginOptions;
10
+ }
11
+ interface BasePlugin<TContext extends PluginContext> {
12
+ terraform?: {
13
+ /**
14
+ * Run the Terraform deployment to create or update infrastructure resources defined in the Terraform program. This hook is executed after the main build process, allowing you to manage your infrastructure as code using Terraform directly from your Powerlines plugin.
15
+ *
16
+ * @remarks
17
+ * This hook will execute the Terraform program defined in the `config` hook, which should be used to define the infrastructure resources. The Terraform program will be executed sequentially, allowing you to define resources in multiple hooks if needed. The resources defined in the Terraform program will be passed to the next hook invocation, allowing you to manage dependencies between resources defined in different hooks.
18
+ *
19
+ * @param this - The plugin context.
20
+ */
21
+ deploy?: (this: TContext) => MaybePromise<void>;
22
+ };
23
+ }
24
+ }
25
+ /**
26
+ * A package containing a Powerlines plugin to configure infrastructure and deploy a project using Terraform IaC.
27
+ *
28
+ * @see https://www.terraform.io
29
+ *
30
+ * @param options - The Terraform plugin user configuration options.
31
+ * @returns A Powerlines plugin to configure infrastructure and deploy a project using Terraform.
32
+ */
33
+ declare const plugin: <TContext extends TerraformPluginContext = TerraformPluginContext>(options?: TerraformPluginOptions) => Plugin<TContext>[];
34
+ //#endregion
35
+ export { Resource, ResourceBody, TerraformContext, TerraformPluginContext, TerraformPluginOptions, TerraformPluginResolvedConfig, TerraformPluginUserConfig, plugin as default, plugin };
36
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;YAiCY,MAAA;IACR,SAAA,GAAY,sBAAA;EAAA;EAAA,UAGJ,UAAA,kBAA4B,aAAA;IACpC,SAAA;MAJY;;;;;;;;MAaV,MAAA,IAAU,IAAA,EAAM,QAAA,KAAa,YAAA;IAAA;EAAA;AAAA;;;;;;;;;cAatB,MAAA,oBACM,sBAAA,GAAyB,sBAAA,EAE1C,OAAA,GAAS,sBAAA,KACR,MAAA,CAAO,QAAA"}
package/dist/index.mjs ADDED
@@ -0,0 +1,87 @@
1
+ import { kebabCase } from "@stryke/string-format/kebab-case";
2
+ import { isSetString } from "@stryke/type-checks";
3
+ import defu from "defu";
4
+ import { execaCommand } from "execa";
5
+ import { getOrganizationName, getWorkspaceName } from "powerlines/plugin-utils";
6
+ import { which } from "shelljs";
7
+
8
+ //#region src/index.ts
9
+ /**
10
+ * A package containing a Powerlines plugin to configure infrastructure and deploy a project using Terraform IaC.
11
+ *
12
+ * @see https://www.terraform.io
13
+ *
14
+ * @param options - The Terraform plugin user configuration options.
15
+ * @returns A Powerlines plugin to configure infrastructure and deploy a project using Terraform.
16
+ */
17
+ const plugin = (options = {}) => {
18
+ return [{
19
+ name: "terraform",
20
+ async config() {
21
+ return { deploy: { terraform: defu(options, {
22
+ autoApproval: false,
23
+ planFile: "plan.out",
24
+ formatWrite: false,
25
+ upgrade: false,
26
+ destroy: false,
27
+ migrateState: false,
28
+ lock: true,
29
+ reconfigure: false
30
+ }) } };
31
+ },
32
+ async configResolved() {
33
+ this.terraform ??= {};
34
+ const command = which("terragrunt") ? "terragrunt" : which("tofu") ? "tofu" : which("terraform") ? "terraform" : null;
35
+ if (!command) throw new Error("Both OpenTofu and Terraform are not installed. Please install one of the two before running this executor.");
36
+ this.terraform.command = command;
37
+ const organizationName = kebabCase(getOrganizationName(this));
38
+ const workspaceName = kebabCase(getWorkspaceName(this));
39
+ const projectName = kebabCase(this.config.name);
40
+ this.config.terraform.stackName ??= `${organizationName || workspaceName || projectName}-${workspaceName && workspaceName !== organizationName && workspaceName !== projectName ? `${workspaceName}-` : ""}${projectName}-${this.config.mode}`;
41
+ },
42
+ async deploy() {
43
+ this.info(`Creating resources for Terraform stack: ${this.config.terraform.stackName}`);
44
+ await this.$$internal.callHook("terraform:deploy", { sequential: true });
45
+ this.info(`Deploying Terraform stack: ${this.config.terraform.stackName}`);
46
+ if (this.config.terraform.destroy) await execaCommand([
47
+ this.terraform.command,
48
+ this.terraform.command === "terragrunt" ? this.config.terraform.stackName : void 0,
49
+ "destroy",
50
+ this.config.terraform.autoApproval && "-auto-approve",
51
+ this.config.terraform.varFile && `--var ${this.config.terraform.varFile}`,
52
+ isSetString(this.config.terraform.planFile) && this.config.terraform.planFile
53
+ ].filter(Boolean).join(" "), {
54
+ preferLocal: true,
55
+ shell: true,
56
+ stdio: "inherit",
57
+ cwd: this.infrastructurePath,
58
+ env: this.config.mode === "production" ? {
59
+ TF_IN_AUTOMATION: "true",
60
+ TF_INPUT: "0"
61
+ } : {}
62
+ });
63
+ await execaCommand([
64
+ this.terraform.command,
65
+ this.terraform.command === "terragrunt" ? this.config.terraform.stackName : void 0,
66
+ "apply",
67
+ this.config.terraform.autoApproval && "-auto-approve",
68
+ this.config.terraform.varFile && `--var ${this.config.terraform.varFile}`,
69
+ isSetString(this.config.terraform.planFile) && this.config.terraform.planFile
70
+ ].filter(Boolean).join(" "), {
71
+ preferLocal: true,
72
+ shell: true,
73
+ stdio: "inherit",
74
+ cwd: this.infrastructurePath,
75
+ env: this.config.mode === "production" ? {
76
+ TF_IN_AUTOMATION: "true",
77
+ TF_INPUT: "0"
78
+ } : {}
79
+ });
80
+ this.info(`Successfully deployed ${this.config.terraform.stackName}`);
81
+ }
82
+ }];
83
+ };
84
+
85
+ //#endregion
86
+ export { plugin as default, plugin };
87
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport { isSetString } from \"@stryke/type-checks\";\nimport { MaybePromise } from \"@stryke/types/base\";\nimport defu from \"defu\";\nimport { execaCommand } from \"execa\";\nimport { Plugin, PluginContext } from \"powerlines\";\nimport { getOrganizationName, getWorkspaceName } from \"powerlines/plugin-utils\";\nimport { which } from \"shelljs\";\nimport { TerraformContext } from \"./types\";\nimport { Unstable_TerraformPluginContext } from \"./types/_internal\";\nimport { TerraformPluginContext, TerraformPluginOptions } from \"./types/plugin\";\n\nexport type * from \"./types\";\n\ndeclare module \"powerlines\" {\n interface Config {\n terraform?: TerraformPluginOptions;\n }\n\n interface BasePlugin<TContext extends PluginContext> {\n terraform?: {\n /**\n * Run the Terraform deployment to create or update infrastructure resources defined in the Terraform program. This hook is executed after the main build process, allowing you to manage your infrastructure as code using Terraform directly from your Powerlines plugin.\n *\n * @remarks\n * This hook will execute the Terraform program defined in the `config` hook, which should be used to define the infrastructure resources. The Terraform program will be executed sequentially, allowing you to define resources in multiple hooks if needed. The resources defined in the Terraform program will be passed to the next hook invocation, allowing you to manage dependencies between resources defined in different hooks.\n *\n * @param this - The plugin context.\n */\n deploy?: (this: TContext) => MaybePromise<void>;\n };\n }\n}\n\n/**\n * A package containing a Powerlines plugin to configure infrastructure and deploy a project using Terraform IaC.\n *\n * @see https://www.terraform.io\n *\n * @param options - The Terraform plugin user configuration options.\n * @returns A Powerlines plugin to configure infrastructure and deploy a project using Terraform.\n */\nexport const plugin = <\n TContext extends TerraformPluginContext = TerraformPluginContext\n>(\n options: TerraformPluginOptions = {}\n): Plugin<TContext>[] => {\n return [\n {\n name: \"terraform\",\n async config() {\n return {\n deploy: {\n terraform: defu(options, {\n autoApproval: false,\n planFile: \"plan.out\",\n formatWrite: false,\n upgrade: false,\n destroy: false,\n migrateState: false,\n lock: true,\n reconfigure: false\n })\n }\n };\n },\n async configResolved() {\n this.terraform ??= {} as TerraformContext;\n\n const command = which(\"terragrunt\")\n ? \"terragrunt\"\n : which(\"tofu\")\n ? \"tofu\"\n : which(\"terraform\")\n ? \"terraform\"\n : null;\n if (!command) {\n throw new Error(\n \"Both OpenTofu and Terraform are not installed. Please install one of the two before running this executor.\"\n );\n }\n\n this.terraform.command = command;\n\n const organizationName = kebabCase(getOrganizationName(this));\n const workspaceName = kebabCase(getWorkspaceName(this));\n const projectName = kebabCase(this.config.name);\n\n this.config.terraform.stackName ??= `${organizationName || workspaceName || projectName}-${\n workspaceName &&\n workspaceName !== organizationName &&\n workspaceName !== projectName\n ? `${workspaceName}-`\n : \"\"\n }${projectName}-${this.config.mode}`;\n },\n async deploy() {\n this.info(\n `Creating resources for Terraform stack: ${this.config.terraform.stackName}`\n );\n\n await (\n this as unknown as Unstable_TerraformPluginContext\n ).$$internal.callHook(\"terraform:deploy\", {\n sequential: true\n });\n\n this.info(\n `Deploying Terraform stack: ${this.config.terraform.stackName}`\n );\n\n if (this.config.terraform.destroy) {\n await execaCommand(\n [\n this.terraform.command,\n this.terraform.command === \"terragrunt\"\n ? this.config.terraform.stackName\n : undefined,\n \"destroy\",\n this.config.terraform.autoApproval && \"-auto-approve\",\n this.config.terraform.varFile &&\n `--var ${this.config.terraform.varFile}`,\n isSetString(this.config.terraform.planFile) &&\n this.config.terraform.planFile\n ]\n .filter(Boolean)\n .join(\" \"),\n {\n preferLocal: true,\n shell: true,\n stdio: \"inherit\",\n cwd: this.infrastructurePath,\n env:\n this.config.mode === \"production\"\n ? {\n TF_IN_AUTOMATION: \"true\",\n TF_INPUT: \"0\"\n }\n : {}\n }\n );\n }\n\n await execaCommand(\n [\n this.terraform.command,\n this.terraform.command === \"terragrunt\"\n ? this.config.terraform.stackName\n : undefined,\n \"apply\",\n this.config.terraform.autoApproval && \"-auto-approve\",\n this.config.terraform.varFile &&\n `--var ${this.config.terraform.varFile}`,\n isSetString(this.config.terraform.planFile) &&\n this.config.terraform.planFile\n ]\n .filter(Boolean)\n .join(\" \"),\n {\n preferLocal: true,\n shell: true,\n stdio: \"inherit\",\n cwd: this.infrastructurePath,\n env:\n this.config.mode === \"production\"\n ? {\n TF_IN_AUTOMATION: \"true\",\n TF_INPUT: \"0\"\n }\n : {}\n }\n );\n\n this.info(`Successfully deployed ${this.config.terraform.stackName}`);\n }\n }\n ] as Plugin<TContext>[];\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;;;AA4DA,MAAa,UAGX,UAAkC,EAAE,KACb;AACvB,QAAO,CACL;EACE,MAAM;EACN,MAAM,SAAS;AACb,UAAO,EACL,QAAQ,EACN,WAAW,KAAK,SAAS;IACvB,cAAc;IACd,UAAU;IACV,aAAa;IACb,SAAS;IACT,SAAS;IACT,cAAc;IACd,MAAM;IACN,aAAa;IACd,CAAC,EACH,EACF;;EAEH,MAAM,iBAAiB;AACrB,QAAK,cAAc,EAAE;GAErB,MAAM,UAAU,MAAM,aAAa,GAC/B,eACA,MAAM,OAAO,GACX,SACA,MAAM,YAAY,GAChB,cACA;AACR,OAAI,CAAC,QACH,OAAM,IAAI,MACR,6GACD;AAGH,QAAK,UAAU,UAAU;GAEzB,MAAM,mBAAmB,UAAU,oBAAoB,KAAK,CAAC;GAC7D,MAAM,gBAAgB,UAAU,iBAAiB,KAAK,CAAC;GACvD,MAAM,cAAc,UAAU,KAAK,OAAO,KAAK;AAE/C,QAAK,OAAO,UAAU,cAAc,GAAG,oBAAoB,iBAAiB,YAAY,GACtF,iBACA,kBAAkB,oBAClB,kBAAkB,cACd,GAAG,cAAc,KACjB,KACH,YAAY,GAAG,KAAK,OAAO;;EAEhC,MAAM,SAAS;AACb,QAAK,KACH,2CAA2C,KAAK,OAAO,UAAU,YAClE;AAED,SACE,KACA,WAAW,SAAS,oBAAoB,EACxC,YAAY,MACb,CAAC;AAEF,QAAK,KACH,8BAA8B,KAAK,OAAO,UAAU,YACrD;AAED,OAAI,KAAK,OAAO,UAAU,QACxB,OAAM,aACJ;IACE,KAAK,UAAU;IACf,KAAK,UAAU,YAAY,eACvB,KAAK,OAAO,UAAU,YACtB;IACJ;IACA,KAAK,OAAO,UAAU,gBAAgB;IACtC,KAAK,OAAO,UAAU,WACpB,SAAS,KAAK,OAAO,UAAU;IACjC,YAAY,KAAK,OAAO,UAAU,SAAS,IACzC,KAAK,OAAO,UAAU;IACzB,CACE,OAAO,QAAQ,CACf,KAAK,IAAI,EACZ;IACE,aAAa;IACb,OAAO;IACP,OAAO;IACP,KAAK,KAAK;IACV,KACE,KAAK,OAAO,SAAS,eACjB;KACE,kBAAkB;KAClB,UAAU;KACX,GACD,EAAE;IACT,CACF;AAGH,SAAM,aACJ;IACE,KAAK,UAAU;IACf,KAAK,UAAU,YAAY,eACvB,KAAK,OAAO,UAAU,YACtB;IACJ;IACA,KAAK,OAAO,UAAU,gBAAgB;IACtC,KAAK,OAAO,UAAU,WACpB,SAAS,KAAK,OAAO,UAAU;IACjC,YAAY,KAAK,OAAO,UAAU,SAAS,IACzC,KAAK,OAAO,UAAU;IACzB,CACE,OAAO,QAAQ,CACf,KAAK,IAAI,EACZ;IACE,aAAa;IACb,OAAO;IACP,OAAO;IACP,KAAK,KAAK;IACV,KACE,KAAK,OAAO,SAAS,eACjB;KACE,kBAAkB;KAClB,UAAU;KACX,GACD,EAAE;IACT,CACF;AAED,QAAK,KAAK,yBAAyB,KAAK,OAAO,UAAU,YAAY;;EAExE,CACF"}
File without changes
@@ -0,0 +1,8 @@
1
+ import { TerraformPluginContext, TerraformPluginResolvedConfig } from "./plugin.cjs";
2
+ import { Unstable_PluginContext } from "@powerlines/core/types/_internal";
3
+
4
+ //#region src/types/_internal.d.ts
5
+ type Unstable_TerraformPluginContext<TResolvedConfig extends TerraformPluginResolvedConfig = TerraformPluginResolvedConfig> = TerraformPluginContext<TResolvedConfig> & Unstable_PluginContext<TResolvedConfig>;
6
+ //#endregion
7
+ export { Unstable_TerraformPluginContext };
8
+ //# sourceMappingURL=_internal.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_internal.d.cts","names":[],"sources":["../../src/types/_internal.ts"],"mappings":";;;;KAwBY,+BAAA,yBACc,6BAAA,GACtB,6BAAA,IACA,sBAAA,CAAuB,eAAA,IACzB,sBAAA,CAAuB,eAAA"}
@@ -0,0 +1,8 @@
1
+ import { TerraformPluginContext, TerraformPluginResolvedConfig } from "./plugin.mjs";
2
+ import { Unstable_PluginContext } from "@powerlines/core/types/_internal";
3
+
4
+ //#region src/types/_internal.d.ts
5
+ type Unstable_TerraformPluginContext<TResolvedConfig extends TerraformPluginResolvedConfig = TerraformPluginResolvedConfig> = TerraformPluginContext<TResolvedConfig> & Unstable_PluginContext<TResolvedConfig>;
6
+ //#endregion
7
+ export { Unstable_TerraformPluginContext };
8
+ //# sourceMappingURL=_internal.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_internal.d.mts","names":[],"sources":["../../src/types/_internal.ts"],"mappings":";;;;KAwBY,+BAAA,yBACc,6BAAA,GACtB,6BAAA,IACA,sBAAA,CAAuB,eAAA,IACzB,sBAAA,CAAuB,eAAA"}
@@ -0,0 +1 @@
1
+ export { };
File without changes
@@ -0,0 +1,3 @@
1
+ import { Resource, ResourceBody, TerraformContext } from "./terraform.cjs";
2
+ import { TerraformPluginContext, TerraformPluginOptions, TerraformPluginResolvedConfig, TerraformPluginUserConfig } from "./plugin.cjs";
3
+ export { Resource, ResourceBody, TerraformContext, TerraformPluginContext, TerraformPluginOptions, TerraformPluginResolvedConfig, TerraformPluginUserConfig };
@@ -0,0 +1,3 @@
1
+ import { Resource, ResourceBody, TerraformContext } from "./terraform.mjs";
2
+ import { TerraformPluginContext, TerraformPluginOptions, TerraformPluginResolvedConfig, TerraformPluginUserConfig } from "./plugin.mjs";
3
+ export { Resource, ResourceBody, TerraformContext, TerraformPluginContext, TerraformPluginOptions, TerraformPluginResolvedConfig, TerraformPluginUserConfig };
@@ -0,0 +1 @@
1
+ export { };
File without changes
@@ -0,0 +1,86 @@
1
+ import { TerraformContext } from "./terraform.cjs";
2
+ import { PluginContext, ResolvedConfig, UserConfig } from "powerlines";
3
+
4
+ //#region src/types/plugin.d.ts
5
+ interface TerraformPluginOptions {
6
+ /**
7
+ * The name of the Terraform stack to deploy
8
+ *
9
+ * @remarks
10
+ * If not specified, the stack name will be generated based on the organization, workspace, project, and mode. The format of the generated stack name is `{organizationName}-{workspaceName}-{projectName}-{mode}`, where `workspaceName` is only included if it is different from both `organizationName` and `projectName`.
11
+ *
12
+ * For example, if the organization name is "my-org", the workspace name is "my-workspace", the project name is "my-project", and the mode is "production", the generated stack name will be `my-org-my-workspace-my-project-production`. If the workspace name is "my-project" (same as project name), the generated stack name will be `my-org-my-project-production`.
13
+ *
14
+ * @defaultvalue `{organizationName}-{workspaceName}-{projectName}-{mode}`
15
+ */
16
+ stackName?: string;
17
+ /**
18
+ * Whether to auto-approve the plan
19
+ *
20
+ * @defaultvalue false
21
+ */
22
+ autoApproval?: boolean;
23
+ /**
24
+ * The plan file
25
+ *
26
+ * @defaultvalue "plan.out"
27
+ */
28
+ planFile?: string;
29
+ /**
30
+ * Whether to format the files before writing
31
+ *
32
+ * @defaultvalue false
33
+ */
34
+ formatWrite?: boolean;
35
+ /**
36
+ * Whether to upgrade the modules
37
+ *
38
+ * @defaultvalue false
39
+ */
40
+ upgrade?: boolean;
41
+ /**
42
+ * Whether to destroy the stack
43
+ *
44
+ * @remarks
45
+ * This will run `terraform destroy` instead of `terraform apply`. Use with caution, as this will destroy all resources in the stack. This option is intended for use in CI/CD pipelines, and should not be used in development or production environments.
46
+ *
47
+ * @defaultvalue false
48
+ */
49
+ destroy?: boolean;
50
+ /**
51
+ * Whether to migrate the state
52
+ *
53
+ * @defaultvalue false
54
+ */
55
+ migrateState?: boolean;
56
+ /**
57
+ * Whether to lock the state
58
+ *
59
+ * @defaultvalue false
60
+ */
61
+ lock?: boolean;
62
+ /**
63
+ * The variable file
64
+ *
65
+ * @defaultvalue "variables.tf"
66
+ */
67
+ varFile?: string;
68
+ /**
69
+ * Whether to reconfigure the state
70
+ *
71
+ * @defaultvalue false
72
+ */
73
+ reconfigure?: boolean;
74
+ }
75
+ interface TerraformPluginUserConfig extends UserConfig {
76
+ terraform?: TerraformPluginOptions;
77
+ }
78
+ interface TerraformPluginResolvedConfig extends ResolvedConfig {
79
+ terraform: TerraformPluginOptions;
80
+ }
81
+ type TerraformPluginContext<TResolvedConfig extends TerraformPluginResolvedConfig = TerraformPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
82
+ terraform: TerraformContext;
83
+ };
84
+ //#endregion
85
+ export { TerraformPluginContext, TerraformPluginOptions, TerraformPluginResolvedConfig, TerraformPluginUserConfig };
86
+ //# sourceMappingURL=plugin.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;UAqBiB,sBAAA;;AAAjB;;;;;;;;;EAWE,SAAA;EA6CA;;;;;EAtCA,YAAA;EA8De;;;;;EAvDf,QAAA;EAwDY;;;AAGd;;EApDE,WAAA;EAoDmE;;;;;EA7CnE,OAAA;EAiDU;;;;;;;;EAvCV,OAAA;EA2C2B;;;;;EApC3B,YAAA;EAoCA;;;;;EA7BA,IAAA;;;;;;EAOA,OAAA;;;;;;EAOA,WAAA;AAAA;AAAA,UAGe,yBAAA,SAAkC,UAAA;EACjD,SAAA,GAAY,sBAAA;AAAA;AAAA,UAGG,6BAAA,SAAsC,cAAA;EACrD,SAAA,EAAW,sBAAA;AAAA;AAAA,KAGD,sBAAA,yBACc,6BAAA,GACtB,6BAAA,IACA,aAAA,CAAc,eAAA;EAChB,SAAA,EAAW,gBAAA;AAAA"}
@@ -0,0 +1,86 @@
1
+ import { TerraformContext } from "./terraform.mjs";
2
+ import { PluginContext, ResolvedConfig, UserConfig } from "powerlines";
3
+
4
+ //#region src/types/plugin.d.ts
5
+ interface TerraformPluginOptions {
6
+ /**
7
+ * The name of the Terraform stack to deploy
8
+ *
9
+ * @remarks
10
+ * If not specified, the stack name will be generated based on the organization, workspace, project, and mode. The format of the generated stack name is `{organizationName}-{workspaceName}-{projectName}-{mode}`, where `workspaceName` is only included if it is different from both `organizationName` and `projectName`.
11
+ *
12
+ * For example, if the organization name is "my-org", the workspace name is "my-workspace", the project name is "my-project", and the mode is "production", the generated stack name will be `my-org-my-workspace-my-project-production`. If the workspace name is "my-project" (same as project name), the generated stack name will be `my-org-my-project-production`.
13
+ *
14
+ * @defaultvalue `{organizationName}-{workspaceName}-{projectName}-{mode}`
15
+ */
16
+ stackName?: string;
17
+ /**
18
+ * Whether to auto-approve the plan
19
+ *
20
+ * @defaultvalue false
21
+ */
22
+ autoApproval?: boolean;
23
+ /**
24
+ * The plan file
25
+ *
26
+ * @defaultvalue "plan.out"
27
+ */
28
+ planFile?: string;
29
+ /**
30
+ * Whether to format the files before writing
31
+ *
32
+ * @defaultvalue false
33
+ */
34
+ formatWrite?: boolean;
35
+ /**
36
+ * Whether to upgrade the modules
37
+ *
38
+ * @defaultvalue false
39
+ */
40
+ upgrade?: boolean;
41
+ /**
42
+ * Whether to destroy the stack
43
+ *
44
+ * @remarks
45
+ * This will run `terraform destroy` instead of `terraform apply`. Use with caution, as this will destroy all resources in the stack. This option is intended for use in CI/CD pipelines, and should not be used in development or production environments.
46
+ *
47
+ * @defaultvalue false
48
+ */
49
+ destroy?: boolean;
50
+ /**
51
+ * Whether to migrate the state
52
+ *
53
+ * @defaultvalue false
54
+ */
55
+ migrateState?: boolean;
56
+ /**
57
+ * Whether to lock the state
58
+ *
59
+ * @defaultvalue false
60
+ */
61
+ lock?: boolean;
62
+ /**
63
+ * The variable file
64
+ *
65
+ * @defaultvalue "variables.tf"
66
+ */
67
+ varFile?: string;
68
+ /**
69
+ * Whether to reconfigure the state
70
+ *
71
+ * @defaultvalue false
72
+ */
73
+ reconfigure?: boolean;
74
+ }
75
+ interface TerraformPluginUserConfig extends UserConfig {
76
+ terraform?: TerraformPluginOptions;
77
+ }
78
+ interface TerraformPluginResolvedConfig extends ResolvedConfig {
79
+ terraform: TerraformPluginOptions;
80
+ }
81
+ type TerraformPluginContext<TResolvedConfig extends TerraformPluginResolvedConfig = TerraformPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
82
+ terraform: TerraformContext;
83
+ };
84
+ //#endregion
85
+ export { TerraformPluginContext, TerraformPluginOptions, TerraformPluginResolvedConfig, TerraformPluginUserConfig };
86
+ //# sourceMappingURL=plugin.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;UAqBiB,sBAAA;;AAAjB;;;;;;;;;EAWE,SAAA;EA6CA;;;;;EAtCA,YAAA;EA8De;;;;;EAvDf,QAAA;EAwDY;;;AAGd;;EApDE,WAAA;EAoDmE;;;;;EA7CnE,OAAA;EAiDU;;;;;;;;EAvCV,OAAA;EA2C2B;;;;;EApC3B,YAAA;EAoCA;;;;;EA7BA,IAAA;;;;;;EAOA,OAAA;;;;;;EAOA,WAAA;AAAA;AAAA,UAGe,yBAAA,SAAkC,UAAA;EACjD,SAAA,GAAY,sBAAA;AAAA;AAAA,UAGG,6BAAA,SAAsC,cAAA;EACrD,SAAA,EAAW,sBAAA;AAAA;AAAA,KAGD,sBAAA,yBACc,6BAAA,GACtB,6BAAA,IACA,aAAA,CAAc,eAAA;EAChB,SAAA,EAAW,gBAAA;AAAA"}
@@ -0,0 +1 @@
1
+ export { };
File without changes
@@ -0,0 +1,17 @@
1
+ //#region src/types/terraform.d.ts
2
+ interface ResourceBody {
3
+ [key: string]: string | boolean | number | ResourceBody | ResourceBody[];
4
+ }
5
+ interface Resource {
6
+ type: string;
7
+ name: string;
8
+ body: ResourceBody;
9
+ }
10
+ interface TerraformContext {
11
+ command: "terraform" | "tofu" | "terragrunt";
12
+ resources: Resource[];
13
+ [key: string]: any;
14
+ }
15
+ //#endregion
16
+ export { Resource, ResourceBody, TerraformContext };
17
+ //# sourceMappingURL=terraform.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"terraform.d.cts","names":[],"sources":["../../src/types/terraform.ts"],"mappings":";UAkBiB,YAAA;EAAA,CACd,GAAA,uCAA0C,YAAA,GAAe,YAAA;AAAA;AAAA,UAG3C,QAAA;EACf,IAAA;EACA,IAAA;EACA,IAAA,EAAM,YAAA;AAAA;AAAA,UAGS,gBAAA;EACf,OAAA;EACA,SAAA,EAAW,QAAA;EAAA,CACV,GAAA;AAAA"}
@@ -0,0 +1,17 @@
1
+ //#region src/types/terraform.d.ts
2
+ interface ResourceBody {
3
+ [key: string]: string | boolean | number | ResourceBody | ResourceBody[];
4
+ }
5
+ interface Resource {
6
+ type: string;
7
+ name: string;
8
+ body: ResourceBody;
9
+ }
10
+ interface TerraformContext {
11
+ command: "terraform" | "tofu" | "terragrunt";
12
+ resources: Resource[];
13
+ [key: string]: any;
14
+ }
15
+ //#endregion
16
+ export { Resource, ResourceBody, TerraformContext };
17
+ //# sourceMappingURL=terraform.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"terraform.d.mts","names":[],"sources":["../../src/types/terraform.ts"],"mappings":";UAkBiB,YAAA;EAAA,CACd,GAAA,uCAA0C,YAAA,GAAe,YAAA;AAAA;AAAA,UAG3C,QAAA;EACf,IAAA;EACA,IAAA;EACA,IAAA,EAAM,YAAA;AAAA;AAAA,UAGS,gBAAA;EACf,OAAA;EACA,SAAA,EAAW,QAAA;EAAA,CACV,GAAA;AAAA"}
@@ -0,0 +1 @@
1
+ export { };
package/package.json ADDED
@@ -0,0 +1,144 @@
1
+ {
2
+ "name": "@powerlines/plugin-terraform",
3
+ "version": "0.1.0",
4
+ "private": false,
5
+ "description": "A Powerlines plugin to deploy infrastructure using Terraform.",
6
+ "keywords": [
7
+ "terraform",
8
+ "powerlines",
9
+ "storm-software",
10
+ "powerlines-plugin"
11
+ ],
12
+ "homepage": "https://stormsoftware.com",
13
+ "bugs": {
14
+ "url": "https://stormsoftware.com/support",
15
+ "email": "support@stormsoftware.com"
16
+ },
17
+ "repository": {
18
+ "type": "github",
19
+ "url": "https://github.com/storm-software/powerlines.git",
20
+ "directory": "packages/plugin-terraform"
21
+ },
22
+ "funding": {
23
+ "type": "github",
24
+ "url": "https://github.com/sponsors/storm-software"
25
+ },
26
+ "license": "Apache-2.0",
27
+ "author": {
28
+ "name": "Storm Software",
29
+ "email": "contact@stormsoftware.com",
30
+ "url": "https://stormsoftware.com"
31
+ },
32
+ "maintainers": [
33
+ {
34
+ "name": "Storm Software",
35
+ "email": "contact@stormsoftware.com",
36
+ "url": "https://stormsoftware.com"
37
+ }
38
+ ],
39
+ "contributors": [
40
+ {
41
+ "name": "Storm Software",
42
+ "email": "contact@stormsoftware.com",
43
+ "url": "https://stormsoftware.com"
44
+ }
45
+ ],
46
+ "type": "module",
47
+ "exports": {
48
+ ".": {
49
+ "require": {
50
+ "types": "./dist/index.d.cts",
51
+ "default": "./dist/index.cjs"
52
+ },
53
+ "import": {
54
+ "types": "./dist/index.d.mts",
55
+ "default": "./dist/index.mjs"
56
+ },
57
+ "default": {
58
+ "types": "./dist/index.d.mts",
59
+ "default": "./dist/index.mjs"
60
+ }
61
+ },
62
+ "./package.json": "./package.json",
63
+ "./types": {
64
+ "require": {
65
+ "types": "./dist/types/index.d.cts",
66
+ "default": "./dist/types/index.cjs"
67
+ },
68
+ "import": {
69
+ "types": "./dist/types/index.d.mts",
70
+ "default": "./dist/types/index.mjs"
71
+ },
72
+ "default": {
73
+ "types": "./dist/types/index.d.mts",
74
+ "default": "./dist/types/index.mjs"
75
+ }
76
+ },
77
+ "./types/_internal": {
78
+ "require": {
79
+ "types": "./dist/types/_internal.d.cts",
80
+ "default": "./dist/types/_internal.cjs"
81
+ },
82
+ "import": {
83
+ "types": "./dist/types/_internal.d.mts",
84
+ "default": "./dist/types/_internal.mjs"
85
+ },
86
+ "default": {
87
+ "types": "./dist/types/_internal.d.mts",
88
+ "default": "./dist/types/_internal.mjs"
89
+ }
90
+ },
91
+ "./types/plugin": {
92
+ "require": {
93
+ "types": "./dist/types/plugin.d.cts",
94
+ "default": "./dist/types/plugin.cjs"
95
+ },
96
+ "import": {
97
+ "types": "./dist/types/plugin.d.mts",
98
+ "default": "./dist/types/plugin.mjs"
99
+ },
100
+ "default": {
101
+ "types": "./dist/types/plugin.d.mts",
102
+ "default": "./dist/types/plugin.mjs"
103
+ }
104
+ },
105
+ "./types/terraform": {
106
+ "require": {
107
+ "types": "./dist/types/terraform.d.cts",
108
+ "default": "./dist/types/terraform.cjs"
109
+ },
110
+ "import": {
111
+ "types": "./dist/types/terraform.d.mts",
112
+ "default": "./dist/types/terraform.mjs"
113
+ },
114
+ "default": {
115
+ "types": "./dist/types/terraform.d.mts",
116
+ "default": "./dist/types/terraform.mjs"
117
+ }
118
+ }
119
+ },
120
+ "main": "./dist/index.cjs",
121
+ "module": "./dist/index.mjs",
122
+ "types": "./dist/index.d.cts",
123
+ "typings": "dist/index.d.mts",
124
+ "files": ["dist/**/*"],
125
+ "dependencies": {
126
+ "@stryke/fs": "^0.33.66",
127
+ "@stryke/helpers": "^0.10.8",
128
+ "@stryke/path": "^0.27.4",
129
+ "@stryke/string-format": "^0.17.9",
130
+ "@stryke/type-checks": "^0.6.1",
131
+ "@stryke/types": "^0.11.3",
132
+ "defu": "^6.1.7",
133
+ "execa": "^9.6.1",
134
+ "powerlines": "^0.42.41",
135
+ "shelljs": "^0.10.0",
136
+ "typescript": "^5.9.3"
137
+ },
138
+ "devDependencies": {
139
+ "@powerlines/plugin-plugin": "^0.12.351",
140
+ "@types/node": "^25.6.0"
141
+ },
142
+ "publishConfig": { "access": "public" },
143
+ "gitHead": "10e11a88d7fa6920f7139649cd74470cab2fd514"
144
+ }