Merge pull request #23185 from scott1138/patch-1

Update taint docs - for_each
This commit is contained in:
Pam Selle 2019-10-31 13:16:53 -04:00 committed by GitHub
commit 5070ab7989
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 0 deletions

View File

@ -73,6 +73,17 @@ $ terraform taint aws_security_group.allow_all
The resource aws_security_group.allow_all in the module root has been marked as tainted. The resource aws_security_group.allow_all in the module root has been marked as tainted.
``` ```
## 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\"]'
The resource module.route_tables.azurerm_route_table.rt["DefaultSubnet"] in the module root has been marked as tainted.
```
## Example: Tainting a Resource within a Module ## Example: Tainting a Resource within a Module
This example will only taint a resource within a module: This example will only taint a resource within a module: