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
I am a Terraform Enterprise user implementing a new project.
We have full separate deployments for each SDLC tier (dev, qa, prod, etc).
I would like to be able to promote terraform code using the same branching workflow that I use for code.
This means I am deploying development branch terraform code from the develop branch, and I am deploying production terraform code from the master branch.
I presently have to hard-code my branch into every file where I am pulling terraform modules from git.. for example
This, however, complicates the merge process. I would prefer to be able to pass this in as a variable.
I have seen the many tickets here about using variables in source declarations, and why that is a bad idea.
I am not suggesting to use a variable in the source url itself, but perhaps as a different parameter.. for example
This would allow me to deploy the exact same code in multiple workspaces/organizations, differing only in what value I have set for the branch variable. I would then set the branch variable to 'develop' for my dev infrastructure, 'master' for my prod infrastructure, and so on.
The text was updated successfully, but these errors were encountered:
I'm going to close this as a duplicate / family member of #25587
We don't have any plans to tackle module source interpolation at the moment unfortunately and the ref here is part of the source for better or worse, even if it is a separate argument. This value has to be known during initialization.
That said, thanks for sharing your use case so clearly. Even though the issue will be closed it will be helpful when we do finally tackle this area of Terraform.
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 as resolved and limited conversation to collaborators
Dec 13, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I am a Terraform Enterprise user implementing a new project.
We have full separate deployments for each SDLC tier (dev, qa, prod, etc).
I would like to be able to promote terraform code using the same branching workflow that I use for code.
This means I am deploying development branch terraform code from the develop branch, and I am deploying production terraform code from the master branch.
I presently have to hard-code my branch into every file where I am pulling terraform modules from git.. for example
This, however, complicates the merge process. I would prefer to be able to pass this in as a variable.
I have seen the many tickets here about using variables in source declarations, and why that is a bad idea.
I am not suggesting to use a variable in the source url itself, but perhaps as a different parameter.. for example
This would allow me to deploy the exact same code in multiple workspaces/organizations, differing only in what value I have set for the branch variable. I would then set the branch variable to 'develop' for my dev infrastructure, 'master' for my prod infrastructure, and so on.
The text was updated successfully, but these errors were encountered: