terraform-provider-postgresql icon indicating copy to clipboard operation
terraform-provider-postgresql copied to clipboard

Create temporary file containing Google credentials if `GOOGLE_CREDENTIALS` is provided

Open jeremylvln opened this issue 3 years ago • 3 comments

On Terraform Cloud, we do not have access to the file system and thus cannot prepare a credentials file for this provider. The official GCP provider supports the GOOGLE_CREDENTIALS environment variable which should contains the JSON key directly.

This PR adds support for this environment variable, will create a temporary file containing the JSON key and will set the GOOGLE_APPLICATION_CREDENTIALS to the path of this temporary file.

This work was cherry-picked from @Deiz 's fork repository.

Closes #138

jeremylvln avatar Feb 07 '22 13:02 jeremylvln

hi! any updates here? I have a similar issue with remote execution and have to make a sad hack around with pre-hook/post-hook so it'd be awesome to utilize at least this method

LiuVII avatar May 19 '22 20:05 LiuVII

I would also love to have this feature. I can try to incorporate the requested changes.

kevinjcash avatar Jun 10 '22 04:06 kevinjcash

I would also love to have this feature. I can try to incorporate the requested changes.

@kevinjcash Feel free to do it :+1:

cyrilgdn avatar Jul 20 '22 19:07 cyrilgdn