diff --git a/google/data_source_google_client_config.go b/google/data_source_google_client_config.go index 90f01aca..e202ed17 100644 --- a/google/data_source_google_client_config.go +++ b/google/data_source_google_client_config.go @@ -20,6 +20,11 @@ func dataSourceGoogleClientConfig() *schema.Resource { Computed: true, }, + "zone": { + Type: schema.TypeString, + Computed: true, + }, + "access_token": { Type: schema.TypeString, Computed: true, @@ -35,6 +40,7 @@ func dataSourceClientConfigRead(d *schema.ResourceData, meta interface{}) error d.SetId(time.Now().UTC().String()) d.Set("project", config.Project) d.Set("region", config.Region) + d.Set("zone", config.Zone) token, err := config.tokenSource.Token() if err != nil { diff --git a/google/data_source_google_client_config_test.go b/google/data_source_google_client_config_test.go index b6b355e5..108678ee 100644 --- a/google/data_source_google_client_config_test.go +++ b/google/data_source_google_client_config_test.go @@ -20,6 +20,7 @@ func TestAccDataSourceGoogleClientConfig_basic(t *testing.T) { Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttrSet(resourceName, "project"), resource.TestCheckResourceAttrSet(resourceName, "region"), + resource.TestCheckResourceAttrSet(resourceName, "zone"), resource.TestCheckResourceAttrSet(resourceName, "access_token"), ), }, diff --git a/website/docs/d/datasource_client_config.html.markdown b/website/docs/d/datasource_client_config.html.markdown index 52f02029..4b888c8c 100644 --- a/website/docs/d/datasource_client_config.html.markdown +++ b/website/docs/d/datasource_client_config.html.markdown @@ -51,4 +51,6 @@ In addition to the arguments listed above, the following attributes are exported * `region` - The region to operate under. +* `zone` - The zone to operate under. + * `access_token` - The OAuth2 access token used by the client to authenticate against the Google Cloud API.