You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As described on the Resource Addressing docs page, the syntax for addressing a module is to prefix its name with module., so the correct way to write your example there would be as follows:
terraform plan --target=module.moduleName
This module. prefix is how Terraform can tell the difference between a module address and a resource address. If you use that prefix, you should hopefully find that this already works as you wanted. Please give that a try and let us know! Thanks.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
ghost
locked and limited conversation to collaborators
Sep 23, 2019
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Current Terraform Version
Use-cases
I think it would be useful to be able to use
--target
to specify a module and then have all resources under that module filtered for plan/apply.Attempted Solutions
terraform plan --target=moduleName
Proposal
The documentation for resource addressing already includes modules as follows:
[module path][resource spec]
My proposal is to make the second part for
[resource spec]
optional so it will work with only a module path:[module path]
References
#2182 might accomplish the same thing if it gets implemented.
The text was updated successfully, but these errors were encountered: