Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for Npa 208 #404

Merged
merged 1 commit into from
Oct 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions infoblox/resource_infoblox_ip_allocation.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func resourceIPAllocation() *schema.Resource {
Description: "IPv4 address of cloud instance." +
"Set a valid IP address for static allocation and leave empty if dynamically allocated.",
DiffSuppressFunc: func(k, oldValue, newValue string, d *schema.ResourceData) bool {
return newValue == ""
return newValue == "" && oldValue == newValue
},
},
"allocated_ipv4_addr": {
Expand All @@ -108,10 +108,13 @@ func resourceIPAllocation() *schema.Resource {
Description: "IPv6 address of cloud instance." +
"Set a valid IP address for static allocation and leave empty if dynamically allocated.",
StateFunc: func(val interface{}) string {
if val == "" {
return ""
}
return normalizeIPAddress(val)
},
DiffSuppressFunc: func(k, oldValue, newValue string, d *schema.ResourceData) bool {
return newValue == ""
return newValue == "" && oldValue == newValue
},
},
"allocated_ipv6_addr": {
Expand Down