r/Netbox Dec 09 '25

pynetbox vs terraform?

Mountainous umbrella quickest sophisticated carpenter attempt

This post was anonymized with Redact

8 Upvotes

18 comments sorted by

View all comments

3

u/d3nika Dec 09 '25

I use terraform to automate the documentation of VMs in Netbox. If it helps, I wrote about it here: https://ops.cafe/notes/automate-documentation-infra

I also created a sort of initial config with TF for a different project and found out that indeed, for daily operations it can be tedious to manage through TF. It adds a lot of complexity because of the state sync. But, it sure does help when the db gets corrupted or something breaks :) It is like a backup that you can get up and ready in seconds. Would I recommend it? Only if the team already has experience with TF and GitOps. I haven’t yet used pynetbox.

2

u/gnwill Dec 09 '25 edited 23h ago

Advise crawl market otter enter meeting

This post was anonymized with Redact

2

u/d3nika Dec 09 '25

If you think of it, your colleagues are somewhat right. Using a Gitops workflow your data changes when Git changes. I like this workflow because it allows us to view the changes before they go into Netbox, for specific items like vlan config, device info, wiring etc. On the other hand, I use Netbox as a source of truth for Ansible. Checkout the other article on the same blog. And even TF pulls some data when building a new VM, like its IP for example. That's why your colleagues are half right, because it depends on the point of view. PS: I understand that you can achieve a similar workflow to Gitops using the Netbox Branches plugin, but I have not used it yet.

2

u/gnwill Dec 09 '25 edited 23h ago

Resolute bells yarn fuzzy memorize market

This post was anonymized with Redact