Open danimo opened 2 years ago
I agree, this would be great.
We had some hardcoded rules to create PTR names, for one of the zone, which was /24, but then we provisioned some other ones which were living in 10.x.x.x, which is /8 zone, so our octet reversing logic not only did not reverse it correctly, it was trying to create entry in non-existing zone.
We fixed it, but this is ugly
A function, output, or something that would make it work out of the box would be awesome.
Actual Behavior
When creating reverse pointers, one has to resort to terraform primitives to transform a given IP to a revere transcription for the PTR record. This works for IPv4, but not for IPv6. For v6 ptrs one could resort to external commands, but this would no longer be idempotent.
Expected Behavior
Provide a utility function that accepts a forward IP address as
name
and produces a PTR record which it forwards to pdns, e.g.name = to_ptr("192.168.1.1")
. Another alternative is to provide a dedicated ptr record resource, similar to the Aure DNS Provider.