Skip to content

Commit d127050

Browse files
committed
docs: update Terraform documentation
1 parent a6d73d8 commit d127050

File tree

3 files changed

+429
-2
lines changed

3 files changed

+429
-2
lines changed

Diff for: .gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,6 @@ TODO.md
2626
.terraform
2727
.terraform.lock.hcl
2828
terraform.tfstate
29-
terraform.tfstate.backup
29+
terraform.tfstate.backup
30+
terraform.tfvars
31+
.terraform.tfstate.lock.info

Diff for: docs/terraform/commands.md

+45
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,51 @@ terraform state rm aws_instance.my_instance
176176

177177
One you remove the resource from the state file, we have manually delete the resource block from the configuration file and from the cloud provider.
178178

179+
### Terraform Workspace Commands
180+
181+
17. Terraform Workspace New
182+
183+
It is used to create a new workspace.
184+
185+
```bash
186+
terraform workspace new <workspace-name>
187+
terraform workspace new dev
188+
```
189+
190+
18. Terraform Workspace List
191+
192+
It is used to list all the workspaces.
193+
194+
```bash
195+
terraform workspace list
196+
```
197+
198+
19. Terraform Workspace Select
199+
200+
It is used to select a workspace.
201+
202+
```bash
203+
terraform workspace select <workspace-name>
204+
terraform workspace select dev
205+
```
206+
207+
20. Terraform Workspace Show
208+
209+
It is used to show the current workspace.
210+
211+
```bash
212+
terraform workspace show
213+
```
214+
215+
21. Terraform Workspace Delete
216+
217+
It is used to delete a workspace.
218+
219+
```bash
220+
terraform workspace delete <workspace-name>
221+
terraform workspace delete dev
222+
```
223+
179224
## AWS Commands
180225
181226
0. AWS Help

0 commit comments

Comments
 (0)