diff --git a/build/terraform b/build/terraform index f783d6a91ef2..d6141aa2b598 160000 --- a/build/terraform +++ b/build/terraform @@ -1 +1 @@ -Subproject commit f783d6a91ef218e1b688a75adf47383b13d453d1 +Subproject commit d6141aa2b5980ce6570e8fcbbee61f47ee4b623e diff --git a/build/terraform-beta b/build/terraform-beta index e322207b318b..9eca81ef14dd 160000 --- a/build/terraform-beta +++ b/build/terraform-beta @@ -1 +1 @@ -Subproject commit e322207b318b62bf20cd95142f71ea103bdce4ea +Subproject commit 9eca81ef14dd099dae9cc2a12d35a7b2576fa17b diff --git a/third_party/terraform/utils/config.go.erb b/third_party/terraform/utils/config.go.erb index 7fb6838bf9e6..c9b2a2ebc2ab 100644 --- a/third_party/terraform/utils/config.go.erb +++ b/third_party/terraform/utils/config.go.erb @@ -11,7 +11,6 @@ import ( "github.com/hashicorp/terraform/helper/logging" "github.com/hashicorp/terraform/helper/pathorcontents" - "github.com/hashicorp/terraform/version" "golang.org/x/oauth2" "golang.org/x/oauth2/google" @@ -167,9 +166,14 @@ func (c *Config) loadAndValidate() error { client.Transport = logging.NewTransport("Google", client.Transport) - projectURL := "https://www.terraform.io" - userAgent := fmt.Sprintf("Terraform/%s (+%s)", - version.String(), projectURL) + terraformVersion := httpclient.UserAgentString() + <% if version.nil? || version == 'ga' -%> + providerVersion := fmt.Sprintf("terraform-provider-google/%s", version.ProviderVersion) + <% else -%> + providerVersion := fmt.Sprintf("terraform-provider-google-<%= version -%>/%s", version.ProviderVersion) + <% end -%> + terraformWebsite := "(+https://www.terraform.io)" + userAgent := fmt.Sprintf("%s %s %s", terraformVersion, terraformWebsite, providerVersion) c.client = client c.userAgent = userAgent