I've been trying to stick to the "infrastructure as code" principle as much as possible in my work.
But after the devops project got more complicated I started loosing the centralized perspective because the scope of used technologies and complexity are very rich: terraform, terraformer, terragrunt, pscore, bash, Azure CLI, Azure DevOps CLI, AzureAD module, msbuild, Java, various REST API calls...
So I started writting scripts and code that calculate "desired vs current" state just for validation and overview, if everything is in the right state. Most of the time this information is everything I need, I don't need to "go to the desired state" because sometimes that actually means manual intervention (sometimes even from someone else).
The output of these scripts is simple, currently they write into stdout something like this:
Name of thing Desired state Current state Result
----------------------------------------------------------------------
THING A This That NOT GOOD
THING B This This GOOD
THING C This ? Timeout after 5 minutes
...
Result:
- 2 things needs attention
My question is if there is some tool or standard targeted at this specific use case?
- I have scripts, I could call them "diff calculators" that can output whether some "thing" or "subthing of thing" is in desired state and what is the current state
- The tool produces nice table based UI output