What's the most efficient way to determine the minimum AWS permissions necessary for a Terraform configuration?

后端 未结 4 1440
日久生厌
日久生厌 2020-12-24 08:50

I have a Terraform configuration targeting deployment on AWS. It applies beautifully when using an IAM user that has permission to do anything (i.e. {actions: [\"*\"],

4条回答
  •  庸人自扰
    2020-12-24 09:10

    Here is another approach, similar to what was said above, but without getting into CloudTrail -

    1. Give full permissions to your IAM user.
    2. Run TF_LOG=trace terraform apply --auto-approve &> log.log
    3. Run cat log.log | grep "DEBUG: Request"

    You will get a list of all AWS Actions used.

提交回复
热议问题