You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When used indirectly (like when creating a project using terraform-google-project-factory), the platform variable of the gcloud module is not accessible, so its default to linux is problematic if using a mac (yes, docker is better, but still :) ).
some ideas:
skip_download could be renamed to something like skip_download_if_gcloud_found and defaulted to true
there could be an attempt to detect the OS if the platform is empty (default "") with something like:
if [[ $(uname -s) == "Darwin" ]]; then echo "darwin" ; else echo "linux" ; fi
The text was updated successfully, but these errors were encountered:
I think attempting to detect the OS if platform is empty is a good idea. A check like you suggested should work for Darwin and Linux and sounds like a good first step.
Sorry, I've left that on the side for too long. I got used to use Docker, then I got dragged away from Terraform.
I can probably work on it by the end of the week if it's fine for you.
@smathalikunnel In the meantime, you can bypass the problem by using docker
The way I'm bypassing it when i'm on MAC is to:
create a service account with enough rights
save it in JSON format
define a SERVICE_ACCOUNT_JSON env var like this export SERVICE_ACCOUNT_JSON=$(< ~/.credentials/name-of-sa.json)
copy the makefile defined in most terraform-google repos into your own repo then make docker_run
you will have access to terraform in a linux env, so the right gcloud SDK will be used
Writing that, I realised that it will be better to fix the issue. :)
When used indirectly (like when creating a project using terraform-google-project-factory), the platform variable of the gcloud module is not accessible, so its default to linux is problematic if using a mac (yes, docker is better, but still :) ).
some ideas:
The text was updated successfully, but these errors were encountered: