Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Terraform
Commits
ffbdd721
Unverified
Commit
ffbdd721
authored
4 years ago
by
James Bardin
Committed by
GitHub
4 years ago
Browse files
Options
Download
Plain Diff
Merge pull request #26487 from hashicorp/jbardin/shell-escape
update taint command example
parents
014fb898
c1efe351
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
website/docs/commands/taint.html.markdown
+6
-2
website/docs/commands/taint.html.markdown
with
6 additions
and
2 deletions
+6
-2
website/docs/commands/taint.html.markdown
+
6
-
2
View file @
ffbdd721
...
...
@@ -76,14 +76,18 @@ The resource aws_security_group.allow_all in the module root has been marked as
## Example: Tainting a single resource created with for_each
It is necessary to wrap the resource in single quotes and escape the quotes.
This example will taint a single resource created with for_each:
```
$ terraform taint
"
module.route_tables.azurerm_route_table.rt[
\
"DefaultSubnet
\
"]
"
$ terraform taint
'
module.route_tables.azurerm_route_table.rt["DefaultSubnet"]
'
The resource module.route_tables.azurerm_route_table.rt["DefaultSubnet"] in the module root has been marked as tainted.
```
~> Note: In most
`sh`
compatible shells, double quotes and spaces can be
escaped by wrapping the argument in single quotes. This however varies between
other shells and operating systems, and users should use the appropriate escape
characters based on the applicable quoting rules for their shell to pass the
address string, including quotes, to Terraform.
## Example: Tainting a Resource within a Module
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help