I'm not sure I understand your question fully? You write documentation, like you do anything. And configure everything with code, so you can go read it (Terraform, Chef/Puppet/Ansible, etc).
I use SCC (System Configuration Collector) to document our servers. Everything else is just a collection of grep-able text files on our management server.
https://sourceforge.net/projects/sysconfcollect/