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) {