@enjoys/context-engine 1.0.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/README.md +213 -0
- package/data/commands/air.json +59 -0
- package/data/commands/ansible.json +24 -0
- package/data/commands/apachectl.json +87 -0
- package/data/commands/apt-get.json +81 -0
- package/data/commands/apt.json +91 -0
- package/data/commands/awk.json +26 -0
- package/data/commands/aws-vault.json +140 -0
- package/data/commands/aws.json +229 -0
- package/data/commands/az.json +36 -0
- package/data/commands/bazel.json +103 -0
- package/data/commands/brew.json +140 -0
- package/data/commands/bun.json +230 -0
- package/data/commands/caddy.json +194 -0
- package/data/commands/cargo.json +1048 -0
- package/data/commands/cat.json +18 -0
- package/data/commands/cd.json +48 -0
- package/data/commands/certbot.json +148 -0
- package/data/commands/chmod.json +97 -0
- package/data/commands/choco.json +134 -0
- package/data/commands/chown.json +59 -0
- package/data/commands/clickhouse-client.json +74 -0
- package/data/commands/cloudflare.json +226 -0
- package/data/commands/cmake.json +110 -0
- package/data/commands/cockroach.json +92 -0
- package/data/commands/conda.json +94 -0
- package/data/commands/consul.json +125 -0
- package/data/commands/cp.json +86 -0
- package/data/commands/curl.json +44 -0
- package/data/commands/cypress.json +100 -0
- package/data/commands/deno.json +29 -0
- package/data/commands/django-admin.json +86 -0
- package/data/commands/dnf.json +137 -0
- package/data/commands/docker.json +1100 -0
- package/data/commands/doctl.json +156 -0
- package/data/commands/eslint.json +69 -0
- package/data/commands/find.json +44 -0
- package/data/commands/firebase.json +97 -0
- package/data/commands/flask.json +79 -0
- package/data/commands/flyctl.json +148 -0
- package/data/commands/gcloud.json +227 -0
- package/data/commands/gh.json +39 -0
- package/data/commands/git.json +527 -0
- package/data/commands/glab.json +116 -0
- package/data/commands/go.json +161 -0
- package/data/commands/gofmt.json +51 -0
- package/data/commands/golangci-lint.json +89 -0
- package/data/commands/gradle.json +44 -0
- package/data/commands/grep.json +47 -0
- package/data/commands/gunicorn.json +83 -0
- package/data/commands/helm.json +1104 -0
- package/data/commands/hg.json +92 -0
- package/data/commands/httpd.json +147 -0
- package/data/commands/influx.json +119 -0
- package/data/commands/iptables.json +86 -0
- package/data/commands/java.json +31 -0
- package/data/commands/jest.json +82 -0
- package/data/commands/journalctl.json +88 -0
- package/data/commands/just.json +93 -0
- package/data/commands/k6.json +84 -0
- package/data/commands/kubectl.json +1277 -0
- package/data/commands/linode-cli.json +117 -0
- package/data/commands/locust.json +83 -0
- package/data/commands/ls.json +115 -0
- package/data/commands/make.json +86 -0
- package/data/commands/mocha.json +75 -0
- package/data/commands/mongosh.json +73 -0
- package/data/commands/mv.json +68 -0
- package/data/commands/mvn.json +45 -0
- package/data/commands/mysql.json +81 -0
- package/data/commands/nest.json +69 -0
- package/data/commands/netlify.json +92 -0
- package/data/commands/next.json +71 -0
- package/data/commands/nft.json +105 -0
- package/data/commands/nginx.json +146 -0
- package/data/commands/nmap.json +92 -0
- package/data/commands/node.json +43 -0
- package/data/commands/nomad.json +139 -0
- package/data/commands/npm.json +1265 -0
- package/data/commands/npx.json +58 -0
- package/data/commands/nx.json +82 -0
- package/data/commands/openssl.json +288 -0
- package/data/commands/packer.json +92 -0
- package/data/commands/pacman.json +82 -0
- package/data/commands/pg_dump.json +83 -0
- package/data/commands/pg_restore.json +74 -0
- package/data/commands/pip.json +95 -0
- package/data/commands/pipenv.json +79 -0
- package/data/commands/pipx.json +53 -0
- package/data/commands/playwright.json +97 -0
- package/data/commands/pnpm.json +29 -0
- package/data/commands/poetry.json +96 -0
- package/data/commands/prettier.json +71 -0
- package/data/commands/ps.json +31 -0
- package/data/commands/psql.json +124 -0
- package/data/commands/pulumi.json +130 -0
- package/data/commands/pytest.json +92 -0
- package/data/commands/python.json +30 -0
- package/data/commands/railway.json +91 -0
- package/data/commands/redis-cli.json +148 -0
- package/data/commands/render.json +72 -0
- package/data/commands/rm.json +79 -0
- package/data/commands/rsync.json +36 -0
- package/data/commands/rust.json +35 -0
- package/data/commands/rustup.json +103 -0
- package/data/commands/scp.json +60 -0
- package/data/commands/sed.json +28 -0
- package/data/commands/sqlite3.json +68 -0
- package/data/commands/ssh-keygen.json +112 -0
- package/data/commands/ssh.json +37 -0
- package/data/commands/sudo.json +147 -0
- package/data/commands/supabase.json +108 -0
- package/data/commands/svn.json +75 -0
- package/data/commands/systemctl.json +31 -0
- package/data/commands/tar.json +35 -0
- package/data/commands/tcpdump.json +77 -0
- package/data/commands/terraform.json +824 -0
- package/data/commands/terragrunt.json +83 -0
- package/data/commands/tsc.json +85 -0
- package/data/commands/turbo.json +72 -0
- package/data/commands/ufw.json +76 -0
- package/data/commands/unzip.json +59 -0
- package/data/commands/uvicorn.json +73 -0
- package/data/commands/vault.json +144 -0
- package/data/commands/vercel.json +98 -0
- package/data/commands/vite.json +63 -0
- package/data/commands/vitest.json +88 -0
- package/data/commands/wasm-pack.json +90 -0
- package/data/commands/wget.json +38 -0
- package/data/commands/winget.json +131 -0
- package/data/commands/wireshark.json +81 -0
- package/data/commands/yarn.json +28 -0
- package/data/commands/yum.json +98 -0
- package/data/commands/zip.json +59 -0
- package/index.d.ts +131 -0
- package/index.js +189 -0
- package/index.mjs +21 -0
- package/package.json +64 -0
|
@@ -0,0 +1,824 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "terraform",
|
|
3
|
+
"description": "Infrastructure as Code tool for building, changing, and versioning cloud infrastructure",
|
|
4
|
+
"category": "devops-infra",
|
|
5
|
+
"platforms": ["linux", "macos", "windows"],
|
|
6
|
+
"shells": ["bash", "zsh", "fish", "powershell"],
|
|
7
|
+
"subcommands": [
|
|
8
|
+
{
|
|
9
|
+
"name": "init",
|
|
10
|
+
"description": "Initialize a Terraform working directory by downloading providers, modules, and configuring the backend",
|
|
11
|
+
"args": [],
|
|
12
|
+
"options": [
|
|
13
|
+
{ "name": "-backend", "description": "Configure the backend for this configuration (default true)", "type": "boolean" },
|
|
14
|
+
{ "name": "-backend-config", "description": "Backend configuration key=value or path to a backend config file", "type": "string" },
|
|
15
|
+
{ "name": "-from-module", "description": "Copy the contents of the given module into the target directory before init", "type": "string" },
|
|
16
|
+
{ "name": "-get", "description": "Download modules for this configuration (default true)", "type": "boolean" },
|
|
17
|
+
{ "name": "-input", "description": "Ask for input for variables if not directly set (default true)", "type": "boolean" },
|
|
18
|
+
{ "name": "-lock", "description": "Don't hold a state lock during init (default true)", "type": "boolean" },
|
|
19
|
+
{ "name": "-lock-timeout", "description": "Duration to retry a state lock (default 0s)", "type": "string" },
|
|
20
|
+
{ "name": "-no-color", "description": "Disable color codes in output" },
|
|
21
|
+
{ "name": "-plugin-dir", "description": "Directory containing plugin binaries; disables automatic plugin download", "type": "path" },
|
|
22
|
+
{ "name": "-reconfigure", "description": "Reconfigure the backend, ignoring any saved configuration" },
|
|
23
|
+
{ "name": "-migrate-state", "description": "Migrate existing state to the new backend configuration" },
|
|
24
|
+
{ "name": "-upgrade", "description": "Upgrade modules and plugins to the latest allowed versions" },
|
|
25
|
+
{ "name": "-lockfile", "description": "Set a dependency lockfile mode (readonly)", "type": "string" },
|
|
26
|
+
{ "name": "-ignore-remote-version", "description": "Ignore checking that the remote and local Terraform versions are compatible" }
|
|
27
|
+
],
|
|
28
|
+
"examples": [
|
|
29
|
+
"terraform init",
|
|
30
|
+
"terraform init -upgrade",
|
|
31
|
+
"terraform init -reconfigure",
|
|
32
|
+
"terraform init -migrate-state",
|
|
33
|
+
"terraform init -backend-config=backend.hcl",
|
|
34
|
+
"terraform init -backend-config=\"bucket=my-tf-state\" -backend-config=\"key=prod/terraform.tfstate\"",
|
|
35
|
+
"terraform init -backend-config=environments/prod.backend.hcl",
|
|
36
|
+
"terraform init -plugin-dir=/path/to/plugins",
|
|
37
|
+
"terraform init -from-module=github.com/hashicorp/example",
|
|
38
|
+
"terraform init -lockfile=readonly",
|
|
39
|
+
"terraform init -backend=false"
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "plan",
|
|
44
|
+
"description": "Create an execution plan showing what actions Terraform will take to reach the desired state",
|
|
45
|
+
"args": [],
|
|
46
|
+
"options": [
|
|
47
|
+
{ "name": "-destroy", "description": "Generate a plan to destroy all resources" },
|
|
48
|
+
{ "name": "-refresh-only", "description": "Generate a plan to update state to match remote objects" },
|
|
49
|
+
{ "name": "-refresh", "description": "Skip checking for external changes during planning (default true)", "type": "boolean" },
|
|
50
|
+
{ "name": "-replace", "description": "Force replacement of a particular resource instance (addr)", "type": "string" },
|
|
51
|
+
{ "name": "-target", "description": "Limit the planning scope to specific resources", "type": "string" },
|
|
52
|
+
{ "name": "-var", "description": "Set a variable value (key=value)", "type": "string" },
|
|
53
|
+
{ "name": "-var-file", "description": "Set variables from a file", "type": "path" },
|
|
54
|
+
{ "name": "-out", "description": "Write the plan to a file", "type": "path" },
|
|
55
|
+
{ "name": "-input", "description": "Ask for input for variables if not directly set (default true)", "type": "boolean" },
|
|
56
|
+
{ "name": "-lock", "description": "Don't hold a state lock during operations (default true)", "type": "boolean" },
|
|
57
|
+
{ "name": "-lock-timeout", "description": "Duration to retry a state lock (default 0s)", "type": "string" },
|
|
58
|
+
{ "name": "-no-color", "description": "Disable color codes in output" },
|
|
59
|
+
{ "name": "-parallelism", "description": "Limit the number of concurrent operations (default 10)", "type": "number" },
|
|
60
|
+
{ "name": "-compact-warnings", "description": "Show warnings in a more compact form" },
|
|
61
|
+
{ "name": "-detailed-exitcode", "description": "Return detailed exit codes: 0=no changes, 1=error, 2=changes present" },
|
|
62
|
+
{ "name": "-generate-config-out", "description": "Generate configuration for import blocks and write to file", "type": "path" }
|
|
63
|
+
],
|
|
64
|
+
"examples": [
|
|
65
|
+
"terraform plan",
|
|
66
|
+
"terraform plan -out=tfplan",
|
|
67
|
+
"terraform plan -var-file=prod.tfvars",
|
|
68
|
+
"terraform plan -var=\"instance_type=t3.large\"",
|
|
69
|
+
"terraform plan -target=module.vpc",
|
|
70
|
+
"terraform plan -target=aws_instance.web",
|
|
71
|
+
"terraform plan -replace=aws_instance.web",
|
|
72
|
+
"terraform plan -destroy",
|
|
73
|
+
"terraform plan -refresh-only",
|
|
74
|
+
"terraform plan -detailed-exitcode",
|
|
75
|
+
"terraform plan -no-color -compact-warnings",
|
|
76
|
+
"terraform plan -parallelism=20",
|
|
77
|
+
"terraform plan -var-file=common.tfvars -var-file=prod.tfvars",
|
|
78
|
+
"terraform plan -out=tfplan -lock-timeout=5m",
|
|
79
|
+
"terraform plan -generate-config-out=generated.tf"
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"name": "apply",
|
|
84
|
+
"description": "Apply the changes required to reach the desired state of the configuration",
|
|
85
|
+
"args": [
|
|
86
|
+
{ "name": "<plan-file>", "type": "path", "required": false, "description": "Path to a previously saved plan file" }
|
|
87
|
+
],
|
|
88
|
+
"options": [
|
|
89
|
+
{ "name": "-auto-approve", "description": "Skip interactive approval of the plan" },
|
|
90
|
+
{ "name": "-refresh-only", "description": "Apply only state refresh changes" },
|
|
91
|
+
{ "name": "-refresh", "description": "Skip checking for external changes (default true)", "type": "boolean" },
|
|
92
|
+
{ "name": "-replace", "description": "Force replacement of a particular resource instance", "type": "string" },
|
|
93
|
+
{ "name": "-target", "description": "Limit the apply scope to specific resources", "type": "string" },
|
|
94
|
+
{ "name": "-var", "description": "Set a variable value (key=value)", "type": "string" },
|
|
95
|
+
{ "name": "-var-file", "description": "Set variables from a file", "type": "path" },
|
|
96
|
+
{ "name": "-input", "description": "Ask for input for variables if not directly set (default true)", "type": "boolean" },
|
|
97
|
+
{ "name": "-lock", "description": "Don't hold a state lock during operations (default true)", "type": "boolean" },
|
|
98
|
+
{ "name": "-lock-timeout", "description": "Duration to retry a state lock (default 0s)", "type": "string" },
|
|
99
|
+
{ "name": "-no-color", "description": "Disable color codes in output" },
|
|
100
|
+
{ "name": "-parallelism", "description": "Limit the number of concurrent operations (default 10)", "type": "number" },
|
|
101
|
+
{ "name": "-compact-warnings", "description": "Show warnings in a more compact form" },
|
|
102
|
+
{ "name": "-destroy", "description": "Alias for terraform destroy" }
|
|
103
|
+
],
|
|
104
|
+
"examples": [
|
|
105
|
+
"terraform apply",
|
|
106
|
+
"terraform apply tfplan",
|
|
107
|
+
"terraform apply -auto-approve",
|
|
108
|
+
"terraform apply -var-file=prod.tfvars",
|
|
109
|
+
"terraform apply -var=\"instance_type=t3.large\" -auto-approve",
|
|
110
|
+
"terraform apply -target=module.vpc",
|
|
111
|
+
"terraform apply -target=aws_instance.web -auto-approve",
|
|
112
|
+
"terraform apply -replace=aws_instance.web",
|
|
113
|
+
"terraform apply -refresh-only -auto-approve",
|
|
114
|
+
"terraform apply -parallelism=20",
|
|
115
|
+
"terraform apply -lock-timeout=5m",
|
|
116
|
+
"terraform apply -compact-warnings -auto-approve"
|
|
117
|
+
]
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"name": "destroy",
|
|
121
|
+
"description": "Destroy all remote objects managed by the current Terraform configuration",
|
|
122
|
+
"args": [],
|
|
123
|
+
"options": [
|
|
124
|
+
{ "name": "-auto-approve", "description": "Skip interactive approval before destroying" },
|
|
125
|
+
{ "name": "-target", "description": "Limit the destroy scope to specific resources", "type": "string" },
|
|
126
|
+
{ "name": "-var", "description": "Set a variable value (key=value)", "type": "string" },
|
|
127
|
+
{ "name": "-var-file", "description": "Set variables from a file", "type": "path" },
|
|
128
|
+
{ "name": "-input", "description": "Ask for input for variables if not directly set (default true)", "type": "boolean" },
|
|
129
|
+
{ "name": "-lock", "description": "Don't hold a state lock during operations (default true)", "type": "boolean" },
|
|
130
|
+
{ "name": "-lock-timeout", "description": "Duration to retry a state lock (default 0s)", "type": "string" },
|
|
131
|
+
{ "name": "-no-color", "description": "Disable color codes in output" },
|
|
132
|
+
{ "name": "-parallelism", "description": "Limit the number of concurrent operations (default 10)", "type": "number" },
|
|
133
|
+
{ "name": "-compact-warnings", "description": "Show warnings in a more compact form" },
|
|
134
|
+
{ "name": "-refresh", "description": "Skip checking for external changes (default true)", "type": "boolean" }
|
|
135
|
+
],
|
|
136
|
+
"examples": [
|
|
137
|
+
"terraform destroy",
|
|
138
|
+
"terraform destroy -auto-approve",
|
|
139
|
+
"terraform destroy -target=aws_instance.web",
|
|
140
|
+
"terraform destroy -target=module.vpc -auto-approve",
|
|
141
|
+
"terraform destroy -var-file=prod.tfvars -auto-approve",
|
|
142
|
+
"terraform destroy -parallelism=20 -auto-approve",
|
|
143
|
+
"terraform destroy -lock-timeout=5m"
|
|
144
|
+
]
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"name": "validate",
|
|
148
|
+
"description": "Validate the configuration files in a directory for correctness and internal consistency",
|
|
149
|
+
"args": [],
|
|
150
|
+
"options": [
|
|
151
|
+
{ "name": "-json", "description": "Produce output in machine-readable JSON format" },
|
|
152
|
+
{ "name": "-no-color", "description": "Disable color codes in output" },
|
|
153
|
+
{ "name": "-no-tests", "description": "Skip validation of test files" }
|
|
154
|
+
],
|
|
155
|
+
"examples": [
|
|
156
|
+
"terraform validate",
|
|
157
|
+
"terraform validate -json",
|
|
158
|
+
"terraform validate -no-color",
|
|
159
|
+
"terraform validate -no-tests"
|
|
160
|
+
]
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"name": "fmt",
|
|
164
|
+
"description": "Rewrite Terraform configuration files to a canonical format and style",
|
|
165
|
+
"args": [
|
|
166
|
+
{ "name": "<target>", "type": "path", "required": false, "description": "File or directory to format (default: current directory)" }
|
|
167
|
+
],
|
|
168
|
+
"options": [
|
|
169
|
+
{ "name": "-list", "description": "List files whose formatting differs (default true)", "type": "boolean" },
|
|
170
|
+
{ "name": "-write", "description": "Write formatted output back to source files (default true)", "type": "boolean" },
|
|
171
|
+
{ "name": "-diff", "description": "Display diffs of formatting changes" },
|
|
172
|
+
{ "name": "-check", "description": "Check if input is formatted; return exit status 0 if formatted, non-zero otherwise" },
|
|
173
|
+
{ "name": "-recursive", "description": "Also process files in subdirectories" },
|
|
174
|
+
{ "name": "-no-color", "description": "Disable color codes in output" }
|
|
175
|
+
],
|
|
176
|
+
"examples": [
|
|
177
|
+
"terraform fmt",
|
|
178
|
+
"terraform fmt -check",
|
|
179
|
+
"terraform fmt -diff",
|
|
180
|
+
"terraform fmt -recursive",
|
|
181
|
+
"terraform fmt -check -recursive",
|
|
182
|
+
"terraform fmt main.tf",
|
|
183
|
+
"terraform fmt -write=false -diff",
|
|
184
|
+
"terraform fmt modules/"
|
|
185
|
+
]
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"name": "show",
|
|
189
|
+
"description": "Show the current state or a saved plan in a human-readable form",
|
|
190
|
+
"args": [
|
|
191
|
+
{ "name": "<path>", "type": "path", "required": false, "description": "Path to a state file or plan file" }
|
|
192
|
+
],
|
|
193
|
+
"options": [
|
|
194
|
+
{ "name": "-json", "description": "Produce output in machine-readable JSON format" },
|
|
195
|
+
{ "name": "-no-color", "description": "Disable color codes in output" }
|
|
196
|
+
],
|
|
197
|
+
"examples": [
|
|
198
|
+
"terraform show",
|
|
199
|
+
"terraform show -json",
|
|
200
|
+
"terraform show tfplan",
|
|
201
|
+
"terraform show -json tfplan",
|
|
202
|
+
"terraform show terraform.tfstate",
|
|
203
|
+
"terraform show -json | jq '.values.root_module.resources[]'",
|
|
204
|
+
"terraform show -no-color"
|
|
205
|
+
]
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"name": "output",
|
|
209
|
+
"description": "Read an output variable from the Terraform state file",
|
|
210
|
+
"args": [
|
|
211
|
+
{ "name": "<name>", "type": "string", "required": false, "description": "Name of the output to read" }
|
|
212
|
+
],
|
|
213
|
+
"options": [
|
|
214
|
+
{ "name": "-json", "description": "Produce output in machine-readable JSON format" },
|
|
215
|
+
{ "name": "-raw", "description": "Print the raw string value of the output without quotes" },
|
|
216
|
+
{ "name": "-no-color", "description": "Disable color codes in output" },
|
|
217
|
+
{ "name": "-state", "description": "Path to the state file to read (default: terraform.tfstate)", "type": "path" }
|
|
218
|
+
],
|
|
219
|
+
"examples": [
|
|
220
|
+
"terraform output",
|
|
221
|
+
"terraform output -json",
|
|
222
|
+
"terraform output instance_ip",
|
|
223
|
+
"terraform output -raw instance_ip",
|
|
224
|
+
"terraform output -json vpc_id",
|
|
225
|
+
"terraform output -state=prod.tfstate",
|
|
226
|
+
"terraform output -json | jq -r '.instance_ip.value'"
|
|
227
|
+
]
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"name": "refresh",
|
|
231
|
+
"description": "Update the state file to match real-world infrastructure (deprecated, prefer plan -refresh-only)",
|
|
232
|
+
"args": [],
|
|
233
|
+
"options": [
|
|
234
|
+
{ "name": "-target", "description": "Limit refresh to specific resources", "type": "string" },
|
|
235
|
+
{ "name": "-var", "description": "Set a variable value (key=value)", "type": "string" },
|
|
236
|
+
{ "name": "-var-file", "description": "Set variables from a file", "type": "path" },
|
|
237
|
+
{ "name": "-input", "description": "Ask for input for variables if not directly set (default true)", "type": "boolean" },
|
|
238
|
+
{ "name": "-lock", "description": "Don't hold a state lock during operations (default true)", "type": "boolean" },
|
|
239
|
+
{ "name": "-lock-timeout", "description": "Duration to retry a state lock (default 0s)", "type": "string" },
|
|
240
|
+
{ "name": "-no-color", "description": "Disable color codes in output" },
|
|
241
|
+
{ "name": "-parallelism", "description": "Limit the number of concurrent operations (default 10)", "type": "number" }
|
|
242
|
+
],
|
|
243
|
+
"examples": [
|
|
244
|
+
"terraform refresh",
|
|
245
|
+
"terraform refresh -var-file=prod.tfvars",
|
|
246
|
+
"terraform refresh -target=aws_instance.web",
|
|
247
|
+
"terraform refresh -no-color"
|
|
248
|
+
]
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"name": "import",
|
|
252
|
+
"description": "Import existing infrastructure into your Terraform state",
|
|
253
|
+
"args": [
|
|
254
|
+
{ "name": "<addr>", "type": "string", "required": true, "description": "Terraform resource address (e.g. aws_instance.web)" },
|
|
255
|
+
{ "name": "<id>", "type": "string", "required": true, "description": "Provider-specific resource ID" }
|
|
256
|
+
],
|
|
257
|
+
"options": [
|
|
258
|
+
{ "name": "-config", "description": "Path to Terraform configuration directory (default: current dir)", "type": "path" },
|
|
259
|
+
{ "name": "-input", "description": "Ask for input for variables if not directly set (default true)", "type": "boolean" },
|
|
260
|
+
{ "name": "-lock", "description": "Don't hold a state lock during import (default true)", "type": "boolean" },
|
|
261
|
+
{ "name": "-lock-timeout", "description": "Duration to retry a state lock (default 0s)", "type": "string" },
|
|
262
|
+
{ "name": "-no-color", "description": "Disable color codes in output" },
|
|
263
|
+
{ "name": "-var", "description": "Set a variable value (key=value)", "type": "string" },
|
|
264
|
+
{ "name": "-var-file", "description": "Set variables from a file", "type": "path" },
|
|
265
|
+
{ "name": "-ignore-remote-version", "description": "Ignore remote version check for state" },
|
|
266
|
+
{ "name": "-allow-missing-config", "description": "Allow import when no resource configuration block exists" }
|
|
267
|
+
],
|
|
268
|
+
"examples": [
|
|
269
|
+
"terraform import aws_instance.web i-1234567890abcdef0",
|
|
270
|
+
"terraform import aws_s3_bucket.bucket my-bucket-name",
|
|
271
|
+
"terraform import aws_security_group.sg sg-0123456789abcdef0",
|
|
272
|
+
"terraform import aws_vpc.main vpc-0123456789abcdef0",
|
|
273
|
+
"terraform import 'aws_instance.web[0]' i-1234567890abcdef0",
|
|
274
|
+
"terraform import module.vpc.aws_vpc.main vpc-0123456789abcdef0",
|
|
275
|
+
"terraform import -var-file=prod.tfvars aws_instance.web i-1234567890abcdef0",
|
|
276
|
+
"terraform import azurerm_resource_group.rg /subscriptions/sub-id/resourceGroups/my-rg",
|
|
277
|
+
"terraform import google_compute_instance.vm projects/my-project/zones/us-central1-a/instances/my-vm"
|
|
278
|
+
]
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
"name": "taint",
|
|
282
|
+
"description": "Mark a resource instance as tainted, forcing it to be destroyed and recreated on the next apply (deprecated, prefer -replace)",
|
|
283
|
+
"args": [
|
|
284
|
+
{ "name": "<addr>", "type": "string", "required": true, "description": "Address of the resource to taint" }
|
|
285
|
+
],
|
|
286
|
+
"options": [
|
|
287
|
+
{ "name": "-allow-missing", "description": "Succeed even if the resource is missing" },
|
|
288
|
+
{ "name": "-lock", "description": "Don't hold a state lock during operations (default true)", "type": "boolean" },
|
|
289
|
+
{ "name": "-lock-timeout", "description": "Duration to retry a state lock (default 0s)", "type": "string" },
|
|
290
|
+
{ "name": "-no-color", "description": "Disable color codes in output" },
|
|
291
|
+
{ "name": "-ignore-remote-version", "description": "Ignore remote version check for state" }
|
|
292
|
+
],
|
|
293
|
+
"examples": [
|
|
294
|
+
"terraform taint aws_instance.web",
|
|
295
|
+
"terraform taint 'aws_instance.web[0]'",
|
|
296
|
+
"terraform taint module.vpc.aws_subnet.public",
|
|
297
|
+
"terraform taint -allow-missing aws_instance.web"
|
|
298
|
+
]
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
"name": "untaint",
|
|
302
|
+
"description": "Remove the taint from a resource instance, allowing it to persist on the next apply",
|
|
303
|
+
"args": [
|
|
304
|
+
{ "name": "<addr>", "type": "string", "required": true, "description": "Address of the resource to untaint" }
|
|
305
|
+
],
|
|
306
|
+
"options": [
|
|
307
|
+
{ "name": "-allow-missing", "description": "Succeed even if the resource is missing" },
|
|
308
|
+
{ "name": "-lock", "description": "Don't hold a state lock during operations (default true)", "type": "boolean" },
|
|
309
|
+
{ "name": "-lock-timeout", "description": "Duration to retry a state lock (default 0s)", "type": "string" },
|
|
310
|
+
{ "name": "-no-color", "description": "Disable color codes in output" },
|
|
311
|
+
{ "name": "-ignore-remote-version", "description": "Ignore remote version check for state" }
|
|
312
|
+
],
|
|
313
|
+
"examples": [
|
|
314
|
+
"terraform untaint aws_instance.web",
|
|
315
|
+
"terraform untaint 'aws_instance.web[0]'",
|
|
316
|
+
"terraform untaint module.vpc.aws_subnet.public",
|
|
317
|
+
"terraform untaint -allow-missing aws_instance.web"
|
|
318
|
+
]
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
"name": "state list",
|
|
322
|
+
"description": "List resources within the Terraform state",
|
|
323
|
+
"args": [
|
|
324
|
+
{ "name": "<filter>", "type": "string", "required": false, "description": "Address filter pattern" }
|
|
325
|
+
],
|
|
326
|
+
"options": [
|
|
327
|
+
{ "name": "-state", "description": "Path to a state file (default: terraform.tfstate)", "type": "path" },
|
|
328
|
+
{ "name": "-id", "description": "Filter by resource ID", "type": "string" }
|
|
329
|
+
],
|
|
330
|
+
"examples": [
|
|
331
|
+
"terraform state list",
|
|
332
|
+
"terraform state list aws_instance",
|
|
333
|
+
"terraform state list module.vpc",
|
|
334
|
+
"terraform state list 'module.vpc.aws_subnet.*'",
|
|
335
|
+
"terraform state list -id=i-1234567890abcdef0"
|
|
336
|
+
]
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"name": "state show",
|
|
340
|
+
"description": "Show the attributes of a single resource in the state",
|
|
341
|
+
"args": [
|
|
342
|
+
{ "name": "<addr>", "type": "string", "required": true, "description": "Address of the resource to show" }
|
|
343
|
+
],
|
|
344
|
+
"options": [
|
|
345
|
+
{ "name": "-state", "description": "Path to a state file (default: terraform.tfstate)", "type": "path" }
|
|
346
|
+
],
|
|
347
|
+
"examples": [
|
|
348
|
+
"terraform state show aws_instance.web",
|
|
349
|
+
"terraform state show 'aws_instance.web[0]'",
|
|
350
|
+
"terraform state show module.vpc.aws_vpc.main",
|
|
351
|
+
"terraform state show aws_s3_bucket.assets"
|
|
352
|
+
]
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
"name": "state mv",
|
|
356
|
+
"description": "Move a resource to a different address in the state",
|
|
357
|
+
"args": [
|
|
358
|
+
{ "name": "<source>", "type": "string", "required": true, "description": "Current address of the resource" },
|
|
359
|
+
{ "name": "<destination>", "type": "string", "required": true, "description": "New address for the resource" }
|
|
360
|
+
],
|
|
361
|
+
"options": [
|
|
362
|
+
{ "name": "-dry-run", "description": "Preview the move without actually performing it" },
|
|
363
|
+
{ "name": "-lock", "description": "Don't hold a state lock during operations (default true)", "type": "boolean" },
|
|
364
|
+
{ "name": "-lock-timeout", "description": "Duration to retry a state lock (default 0s)", "type": "string" },
|
|
365
|
+
{ "name": "-state", "description": "Path to the source state file", "type": "path" },
|
|
366
|
+
{ "name": "-state-out", "description": "Path to the destination state file", "type": "path" },
|
|
367
|
+
{ "name": "-ignore-remote-version", "description": "Ignore remote version check for state" }
|
|
368
|
+
],
|
|
369
|
+
"examples": [
|
|
370
|
+
"terraform state mv aws_instance.web aws_instance.app",
|
|
371
|
+
"terraform state mv aws_instance.web module.compute.aws_instance.web",
|
|
372
|
+
"terraform state mv module.old_name module.new_name",
|
|
373
|
+
"terraform state mv 'aws_instance.web[0]' 'aws_instance.web[1]'",
|
|
374
|
+
"terraform state mv -dry-run aws_instance.web aws_instance.app",
|
|
375
|
+
"terraform state mv -state-out=other.tfstate aws_instance.web aws_instance.web"
|
|
376
|
+
]
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
"name": "state rm",
|
|
380
|
+
"description": "Remove resources from the Terraform state without destroying them",
|
|
381
|
+
"args": [
|
|
382
|
+
{ "name": "<addr>", "type": "string", "required": true, "description": "Address of the resource(s) to remove" }
|
|
383
|
+
],
|
|
384
|
+
"options": [
|
|
385
|
+
{ "name": "-dry-run", "description": "Preview the removal without actually performing it" },
|
|
386
|
+
{ "name": "-lock", "description": "Don't hold a state lock during operations (default true)", "type": "boolean" },
|
|
387
|
+
{ "name": "-lock-timeout", "description": "Duration to retry a state lock (default 0s)", "type": "string" },
|
|
388
|
+
{ "name": "-state", "description": "Path to the state file", "type": "path" },
|
|
389
|
+
{ "name": "-ignore-remote-version", "description": "Ignore remote version check for state" }
|
|
390
|
+
],
|
|
391
|
+
"examples": [
|
|
392
|
+
"terraform state rm aws_instance.web",
|
|
393
|
+
"terraform state rm 'aws_instance.web[0]'",
|
|
394
|
+
"terraform state rm module.vpc",
|
|
395
|
+
"terraform state rm module.vpc.aws_subnet.public",
|
|
396
|
+
"terraform state rm -dry-run aws_instance.web"
|
|
397
|
+
]
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
"name": "state pull",
|
|
401
|
+
"description": "Pull the current state and output it to stdout",
|
|
402
|
+
"args": [],
|
|
403
|
+
"options": [],
|
|
404
|
+
"examples": [
|
|
405
|
+
"terraform state pull",
|
|
406
|
+
"terraform state pull | jq '.resources | length'",
|
|
407
|
+
"terraform state pull > backup.tfstate",
|
|
408
|
+
"terraform state pull | jq '.resources[].type' | sort -u"
|
|
409
|
+
]
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
"name": "state push",
|
|
413
|
+
"description": "Update remote state from a local state file",
|
|
414
|
+
"args": [
|
|
415
|
+
{ "name": "<path>", "type": "path", "required": true, "description": "Path to the state file to push" }
|
|
416
|
+
],
|
|
417
|
+
"options": [
|
|
418
|
+
{ "name": "-force", "description": "Write the state even if lineages don't match or serial is lower" },
|
|
419
|
+
{ "name": "-lock", "description": "Don't hold a state lock during operations (default true)", "type": "boolean" },
|
|
420
|
+
{ "name": "-lock-timeout", "description": "Duration to retry a state lock (default 0s)", "type": "string" }
|
|
421
|
+
],
|
|
422
|
+
"examples": [
|
|
423
|
+
"terraform state push backup.tfstate",
|
|
424
|
+
"terraform state push -force errored.tfstate"
|
|
425
|
+
]
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
"name": "state replace-provider",
|
|
429
|
+
"description": "Replace provider in the state",
|
|
430
|
+
"args": [
|
|
431
|
+
{ "name": "<from>", "type": "string", "required": true, "description": "Current provider address (e.g. registry.terraform.io/hashicorp/aws)" },
|
|
432
|
+
{ "name": "<to>", "type": "string", "required": true, "description": "New provider address" }
|
|
433
|
+
],
|
|
434
|
+
"options": [
|
|
435
|
+
{ "name": "-auto-approve", "description": "Skip interactive approval" },
|
|
436
|
+
{ "name": "-lock", "description": "Don't hold a state lock during operations (default true)", "type": "boolean" },
|
|
437
|
+
{ "name": "-lock-timeout", "description": "Duration to retry a state lock (default 0s)", "type": "string" },
|
|
438
|
+
{ "name": "-ignore-remote-version", "description": "Ignore remote version check for state" }
|
|
439
|
+
],
|
|
440
|
+
"examples": [
|
|
441
|
+
"terraform state replace-provider hashicorp/aws registry.example.com/acme/aws",
|
|
442
|
+
"terraform state replace-provider 'registry.terraform.io/hashicorp/aws' 'registry.terraform.io/-/aws'",
|
|
443
|
+
"terraform state replace-provider -auto-approve hashicorp/aws custom/aws"
|
|
444
|
+
]
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
"name": "workspace new",
|
|
448
|
+
"description": "Create a new Terraform workspace",
|
|
449
|
+
"args": [
|
|
450
|
+
{ "name": "<name>", "type": "string", "required": true, "description": "Name of the new workspace" }
|
|
451
|
+
],
|
|
452
|
+
"options": [
|
|
453
|
+
{ "name": "-lock", "description": "Don't hold a state lock (default true)", "type": "boolean" },
|
|
454
|
+
{ "name": "-lock-timeout", "description": "Duration to retry a state lock (default 0s)", "type": "string" },
|
|
455
|
+
{ "name": "-state", "description": "Copy an existing state file into the new workspace", "type": "path" }
|
|
456
|
+
],
|
|
457
|
+
"examples": [
|
|
458
|
+
"terraform workspace new dev",
|
|
459
|
+
"terraform workspace new staging",
|
|
460
|
+
"terraform workspace new production",
|
|
461
|
+
"terraform workspace new feature-branch",
|
|
462
|
+
"terraform workspace new -state=existing.tfstate dev"
|
|
463
|
+
]
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
"name": "workspace select",
|
|
467
|
+
"description": "Switch to an existing Terraform workspace",
|
|
468
|
+
"args": [
|
|
469
|
+
{ "name": "<name>", "type": "string", "required": true, "description": "Name of the workspace to select" }
|
|
470
|
+
],
|
|
471
|
+
"options": [
|
|
472
|
+
{ "name": "-or-create", "description": "Create the workspace if it doesn't exist", "type": "boolean" }
|
|
473
|
+
],
|
|
474
|
+
"examples": [
|
|
475
|
+
"terraform workspace select dev",
|
|
476
|
+
"terraform workspace select staging",
|
|
477
|
+
"terraform workspace select production",
|
|
478
|
+
"terraform workspace select default",
|
|
479
|
+
"terraform workspace select -or-create=true dev"
|
|
480
|
+
]
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
"name": "workspace list",
|
|
484
|
+
"description": "List all Terraform workspaces",
|
|
485
|
+
"args": [],
|
|
486
|
+
"options": [],
|
|
487
|
+
"examples": [
|
|
488
|
+
"terraform workspace list"
|
|
489
|
+
]
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
"name": "workspace show",
|
|
493
|
+
"description": "Show the name of the current Terraform workspace",
|
|
494
|
+
"args": [],
|
|
495
|
+
"options": [],
|
|
496
|
+
"examples": [
|
|
497
|
+
"terraform workspace show"
|
|
498
|
+
]
|
|
499
|
+
},
|
|
500
|
+
{
|
|
501
|
+
"name": "workspace delete",
|
|
502
|
+
"description": "Delete an existing Terraform workspace",
|
|
503
|
+
"args": [
|
|
504
|
+
{ "name": "<name>", "type": "string", "required": true, "description": "Name of the workspace to delete" }
|
|
505
|
+
],
|
|
506
|
+
"options": [
|
|
507
|
+
{ "name": "-force", "description": "Remove a workspace even if it has existing resources" },
|
|
508
|
+
{ "name": "-lock", "description": "Don't hold a state lock (default true)", "type": "boolean" },
|
|
509
|
+
{ "name": "-lock-timeout", "description": "Duration to retry a state lock (default 0s)", "type": "string" }
|
|
510
|
+
],
|
|
511
|
+
"examples": [
|
|
512
|
+
"terraform workspace delete dev",
|
|
513
|
+
"terraform workspace delete -force old-workspace",
|
|
514
|
+
"terraform workspace delete feature-branch"
|
|
515
|
+
]
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
"name": "providers",
|
|
519
|
+
"description": "Show the providers required by the current configuration",
|
|
520
|
+
"args": [],
|
|
521
|
+
"options": [],
|
|
522
|
+
"examples": [
|
|
523
|
+
"terraform providers"
|
|
524
|
+
]
|
|
525
|
+
},
|
|
526
|
+
{
|
|
527
|
+
"name": "providers mirror",
|
|
528
|
+
"description": "Download the providers required by the current configuration into a local directory",
|
|
529
|
+
"args": [
|
|
530
|
+
{ "name": "<target-dir>", "type": "path", "required": true, "description": "Directory to store the mirrored providers" }
|
|
531
|
+
],
|
|
532
|
+
"options": [
|
|
533
|
+
{ "name": "-platform", "description": "Target platform(s) to mirror (os_arch format)", "type": "string" }
|
|
534
|
+
],
|
|
535
|
+
"examples": [
|
|
536
|
+
"terraform providers mirror /path/to/mirror",
|
|
537
|
+
"terraform providers mirror -platform=linux_amd64 /path/to/mirror",
|
|
538
|
+
"terraform providers mirror -platform=linux_amd64 -platform=darwin_arm64 ./providers-mirror"
|
|
539
|
+
]
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
"name": "providers lock",
|
|
543
|
+
"description": "Write the dependency lock file for providers",
|
|
544
|
+
"args": [],
|
|
545
|
+
"options": [
|
|
546
|
+
{ "name": "-platform", "description": "Target platform(s) to include in the lock file (os_arch format)", "type": "string" },
|
|
547
|
+
{ "name": "-fs-mirror", "description": "Filesystem mirror directory to use", "type": "path" },
|
|
548
|
+
{ "name": "-net-mirror", "description": "Network mirror URL to use", "type": "string" }
|
|
549
|
+
],
|
|
550
|
+
"examples": [
|
|
551
|
+
"terraform providers lock",
|
|
552
|
+
"terraform providers lock -platform=linux_amd64 -platform=darwin_arm64",
|
|
553
|
+
"terraform providers lock -platform=linux_amd64 -platform=darwin_amd64 -platform=windows_amd64",
|
|
554
|
+
"terraform providers lock -fs-mirror=/path/to/mirror"
|
|
555
|
+
]
|
|
556
|
+
},
|
|
557
|
+
{
|
|
558
|
+
"name": "providers schema",
|
|
559
|
+
"description": "Print the schemas for the providers used in the configuration",
|
|
560
|
+
"args": [],
|
|
561
|
+
"options": [
|
|
562
|
+
{ "name": "-json", "description": "Output the schemas in JSON format" }
|
|
563
|
+
],
|
|
564
|
+
"examples": [
|
|
565
|
+
"terraform providers schema -json",
|
|
566
|
+
"terraform providers schema -json | jq '.provider_schemas[\"registry.terraform.io/hashicorp/aws\"]'"
|
|
567
|
+
]
|
|
568
|
+
},
|
|
569
|
+
{
|
|
570
|
+
"name": "graph",
|
|
571
|
+
"description": "Generate a visual representation of the dependency graph in DOT format",
|
|
572
|
+
"args": [],
|
|
573
|
+
"options": [
|
|
574
|
+
{ "name": "-type", "description": "Type of graph to output (plan, plan-refresh-only, plan-destroy, apply)", "type": "string" },
|
|
575
|
+
{ "name": "-draw-cycles", "description": "Highlight any cycles in the graph with colored edges" },
|
|
576
|
+
{ "name": "-plan", "description": "Render the graph based on a specific plan file", "type": "path" }
|
|
577
|
+
],
|
|
578
|
+
"examples": [
|
|
579
|
+
"terraform graph",
|
|
580
|
+
"terraform graph | dot -Tpng > graph.png",
|
|
581
|
+
"terraform graph | dot -Tsvg > graph.svg",
|
|
582
|
+
"terraform graph -type=plan",
|
|
583
|
+
"terraform graph -type=plan-destroy",
|
|
584
|
+
"terraform graph -draw-cycles",
|
|
585
|
+
"terraform graph -plan=tfplan"
|
|
586
|
+
]
|
|
587
|
+
},
|
|
588
|
+
{
|
|
589
|
+
"name": "console",
|
|
590
|
+
"description": "Open an interactive console for evaluating Terraform expressions",
|
|
591
|
+
"args": [],
|
|
592
|
+
"options": [
|
|
593
|
+
{ "name": "-state", "description": "Path to a state file to use for evaluation", "type": "path" },
|
|
594
|
+
{ "name": "-var", "description": "Set a variable value (key=value)", "type": "string" },
|
|
595
|
+
{ "name": "-var-file", "description": "Set variables from a file", "type": "path" },
|
|
596
|
+
{ "name": "-plan", "description": "Use a plan file for evaluation context", "type": "path" }
|
|
597
|
+
],
|
|
598
|
+
"examples": [
|
|
599
|
+
"terraform console",
|
|
600
|
+
"terraform console -var-file=prod.tfvars",
|
|
601
|
+
"echo 'tolist([\"a\", \"b\", \"c\"])' | terraform console",
|
|
602
|
+
"echo 'length(var.subnets)' | terraform console",
|
|
603
|
+
"echo 'aws_instance.web.id' | terraform console",
|
|
604
|
+
"echo 'jsonencode({a = 1, b = 2})' | terraform console"
|
|
605
|
+
]
|
|
606
|
+
},
|
|
607
|
+
{
|
|
608
|
+
"name": "force-unlock",
|
|
609
|
+
"description": "Manually unlock the state for the current configuration",
|
|
610
|
+
"args": [
|
|
611
|
+
{ "name": "<lock-id>", "type": "string", "required": true, "description": "Lock ID from the lock error message" }
|
|
612
|
+
],
|
|
613
|
+
"options": [
|
|
614
|
+
{ "name": "-force", "description": "Don't ask for input for unlock confirmation" }
|
|
615
|
+
],
|
|
616
|
+
"examples": [
|
|
617
|
+
"terraform force-unlock LOCK_ID",
|
|
618
|
+
"terraform force-unlock -force LOCK_ID",
|
|
619
|
+
"terraform force-unlock 2b6a6738-5ef0-7c89-af76-123abc456def"
|
|
620
|
+
]
|
|
621
|
+
},
|
|
622
|
+
{
|
|
623
|
+
"name": "login",
|
|
624
|
+
"description": "Obtain and save credentials for a remote host (Terraform Cloud by default)",
|
|
625
|
+
"args": [
|
|
626
|
+
{ "name": "<hostname>", "type": "string", "required": false, "description": "Hostname of the Terraform service (default: app.terraform.io)" }
|
|
627
|
+
],
|
|
628
|
+
"options": [],
|
|
629
|
+
"examples": [
|
|
630
|
+
"terraform login",
|
|
631
|
+
"terraform login app.terraform.io",
|
|
632
|
+
"terraform login tfe.example.com"
|
|
633
|
+
]
|
|
634
|
+
},
|
|
635
|
+
{
|
|
636
|
+
"name": "logout",
|
|
637
|
+
"description": "Remove locally-stored credentials for a remote host",
|
|
638
|
+
"args": [
|
|
639
|
+
{ "name": "<hostname>", "type": "string", "required": false, "description": "Hostname of the Terraform service (default: app.terraform.io)" }
|
|
640
|
+
],
|
|
641
|
+
"options": [],
|
|
642
|
+
"examples": [
|
|
643
|
+
"terraform logout",
|
|
644
|
+
"terraform logout app.terraform.io",
|
|
645
|
+
"terraform logout tfe.example.com"
|
|
646
|
+
]
|
|
647
|
+
},
|
|
648
|
+
{
|
|
649
|
+
"name": "version",
|
|
650
|
+
"description": "Print the Terraform version and installed provider versions",
|
|
651
|
+
"args": [],
|
|
652
|
+
"options": [
|
|
653
|
+
{ "name": "-json", "description": "Output version information in JSON format" }
|
|
654
|
+
],
|
|
655
|
+
"examples": [
|
|
656
|
+
"terraform version",
|
|
657
|
+
"terraform version -json",
|
|
658
|
+
"terraform version -json | jq '.terraform_version'"
|
|
659
|
+
]
|
|
660
|
+
},
|
|
661
|
+
{
|
|
662
|
+
"name": "get",
|
|
663
|
+
"description": "Download and update modules mentioned in the root module",
|
|
664
|
+
"args": [],
|
|
665
|
+
"options": [
|
|
666
|
+
{ "name": "-update", "description": "Check all modules for updates and download updates if needed" },
|
|
667
|
+
{ "name": "-no-color", "description": "Disable color codes in output" }
|
|
668
|
+
],
|
|
669
|
+
"examples": [
|
|
670
|
+
"terraform get",
|
|
671
|
+
"terraform get -update",
|
|
672
|
+
"terraform get -no-color"
|
|
673
|
+
]
|
|
674
|
+
},
|
|
675
|
+
{
|
|
676
|
+
"name": "test",
|
|
677
|
+
"description": "Execute integration tests for Terraform modules",
|
|
678
|
+
"args": [],
|
|
679
|
+
"options": [
|
|
680
|
+
{ "name": "-cloud-run", "description": "Run tests on Terraform Cloud in the specified organization", "type": "string" },
|
|
681
|
+
{ "name": "-filter", "description": "Only run test files that match the given filter glob pattern", "type": "string" },
|
|
682
|
+
{ "name": "-json", "description": "Produce output in machine-readable JSON format" },
|
|
683
|
+
{ "name": "-no-color", "description": "Disable color codes in output" },
|
|
684
|
+
{ "name": "-test-directory", "description": "Set the test directory (default: tests)", "type": "path" },
|
|
685
|
+
{ "name": "-var", "description": "Set a variable value (key=value)", "type": "string" },
|
|
686
|
+
{ "name": "-var-file", "description": "Set variables from a file", "type": "path" },
|
|
687
|
+
{ "name": "-verbose", "description": "Print the plan or state for each run block as it executes" }
|
|
688
|
+
],
|
|
689
|
+
"examples": [
|
|
690
|
+
"terraform test",
|
|
691
|
+
"terraform test -verbose",
|
|
692
|
+
"terraform test -filter=tests/vpc_test.tftest.hcl",
|
|
693
|
+
"terraform test -json",
|
|
694
|
+
"terraform test -var-file=testing.tfvars",
|
|
695
|
+
"terraform test -var=\"region=us-west-2\"",
|
|
696
|
+
"terraform test -test-directory=integration-tests"
|
|
697
|
+
]
|
|
698
|
+
}
|
|
699
|
+
],
|
|
700
|
+
"globalOptions": [
|
|
701
|
+
{ "name": "-chdir", "description": "Switch to a different working directory before executing the command", "type": "path" },
|
|
702
|
+
{ "name": "-help", "description": "Show help for a command" },
|
|
703
|
+
{ "name": "-version", "description": "Show the Terraform version" },
|
|
704
|
+
{ "name": "-no-color", "description": "Disable color codes in output" }
|
|
705
|
+
],
|
|
706
|
+
"examples": [
|
|
707
|
+
"terraform init",
|
|
708
|
+
"terraform plan -out=tfplan",
|
|
709
|
+
"terraform apply tfplan",
|
|
710
|
+
"terraform apply -auto-approve",
|
|
711
|
+
"terraform destroy -auto-approve",
|
|
712
|
+
"terraform fmt -recursive",
|
|
713
|
+
"terraform validate -json",
|
|
714
|
+
"terraform state list",
|
|
715
|
+
"terraform workspace select production",
|
|
716
|
+
"terraform import aws_instance.web i-1234567890abcdef0",
|
|
717
|
+
"terraform output -json",
|
|
718
|
+
"terraform show -json tfplan | jq '.'",
|
|
719
|
+
"terraform console",
|
|
720
|
+
"terraform graph | dot -Tpng > graph.png",
|
|
721
|
+
"terraform plan -var-file=prod.tfvars -out=tfplan",
|
|
722
|
+
"terraform apply -target=module.networking -auto-approve",
|
|
723
|
+
"terraform state mv aws_instance.old aws_instance.new",
|
|
724
|
+
"terraform providers lock -platform=linux_amd64 -platform=darwin_arm64",
|
|
725
|
+
"terraform test -verbose",
|
|
726
|
+
"terraform force-unlock LOCK_ID"
|
|
727
|
+
],
|
|
728
|
+
"relatedCommands": ["terragrunt", "pulumi", "ansible", "packer"],
|
|
729
|
+
"contextEngine": {
|
|
730
|
+
"detectors": [
|
|
731
|
+
{
|
|
732
|
+
"name": "workspace",
|
|
733
|
+
"description": "Currently active Terraform workspace",
|
|
734
|
+
"command": "terraform workspace show",
|
|
735
|
+
"parser": "text",
|
|
736
|
+
"cacheFor": 10,
|
|
737
|
+
"requiresCmd": "terraform"
|
|
738
|
+
},
|
|
739
|
+
{
|
|
740
|
+
"name": "workspaces",
|
|
741
|
+
"description": "All available Terraform workspaces",
|
|
742
|
+
"command": "terraform workspace list",
|
|
743
|
+
"parser": "lines",
|
|
744
|
+
"cacheFor": 30,
|
|
745
|
+
"requiresCmd": "terraform"
|
|
746
|
+
},
|
|
747
|
+
{
|
|
748
|
+
"name": "state_resources",
|
|
749
|
+
"description": "All resources tracked in the current Terraform state",
|
|
750
|
+
"command": "terraform state list 2>/dev/null",
|
|
751
|
+
"parser": "lines",
|
|
752
|
+
"cacheFor": 15,
|
|
753
|
+
"requiresCmd": "terraform"
|
|
754
|
+
},
|
|
755
|
+
{
|
|
756
|
+
"name": "outputs",
|
|
757
|
+
"description": "All outputs from the current Terraform state in JSON format",
|
|
758
|
+
"command": "terraform output -json 2>/dev/null",
|
|
759
|
+
"parser": "json",
|
|
760
|
+
"cacheFor": 15,
|
|
761
|
+
"requiresCmd": "terraform"
|
|
762
|
+
},
|
|
763
|
+
{
|
|
764
|
+
"name": "providers",
|
|
765
|
+
"description": "Providers required by the current configuration",
|
|
766
|
+
"command": "terraform providers 2>/dev/null",
|
|
767
|
+
"parser": "text",
|
|
768
|
+
"cacheFor": 60,
|
|
769
|
+
"requiresCmd": "terraform"
|
|
770
|
+
},
|
|
771
|
+
{
|
|
772
|
+
"name": "tf_version",
|
|
773
|
+
"description": "Terraform version and installed provider versions",
|
|
774
|
+
"command": "terraform version -json",
|
|
775
|
+
"parser": "json",
|
|
776
|
+
"cacheFor": 300,
|
|
777
|
+
"requiresCmd": "terraform"
|
|
778
|
+
},
|
|
779
|
+
{
|
|
780
|
+
"name": "plan_summary",
|
|
781
|
+
"description": "Quick summary of pending infrastructure changes",
|
|
782
|
+
"command": "terraform plan -no-color -compact-warnings 2>/dev/null | tail -5",
|
|
783
|
+
"parser": "text",
|
|
784
|
+
"cacheFor": 30,
|
|
785
|
+
"requiresCmd": "terraform"
|
|
786
|
+
},
|
|
787
|
+
{
|
|
788
|
+
"name": "tf_files",
|
|
789
|
+
"description": "Terraform configuration files in the current directory",
|
|
790
|
+
"command": "find . -maxdepth 1 -name '*.tf' -exec basename {} \\;",
|
|
791
|
+
"parser": "lines",
|
|
792
|
+
"cacheFor": 30
|
|
793
|
+
},
|
|
794
|
+
{
|
|
795
|
+
"name": "variables",
|
|
796
|
+
"description": "Variable names defined in Terraform configuration files",
|
|
797
|
+
"command": "grep -h 'variable \"' *.tf 2>/dev/null | sed 's/variable \"//;s/\".*//'",
|
|
798
|
+
"parser": "lines",
|
|
799
|
+
"cacheFor": 30
|
|
800
|
+
},
|
|
801
|
+
{
|
|
802
|
+
"name": "modules",
|
|
803
|
+
"description": "Module sources referenced in the configuration",
|
|
804
|
+
"command": "grep -rh 'source.*=' *.tf 2>/dev/null | head -20",
|
|
805
|
+
"parser": "lines",
|
|
806
|
+
"cacheFor": 60
|
|
807
|
+
},
|
|
808
|
+
{
|
|
809
|
+
"name": "backend_config",
|
|
810
|
+
"description": "Backend configuration block from Terraform files",
|
|
811
|
+
"command": "grep -A 5 'backend \"' *.tf 2>/dev/null",
|
|
812
|
+
"parser": "text",
|
|
813
|
+
"cacheFor": 60
|
|
814
|
+
},
|
|
815
|
+
{
|
|
816
|
+
"name": "terraform_cloud",
|
|
817
|
+
"description": "Terraform Cloud workspace environment configuration",
|
|
818
|
+
"command": "cat .terraform/environment 2>/dev/null",
|
|
819
|
+
"parser": "text",
|
|
820
|
+
"cacheFor": 30
|
|
821
|
+
}
|
|
822
|
+
]
|
|
823
|
+
}
|
|
824
|
+
}
|