tftarget icon indicating copy to clipboard operation
tftarget copied to clipboard

How are we supposed to use this tool with custom *.tfvars files?

Open lodotek opened this issue 1 year ago • 2 comments

It appears that this tool assumes that we have a terraform.tfvars and does not provide a way for us to specify our custom *.tfvars files, similar to how we can do natively, ie with -var-file terraform.prod.tfvars . Is this correct?

lodotek avatar Jan 19 '24 16:01 lodotek

@lodotek Sorry for the late reply. Yes, we don't support -var-file terraform.prod.tfvars right now, but that is a good idea. I will consider supporting it.

orangekame3 avatar Mar 07 '24 02:03 orangekame3

You can pass the variable TF_CLI_ARGS to add the var file

export TF_CLI_ARGS="-var-file terraform.prod.tfvars"
tftarget plan

or

TF_CLI_ARGS="-var-file terraform.prod.tfvars" tftarget plan

sidneiweber avatar Jul 11 '24 00:07 sidneiweber