Skip to content

Commit

Permalink
remove need for provider-level project from service networking connec…
Browse files Browse the repository at this point in the history
…tion resource (#4445)

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored and danawillow committed Sep 13, 2019
1 parent f491302 commit ef6394c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions google/resource_service_networking_connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,12 @@ func resourceServiceNetworkingConnectionDelete(d *schema.ResourceData, meta inte
obj["name"] = peering
url := fmt.Sprintf("%s%s/removePeering", config.ComputeBasePath, serviceNetworkingNetworkName)

project, err := getProject(d, config)
networkFieldValue, err := ParseNetworkFieldValue(network, d, config)
if err != nil {
return err
return errwrap.Wrapf("Failed to retrieve network field value, err: {{err}}", err)
}

project := networkFieldValue.Project
res, err := sendRequestWithTimeout(config, "POST", project, url, obj, d.Timeout(schema.TimeoutUpdate))
if err != nil {
return handleNotFoundError(err, d, fmt.Sprintf("ServiceNetworkingConnection %q", d.Id()))
Expand Down

0 comments on commit ef6394c

Please sign in to comment.