-
Is it possible to parameterize Something along the lines of:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
To clarify, you're asking about parametrizing inside the |
Beta Was this translation helpful? Give feedback.
-
TLDR: Technically possible but not ideal. It would be pretty easy for us to add an extra option for args to pass to the backend. Does it make sense to pass those per-deployment instead of globally? I don't think parametrising within the tfbackend file is possible in Terraform. There's an open issue about that. Do let me know if I'm wrong, though. If it does work, the option The recommendation there, which doesn't currently work with Pants, is to use Terraform has the functionality to pass arguments to just one [download-terraform]
extra_env_vars=[
"TF_CLI_ARGS_init=-backend-config=path=/%(buildroot)s/b.tfstate",
] |
Beta Was this translation helpful? Give feedback.
TLDR: Technically possible but not ideal. It would be pretty easy for us to add an extra option for args to pass to the backend. Does it make sense to pass those per-deployment instead of globally?
I don't think parametrising within the tfbackend file is possible in Terraform. There's an open issue about that. Do let me know if I'm wrong, though. If it does work, the option
[download-terraform].extra_env_vars
will allow you to pass (or pass through from your current env, or template with Pant's interpolation) envvars in the runs of the Terraform processes.The recommendation there, which doesn't currently work with Pants, is to use
-backend-config
with key-value pairs. Passing that throug…