From 71426f382b89bf6114419eed571bdf28a64a62d6 Mon Sep 17 00:00:00 2001 From: The Magician Date: Tue, 11 Jun 2024 15:01:46 -0700 Subject: [PATCH] remove network url custom expand for workbench instance (#10931) (#18404) [upstream:1a50dca365227e563f105288d6324700ed0f7dab] Signed-off-by: Modular Magician --- .changelog/10931.txt | 3 +++ .../services/workbench/resource_workbench_instance.go | 11 +---------- 2 files changed, 4 insertions(+), 10 deletions(-) create mode 100644 .changelog/10931.txt diff --git a/.changelog/10931.txt b/.changelog/10931.txt new file mode 100644 index 00000000000..03a78c74065 --- /dev/null +++ b/.changelog/10931.txt @@ -0,0 +1,3 @@ +```release-note:bug +workbench: fixed a bug in the `google_workbench_instance` resource where specifying a network in some scenarios would cause instance creation to fail +``` \ No newline at end of file diff --git a/google/services/workbench/resource_workbench_instance.go b/google/services/workbench/resource_workbench_instance.go index bf25c63a2fc..b5aee9d3a37 100644 --- a/google/services/workbench/resource_workbench_instance.go +++ b/google/services/workbench/resource_workbench_instance.go @@ -2044,16 +2044,7 @@ func expandWorkbenchInstanceGceSetupNetworkInterfaces(v interface{}, d tpgresour } func expandWorkbenchInstanceGceSetupNetworkInterfacesNetwork(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { - if v == nil || v.(string) == "" { - return "", nil - } else if strings.HasPrefix(v.(string), "https://") { - return v, nil - } - url, err := tpgresource.ReplaceVars(d, config, "{{ComputeBasePath}}"+v.(string)) - if err != nil { - return "", err - } - return tpgresource.ConvertSelfLinkToV1(url), nil + return v, nil } func expandWorkbenchInstanceGceSetupNetworkInterfacesSubnet(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) {