IssueRaiser

Replace multiple resource instances with a single -replace=... planning argument

Hey guys, I've got an AWS instance resource for my workers in a module (`mymodule`): ``` bash resource "aws_instance" "worker" { count = "12" ... } ``` Is it possible to taint all 12 resources? I've tried the following: ``` bash ❯ terraform taint -module=mymodule "aws_instance.worker.*" The resource aws_instance.worker.* couldn't be found in the module root.mymodule. ``` Rather than having to do this: ``` bash ❯ terraform taint -module=mymodule "aws_instance.worker.0" The resource aws_instance.worker.0 in the module root.mymodule has been marked as tainted! ❯ terraform taint -module=mymodule "aws_instance.worker.1" The resource aws_instance.worker.1 in the module root.mymodule has been marked as tainted! ... ``` Cheers, Alex

Posted by alexlouden on May 1, 2015, 7:39 AM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.7,000 issues0 comments

github (Other)

Replace multiple resource instances with a single -replace=... planning argument

alexloudenMay 1, 2015, 7:39 AM

Hey guys, I've got an AWS instance resource for my workers in a module (`mymodule`): ``` bash resource "aws_instance" "worker" { count = "12" ... } ``` Is it possible to taint all 12 resources? I've tried the following: ``` bash ❯ terraform taint -module=mymodule "aws_instance.worker.*" The resource aws_instance.worker.* couldn't be found in the module root.mymodule. ``` Rather than having to do this: ``` bash ❯ terraform taint -module=mymodule "aws_instance.worker.0" The resource aws_instance.worker.0 in the module root.mymodule has been marked as tainted! ❯ terraform taint -module=mymodule "aws_instance.worker.1" The resource aws_instance.worker.1 in the module root.mymodule has been marked as tainted! ... ``` Cheers, Alex

Comments (0)

No comments yet. Start the discussion.

Comment on this issue