diff --git a/README.md b/README.md index 3c5a8b7..c0c6a33 100644 --- a/README.md +++ b/README.md @@ -75,12 +75,6 @@ Fill in `vars.*module_name*.yml` with correct values and render the module: ### Apply Terraform configuration from the environment -Set your default gcloud credentials using - -``` - gcloud auth application-default login -``` - ``` kite terraform init kite terraform apply --env *env_name* diff --git a/lib/kite/terraform.rb b/lib/kite/terraform.rb index 5b62ee1..a4aa2ab 100644 --- a/lib/kite/terraform.rb +++ b/lib/kite/terraform.rb @@ -26,8 +26,7 @@ def load_env STDERR.puts "%-25s: %s" % [key, ENV["TF_VAR_#{var}"]] end - # TODO: Need to be set only in case of GCP - # ENV['GOOGLE_APPLICATION_CREDENTIALS'] = @vars["credentials"] + ENV['GOOGLE_APPLICATION_CREDENTIALS'] = File.expand_path(@vars["service_account"]) if cloud.key? 'gcp' end def cloud