[ 
https://issues.apache.org/jira/browse/BEAM-8472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17082711#comment-17082711
 ] 

Robert Burke edited comment on BEAM-8472 at 4/13/20, 10:26 PM:
---------------------------------------------------------------

Just to be clear, the protocol is to check the environment variables, and then 
execute the gcloud command?

Which would be to use [os.Getenv|https://godoc.org/pkg/os#Getenv] with 
"CLOUDSDK_COMPUTE_REGION" and then use the [os/exec 
package|https://godoc.org/pkg/os/exec] to call the gcloud executable?


was (Author: lostluck):
Just to be clear, the protocol is to check the environment variables, and then 
execute the gcloud command?

Which would be to use [os.Getenv|https://godoc.corp.google.com/pkg/os#Getenv] 
with "CLOUDSDK_COMPUTE_REGION" and then use the [os/exec 
package|https://godoc.corp.google.com/pkg/os/exec] to call the gcloud 
executable?

> Get default GCP region from gcloud
> ----------------------------------
>
>                 Key: BEAM-8472
>                 URL: https://issues.apache.org/jira/browse/BEAM-8472
>             Project: Beam
>          Issue Type: Improvement
>          Components: runner-dataflow, sdk-go
>            Reporter: Kyle Weaver
>            Priority: Major
>          Time Spent: 3h 40m
>  Remaining Estimate: 0h
>
> Currently, we default to us-central1 if --region flag is not set. The Google 
> Cloud SDK generally tries to get a default value in this case for 
> convenience, which we should follow. 
> [https://cloud.google.com/compute/docs/gcloud-compute/#order_of_precedence_for_default_properties]
> Update 11/12: this is complete for Python and Java, Go remains.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to