Closed evelynhathaway closed 1 year ago
As an example for the automatic format use case, say a developer uses cidr-tools
to merge
their network blocks. They use Terraform to manage a resource with their merged network with their cloud provider.
Without this feature, Terraform will report that their CIDR blocks changed by their cloud provider every time.
I could see having a separate function to "uncompress", e.g. the opposite of normalize
.
That would also be a great solution! Nice idea
I notice the logic for compressing the IP for normalize
is from silverwind/ip-bigint
. Should the uncompression logic live in there?
Both modules now take a compress
option and ip-bigint
now also exports a normalizeIp
function.
Some services only support or automatically format compressed syntax as the expanded representation of the IPV6 address. A new feature to disable the compression of zeros in IPv6 would be helpful in those cases.
Compressed, default and current behavior:
fdff:1::
Expanded, proposed option:
fdff:0001:0000:0000:0000:0000:0000:0000