Closed ralphpi closed 3 years ago
For the backend config, set credentials
to the JSON contents rather than a path. The docs don't say it explicitly, but that key accepts a path or the contents of the file. Similarly the GCP provider itself accepts a JSON string as either an explicit credentials
value in the provider config or any of these env vars, but not GOOGLE_APPLICATION_CREDENTIALS
.
But the actual error message, open gce-subnet-test-repo/path/to/tf/files/testing/resource_backend_override.tf: no such file or directory
, it sounds like the directory path/to/tf/files/testing
doesn't exist in your git repo. I would double-check that directory exists and try again. If you need to troubleshoot further you can try running fly intercept
to SSH into the job container and look around at the files directly.
Also ourcelan_only
should be plan_only
, hopefully just a typo when you pasted in the example
Sorry yeah copy paste typo. Im not to worried about the GOOGLE_APPLICATION_CREDENTIALS
since im building the file in the task and setting env:GOOGLE_APPLICATION_CREDENTIALS
value to that path (Winging that part, not sure if thats the right thing to do). I updated git uri and terraform source to real value for more clarity. I must be doing something wrong with the terraform_source
Closing non-issue, using in correct paths for ref built cred file.
There doesn't seem to be easy way to allow json content provided in credentials for the GCS to also be used to run as the terraform creds for GCP using
$GOOGLE_APPLICATION_CREDENTIAL
being that its expecting a file. I also believe the gcs bucket backend isnt working properly. With the current setup below I keep getting returnedopen gce-subnet-test-repo/path/to/tf/files/testing/resource_backend_override.tf: no such file or directory