Skip to content

Commit

Permalink
Fix absoluteDomainSuppress to check more than one domain (#3711) (#2241)
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician authored Jun 26, 2020
1 parent 0eddadb commit 9eb8807
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .changelog/3711.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
compute: Fixed an issue in `google_compute_managed_ssl_certificate` where multiple fully qualified domain names would cause a permadiff
```
2 changes: 1 addition & 1 deletion google-beta/common_diff_suppress.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func rfc3339TimeDiffSuppress(k, old, new string, d *schema.ResourceData) bool {

// For managed SSL certs, if new is an absolute FQDN (trailing '.') but old isn't, treat them as equals.
func absoluteDomainSuppress(k, old, new string, _ *schema.ResourceData) bool {
if k == "managed.0.domains.0" {
if strings.HasPrefix(k, "managed.0.domains.") {
return old == strings.TrimRight(new, ".")
}
return old == new
Expand Down

0 comments on commit 9eb8807

Please sign in to comment.