Merge pull request #6790 from hashicorp/b-arm-nic-iphash

provider/azurerm: `azurerm_network_interface` diffs didn't match during apply
This commit is contained in:
James Nugent 2016-05-20 16:56:12 -05:00
commit 3356acc1f7
1 changed files with 6 additions and 0 deletions

View File

@ -337,7 +337,13 @@ func resourceArmNetworkInterfaceIpConfigurationHash(v interface{}) int {
m := v.(map[string]interface{})
buf.WriteString(fmt.Sprintf("%s-", m["name"].(string)))
buf.WriteString(fmt.Sprintf("%s-", m["subnet_id"].(string)))
if m["private_ip_address"] != nil {
buf.WriteString(fmt.Sprintf("%s-", m["private_ip_address"].(string)))
}
buf.WriteString(fmt.Sprintf("%s-", m["private_ip_address_allocation"].(string)))
if m["public_ip_address_id"] != nil {
buf.WriteString(fmt.Sprintf("%s-", m["public_ip_address_id"].(string)))
}
return hashcode.String(buf.String())
}