netascode / terraform-aci-nac-aci

Terraform Cisco ACI Nexus-as-Code Module
https://registry.terraform.io/modules/netascode/nac-aci/aci
Apache License 2.0
18 stars 14 forks source link

Fix issue with OSPF area #21

Closed andbyrne closed 8 months ago

andbyrne commented 8 months ago

The OSPF area as a number could be from 1 to 4294967295. The text "0.0.0." should not be prepended to this number.

danischm commented 8 months ago

If we remove the leading zeros, a subsequent read operation would consider this a config drift as APIC always translates this to the dotted notation. We would need to find a way/function to translate all integer values to the dotted notation.

andbyrne commented 8 months ago

If we remove the leading zeros, a subsequent read operation would consider this a config drift as APIC always translates this to the dotted notation. We would need to find a way/function to translate all integer values to the dotted notation.

That explains the code, although it only works for integers from 1 to 255.

The aci_l3out module is expecting an integer, an IP, or "backbone".

Either module could perform the conversion from integer to IP but I believe it would make sense for the aci_l3out module to do so since it contains the actual resource.

danischm commented 8 months ago

Yes, it was a dirty workaround and I would agree that it should be implemented in the low-level module.

andbyrne commented 8 months ago

Submitted https://github.com/netascode/terraform-aci-l3out/pull/18 to perform the translation.