nautobot-app-ssot
nautobot-app-ssot copied to clipboard
Allow for a diff created by a dry run to be later re-used without re-calculating it
Environment
- Nautobot version: latest
- nautobot-ssot version: latest
Proposed Functionality
Using the dry-run functionality, we can generate a diff. It would be nice if we could then later apply that diff without recalculating it.
Use Case
This would allow for more sophisticated and deterministic approval processes, i.e. having a process like:
- generate diff with dry run
- validate diff manually and approve it for deployment
- deploy diff (and only that diff, not any changes that happened in the meantime)
Caveats
I believe care needs to be taken at what happens if the target systems state changes in the meantime. If it does, the diff might be corrupt?
I think that you will always need to get the actual state... what you could use it for is if there is an approval state, using a previous diff, you skip it (similar to what Terraform does with inputting a previous plan in the apply stage)
Yeah terraform with the plan feature is something that mirrors this very well
This would also open the door to distributed processing of the diff.
This may be particularly interesting for 'outgoing' jobs, i.e. ones where we mutate the state of an external system (think a network device controller) using data from Nautobot.