Skip to content

Commit

Permalink
remove network url custom expand for workbench instance (#10931) (#18404
Browse files Browse the repository at this point in the history
)

[upstream:1a50dca365227e563f105288d6324700ed0f7dab]

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Jun 11, 2024
1 parent 18df124 commit 71426f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .changelog/10931.txt
Original file line number Diff line number Diff line change
@@ -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
```
11 changes: 1 addition & 10 deletions google/services/workbench/resource_workbench_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 71426f3

Please sign in to comment.