Closed ralphpi closed 3 years ago
Fixed typos, added error
setting the json file extension in the output as well as the var_files seems to resolve my problem. Readme states that it must end in .tfvars
but it does in fact accept double extensions.
file_name:
variables.tfvars.json
params:
env_name: production
terraform_source: gcp-region-config/ci/tf/gcp
plan_only: true
var_files:
- vars/variables.tfvars.json
Oh, yeah the wording in the README is unfortunately ambiguous. What I meant was if the filename ends in .tfvars
then that file will be parsed as HCL, otherwise it will be parsed as YAML/JSON. Updated the wording to hopefully make that more clear: https://github.com/ljfranklin/terraform-resource/commit/5cb79e0850105c04d96387f66888401bd497676a. Closing this out as it looks like you got it figured out, but feel free to re-open if there's more to discuss.
Thanks!
I have a task that generates a file json file
variables.tfvars
as output invars/
I have the
- put: terraform
withvar_files:
set. Below is the job.This works locally for me when ran with the
--var-file
parameter. But when ran in this job it fails withI verified the file is there in
vars/
with the same content as the file that works locally. What am I not possibly understanding here ?variables.tfvars
task
Job