From 20716c29285bce1b815c8ad1a26ffb430d0d95c5 Mon Sep 17 00:00:00 2001 From: Edward Sun Date: Wed, 10 Mar 2021 10:11:22 -0800 Subject: [PATCH] add two fields to ForceSendFields --- .../resources/resource_compute_network_peering.go | 2 +- .../tests/resource_compute_network_peering_test.go | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/mmv1/third_party/terraform/resources/resource_compute_network_peering.go b/mmv1/third_party/terraform/resources/resource_compute_network_peering.go index 32b3fc089656..52e50c27f043 100644 --- a/mmv1/third_party/terraform/resources/resource_compute_network_peering.go +++ b/mmv1/third_party/terraform/resources/resource_compute_network_peering.go @@ -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"}, } } diff --git a/mmv1/third_party/terraform/tests/resource_compute_network_peering_test.go b/mmv1/third_party/terraform/tests/resource_compute_network_peering_test.go index 1dde189ec4fe..25ebeaaf8c25 100644 --- a/mmv1/third_party/terraform/tests/resource_compute_network_peering_test.go +++ b/mmv1/third_party/terraform/tests/resource_compute_network_peering_test.go @@ -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, + }, }, }) }