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

Enable the management of bucket-level ACLs in amazon.aws.s3_bucket #573

Closed
1 task done
tomkivlin opened this issue Nov 22, 2021 · 1 comment
Closed
1 task done
Assignees
Labels

Comments

@tomkivlin
Copy link

Summary

The AWS S3 API includes the ability to manage bucket-level ACL (not the public access blocks, but the ACLs themselves): https://awscli.amazonaws.com/v2/documentation/api/latest/reference/s3api/put-bucket-acl.html. e.g. the following will enable read-only access for everyone.

aws s3api put-bucket-acl --bucket MyBucket --grant-read uri=http://acs.amazonaws.com/groups/global/AllUsers

I can't work out how this part of the configuration can be applied through the amazon.aws.s3_bucket module.

Issue Type

Feature Idea

Component Name

amazon.aws.s3_bucket

Additional Information

# Create a bucket with public read-only access for all users
# Uses canned ACLs as per https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#canned-acl
- amazon.aws.s3_bucket:
    name: mys3bucket
    state: present
    acl: public-read
    public_access:
        block_public_acls: false
        ignore_public_acls: false
        block_public_policy: false
        restrict_public_buckets: false

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@jillr jillr added waiting_on_contributor Needs help. Feel free to engage to get things unblocked and removed needs_triage labels Jan 11, 2022
@abikouo abikouo self-assigned this Jan 12, 2022
@abikouo abikouo added WIP Work in progress has_pr and removed waiting_on_contributor Needs help. Feel free to engage to get things unblocked WIP Work in progress labels Jan 12, 2022
ansible-zuul bot pushed a commit that referenced this issue Jan 13, 2022
s3_bucket - enable ACL management

SUMMARY

Enable ACL management for S3 bucket
#573

ISSUE TYPE


Feature Pull Request

COMPONENT NAME

s3_bucket
ADDITIONAL INFORMATION



- amazon.aws.s3_bucket:
      name: mybucket
      acl: public-read-write
      state: present

Reviewed-by: Jill R <None>
Reviewed-by: Alina Buzachis <None>
Reviewed-by: None <None>
@abikouo
Copy link
Contributor

abikouo commented Jan 14, 2022

Hi @tomkivlin

The following feature has been merged into main branch, please feel free to test it and give feedback.

Regards
Aubin

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

No branches or pull requests

4 participants