I'm curious to implement this in my work. We've migrated many of our applications to AWS recently. The exact issue you've described with lower environment being configured differently from staging and production was something resulting from manual deployment of ec2 instances. I didn't have that level of control over my environments, but I hope to bring this up, and maybe have our devops team use more of this approach. Great read.
Thank you for the comment Nick.
One thing I don't touch on here is the idea of moving from manual provisioning to IaC and converting existing infrastructure. This is a tricky problem and requires even more time and effort because we don't want to break production.
Therefore, my advice is to start with IaC on any new services/resources. Establish the culture and process around it. Get used to operating in this way and then tackle your existing infrastructure.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.