-
-
Notifications
You must be signed in to change notification settings - Fork 215
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
Added log-delivery-policy for s3-bucket component #698
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, please see comments
Map of IAM policy statements to use in the bucket policy. Conflicts with `var.custom_policy_enabled` and `var.log_delivery_policy_enabled`. | ||
It will be used if `var.custom_policy_enabled` and `var.log_delivery_policy_enabled` are set to `false`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This description is wrong, right? This will be used when var.custom_policy_enabled
is true
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
be616cd
to
4822e28
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comments
@Nuru please re-review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zdmytriv I appreciate the motivation behind this PR and the effort you put into it. I am, however, not inclined to accept this PR for a few reasons. (Although I'm using the "Request changes" feature, I'm not asking you to make changes to make the PR acceptable, I'm asking you to close the PR without merging.)
To begin with, the log delivery policy you have added is not the current "best practice" policy. The current best practice is to include conditionals on the source account and ARN to guard against the confused deputies problem. (See the link for more details.)
Next, the name "custom policy" of the input to the current component is a bit misleading. Both the custom policy and the default policy are user supplied policies, just with different formats. This component does not provide any pre-defined policies. Adding a pre-defined policy makes this component even more complicated, and invites future users to want to be able to combine custom and pre-defined policies in a way that will cause further confusion and headache.
Cloud Posse already provides other components and modules for log delivery buckets, such as vpc-flow-logs-bucket
and cloudtrail-bucket
to handle the cases where the S3 bucket is for log delivery. These are much easier to use because they are pre-tuned for specific purposes. This component (s3-bucket) is meant for maximum flexibility, and users can and should create their own policies for it.
So I suggest you use one of the other components that meets your needs and please close this PR.
what
why
references