-
Notifications
You must be signed in to change notification settings - Fork 9.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Module within module silently ignored until terraform init
#21771
Comments
HI @benhoskings, Thanks for filing the issue. This may seem unusual at first, but this is the expected behavior as new modules always need to be initialized via The |
@jbardin Absolutely, I understand that the init is required; the problem is that terraform doesn't. :) I would say terraform should fail with an error in this case, as shown in "expected output" above; instead it silently omits module changes. |
Apologies @benhoskings, I saw your "expected output" and missed that it wasn't what you got ;). |
My first thought when I came across this issue was that modules within modules wasn't supported, because while terraform silently ignores modules within modules, it fails instantly if the module is declared in the project's root folder. It is actually just that terraform won't search for submodules within modules when planning to ask for |
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. |
Terraform Version
G'day, I've found on terraform 0.12.x that a module within a module won't be detected during
plan
and will be silently ignored untilterraform init
is run, rather than failingplan
like a top-level module does.Terraform Configuration Files
If you initialise the above structure, and then modify
module/module.tf
like so without re-initing:Expected behaviour
Actual behaviour
The text was updated successfully, but these errors were encountered: