-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
provider/azure: Some changes to azurerm_network_interface are ignored #6796
Comments
Even if it's not currently managed by TF, I think it should be included. It could be passed in as a variable, or be provisioned through the CLI with |
Hi @Bowbaq I will try and get this updated now to work with the load balancer stuff. I don't have any load balancers to test this with though (thus why i left it out of this update) P. |
I use the following diff in combination with #6429 and #6467 diff --git a/builtin/providers/azurerm/resource_arm_network_interface_card.go b/builtin/providers/azurerm/resource_arm_network_interface_card.go
index 174afc5..a165051 100644
--- a/builtin/providers/azurerm/resource_arm_network_interface_card.go
+++ b/builtin/providers/azurerm/resource_arm_network_interface_card.go
@@ -345,6 +345,11 @@ func resourceArmNetworkInterfaceIpConfigurationHash(v interface{}) int {
buf.WriteString(fmt.Sprintf("%s-", m["public_ip_address_id"].(string)))
}
+ pools := m["load_balancer_backend_address_pools_ids"].(*schema.Set).List()
+ for _, p := range pools {
+ buf.WriteString(fmt.Sprintf("%s-", p.(string)))
+ }
+
return hashcode.String(buf.String())
} Perhaps this could be included in one of the open load balancer pull requests as it's not really needed without the load balancer functionality. |
@Bowbaq those properties are written to the hash now if present, should resolve your issue :). |
Closed via #6429 |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Terraform Version
Terraform v0.7.0-dev (84a0a32b1947f52deeac344ec5e49393e8a432e1)
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
Adding the
load_balancer_backend_address_pools_ids
key should trigger an update or the network interfaceActual Behavior
The change of configuration is not detected by Terraform
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
load_balancer_backend_address_pools_ids
load_balancer_backend_address_pools_ids
and runterraform plan
References
I believe the problem is the hash function for the sub-resource:
terraform/builtin/providers/azurerm/resource_arm_network_interface_card.go
Lines 326 to 334 in 156d291
Some of the keys are hashed, but not all of them. I'm not sure why that is. Rewriting it as the following seems to fix the diff problem, but might have undesirable side-effects:
The text was updated successfully, but these errors were encountered: