Skip to content

Parameters with terraform_backend target #21567

Answered by lilatomic
d-m asked this question in Q&A
Discussion options

You must be logged in to vote

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…

Replies: 2 comments 1 reply

Comment options

benjyw
Oct 23, 2024
Maintainer Sponsor

You must be logged in to vote
1 reply
@d-m
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by d-m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants