Open garysassano opened 1 year ago
Hi,
This issue hasn't seen activity in 60 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. Feel free to re-open this issue when there's an update or relevant information to be added. Thanks!
Hi,
This issue hasn't seen activity in 60 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. Feel free to re-open this issue when there's an update or relevant information to be added. Thanks!
Hi,
This issue hasn't seen activity in 90 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. Feel free to re-open this issue when there's an update or relevant information to be added. Thanks!
Hi,
This issue hasn't seen activity in 90 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. Feel free to re-open this issue when there's an update or relevant information to be added. Thanks!
Feature Spec
Currently Wing allows you to compile to
tf-gcp
target by manually exporting two env variables calledGOOGLE_PROJECT_ID
andGOOGLE_REGION
, which is not ideal. We should instead follow the standard way to interact with the Google Cloud APIs, which is by using Application Default Credentials (ADC). This is also what HashiCorp docs recommend for thegoogle
provider.The way it works is quite similar to AWS. You have two main options to set up credentials for your project: 1) You save a JSON file with your credentials locally and then export the
GOOGLE_APPLICATION_CREDENTIALS
env variable with the path to the file as its value. This is slightly different from AWS where you instead exportAWS_ACCESS_KEY_ID
,AWS_SECRET_ACCESS_KEY
andAWS_DEFAULT_REGION
env variables.2) You use the gcloud CLI to generate a JSON credentials file using the
gcloud auth application-default login
command. This file gets stored at~/.config/gcloud/application_default_credentials.json
. This is practically identical to what the AWS CLI does when using theaws configure
command. This would generate a file at the~/.aws/credentials
location.ADC searches for credentials in the following order: 1) Check if
GOOGLE_APPLICATION_CREDENTIALS
env variable is set. 2) Check if gcloud CLI credentials file exist at~/.config/gcloud/application_default_credentials.json
.Use Cases
Follow the standard way to interact with Google Cloud APIs.
Implementation Notes
No response
Component
No response
Community Notes