Skip to content

Commit

Permalink
s3_bucket - Improve documentation of the policy parameter (#387)
Browse files Browse the repository at this point in the history
s3_bucket - improve documentation of policy parameter

SUMMARY
This pull requests improves the documentation of the policy parameter in the s3_bucket module. It documents how to ensure the absence of a policy.
Fixes #385
ISSUE TYPE

Docs Pull Request

COMPONENT NAME
s3_bucket

Reviewed-by: Jill R <None>
Reviewed-by: Moritz Wagner <None>
Reviewed-by: None <None>
Reviewed-by: Mark Chappell <None>
  • Loading branch information
2d6 authored Aug 20, 2021
1 parent 54e1f95 commit 6c767b1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions plugins/modules/s3_bucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
type: str
policy:
description:
- The JSON policy as a string.
- The JSON policy as a string. Set to the string C("null") to force the absence of a policy.
type: json
s3_url:
description:
Expand Down Expand Up @@ -214,7 +214,7 @@
public_access:
block_public_acls: true
ignore_public_acls: true
## keys == 'false' can be ommited, undefined keys defaults to 'false'
## keys == 'false' can be omitted, undefined keys defaults to 'false'
# block_public_policy: false
# restrict_public_buckets: false
Expand All @@ -235,6 +235,12 @@
name: mys3bucket
state: present
delete_object_ownership: true
# Delete a bucket policy from bucket
- amazon.aws.s3_bucket:
name: mys3bucket
state: present
policy: "null"
'''

import json
Expand Down

0 comments on commit 6c767b1

Please sign in to comment.