Skip to content

Commit

Permalink
add two fields to ForceSendFields (hashicorp#4580) (hashicorp#3045)
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Mar 11, 2021
1 parent 5110e33 commit 96d8770
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .changelog/4580.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
container: Fixed updates on `export_custom_routes` and `import_custom_routes` in `google_compute_network_peering`
```
2 changes: 1 addition & 1 deletion google-beta/resource_compute_network_peering.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ func expandNetworkPeering(d *schema.ResourceData) *compute.NetworkPeering {
ImportCustomRoutes: d.Get("import_custom_routes").(bool),
ExportSubnetRoutesWithPublicIp: d.Get("export_subnet_routes_with_public_ip").(bool),
ImportSubnetRoutesWithPublicIp: d.Get("import_subnet_routes_with_public_ip").(bool),
ForceSendFields: []string{"ExportSubnetRoutesWithPublicIp"},
ForceSendFields: []string{"ExportSubnetRoutesWithPublicIp", "ImportCustomRoutes", "ExportCustomRoutes"},
}
}

Expand Down
9 changes: 9 additions & 0 deletions google-beta/resource_compute_network_peering_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,15 @@ func TestAccComputeNetworkPeering_customRoutesUpdate(t *testing.T) {
ImportStateVerify: true,
ImportStateId: importId,
},
{
Config: testAccComputeNetworkPeeringDefaultCustomRoutes(primaryNetworkName, peeringName, suffix),
},
{
ResourceName: "google_compute_network_peering.bar",
ImportState: true,
ImportStateVerify: true,
ImportStateId: importId,
},
},
})
}
Expand Down
3 changes: 1 addition & 2 deletions google-beta/resource_dataproc_cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"

"google.golang.org/api/googleapi"

dataproc "google.golang.org/api/dataproc/v1beta2"
"google.golang.org/api/googleapi"
)

func TestDataprocExtractInitTimeout(t *testing.T) {
Expand Down

0 comments on commit 96d8770

Please sign in to comment.