diff --git a/cmd/cmd_dnshelp.go b/cmd/cmd_dnshelp.go index 9d531d6d..c2dfc164 100644 --- a/cmd/cmd_dnshelp.go +++ b/cmd/cmd_dnshelp.go @@ -51,7 +51,7 @@ Here is an example bash command using the CloudFlare DNS provider: fmt.Fprintln(w, "\tfastdns:\tAKAMAI_HOST, AKAMAI_CLIENT_TOKEN, AKAMAI_CLIENT_SECRET, AKAMAI_ACCESS_TOKEN") fmt.Fprintln(w, "\tgandi:\tGANDI_API_KEY") fmt.Fprintln(w, "\tgandiv5:\tGANDIV5_API_KEY") - fmt.Fprintln(w, "\tgcloud:\tGCE_PROJECT, GCE_SERVICE_ACCOUNT_FILE") + fmt.Fprintln(w, "\tgcloud:\tGCE_PROJECT, 'Application Default Credentials', [GCE_SERVICE_ACCOUNT_FILE]") fmt.Fprintln(w, "\tglesys:\tGLESYS_API_USER, GLESYS_API_KEY") fmt.Fprintln(w, "\tgodaddy:\tGODADDY_API_KEY, GODADDY_API_SECRET") fmt.Fprintln(w, "\thostingde:\tHOSTINGDE_API_KEY, HOSTINGDE_ZONE_NAME") diff --git a/providers/dns/gcloud/googlecloud.go b/providers/dns/gcloud/googlecloud.go index 3efd4a25..d2cd04f4 100644 --- a/providers/dns/gcloud/googlecloud.go +++ b/providers/dns/gcloud/googlecloud.go @@ -61,7 +61,7 @@ func NewDNSProvider() (*DNSProvider, error) { } // Use default credentials. - project := os.Getenv("GCE_PROJECT") + project := env.GetOrDefaultString("GCE_PROJECT", "") return NewDNSProviderCredentials(project) } @@ -98,7 +98,7 @@ func NewDNSProviderServiceAccount(saFile string) (*DNSProvider, error) { // If GCE_PROJECT is non-empty it overrides the project in the service // account file. - project := os.Getenv("GCE_PROJECT") + project := env.GetOrDefaultString("GCE_PROJECT", "") if project == "" { // read project id from service account file var datJSON struct {