Skip to content

Commit

Permalink
Apply dsf to google_compute_health_check port value with no portspec (#…
Browse files Browse the repository at this point in the history
…4143) (#7623)

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Oct 23, 2020
1 parent 1671926 commit 6655ef4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .changelog/4143.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
compute: fixed an issue where `google_compute_health_check` `port` values caused a diff when `port_specification` was unset or set to `""`
```
2 changes: 1 addition & 1 deletion google/resource_compute_health_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func portDiffSuppress(k, old, new string, d *schema.ResourceData) bool {
newPort, _ := strconv.Atoi(new)

portSpec := d.Get(b[0] + ".0.port_specification")
if int64(oldPort) == defaultPort && newPort == 0 && portSpec == "USE_FIXED_PORT" {
if int64(oldPort) == defaultPort && newPort == 0 && (portSpec == "USE_FIXED_PORT" || portSpec == "") {
return true
}
}
Expand Down

0 comments on commit 6655ef4

Please sign in to comment.