Skip to content
This repository has been archived by the owner on Aug 11, 2024. It is now read-only.

network_ip attribute #9

Open
poroping opened this issue Apr 7, 2021 · 1 comment
Open

network_ip attribute #9

poroping opened this issue Apr 7, 2021 · 1 comment
Assignees
Milestone

Comments

@poroping
Copy link

poroping commented Apr 7, 2021

Firstly, HUGE thanks for publishing this provider, much cleaner than the gross module I was using.

Is it possible to add another attribute, network_ip? I have a network device where the API accepts various input formats but always outputs "ip mask". In certain config areas (ospf/bgp networks) it also accepts and converts host addresses to network addresses.

Having this attribute would allow me to use

"${data.cidr_network.example.network_ip} ${data.cidr_network.example.mask}"

Instead of

"${split("/", data.cidr_network.example.network)[0]} ${data.cidr_network.example.mask}"
  + debug = {
      + broadcast  = "192.168.2.63"
      + first_ip   = "192.168.2.57"
      + id         = "192.168.2.56/29"
      + ip         = "192.168.2.58"
      + last_ip    = "192.168.2.62"
      + mask       = "255.255.255.248"
      + mask_bits  = 29
      + network    = "192.168.2.56/29"
      + network_ip = "192.168.2.56"
      + prefix     = "192.168.2.58/29"
    }
@joakimhellum
Copy link
Member

Hi, @poroping

Thanks for raising this issue. This will be included in next (v0.1.1) release within next 1-2 days. Sorry about the unfortunate naming here, we should fix this for v0.2.0 release.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants