From b6a464c5214d1378b74cf683c51feb876791e155 Mon Sep 17 00:00:00 2001 From: Joe Winter Date: Tue, 22 Aug 2017 14:47:30 -0400 Subject: [PATCH] Provide example for terraform taint documentation (#15873) * Provide example to taint documentation Provides an example (with similar formatting as https://www.terraform.io/docs/commands/state/list.html#example-filtering-by-module) for tainting resources within a module. * Add documentation for tainting a single resource --- website/docs/commands/taint.html.markdown | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/website/docs/commands/taint.html.markdown b/website/docs/commands/taint.html.markdown index 8b6a78655..1b9e3e6c7 100644 --- a/website/docs/commands/taint.html.markdown +++ b/website/docs/commands/taint.html.markdown @@ -65,3 +65,21 @@ The command-line flags are all optional. The list of available flags are: * `-state-out=path` - Path to write updated state file. By default, the `-state` path will be used. Ignored when [remote state](/docs/state/remote.html) is used. + +## Example: Tainting a Single Resource + +This example will taint a single resource: + +``` +$ terraform taint aws_security_group.allow_all +The resource aws_security_group.allow_all in the module root has been marked as tainted! +``` + +## Example: Tainting a Resource within a Module + +This example will only taint a resource within a module: + +``` +$ terraform taint -module=couchbase aws_instance.cb_node.9 +The resource aws_instance.couchbase.11 in the module root.couchbase has been marked as tainted! +```