nautobot / nautobot-app-ssot

Single Source of Truth for Nautobot
https://docs.nautobot.com/projects/ssot/en/latest/
Other
37 stars 35 forks source link

Allow for a diff created by a dry run to be later re-used without re-calculating it #127

Open Kircheneer opened 1 year ago

Kircheneer commented 1 year ago

Environment

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:

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?

chadell commented 1 year ago

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)

Kircheneer commented 1 year ago

Yeah terraform with the plan feature is something that mirrors this very well

lampwins commented 1 year ago

This would also open the door to distributed processing of the diff.

Kircheneer commented 1 year ago

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.