Skip to content

Commit 20c4bfc

Browse files
add two fields to ForceSendFields (#4580) (#8650)
Signed-off-by: Modular Magician <magic-modules@google.com>
1 parent 913d98a commit 20c4bfc

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

.changelog/4580.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:bug
2+
container: Fixed updates on `export_custom_routes` and `import_custom_routes` in `google_compute_network_peering`
3+
```

google/resource_compute_network_peering.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ func expandNetworkPeering(d *schema.ResourceData) *compute.NetworkPeering {
299299
ImportCustomRoutes: d.Get("import_custom_routes").(bool),
300300
ExportSubnetRoutesWithPublicIp: d.Get("export_subnet_routes_with_public_ip").(bool),
301301
ImportSubnetRoutesWithPublicIp: d.Get("import_subnet_routes_with_public_ip").(bool),
302-
ForceSendFields: []string{"ExportSubnetRoutesWithPublicIp"},
302+
ForceSendFields: []string{"ExportSubnetRoutesWithPublicIp", "ImportCustomRoutes", "ExportCustomRoutes"},
303303
}
304304
}
305305

google/resource_compute_network_peering_test.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,15 @@ func TestAccComputeNetworkPeering_customRoutesUpdate(t *testing.T) {
9090
ImportStateVerify: true,
9191
ImportStateId: importId,
9292
},
93+
{
94+
Config: testAccComputeNetworkPeeringDefaultCustomRoutes(primaryNetworkName, peeringName, suffix),
95+
},
96+
{
97+
ResourceName: "google_compute_network_peering.bar",
98+
ImportState: true,
99+
ImportStateVerify: true,
100+
ImportStateId: importId,
101+
},
93102
},
94103
})
95104
}

0 commit comments

Comments
 (0)