-
Notifications
You must be signed in to change notification settings - Fork 9.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
providers/google: Change account_file to expect a JSON string #2839
Conversation
Going to change this to only use |
3ec2c58
to
df8a6a8
Compare
} | ||
|
||
var account accountFile | ||
if err := json.Unmarshal([]byte(value), &account); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to detect if value
here is a JSON file, or the contents of a file. If I supply somefile.json
or even just the word what
, this will throw an error:
invalid character 'w' looking for beginning of value
I'm thinking we shouldn't return in this error block, instead return if there is no error (we found json, yay)
99a2fc1
to
bfc205d
Compare
This is ready, just waiting on #2878 to be merged first |
Ok landed #2878 - LGTM - you can do the honors @justincampbell 😀 |
Prevents prompting for input
If JSON fails to parse, treat it as a file path
bfc205d
to
7884456
Compare
providers/google: Change account_file to expect a JSON string
+ Google provider sets account file JSON contents instead of path - See hashicorp/terraform#2839 [Finishes #101087224] Signed-off-by: Damon Anderson <danderson@pivotal.io>
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Using the Google provider from Atlas if currently not possible without committing the
account_file
to version control, or only usingterraform push
. This addsaccount_file_contents
to allow specifying the contents of theaccount_file
in an environment variable (encrypted on Atlas).