Skip to content

Commit fb9b106

Browse files
terraform-taint, terraform-untaint: add pages (#22523)
Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
1 parent 846178b commit fb9b106

2 files changed

Lines changed: 43 additions & 0 deletions

File tree

pages/common/terraform-taint.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# terraform taint
2+
3+
> Mark a resource instance as not fully functional to force replacement on next apply.
4+
> Note: This command is deprecated. Use `terraform apply -replace` instead.
5+
> See also: `terraform apply`, `terraform untaint`.
6+
> More information: <https://developer.hashicorp.com/terraform/cli/commands/taint>.
7+
8+
- Mark a resource as tainted:
9+
10+
`terraform taint {{resource_type.resource_name[instance_index]}}`
11+
12+
- Mark a resource as tainted, even if the resource is missing:
13+
14+
`terraform taint -allow-missing {{resource_type.resource_name[instance_index]}}`
15+
16+
- Mark a resource as tainted without acquiring a state lock:
17+
18+
`terraform taint -lock=false {{resource_type.resource_name[instance_index]}}`
19+
20+
- Mark a resource as tainted with a custom lock timeout:
21+
22+
`terraform taint -lock-timeout={{duration}} {{resource_type.resource_name[instance_index]}}`

pages/common/terraform-untaint.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# terraform untaint
2+
3+
> Remove the tainted status from a resource instance.
4+
> See also: `terraform taint`.
5+
> More information: <https://developer.hashicorp.com/terraform/cli/commands/untaint>.
6+
7+
- Remove tainted status from a resource:
8+
9+
`terraform untaint {{resource_type.resource_name[instance_index]}}`
10+
11+
- Remove tainted status, even if the resource is missing:
12+
13+
`terraform untaint -allow-missing {{resource_type.resource_name[instance_index]}}`
14+
15+
- Remove tainted status without acquiring a state lock:
16+
17+
`terraform untaint -lock=false {{resource_type.resource_name[instance_index]}}`
18+
19+
- Remove tainted status with a custom lock timeout:
20+
21+
`terraform untaint -lock-timeout={{duration}} {{resource_type.resource_name[instance_index]}}`

0 commit comments

Comments
 (0)