Skip to content

Commit d0c3fc5

Browse files
committed
update terraform example
1 parent 38e212b commit d0c3fc5

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ site
2929

3030
.terraform/
3131
*.tfstate
32+
*.tfstate.*
3233
*.tfplan
3334
plan.out
3435
*.tfvars

docs/terraform.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Terraform's core building blocks:
2727
* `output` values Terraform prints after apply (and exposes to parent modules)
2828
* `module` reusable Terraform package/folder you call from another config
2929

30-
Examples
30+
Docker example
3131
```sh
3232
# formatting/linting
3333
terraform fmt -check
@@ -45,6 +45,8 @@ terraform plan
4545
terraform plan -var="docker_host=unix:///${HOME}/.rd/docker.sock"
4646
# apply with "TF_VAR_<name>" convention
4747
TF_VAR_docker_host="unix:///${HOME}/.rd/docker.sock" terraform apply -auto-approve
48+
# cleanup
49+
terraform destroy -var="docker_host=unix:///${HOME}/.rd/docker.sock"
4850

4951
# verify state
5052
terraform show

0 commit comments

Comments
 (0)