@storm-software/terraform-tools 0.46.0 → 0.47.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.
Files changed (88) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/chunk-23KFTIT2.mjs +0 -0
  3. package/dist/chunk-3GQAWCBQ.js +13 -0
  4. package/dist/chunk-463AGI5I.mjs +10 -0
  5. package/dist/chunk-53WQJQ5K.js +10 -0
  6. package/dist/chunk-6GLEQENV.mjs +10 -0
  7. package/dist/chunk-AOTMRUKU.js +53 -0
  8. package/dist/chunk-CA7S5MOH.mjs +0 -0
  9. package/dist/chunk-E7SPQEPH.js +1 -0
  10. package/dist/chunk-EAPOMBKY.mjs +10 -0
  11. package/dist/chunk-EL25IDXP.mjs +93 -0
  12. package/dist/chunk-GUQOEBFW.js +1 -0
  13. package/dist/chunk-HYHKZPRR.mjs +0 -0
  14. package/dist/chunk-ILC773N2.js +93 -0
  15. package/dist/chunk-JNBNKAGF.js +1288 -0
  16. package/dist/chunk-MW3JRZ4N.js +10 -0
  17. package/dist/chunk-N2YKXZ5R.js +1 -0
  18. package/dist/chunk-NEISKBUA.mjs +10 -0
  19. package/dist/chunk-SCRXKTPS.js +10 -0
  20. package/dist/chunk-SH7NPG4K.mjs +1288 -0
  21. package/dist/chunk-SIQ2JL7E.js +10 -0
  22. package/dist/chunk-W4CCHPMY.mjs +3934 -0
  23. package/dist/chunk-WKVEHDC2.mjs +53 -0
  24. package/dist/chunk-XUV4U54K.mjs +21 -0
  25. package/dist/chunk-YLTIJRR5.js +3933 -0
  26. package/dist/executors.d.mts +20 -0
  27. package/dist/executors.d.ts +20 -0
  28. package/dist/executors.js +8 -0
  29. package/dist/executors.mjs +8 -0
  30. package/dist/generators.d.mts +10 -0
  31. package/dist/generators.d.ts +10 -0
  32. package/dist/generators.js +9 -0
  33. package/dist/generators.mjs +9 -0
  34. package/dist/index.d.mts +10 -0
  35. package/dist/index.d.ts +10 -0
  36. package/dist/index.js +23 -0
  37. package/dist/index.mjs +23 -0
  38. package/dist/schema.d-DRCBZob5.d.mts +3 -0
  39. package/dist/schema.d-DRCBZob5.d.ts +3 -0
  40. package/dist/src/base/base-terraform-executor.untyped.d.mts +5 -0
  41. package/dist/src/base/base-terraform-executor.untyped.d.ts +5 -0
  42. package/dist/src/base/base-terraform-executor.untyped.js +7 -0
  43. package/dist/src/base/base-terraform-executor.untyped.mjs +7 -0
  44. package/dist/src/base/index.d.mts +7 -0
  45. package/dist/src/base/index.d.ts +7 -0
  46. package/dist/src/base/index.js +13 -0
  47. package/dist/src/base/index.mjs +13 -0
  48. package/dist/src/base/terraform-executor.d.mts +1301 -0
  49. package/dist/src/base/terraform-executor.d.ts +1301 -0
  50. package/dist/src/base/terraform-executor.js +8 -0
  51. package/dist/src/base/terraform-executor.mjs +8 -0
  52. package/dist/src/executors/apply/executor.d.mts +11 -0
  53. package/dist/src/executors/apply/executor.d.ts +11 -0
  54. package/dist/src/executors/apply/executor.js +9 -0
  55. package/dist/src/executors/apply/executor.mjs +9 -0
  56. package/dist/src/executors/apply/schema.d.ts +5 -0
  57. package/dist/src/executors/apply/schema.json +21 -0
  58. package/dist/src/executors/destroy/executor.d.mts +11 -0
  59. package/dist/src/executors/destroy/executor.d.ts +11 -0
  60. package/dist/src/executors/destroy/executor.js +9 -0
  61. package/dist/src/executors/destroy/executor.mjs +9 -0
  62. package/dist/src/executors/destroy/schema.d.ts +5 -0
  63. package/dist/src/executors/destroy/schema.json +16 -0
  64. package/dist/src/executors/output/executor.d.mts +8 -0
  65. package/dist/src/executors/output/executor.d.ts +8 -0
  66. package/dist/src/executors/output/executor.js +9 -0
  67. package/dist/src/executors/output/executor.mjs +9 -0
  68. package/dist/src/executors/output/schema.d.ts +1 -0
  69. package/dist/src/executors/output/schema.json +10 -0
  70. package/dist/src/executors/plan/executor.d.mts +11 -0
  71. package/dist/src/executors/plan/executor.d.ts +11 -0
  72. package/dist/src/executors/plan/executor.js +9 -0
  73. package/dist/src/executors/plan/executor.mjs +9 -0
  74. package/dist/src/executors/plan/schema.d.ts +5 -0
  75. package/dist/src/executors/plan/schema.json +16 -0
  76. package/dist/src/generators/init/init.d.mts +2 -0
  77. package/dist/src/generators/init/init.d.ts +2 -0
  78. package/dist/src/generators/init/init.js +10 -0
  79. package/dist/src/generators/init/init.mjs +10 -0
  80. package/dist/src/generators/init/schema.d.ts +3 -0
  81. package/dist/src/generators/init/schema.json +16 -0
  82. package/dist/tsup.config.d.mts +5 -0
  83. package/dist/tsup.config.d.ts +5 -0
  84. package/dist/tsup.config.js +39 -0
  85. package/dist/tsup.config.mjs +39 -0
  86. package/package.json +1 -1
  87. /package/dist/src/base/{base-terraform-executor.d.ts → base-terraform-executor.schema.d.ts} +0 -0
  88. /package/docs/api/base/{base-terraform-executor.md → base-terraform-executor.schema.md} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,3 +1,29 @@
1
+ ## 0.47.1 (2025-01-20)
2
+
3
+ ### Bug Fixes
4
+
5
+ - **workspace-tools:** Resolve cross-platform build issue in `copyfiles` script ([331a723f](https://github.com/storm-software/storm-ops/commit/331a723f))
6
+
7
+ ### 🧱 Updated Dependencies
8
+
9
+ - Updated workspace-tools to 1.229.1
10
+ - Updated workspace-tools to 1.229.1
11
+
12
+ ## 0.47.0 (2025-01-20)
13
+
14
+ ### Features
15
+
16
+ - **untyped:** Standard file name changes to avoid collisions ([71acf100](https://github.com/storm-software/storm-ops/commit/71acf100))
17
+
18
+ ### Bug Fixes
19
+
20
+ - **terraform-tools:** Resolve issue with invalid import path ([7a8ee2cf](https://github.com/storm-software/storm-ops/commit/7a8ee2cf))
21
+
22
+ ### 🧱 Updated Dependencies
23
+
24
+ - Updated workspace-tools to 1.229.0
25
+ - Updated workspace-tools to 1.229.0
26
+
1
27
  ## 0.46.0 (2025-01-20)
2
28
 
3
29
  ### Features
File without changes
@@ -0,0 +1,13 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
4
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
5
+ }) : x)(function(x) {
6
+ if (typeof require !== "undefined") return require.apply(this, arguments);
7
+ throw Error('Dynamic require of "' + x + '" is not supported');
8
+ });
9
+
10
+
11
+
12
+
13
+ exports.__name = __name; exports.__require = __require;
@@ -0,0 +1,10 @@
1
+ import {
2
+ withTerraformExecutor
3
+ } from "./chunk-WKVEHDC2.mjs";
4
+
5
+ // src/executors/apply/executor.ts
6
+ var executor_default = withTerraformExecutor("apply");
7
+
8
+ export {
9
+ executor_default
10
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkAOTMRUKUjs = require('./chunk-AOTMRUKU.js');
4
+
5
+ // src/executors/destroy/executor.ts
6
+ var executor_default = _chunkAOTMRUKUjs.withTerraformExecutor.call(void 0, "destroy");
7
+
8
+
9
+
10
+ exports.executor_default = executor_default;
@@ -0,0 +1,10 @@
1
+ import {
2
+ withTerraformExecutor
3
+ } from "./chunk-WKVEHDC2.mjs";
4
+
5
+ // src/executors/destroy/executor.ts
6
+ var executor_default = withTerraformExecutor("destroy");
7
+
8
+ export {
9
+ executor_default
10
+ };
@@ -0,0 +1,53 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+ var _chunkJNBNKAGFjs = require('./chunk-JNBNKAGF.js');
5
+
6
+
7
+ var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
8
+
9
+ // src/base/terraform-executor.ts
10
+ var _shelljs = require('shelljs');
11
+ var withTerraformExecutor = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (command, executorOptions = {}) => async (_options, context) => {
12
+ return _chunkJNBNKAGFjs.withRunExecutor.call(void 0, `Terraform \`${command}\` Command Executor`, async (options, context2, config) => {
13
+ if (!_shelljs.which.call(void 0, "tofu") || !_shelljs.which.call(void 0, "terraform")) {
14
+ throw new Error("Both OpenTofu and Terraform are not installed. Please install one of the two before running this executor.");
15
+ }
16
+ if (!_shelljs.which.call(void 0, "terragrunt")) {
17
+ throw new Error("Terragrunt is not installed. Please install them before running this executor.");
18
+ }
19
+ const { backendConfig = [], planFile, autoApproval, formatWrite, upgrade, migrateState, lock, varFile, varString, reconfigure } = options;
20
+ let jsonBackendConfig = backendConfig;
21
+ if (typeof jsonBackendConfig === "string") {
22
+ jsonBackendConfig = JSON.parse(jsonBackendConfig);
23
+ }
24
+ _chunkJNBNKAGFjs.run.call(void 0, config, [
25
+ "terragrunt",
26
+ command,
27
+ ...jsonBackendConfig.map((config2) => `-backend-config="${config2.key}=${config2.name}"`),
28
+ command === "plan" && planFile && `-out ${planFile}`,
29
+ command === "plan" && varFile && `--var-file ${varFile}`,
30
+ command === "plan" && varString && `--var ${varString}`,
31
+ command === "destroy" && autoApproval && "-auto-approve",
32
+ command === "apply" && autoApproval && "-auto-approve",
33
+ command === "apply" && planFile,
34
+ command === "apply" && varString && `--var ${varString}`,
35
+ command === "fmt" && "--recursive",
36
+ command === "fmt" && !formatWrite && "--check --list",
37
+ command === "init" && upgrade && "-upgrade",
38
+ command === "init" && migrateState && "-migrate-state",
39
+ command === "init" && reconfigure && "-reconfigure",
40
+ command === "providers" && lock && "lock",
41
+ command === "test" && varFile && `--var-file ${varFile}`,
42
+ command === "test" && varString && `--var ${varString}`
43
+ ].filter(Boolean).join(" "), options.sourceRoot, "inherit", process.env.CI ? {
44
+ TF_IN_AUTOMATION: "true",
45
+ TF_INPUT: "0"
46
+ } : {});
47
+ return null;
48
+ }, executorOptions)(_options, context);
49
+ }, "withTerraformExecutor");
50
+
51
+
52
+
53
+ exports.withTerraformExecutor = withTerraformExecutor;
File without changes
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1,10 @@
1
+ import {
2
+ withTerraformExecutor
3
+ } from "./chunk-WKVEHDC2.mjs";
4
+
5
+ // src/executors/output/executor.ts
6
+ var executor_default = withTerraformExecutor("output");
7
+
8
+ export {
9
+ executor_default
10
+ };
@@ -0,0 +1,93 @@
1
+ // src/base/base-terraform-executor.untyped.ts
2
+ import { defineUntypedSchema } from "untyped";
3
+ var base_terraform_executor_untyped_default = defineUntypedSchema({
4
+ $schema: {
5
+ title: "Base Terraform Executor",
6
+ description: "A base type definition for a Terraform executor schema"
7
+ },
8
+ backendConfig: {
9
+ $schema: {
10
+ title: "Backend Config",
11
+ type: "array",
12
+ description: "The backend configuration"
13
+ },
14
+ $default: []
15
+ },
16
+ autoApproval: {
17
+ $schema: {
18
+ title: "Auto Approval",
19
+ type: "boolean",
20
+ description: "Whether to auto-approve the plan"
21
+ },
22
+ $default: false
23
+ },
24
+ planFile: {
25
+ $schema: {
26
+ title: "Plan File",
27
+ format: "path",
28
+ description: "The plan file",
29
+ type: "string"
30
+ },
31
+ $default: "plan.out"
32
+ },
33
+ formatWrite: {
34
+ $schema: {
35
+ title: "Format Write",
36
+ type: "boolean",
37
+ description: "Whether to format the files before writing"
38
+ },
39
+ $default: false
40
+ },
41
+ upgrade: {
42
+ $schema: {
43
+ title: "Upgrade",
44
+ type: "boolean",
45
+ description: "Whether to upgrade the modules"
46
+ },
47
+ $default: false
48
+ },
49
+ migrateState: {
50
+ $schema: {
51
+ title: "Migrate State",
52
+ type: "boolean",
53
+ description: "Whether to migrate the state"
54
+ },
55
+ $default: false
56
+ },
57
+ lock: {
58
+ $schema: {
59
+ title: "Lock",
60
+ type: "boolean",
61
+ description: "Whether to lock the state"
62
+ },
63
+ $default: false
64
+ },
65
+ varFile: {
66
+ $schema: {
67
+ title: "Var File",
68
+ format: "path",
69
+ type: "string",
70
+ description: "The variable file"
71
+ },
72
+ $default: "variables.tf"
73
+ },
74
+ varString: {
75
+ $schema: {
76
+ title: "Var String",
77
+ type: "string",
78
+ description: "The variable string"
79
+ }
80
+ },
81
+ reconfigure: {
82
+ $schema: {
83
+ title: "Reconfigure",
84
+ type: "boolean",
85
+ description: "Whether to reconfigure the state"
86
+ },
87
+ $default: false
88
+ }
89
+ });
90
+
91
+ export {
92
+ base_terraform_executor_untyped_default
93
+ };
@@ -0,0 +1 @@
1
+ "use strict";
File without changes
@@ -0,0 +1,93 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/base/base-terraform-executor.untyped.ts
2
+ var _untyped = require('untyped');
3
+ var base_terraform_executor_untyped_default = _untyped.defineUntypedSchema.call(void 0, {
4
+ $schema: {
5
+ title: "Base Terraform Executor",
6
+ description: "A base type definition for a Terraform executor schema"
7
+ },
8
+ backendConfig: {
9
+ $schema: {
10
+ title: "Backend Config",
11
+ type: "array",
12
+ description: "The backend configuration"
13
+ },
14
+ $default: []
15
+ },
16
+ autoApproval: {
17
+ $schema: {
18
+ title: "Auto Approval",
19
+ type: "boolean",
20
+ description: "Whether to auto-approve the plan"
21
+ },
22
+ $default: false
23
+ },
24
+ planFile: {
25
+ $schema: {
26
+ title: "Plan File",
27
+ format: "path",
28
+ description: "The plan file",
29
+ type: "string"
30
+ },
31
+ $default: "plan.out"
32
+ },
33
+ formatWrite: {
34
+ $schema: {
35
+ title: "Format Write",
36
+ type: "boolean",
37
+ description: "Whether to format the files before writing"
38
+ },
39
+ $default: false
40
+ },
41
+ upgrade: {
42
+ $schema: {
43
+ title: "Upgrade",
44
+ type: "boolean",
45
+ description: "Whether to upgrade the modules"
46
+ },
47
+ $default: false
48
+ },
49
+ migrateState: {
50
+ $schema: {
51
+ title: "Migrate State",
52
+ type: "boolean",
53
+ description: "Whether to migrate the state"
54
+ },
55
+ $default: false
56
+ },
57
+ lock: {
58
+ $schema: {
59
+ title: "Lock",
60
+ type: "boolean",
61
+ description: "Whether to lock the state"
62
+ },
63
+ $default: false
64
+ },
65
+ varFile: {
66
+ $schema: {
67
+ title: "Var File",
68
+ format: "path",
69
+ type: "string",
70
+ description: "The variable file"
71
+ },
72
+ $default: "variables.tf"
73
+ },
74
+ varString: {
75
+ $schema: {
76
+ title: "Var String",
77
+ type: "string",
78
+ description: "The variable string"
79
+ }
80
+ },
81
+ reconfigure: {
82
+ $schema: {
83
+ title: "Reconfigure",
84
+ type: "boolean",
85
+ description: "Whether to reconfigure the state"
86
+ },
87
+ $default: false
88
+ }
89
+ });
90
+
91
+
92
+
93
+ exports.base_terraform_executor_untyped_default = base_terraform_executor_untyped_default;