-
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 Source Interpolation ? #18063
Comments
Hi @octravis, Sorry this tripped you up. Interpolations are not allowed in that field, because the module need to be fetched early on before we have a complete config for interpolation. I just checked though, and it seems this is only called out in passing here: https://www.terraform.io/docs/modules/sources.html#private-github-repos, so we should probably highlight it better in the documentation. |
Hi! So is that planned for futuru releases or no? Any idea? |
@jbardin It would be very nice to have the ability for interpolation here (or even just the ability to specify a variable!) for allowing easier ability to switch between local development (i.e. . |
Duplicate of #1439 |
Indeed, this is the same as #1439, so I'm going to close this out. The other issue has some extensive discussion on why this isn't allowed and what you might do instead for certain use-cases. If you have a use-case that isn't covered by it, please open a new Feature Request issue about what you are trying to achieve; your problem will not be solved by supporting arbitrary expressions in the |
This issue was to document that this isn't supported somewhere in the public documentation... |
The forthcoming Terraform v0.12.0 release includes a specific error message for this case that will be shown if you try to use variables or functions in the The documentation also already reflects that constraint:
The older documentation for Terraform v0.11 also reflects this, using more v0.11-oriented terminology:
(Templates are the extended idea of "interpolations" in v0.12, after conditionals and repetition were added.) |
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. |
Hi Support,
I was attempting use interpolation on the module source. Is this allowed ?, seems to pass the string with not interpolation?
Terraform Version
Terraform v0.11.7
Expected Behavior
Initialize the module with the interpolated github_location
Actual Behavior
Initializing modules...
Getting source "${format("%s%s", var.github_location, "/vmware_provision")}"
The text was updated successfully, but these errors were encountered: