-
-
Notifications
You must be signed in to change notification settings - Fork 839
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 IP-based statement in bucket policy #216
Conversation
effect = "Deny" | ||
actions = ["s3:*"] | ||
resources = [local.bucket_arn, "${local.bucket_arn}/*"] | ||
principals { |
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.
Is this section required?
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.
Sorry for not writing the description...
Yes, it is required to achieve what I wrote in the description now.
Could you please review my PR again?
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.
Sorry what I meant was is the principals element required?
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.
Yes, it is required to be a valid policy. If we omit this we will get MalformedPolicyDocument error.
The reason for the wildcard is that I would like to block any principal outside of the specified IP.
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.
Hi @soya-miyoshi thanks for your contribution.
Could you please fill out the PR template?
Also @soya-miyoshi could you please run the following and commit the result?
|
@joe-niland |
/terratest |
@hans-d |
/terratest |
@joe-niland can you have a recheck again? for me its a lgtm |
@hans-d |
/terratest |
@.joe-niland @.hans-d |
what
source_ip_allow_list
variable.why
Use cases:
references