Closed ian-bartholomew closed 3 years ago
Hi @ian-bartholomew
I recommend that when running the deep inspection, you have the same privileges as the account that actually performs terraform plan
or terraform apply
. This partially ensures that you have the necessary privileges when running terraform commands.
On the other hand, TFLint doesn't require write permission, so it is also a good practice to use the least privilege for security. For such cases, it may be worth describing the IAM policy in the documentation.
@wata727 thank you, that answers my question. Thanks!
Hi.
Please can we have a complete list of required permissions for tflint.
We have a specific user that is used to plan and apply using terraform and all is working there.
We've introduced tflint into our process and we now requiring additional access...
Failed to check ruleset. An error occurred:
Error: Failed to check `aws_instance_invalid_key_name` rule: An error occurred while invoking DescribeKeyPairs; UnauthorizedOperation: You are not authorized to perform this operation.
status code: 403, request id: *********
amongst other things.
As it stands, the user used to deploy the terraform plan does NOT require these permissions and so we would not have granted that.
If this is something that is available in code (but not documented), then potentially the list of calls being made by the ruleset could be extracted and the logged. That would certainly be a start?
Some sort of auto-discovery?
Hello, we want to run this in CI, and be able to also run the deep inspection, but its not clear what kind of IAM permissions are needed. We want to run this in CI, and grant it the least privileged IAM policy.
Thanks!