Giter Site home page Giter Site logo

Comments (8)

bodgit avatar bodgit commented on June 18, 2024

I raised #13 to fix this for IPv6 records nearly three months ago and have so far had no feedback. The IPv6 failure case is more obvious as you have the :: expansion to handle; some resources return the IPv6 address in attributes fully expanded whereas miekg/dns compresses the address where possible so they sometimes will never match.

I can easily extend my patch to also canonicalise IPv4 addresses using the same technique.

from terraform-provider-dns.

cdybedahl avatar cdybedahl commented on June 18, 2024

Yes, it was the IPv6 case that I first ran into (Digital Ocean returns IPv6 addresses for droplets in an expanded form), and when I looked into it I saw that it can happen for IPv4 as well. And it would seem to make more sense to have one patch for both problems, since they are essentially the same.

from terraform-provider-dns.

bodgit avatar bodgit commented on June 18, 2024

I also encountered it for DO droplets 😄

The IPv4 case is interesting as some tools will treat the zero-padding as an octal number so your example works fine but for numbers greater than 007 different tools interpret it differently. I've just checked Go and its net.ParseIP() seems to just see leading zeros as padding rather than treat the number as octal.

See https://superuser.com/questions/857603/are-ip-addresses-with-and-without-leading-zeroes-the-same/857787 for a discussion.

from terraform-provider-dns.

bodgit avatar bodgit commented on June 18, 2024

I've updated my PR #13 to also cover IPv4 addresses.

from terraform-provider-dns.

apparentlymart avatar apparentlymart commented on June 18, 2024

Hi @cdybedahl and @bodgit!

Sorry for the slow response here. I've now merged #13, so this issue should be fixed in master.

from terraform-provider-dns.

katbyte avatar katbyte commented on June 18, 2024

As mentioned above, looks like this was fixed by #13.

from terraform-provider-dns.

katbyte avatar katbyte commented on June 18, 2024

Hi @cdybedahl,

Just wanted to let you know that we have released v2.0.0 of the provider containing the fix 🙂

from terraform-provider-dns.

cdybedahl avatar cdybedahl commented on June 18, 2024

Excellent. Thank you!

from terraform-provider-dns.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.