this post was submitted on 12 Nov 2023
1 points (100.0% liked)
Homelab
22 readers
1 users here now
Rules
- Be Civil.
- Post about your homelab, discussion of your homelab, questions you may have, or general discussion about transition your skill from the homelab to the workplace.
- No memes or potato images.
- We love detailed homelab builds, especially network diagrams!
- Report any posts that you feel should be brought to our attention.
- Please no shitposting or blogspam.
- No Referral Linking.
- Keep piracy discussion off of this community
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Automating router/networking configs is a whole thing in itself, it's mainly done in Python though. Like Netmiko, Genie, or Ansible (which is a wrapper around those packages).
Most routers don't have their own scripting language either. Most solutions are creating SSH tunnels and then running network commands.
It's also mostly stateless and not idempotent. Which is why you aren't going to find many routers that have good terraform support, it's stateful. (How do you reverse commands in a way that doesn't destroy the router?)
Either way, if it has an API you can always write your own GO Rest Client and create a Terraform module.
But your best bet is to go with the Python solutions, since most our vendor supported.
I will say that I have automated a K3s cluster including the networking with Vyos Cloud-Init capabilities in Proxmox, using Terraform. BGP was used upstream to make routing dynamic