Step 1. Use infrastructure as code and store in git.
Step 2. Keep your docs and diagram as close to the code as you can. I have used
draw.io with drawio.png file extensions to visualize the architecture diagrams in markdown while still working with a good pull request process. The drawio.png file extension with the vscode plugin for
draw.io allows you to edit the file in
draw.io (no need to convert or export it as a png) and still be tracked nicely in git while even being visually rendered during PR process. Thus when a PR comes in to change the IaC, the reviewer should look at code, look for corresponding updates in the docs (markdown), and look for updated diagram. If something is missing, reviewer would request submitter to update their docs or diagram. It really comes down to a process that ensures docs/diagrams are updated whenever a change happens.