Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rules to check for a Resource wildcard in a policy #133

Closed
phelewski opened this issue Feb 20, 2020 · 3 comments · Fixed by #202
Closed

Add rules to check for a Resource wildcard in a policy #133

phelewski opened this issue Feb 20, 2020 · 3 comments · Fixed by #202
Assignees

Comments

@phelewski
Copy link
Contributor

This should apply for any policy type, just make sure that all resource types are covered.

For example:

  • aws_sqs_queue_policy
  • aws_sns_topic_policy
  • etc...
@kmonihen kmonihen self-assigned this Apr 16, 2020
@kmonihen
Copy link
Contributor

We might want to considering failing if these resources are using inline rather than a policy document.
aws_iam_policy_document would then have it's own set of rules in a single place.

@kmonihen
Copy link
Contributor

kmonihen commented Apr 16, 2020

The Terraform documentation recommends using an aws_iam_policy_document data source for several good reasons:

  • Native Terraform configuration - no need to worry about JSON formatting or syntax
  • Policy layering - create policy documents that combine and/or overwrite other policy documents
  • Built-in policy error checking

https://learn.hashicorp.com/terraform/aws/iam-policy#choosing-a-configuration-method

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants