From c1efe351b2606b98b6a9d473394d24a3a7cac670 Mon Sep 17 00:00:00 2001 From: James Bardin Date: Mon, 5 Oct 2020 17:43:32 -0400 Subject: [PATCH] update taint command example Fix the example to match the usual shell style, and add a note about different shells requiring different escaping formats. --- website/docs/commands/taint.html.markdown | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/website/docs/commands/taint.html.markdown b/website/docs/commands/taint.html.markdown index 8086ffefc..65c758d9c 100644 --- a/website/docs/commands/taint.html.markdown +++ b/website/docs/commands/taint.html.markdown @@ -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