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

Bucket policy not created when #100

Closed
ghost opened this issue Aug 10, 2021 · 1 comment
Closed

Bucket policy not created when #100

ghost opened this issue Aug 10, 2021 · 1 comment
Labels
bug 🐛 An issue with the system

Comments

@ghost
Copy link

ghost commented Aug 10, 2021

Describe the Bug

If the privileged_principal_arns option is used it will never create a bucket policy.

Expected Behavior

If the privileged_principal_arns option is used it will create a bucket policy.

Additional Context

The privileged_principal_arnsoption will lead to create a aws_iam_policy_document here.
But is not used, since the bucket policy is only created under those conditions:

count      = local.enabled && (var.allow_ssl_requests_only || var.allow_encrypted_uploads_only || length(var.s3_replication_source_roles) > 0 || var.policy != "") ? 1 : 0

And it I think there is the check missing to the privileged_principal_arns

Ideally it would be like this:

count      = local.enabled && (var.allow_ssl_requests_only || var.allow_encrypted_uploads_only || length(var.s3_replication_source_roles) > 0 || length(var.privileged_principal_arns) > 0 || var.policy != "") ? 1 : 0
@ghost ghost added the bug 🐛 An issue with the system label Aug 10, 2021
@ghost
Copy link
Author

ghost commented Aug 11, 2021

Thanks @nitrocode for approving and merging! This fixed this issue.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue with the system
Projects
None yet
Development

No branches or pull requests

0 participants