-
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
Provider alias does not work properly inside module v(0.5.3) #2023
Comments
I'm hitting this bug as well - we've got a route53 account that's managed by a third party, so we need to have a secondary AWS provider, but can't use an aliased provider inside the module. |
I can reproduce this in a module using the 0.5.3 release on OSX 10.10.3. It works if I move the aliased provider block and the subsequent resources out of the module (into a |
Reproduced as well. Makes re-using a module in multiple regions aws regions impossible. :( |
Is there a solution for this problem? |
Hi @JulianAlves, The problem as stated here was fixed a couple years ago. If you are seeing a similar problem, please open a new top-level issue with some more information on what you're seeing and we can work on debugging it against the latest version of Terraform. |
Hi apparentlymart, I am seeing the same issue reported by @JulianAlves. variable "dev_subscription_id" {} A sample module like VNET is defined as below, where the provider alias is given. This is how the module is referenced: module "rg" { This gives the following error:
As mentioned in the above thread, if I include provider in each module then it doesn't give this error. Hope to have this fixed soon as it is really nasty to give provider block in each module. Many 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. |
Hey all. I have only tested this with the google provider
Terraform v0.5.3-dev (0d575b7)
I also tested with 0.5.1 with the same behaviour.
main.tf
./module/main.tf
terraform plan produces:
If I include the provider inside the main.tf file I get the same error.
If I include the provider in both main.tf and ./module/main.tf it works.
The text was updated successfully, but these errors were encountered: