-
Notifications
You must be signed in to change notification settings - Fork 4.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
Bug: azurerm_dns_aaaa_record
- Normalize IPv6 addresses
#5459
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @phires,
Thanks for giving this a shot. I'm not sure we need the CompressIPv6Address
function, a suppress should do the trick. Could we add an acctest with an IP address exhibing the error? once thats done we can dig into this further. thanks!
Type: schema.TypeSet, | ||
Optional: true, | ||
Elem: &schema.Schema{ | ||
Type: schema.TypeString, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And we should add a validate.IPv6Address
👋 @phires, Is this reaady to be looked at outside the failing travis test? |
Pretty sure the validation function will allow the compressed form in, so it won't really help |
I've removed the unused import (shame on me), would be great to have a look onto this, why the DiffSuppressFunc is not working correctly. |
Hey @phires, i believe this is because we are trying to diff suppress on a set and they behave differently then a list. I think what we'll need to do is setup a custom hash function an a state migration to switch to the new hashs. |
@phires, I believe @katbyte is totally correct in her assessment of what is happening here. I was playing around with this too and added some debug spew to your code just to see what the values were when entering and exiting your function and what I saw is consistent with what @katbyte is saying: *** = Enter function
|
Yes, see my original PR text, I had added a similar func already ;) So, a custom hash function it is. Any pointers where to start? |
@phires sure, I played around with this a bit and here is what I did... In the
Then in the resource I updated the "records" schema
I also removed the Finally, I modified the expand function:
and the flatten function:
That's it... I think that should work, now all we need to do is to move the test cases and update them to use the new normalize functions and I think we are gold. 😃 |
@phires doing it this way I don't think we will need the state migration either, but play with it and see how it goes. |
👋 @phires just curious, did you want to make the changes to your code or are you ok with me pushing to your branch? Thanks again for the PR! |
Hi, I've implemented the changes and also build some tests for the new funcs. |
azurerm_dns_aaaa_record
- Normalize IPv6 addresses
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@phires thanks much for pushing those changes and adding the test cases. LGTM! 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this @phires, LGTM 👍
This has been released in version 1.43.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example: provider "azurerm" {
version = "~> 1.43.0"
}
# ... other configuration ... |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks! |
This is a work in progress try to fix issue #5321 .
Sadly somehow the DiffSuppressFunc does not compare the correct set values with each other - and I have no idea why.
If adding a logline to the func I get something like this:
Anyone any clues?