From 0a18afe9691c7399c896b5082b642071045deb7a Mon Sep 17 00:00:00 2001 From: Sarah French Date: Thu, 26 Sep 2024 23:56:19 +0100 Subject: [PATCH 1/8] Add acceptance tests for request_timeout in the SDK provider --- .../provider/provider_request_timeout_test.go | 104 ++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 mmv1/third_party/terraform/provider/provider_request_timeout_test.go diff --git a/mmv1/third_party/terraform/provider/provider_request_timeout_test.go b/mmv1/third_party/terraform/provider/provider_request_timeout_test.go new file mode 100644 index 000000000000..836ce3c51891 --- /dev/null +++ b/mmv1/third_party/terraform/provider/provider_request_timeout_test.go @@ -0,0 +1,104 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 +package provider_test + +import ( + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-google/google/acctest" +) + +// TestAccSdkProvider_request_timeout is a series of acc tests asserting how the SDK provider handles request_timeout arguments +// It is SDK specific because the HCL used provisions SDK-implemented resources +// It is a counterpart to TestAccFwProvider_request_timeout +func TestAccSdkProvider_request_timeout(t *testing.T) { + testCases := map[string]func(t *testing.T){ + // Configuring the provider using inputs + "request_timeout can be set in config in different formats": testAccSdkProvider_request_timeout_setInConfig, + //no ENVs to test + + // Schema-level validation + "when request_timeout is set to an empty string in the config the value fails validation, as it is not a duration": testAccSdkProvider_request_timeout_emptyStringValidation, + + // Usage + // We cannot test the impact of this field in an acc test + } + + for name, tc := range testCases { + // shadow the tc variable into scope so that when + // the loop continues, if t.Run hasn't executed tc(t) + // yet, we don't have a race condition + // see https://github.com/golang/go/wiki/CommonMistakes#using-goroutines-on-loop-iterator-variables + tc := tc + t.Run(name, func(t *testing.T) { + tc(t) + }) + } +} + +func testAccSdkProvider_request_timeout_setInConfig(t *testing.T) { + acctest.SkipIfVcr(t) // Test doesn't interact with API + + providerTimeout1 := "3m0s" + providerTimeout2 := "3m" + expectedValue := "3m0s" + + context1 := map[string]interface{}{ + "request_timeout": providerTimeout1, + } + context2 := map[string]interface{}{ + "request_timeout": providerTimeout2, + } + + acctest.VcrTest(t, resource.TestCase{ + // No PreCheck for checking ENVs + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + Steps: []resource.TestStep{ + { + Config: testAccSdkProvider_request_timeout_inProviderBlock(context1), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("data.google_provider_config_sdk.default", "request_timeout", expectedValue), + ), + }, + { + Config: testAccSdkProvider_request_timeout_inProviderBlock(context2), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("data.google_provider_config_sdk.default", "request_timeout", expectedValue), + ), + }, + }, + }) +} + +func testAccSdkProvider_request_timeout_emptyStringValidation(t *testing.T) { + acctest.SkipIfVcr(t) // Test doesn't interact with API + + context := map[string]interface{}{ + "request_timeout": "", // empty string used + } + + acctest.VcrTest(t, resource.TestCase{ + // No PreCheck for checking ENVs + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + Steps: []resource.TestStep{ + { + Config: testAccSdkProvider_request_timeout_inProviderBlock(context), + ExpectError: regexp.MustCompile("invalid duration"), + }, + }, + }) +} + +// testAccSdkProvider_request_timeout_inProviderBlock allows setting the request_timeout argument in a provider block. +// This function uses data.google_provider_config_sdk because it is implemented with the SDKv2 +func testAccSdkProvider_request_timeout_inProviderBlock(context map[string]interface{}) string { + return acctest.Nprintf(` +provider "google" { + request_timeout = "%{request_timeout}" +} + +data "google_provider_config_sdk" "default" {} +`, context) +} From 61046abedbed138cefe4ab3391484ceb700aa5c7 Mon Sep 17 00:00:00 2001 From: Sarah French Date: Fri, 27 Sep 2024 10:56:46 +0100 Subject: [PATCH 2/8] Fix some comments --- .../fwprovider/framework_provider_access_token_test.go.tmpl | 2 +- .../terraform/provider/provider_request_timeout_test.go | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/mmv1/third_party/terraform/fwprovider/framework_provider_access_token_test.go.tmpl b/mmv1/third_party/terraform/fwprovider/framework_provider_access_token_test.go.tmpl index c85685f99654..ccc304e8cad1 100644 --- a/mmv1/third_party/terraform/fwprovider/framework_provider_access_token_test.go.tmpl +++ b/mmv1/third_party/terraform/fwprovider/framework_provider_access_token_test.go.tmpl @@ -267,7 +267,7 @@ func testAccFwProvider_access_token_authInUse(t *testing.T) { {{- end }} // testAccFwProvider_access_tokenInProviderBlock allows setting the access_token argument in a provider block. -// This function uses data.google_provider_config_plugin_framework because it is implemented with the SDKv2 +// This function uses data.google_provider_config_plugin_framework because it is implemented with the PF func testAccFwProvider_access_tokenInProviderBlock(context map[string]interface{}) string { return acctest.Nprintf(` provider "google" { diff --git a/mmv1/third_party/terraform/provider/provider_request_timeout_test.go b/mmv1/third_party/terraform/provider/provider_request_timeout_test.go index 836ce3c51891..634f5f27cbeb 100644 --- a/mmv1/third_party/terraform/provider/provider_request_timeout_test.go +++ b/mmv1/third_party/terraform/provider/provider_request_timeout_test.go @@ -1,5 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 package provider_test import ( From 10e02eac72327ed4622f98913a4500238a24217f Mon Sep 17 00:00:00 2001 From: Sarah French Date: Fri, 27 Sep 2024 11:06:59 +0100 Subject: [PATCH 3/8] Expose `request_timeout` data via `FrameworkProviderConfig` struct and `google_provider_config_plugin_framework` data source --- .../fwprovider/data_source_provider_config_plugin_framework.go | 2 +- mmv1/third_party/terraform/fwtransport/framework_config.go.tmpl | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/mmv1/third_party/terraform/fwprovider/data_source_provider_config_plugin_framework.go b/mmv1/third_party/terraform/fwprovider/data_source_provider_config_plugin_framework.go index c70983059afb..e20e13e7327f 100644 --- a/mmv1/third_party/terraform/fwprovider/data_source_provider_config_plugin_framework.go +++ b/mmv1/third_party/terraform/fwprovider/data_source_provider_config_plugin_framework.go @@ -215,7 +215,7 @@ func (d *GoogleProviderConfigPluginFrameworkDataSource) Read(ctx context.Context data.Scopes = d.providerConfig.Scopes data.UserProjectOverride = d.providerConfig.UserProjectOverride // TODO(SarahFrench) - request_reason - // TODO(SarahFrench) - request_timeout + data.RequestTimeout = d.providerConfig.RequestTimeout data.DefaultLabels = d.providerConfig.DefaultLabels // TODO(SarahFrench) - add_terraform_attribution_label // TODO(SarahFrench) - terraform_attribution_label_addition_strategy diff --git a/mmv1/third_party/terraform/fwtransport/framework_config.go.tmpl b/mmv1/third_party/terraform/fwtransport/framework_config.go.tmpl index c43ba36f7939..debc056d0253 100644 --- a/mmv1/third_party/terraform/fwtransport/framework_config.go.tmpl +++ b/mmv1/third_party/terraform/fwtransport/framework_config.go.tmpl @@ -37,6 +37,7 @@ type FrameworkProviderConfig struct { Credentials types.String AccessToken types.String ImpersonateServiceAccount types.String + RequestTimeout types.String // End temporary BillingProject types.String @@ -107,6 +108,7 @@ func (p *FrameworkProviderConfig) LoadAndValidateFramework(ctx context.Context, p.Credentials = data.Credentials p.AccessToken = data.AccessToken p.ImpersonateServiceAccount = data.ImpersonateServiceAccount + p.RequestTimeout = data.RequestTimeout // End temporary // Copy values from the ProviderModel struct containing data about the provider configuration (present only when responsing to ConfigureProvider rpc calls) From 8cc3271d999c4b4b1e9300b9920d864818e2a9b3 Mon Sep 17 00:00:00 2001 From: Sarah French Date: Fri, 27 Sep 2024 11:07:24 +0100 Subject: [PATCH 4/8] Add acceptance tests for request_timeout in the PF provider, highlight difference vs SDK --- ...framework_provider_request_timeout_test.go | 105 ++++++++++++++++++ .../provider/provider_request_timeout_test.go | 2 +- 2 files changed, 106 insertions(+), 1 deletion(-) create mode 100644 mmv1/third_party/terraform/fwprovider/framework_provider_request_timeout_test.go diff --git a/mmv1/third_party/terraform/fwprovider/framework_provider_request_timeout_test.go b/mmv1/third_party/terraform/fwprovider/framework_provider_request_timeout_test.go new file mode 100644 index 000000000000..10feb4188198 --- /dev/null +++ b/mmv1/third_party/terraform/fwprovider/framework_provider_request_timeout_test.go @@ -0,0 +1,105 @@ +package fwprovider_test + +import ( + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-google/google/acctest" +) + +// TestAccFwProvider_request_timeout is a series of acc tests asserting how the PF provider handles request_timeout arguments +// It is PF specific because the HCL used provisions PF-implemented resources +// It is a counterpart to TestAccSdkProvider_request_timeout +func TestAccFwProvider_request_timeout(t *testing.T) { + testCases := map[string]func(t *testing.T){ + // Configuring the provider using inputs + "request_timeout can be set in config in different formats, are NOT normalized to full-length format": testAccFwProvider_request_timeout_setInConfig, + //no ENVs to test + + // Schema-level validation + "when request_timeout is set to an empty string in the config the value fails validation, as it is not a duration": testAccFwProvider_request_timeout_emptyStringValidation, + + // Usage + // We cannot test the impact of this field in an acc test + } + + for name, tc := range testCases { + // shadow the tc variable into scope so that when + // the loop continues, if t.Run hasn't executed tc(t) + // yet, we don't have a race condition + // see https://github.com/golang/go/wiki/CommonMistakes#using-goroutines-on-loop-iterator-variables + tc := tc + t.Run(name, func(t *testing.T) { + tc(t) + }) + } +} + +func testAccFwProvider_request_timeout_setInConfig(t *testing.T) { + acctest.SkipIfVcr(t) // Test doesn't interact with API + + providerTimeout1 := "3m0s" + providerTimeout2 := "3m" + + // In the SDK version of the test expectedValue = "3m0s" only + expectedValue1 := "3m0s" + expectedValue2 := "3m" + + context1 := map[string]interface{}{ + "request_timeout": providerTimeout1, + } + context2 := map[string]interface{}{ + "request_timeout": providerTimeout2, + } + + acctest.VcrTest(t, resource.TestCase{ + // No PreCheck for checking ENVs + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + Steps: []resource.TestStep{ + { + Config: testAccFwProvider_request_timeout_inProviderBlock(context1), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("data.google_provider_config_plugin_framework.default", "request_timeout", expectedValue1), + ), + }, + { + Config: testAccFwProvider_request_timeout_inProviderBlock(context2), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("data.google_provider_config_plugin_framework.default", "request_timeout", expectedValue2), + ), + }, + }, + }) +} + +func testAccFwProvider_request_timeout_emptyStringValidation(t *testing.T) { + acctest.SkipIfVcr(t) // Test doesn't interact with API + + context := map[string]interface{}{ + "request_timeout": "", // empty string used + } + + acctest.VcrTest(t, resource.TestCase{ + // No PreCheck for checking ENVs + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + Steps: []resource.TestStep{ + { + Config: testAccFwProvider_request_timeout_inProviderBlock(context), + ExpectError: regexp.MustCompile("invalid duration"), + }, + }, + }) +} + +// testAccFwProvider_request_timeout_inProviderBlock allows setting the request_timeout argument in a provider block. +// This function uses data.google_provider_config_plugin_framework because it is implemented with the PF +func testAccFwProvider_request_timeout_inProviderBlock(context map[string]interface{}) string { + return acctest.Nprintf(` +provider "google" { + request_timeout = "%{request_timeout}" +} + +data "google_provider_config_plugin_framework" "default" {} +`, context) +} diff --git a/mmv1/third_party/terraform/provider/provider_request_timeout_test.go b/mmv1/third_party/terraform/provider/provider_request_timeout_test.go index 634f5f27cbeb..98251286249b 100644 --- a/mmv1/third_party/terraform/provider/provider_request_timeout_test.go +++ b/mmv1/third_party/terraform/provider/provider_request_timeout_test.go @@ -14,7 +14,7 @@ import ( func TestAccSdkProvider_request_timeout(t *testing.T) { testCases := map[string]func(t *testing.T){ // Configuring the provider using inputs - "request_timeout can be set in config in different formats": testAccSdkProvider_request_timeout_setInConfig, + "request_timeout can be set in config in different formats, are normalized to full-length format": testAccSdkProvider_request_timeout_setInConfig, //no ENVs to test // Schema-level validation From 64fca87c384e1fbeb047f28a2187094c05567d4c Mon Sep 17 00:00:00 2001 From: Sarah French Date: Fri, 27 Sep 2024 14:38:15 +0100 Subject: [PATCH 5/8] Add test cases covering default values used when there's no input --- ...framework_provider_request_timeout_test.go | 27 +++++++++++++++++++ .../provider/provider_request_timeout_test.go | 25 +++++++++++++++++ 2 files changed, 52 insertions(+) diff --git a/mmv1/third_party/terraform/fwprovider/framework_provider_request_timeout_test.go b/mmv1/third_party/terraform/fwprovider/framework_provider_request_timeout_test.go index 10feb4188198..120afe6b9949 100644 --- a/mmv1/third_party/terraform/fwprovider/framework_provider_request_timeout_test.go +++ b/mmv1/third_party/terraform/fwprovider/framework_provider_request_timeout_test.go @@ -14,6 +14,7 @@ import ( func TestAccFwProvider_request_timeout(t *testing.T) { testCases := map[string]func(t *testing.T){ // Configuring the provider using inputs + "a default value of 120s is used when there are no user inputs": testAccFwProvider_request_timeout_providerDefault, "request_timeout can be set in config in different formats, are NOT normalized to full-length format": testAccFwProvider_request_timeout_setInConfig, //no ENVs to test @@ -36,6 +37,25 @@ func TestAccFwProvider_request_timeout(t *testing.T) { } } +func testAccFwProvider_request_timeout_providerDefault(t *testing.T) { + acctest.SkipIfVcr(t) // Test doesn't interact with API + + defaultValue := "120s" + + acctest.VcrTest(t, resource.TestCase{ + // No PreCheck for checking ENVs + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + Steps: []resource.TestStep{ + { + Config: testAccFwProvider_request_timeout_unset(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("data.google_provider_config_plugin_framework.default", "request_timeout", defaultValue), + ), + }, + }, + }) +} + func testAccFwProvider_request_timeout_setInConfig(t *testing.T) { acctest.SkipIfVcr(t) // Test doesn't interact with API @@ -103,3 +123,10 @@ provider "google" { data "google_provider_config_plugin_framework" "default" {} `, context) } + +// testAccFwProvider_request_timeout_inEnvsOnly allows testing when the request_timeout argument is not set +func testAccFwProvider_request_timeout_unset() string { + return ` +data "google_provider_config_plugin_framework" "default" {} +` +} diff --git a/mmv1/third_party/terraform/provider/provider_request_timeout_test.go b/mmv1/third_party/terraform/provider/provider_request_timeout_test.go index 98251286249b..fce351d5e896 100644 --- a/mmv1/third_party/terraform/provider/provider_request_timeout_test.go +++ b/mmv1/third_party/terraform/provider/provider_request_timeout_test.go @@ -14,6 +14,7 @@ import ( func TestAccSdkProvider_request_timeout(t *testing.T) { testCases := map[string]func(t *testing.T){ // Configuring the provider using inputs + "a default value of 0s is used when there are no user inputs (it is overridden downstream)": testAccSdkProvider_request_timeout_providerDefault, "request_timeout can be set in config in different formats, are normalized to full-length format": testAccSdkProvider_request_timeout_setInConfig, //no ENVs to test @@ -36,6 +37,23 @@ func TestAccSdkProvider_request_timeout(t *testing.T) { } } +func testAccSdkProvider_request_timeout_providerDefault(t *testing.T) { + acctest.SkipIfVcr(t) // Test doesn't interact with API + + acctest.VcrTest(t, resource.TestCase{ + // No PreCheck for checking ENVs + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + Steps: []resource.TestStep{ + { + Config: testAccSdkProvider_request_timeout_unset(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("data.google_provider_config_sdk.default", "request_timeout", "0s"), + ), + }, + }, + }) +} + func testAccSdkProvider_request_timeout_setInConfig(t *testing.T) { acctest.SkipIfVcr(t) // Test doesn't interact with API @@ -100,3 +118,10 @@ provider "google" { data "google_provider_config_sdk" "default" {} `, context) } + +// testAccSdkProvider_request_timeout_inEnvsOnly allows testing when the request_timeout argument is not set +func testAccSdkProvider_request_timeout_unset() string { + return ` +data "google_provider_config_sdk" "default" {} +` +} From 86828c95c81349b328acac6318fa981dc89885ea Mon Sep 17 00:00:00 2001 From: Sarah French Date: Fri, 27 Sep 2024 14:38:37 +0100 Subject: [PATCH 6/8] Add test case for impact of the timeout, but only for the SDK tests --- ...framework_provider_request_timeout_test.go | 2 +- .../provider/provider_request_timeout_test.go | 51 ++++++++++++++++++- 2 files changed, 51 insertions(+), 2 deletions(-) diff --git a/mmv1/third_party/terraform/fwprovider/framework_provider_request_timeout_test.go b/mmv1/third_party/terraform/fwprovider/framework_provider_request_timeout_test.go index 120afe6b9949..aa22b6a496f5 100644 --- a/mmv1/third_party/terraform/fwprovider/framework_provider_request_timeout_test.go +++ b/mmv1/third_party/terraform/fwprovider/framework_provider_request_timeout_test.go @@ -22,7 +22,7 @@ func TestAccFwProvider_request_timeout(t *testing.T) { "when request_timeout is set to an empty string in the config the value fails validation, as it is not a duration": testAccFwProvider_request_timeout_emptyStringValidation, // Usage - // We cannot test the impact of this field in an acc test + // We cannot test the impact of this field in an acc test until more resources/data sources are implemented with the plugin-framework } for name, tc := range testCases { diff --git a/mmv1/third_party/terraform/provider/provider_request_timeout_test.go b/mmv1/third_party/terraform/provider/provider_request_timeout_test.go index fce351d5e896..5c45eb96bd3e 100644 --- a/mmv1/third_party/terraform/provider/provider_request_timeout_test.go +++ b/mmv1/third_party/terraform/provider/provider_request_timeout_test.go @@ -22,7 +22,7 @@ func TestAccSdkProvider_request_timeout(t *testing.T) { "when request_timeout is set to an empty string in the config the value fails validation, as it is not a duration": testAccSdkProvider_request_timeout_emptyStringValidation, // Usage - // We cannot test the impact of this field in an acc test + "short timeouts impact provisioning resources": testAccSdkProvider_request_timeout_usage, } for name, tc := range testCases { @@ -107,6 +107,38 @@ func testAccSdkProvider_request_timeout_emptyStringValidation(t *testing.T) { }) } +func testAccSdkProvider_request_timeout_usage(t *testing.T) { + acctest.SkipIfVcr(t) // Test doesn't interact with API + + shortTimeout := "10ms" // short time that will result in an error + longTimeout := "120s" + + context1 := map[string]interface{}{ + "request_timeout": shortTimeout, + "random_suffix": acctest.RandString(t, 10), + } + context2 := map[string]interface{}{ + "request_timeout": longTimeout, + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + // No PreCheck for checking ENVs + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + Steps: []resource.TestStep{ + { + Config: testAccSdkProvider_request_timeout_provisionWithTimeout(context1), + // Effect of request_timeout value + ExpectError: regexp.MustCompile("context deadline exceeded"), + }, + { + Config: testAccSdkProvider_request_timeout_provisionWithTimeout(context2), + // No error; everything is fine with an appropriate timeout value + }, + }, + }) +} + // testAccSdkProvider_request_timeout_inProviderBlock allows setting the request_timeout argument in a provider block. // This function uses data.google_provider_config_sdk because it is implemented with the SDKv2 func testAccSdkProvider_request_timeout_inProviderBlock(context map[string]interface{}) string { @@ -119,6 +151,23 @@ data "google_provider_config_sdk" "default" {} `, context) } +// testAccSdkProvider_request_timeout_provisionWithTimeout allows testing the effects of request_timeout on +// provisioning a resource. +func testAccSdkProvider_request_timeout_provisionWithTimeout(context map[string]interface{}) string { + return acctest.Nprintf(` +provider "google" { + request_timeout = "%{request_timeout}" +} + +data "google_provider_config_sdk" "default" {} + +resource "google_service_account" "default" { + account_id = "tf-test-%{random_suffix}" + display_name = "AccTest Service Account" +} +`, context) +} + // testAccSdkProvider_request_timeout_inEnvsOnly allows testing when the request_timeout argument is not set func testAccSdkProvider_request_timeout_unset() string { return ` From 72acfb600ef64ad7b19a39aac2ea78ff13507e59 Mon Sep 17 00:00:00 2001 From: Sarah French <15078782+SarahFrench@users.noreply.github.com> Date: Tue, 1 Oct 2024 11:10:31 +0100 Subject: [PATCH 7/8] Make random_suffix consistent --- .../terraform/provider/provider_request_timeout_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mmv1/third_party/terraform/provider/provider_request_timeout_test.go b/mmv1/third_party/terraform/provider/provider_request_timeout_test.go index 5c45eb96bd3e..99a75dbc266c 100644 --- a/mmv1/third_party/terraform/provider/provider_request_timeout_test.go +++ b/mmv1/third_party/terraform/provider/provider_request_timeout_test.go @@ -113,13 +113,14 @@ func testAccSdkProvider_request_timeout_usage(t *testing.T) { shortTimeout := "10ms" // short time that will result in an error longTimeout := "120s" + randomString := acctest.RandString(t, 10) context1 := map[string]interface{}{ "request_timeout": shortTimeout, - "random_suffix": acctest.RandString(t, 10), + "random_suffix": randomString, } context2 := map[string]interface{}{ "request_timeout": longTimeout, - "random_suffix": acctest.RandString(t, 10), + "random_suffix": randomString, } acctest.VcrTest(t, resource.TestCase{ From fb6d664580faa235183462a064e67643bc9a8d2c Mon Sep 17 00:00:00 2001 From: Mauricio Alvarez Leon <65101411+BBBmau@users.noreply.github.com> Date: Fri, 18 Oct 2024 12:23:21 -0700 Subject: [PATCH 8/8] Update mmv1/third_party/terraform/provider/provider_request_timeout_test.go Co-authored-by: Sarah French <15078782+SarahFrench@users.noreply.github.com> --- .../terraform/provider/provider_request_timeout_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mmv1/third_party/terraform/provider/provider_request_timeout_test.go b/mmv1/third_party/terraform/provider/provider_request_timeout_test.go index 99a75dbc266c..cd57877a8bf4 100644 --- a/mmv1/third_party/terraform/provider/provider_request_timeout_test.go +++ b/mmv1/third_party/terraform/provider/provider_request_timeout_test.go @@ -37,6 +37,9 @@ func TestAccSdkProvider_request_timeout(t *testing.T) { } } +// In the SDK version of the provider config code request_timeout has a zero value of "0s" and no default. +// The final 'effective' value is "120s", matching the default used in the plugin-framework version of the provider config code. +// See : https://github.com/hashicorp/terraform-provider-google/blob/09cb850ee64bcd78e4457df70905530c1ed75f19/google/transport/config.go#L1228-L1233 func testAccSdkProvider_request_timeout_providerDefault(t *testing.T) { acctest.SkipIfVcr(t) // Test doesn't interact with API