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

Rename s3 modules #1271

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ Name | Description
[community.aws.aws_msk_cluster](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.aws_msk_cluster_module.rst)|Manage Amazon MSK clusters
[community.aws.aws_msk_config](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.aws_msk_config_module.rst)|Manage Amazon MSK cluster configurations.
[community.aws.aws_region_info](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.aws_region_info_module.rst)|Gather information about AWS regions.
[community.aws.aws_s3_bucket_info](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.aws_s3_bucket_info_module.rst)|lists S3 buckets in AWS
[community.aws.aws_s3_cors](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.aws_s3_cors_module.rst)|Manage CORS for S3 buckets in AWS
[community.aws.aws_secret](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.aws_secret_module.rst)|Manage secrets stored in AWS Secrets Manager
[community.aws.aws_sgw_info](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.aws_sgw_info_module.rst)|Fetch AWS Storage Gateway information
[community.aws.aws_ssm_parameter_store](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.aws_ssm_parameter_store_module.rst)|Manage key-value pairs in AWS SSM parameter store
Expand Down Expand Up @@ -202,7 +200,9 @@ Name | Description
[community.aws.route53_health_check](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.route53_health_check_module.rst)|Manage health-checks in Amazons Route53 DNS service
[community.aws.route53_info](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.route53_info_module.rst)|Retrieves route53 details using AWS methods
[community.aws.route53_zone](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.route53_zone_module.rst)|add or delete Route53 zones
[community.aws.s3_bucket_info](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.s3_bucket_info_module.rst)|Lists S3 buckets in AWS
[community.aws.s3_bucket_notification](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.s3_bucket_notification_module.rst)|Creates, updates or deletes S3 Bucket notifications targeting Lambda functions, SNS or SQS.
[community.aws.s3_cors](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.s3_cors_module.rst)|Manage CORS for S3 buckets in AWS
[community.aws.s3_lifecycle](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.s3_lifecycle_module.rst)|Manage S3 bucket lifecycle rules in AWS
[community.aws.s3_logging](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.s3_logging_module.rst)|Manage logging facility of an s3 bucket in AWS
[community.aws.s3_metrics_configuration](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.s3_metrics_configuration_module.rst)|Manage s3 bucket metrics configuration in AWS
Expand Down
3 changes: 3 additions & 0 deletions changelogs/fragments/1271-rename-s3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
minor_changes:
- aws_s3_bucket_info - the ``aws_s3_bucket_info`` module has been renamed to ``s3_bucket_info``, ``aws_s3_bucket_info`` remains as an alias (https://github.com/ansible-collections/community.aws/pull/1271).
- aws_s3_cors - the ``aws_s3_cors`` module has been renamed to ``s3_cors``, ``aws_s3_cors`` remains as an alias (https://github.com/ansible-collections/community.aws/pull/1271).
1 change: 1 addition & 0 deletions docs/community.aws.acm_certificate_info_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Synopsis
--------
- Retrieve information for ACM certificates.
- Note that this will not return information about uploaded keys of size 4096 bits, due to a limitation of the ACM API.
- Prior to release 5.0.0 this module was called ``community.aws.aws_acm_info``. The usage did not change.



Expand Down
1 change: 1 addition & 0 deletions docs/community.aws.acm_certificate_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Synopsis

- Note that this may not work properly with keys of size 4096 bits, due to a limitation of the ACM API.

- Prior to release 5.0.0 this module was called ``community.aws.aws_acm``. The usage did not change.



Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
.. _community.aws.aws_s3_bucket_info_module:
.. _community.aws.s3_bucket_info_module:


********************************
community.aws.aws_s3_bucket_info
********************************
****************************
community.aws.s3_bucket_info
****************************

**lists S3 buckets in AWS**
**Lists S3 buckets in AWS**


Version added: 1.0.0
Expand All @@ -18,6 +18,7 @@ Version added: 1.0.0
Synopsis
--------
- Lists S3 buckets and details about those buckets.
- Prior to release 5.0.0 this module was called ``community.aws.aws_s3_bucket_info``. The usage did not change.



Expand Down Expand Up @@ -120,7 +121,7 @@ Parameters
<td>
</td>
<td>
<div>Retrieve requested S3 bucket detailed information</div>
<div>Retrieve requested S3 bucket detailed information.</div>
<div>Each bucket_X option executes one API call, hence many options being set to <code>true</code> will cause slower module execution.</div>
<div>You can limit buckets by using the <em>name</em> or <em>name_filter</em> option.</div>
</td>
Expand Down Expand Up @@ -629,12 +630,12 @@ Examples

# Note: Only AWS S3 is currently supported

# Lists all s3 buckets
- community.aws.aws_s3_bucket_info:
# Lists all S3 buckets
- community.aws.s3_bucket_info:
register: result

# Retrieve detailed bucket information
- community.aws.aws_s3_bucket_info:
- community.aws.s3_bucket_info:
# Show only buckets with name matching
name_filter: your.testing
# Choose facts to retrieve
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.. _community.aws.aws_s3_cors_module:
.. _community.aws.s3_cors_module:


*************************
community.aws.aws_s3_cors
*************************
*********************
community.aws.s3_cors
*********************

**Manage CORS for S3 buckets in AWS**

Expand All @@ -17,7 +17,8 @@ Version added: 1.0.0

Synopsis
--------
- Manage CORS for S3 buckets in AWS
- Manage CORS for S3 buckets in AWS.
- Prior to release 5.0.0 this module was called ``community.aws.aws_s3_cors``. The usage did not change.



Expand Down Expand Up @@ -155,7 +156,7 @@ Parameters
<td>
</td>
<td>
<div>Name of the s3 bucket</div>
<div>Name of the S3 bucket.</div>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -203,7 +204,7 @@ Parameters
<td>
</td>
<td>
<div>Cors rules to put on the s3 bucket</div>
<div>Cors rules to put on the S3 bucket.</div>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -241,7 +242,7 @@ Parameters
</ul>
</td>
<td>
<div>Create or remove cors on the s3 bucket</div>
<div>Create or remove cors on the S3 bucket.</div>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -285,7 +286,7 @@ Examples
# Note: These examples do not set authentication details, see the AWS Guide for details.

# Create a simple cors for s3 bucket
- community.aws.aws_s3_cors:
- community.aws.s3_cors:
name: mys3bucket
state: present
rules:
Expand All @@ -302,7 +303,7 @@ Examples
max_age_seconds: 30000

# Remove cors for s3 bucket
- community.aws.aws_s3_cors:
- community.aws.s3_cors:
name: mys3bucket
state: absent

Expand Down
9 changes: 7 additions & 2 deletions meta/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ action_groups:
- route53_info
- route53_zone
- s3_bucket_notification
- s3_bucket_info
- s3_cors
- s3_lifecycle
- s3_logging
- s3_metrics_configuration
Expand Down Expand Up @@ -218,9 +220,12 @@ plugin_routing:
aws_eks_cluster:
# Deprecation for this alias should not *start* prior to 2024-09-01
redirect: community.aws.eks_cluster
aws_ses_identity_policy:
aws_s3_bucket_info:
# Deprecation for this alias should not *start* prior to 2024-09-01
redirect: community.aws.ses_identity_policy
redirect: community.aws.s3_bucket_info
aws_s3_cors:
# Deprecation for this alias should not *start* prior to 2024-09-01
redirect: community.aws.s3_cors
aws_ses_rule_set:
# Deprecation for this alias should not *start* prior to 2024-09-01
redirect: community.aws.ses_rule_set
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@

DOCUMENTATION = '''
---
module: aws_s3_bucket_info
module: s3_bucket_info
version_added: 1.0.0
author: "Gerben Geijteman (@hyperized)"
short_description: lists S3 buckets in AWS
author:
- "Gerben Geijteman (@hyperized)"
short_description: Lists S3 buckets in AWS
description:
- Lists S3 buckets and details about those buckets.
- Lists S3 buckets and details about those buckets.
- Prior to release 5.0.0 this module was called C(community.aws.aws_s3_bucket_info).
The usage did not change.
options:
name:
description:
Expand All @@ -31,7 +34,7 @@
version_added: 1.4.0
bucket_facts:
description:
- Retrieve requested S3 bucket detailed information
- Retrieve requested S3 bucket detailed information.
- Each bucket_X option executes one API call, hence many options being set to C(true) will cause slower module execution.
- You can limit buckets by using the I(name) or I(name_filter) option.
suboptions:
Expand Down Expand Up @@ -111,21 +114,21 @@
default: False
version_added: 1.4.0
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2
- amazon.aws.aws
- amazon.aws.ec2
'''

EXAMPLES = '''
# Note: These examples do not set authentication details, see the AWS Guide for details.

# Note: Only AWS S3 is currently supported

# Lists all s3 buckets
- community.aws.aws_s3_bucket_info:
# Lists all S3 buckets
- community.aws.s3_bucket_info:
register: result

# Retrieve detailed bucket information
- community.aws.aws_s3_bucket_info:
- community.aws.s3_bucket_info:
# Show only buckets with name matching
name_filter: your.testing
# Choose facts to retrieve
Expand Down
24 changes: 13 additions & 11 deletions plugins/modules/aws_s3_cors.py → plugins/modules/s3_cors.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,40 +9,42 @@

DOCUMENTATION = r'''
---
module: aws_s3_cors
module: s3_cors
version_added: 1.0.0
short_description: Manage CORS for S3 buckets in AWS
description:
- Manage CORS for S3 buckets in AWS
author: "Oyvind Saltvik (@fivethreeo)"
- Manage CORS for S3 buckets in AWS.
- Prior to release 5.0.0 this module was called C(community.aws.aws_s3_cors).
The usage did not change.
author:
- "Oyvind Saltvik (@fivethreeo)"
options:
name:
description:
- Name of the s3 bucket
- Name of the S3 bucket.
required: true
type: str
rules:
description:
- Cors rules to put on the s3 bucket
- Cors rules to put on the S3 bucket.
type: list
elements: dict
state:
description:
- Create or remove cors on the s3 bucket
- Create or remove cors on the S3 bucket.
required: true
choices: [ 'present', 'absent' ]
type: str
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2

- amazon.aws.aws
- amazon.aws.ec2
'''

EXAMPLES = r'''
# Note: These examples do not set authentication details, see the AWS Guide for details.

# Create a simple cors for s3 bucket
- community.aws.aws_s3_cors:
- community.aws.s3_cors:
name: mys3bucket
state: present
rules:
Expand All @@ -59,7 +61,7 @@
max_age_seconds: 30000

# Remove cors for s3 bucket
- community.aws.aws_s3_cors:
- community.aws.s3_cors:
name: mys3bucket
state: absent
'''
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/targets/legacy_missing_tests/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ aws_direct_connect_connection
aws_direct_connect_gateway
aws_direct_connect_link_aggregation_group
aws_direct_connect_virtual_interface
aws_s3_cors
aws_sgw_info
cloudfront_info
cloudfront_invalidation
Expand All @@ -33,4 +32,5 @@ lambda_event
rds_instance_snapshot
rds_snapshot_info
redshift_cross_region_snapshots
s3_cors
s3_website