Skip to content

Commit

Permalink
Add ignore read on reservedIpRange field Filestore Instance (#8520) (#…
Browse files Browse the repository at this point in the history
…15614)

Signed-off-by: Modular Magician <magic-modules@google.com>
Co-authored-by: Shuya Ma <87669292+shuyama1@users.noreply.github.com>
  • Loading branch information
modular-magician and shuyama1 committed Aug 24, 2023
1 parent 8748e3c commit 9efbd46
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .changelog/8520.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
filestore: fixed a bug causing premadiff on `reserved_ip_range` field in `google_filestore_instance`
```
2 changes: 1 addition & 1 deletion google/services/filestore/resource_filestore_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ func flattenFilestoreInstanceNetworksModes(v interface{}, d *schema.ResourceData
}

func flattenFilestoreInstanceNetworksReservedIpRange(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} {
return v
return d.Get("networks.0.reserved_ip_range")
}

func flattenFilestoreInstanceNetworksIpAddresses(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} {
Expand Down
4 changes: 2 additions & 2 deletions google/services/filestore/resource_filestore_instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ func TestAccFilestoreInstance_reservedIpRange_update(t *testing.T) {
ResourceName: "google_filestore_instance.instance",
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"zone", "location"},
ImportStateVerifyIgnore: []string{"zone", "location", "networks.0.reserved_ip_range"},
},
{
Config: testAccFilestoreInstance_reservedIpRange_update2(name),
Expand All @@ -145,7 +145,7 @@ func TestAccFilestoreInstance_reservedIpRange_update(t *testing.T) {
ResourceName: "google_filestore_instance.instance",
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"zone", "location"},
ImportStateVerifyIgnore: []string{"zone", "location", "networks.0.reserved_ip_range"},
},
},
})
Expand Down

0 comments on commit 9efbd46

Please sign in to comment.