by rfmoz on 4/6/22, 5:15 PM with 8 comments
The most similar approach is a IAM cli command "aws iam get-account-authorization-details" who dump the IAM settings, but outside this service there aren't any equal. Think about something like "get-network-details" or "get-s3-details" who could give you a whole view of them.
Maybe someone knows something similar to etckeeper, but for AWS?
by danenania on 4/6/22, 5:26 PM
I wouldn't think it would be overly difficult to write a tool that looped through the all the API endpoints to construct the full state.
Say what you want about AWS, but one great thing about it is how accessible almost every piece of account state is via API.
I'd imagine terraform has some logic like this somewhere in its guts?
by f0e4c2f7 on 4/6/22, 6:12 PM
Unfortunately this only works for things that are built with Terraform, not already created infrastructure to my knowledge.
by tkunovsky on 4/6/22, 10:27 PM
by beamatronic on 4/6/22, 7:27 PM
by 97-109-107 on 4/7/22, 9:38 AM
While I don't have an answer to your question, you might find this tool handy for cleanups - https://github.com/rebuy-de/aws-nuke
by wrboyce on 4/6/22, 9:42 PM
by rfraile on 4/7/22, 9:41 AM
It can dump the configuration to text files and later could be consumed by terraform.