-
Notifications
You must be signed in to change notification settings - Fork 19
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
Interpolation of variables in backend.tf #26
Comments
Thank you @samar-upadhyay. To clarify, by app name are you referring to a runiac provided variable, e.g. |
@tiny-dancer - Possibly. We could probably use this variable to build the key in backend.tf if we added the substitution in the interpolation code. Or it could be any fringe variable that can be used to build the key. It just happens to be app name in our case.
Application name (app1, app2, etc.) is an input variable based on which the project provisions the necessary resources needed to run the application. I want the state file to be unique per application so I have the ability to destroy the application resources and recreate them. So the key name would be something like this:
|
Ah, okay. That adds a bit of complexity to generally support incoming variables for interpolation, up to this point we've been leveraging a select few variable in a quick win fashion. We won't be adding support for general variable interpolation in the current fashion. We may switch to use template files which would help accomplish this. Additionally you could leverage entrypoint.sh to do any string interpolation or templating as desired. |
#24 may be of interest as well |
OK. That is currently what I'm doing. |
Interesting. I'll take a look. |
I want to be able to use a variable in the key field in backend.tf for azurerm provider. The use case is that I am building a self service app registration component and I want to keep application specific tfstate files separate. I want to append app name in the key. Currently, there isn't a way to do it.
The text was updated successfully, but these errors were encountered: