Skip to content

Commit

Permalink
Rename aws_secrets (#1315)
Browse files Browse the repository at this point in the history
Rename aws_secrets

SUMMARY
in line with the new naming guidelines rename aws_secret  to secretsmanager_secret
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
plugins/modules/aws_secret.py
plugins/modules/secretsmanager_secret.py
ADDITIONAL INFORMATION

Reviewed-by: Alina Buzachis <None>
  • Loading branch information
tremble authored Jul 6, 2022
1 parent 2e12c1a commit 76fa1ef
Show file tree
Hide file tree
Showing 14 changed files with 21 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ Name | Description
[community.aws.autoscaling_policy](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.autoscaling_policy_module.rst)|Create or delete AWS scaling policies for Autoscaling groups
[community.aws.autoscaling_scheduled_action](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.autoscaling_scheduled_action_module.rst)|Create, modify and delete ASG scheduled scaling actions
[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_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.batch_compute_environment](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.batch_compute_environment_module.rst)|Manage AWS Batch Compute Environments
[community.aws.batch_job_definition](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.batch_job_definition_module.rst)|Manage AWS Batch Job Definitions
[community.aws.batch_job_queue](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.batch_job_queue_module.rst)|Manage AWS Batch Job Queues
Expand Down Expand Up @@ -201,6 +200,7 @@ Name | Description
[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
[community.aws.s3_sync](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.s3_sync_module.rst)|Efficiently upload multiple files to S3
[community.aws.s3_website](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.s3_website_module.rst)|Configure an s3 bucket as a website
[community.aws.secretsmanager_secret](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.secretsmanager_secret_module.rst)|Manage secrets stored in AWS Secrets Manager
[community.aws.ses_identity](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.ses_identity_module.rst)|Manages SES email and domain identity
[community.aws.ses_identity_policy](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.ses_identity_policy_module.rst)|Manages SES sending authorization policies
[community.aws.ses_rule_set](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.ses_rule_set_module.rst)|Manages SES inbound receipt rule sets
Expand Down
2 changes: 2 additions & 0 deletions changelogs/fragments/1315-rename-aws_secret.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
minor_changes:
- aws_secret - the ``aws_secret`` module has been renamed to ``secretsmanager_secret``, ``aws_secret`` remains as an alias (https://github.com/ansible-collections/community.aws/pull/1315).
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.. _community.aws.aws_secret_module:
.. _community.aws.secretsmanager_secret_module:


************************
community.aws.aws_secret
************************
***********************************
community.aws.secretsmanager_secret
***********************************

**Manage secrets stored in AWS Secrets Manager**

Expand All @@ -18,6 +18,7 @@ Version added: 1.0.0
Synopsis
--------
- Create, update, and delete secrets stored in AWS Secrets Manager.
- Prior to release 5.0.0 this module was called ``community.aws.aws_secret``. The usage did not change.



Expand Down Expand Up @@ -435,22 +436,22 @@ Examples
.. code-block:: yaml
- name: Add string to AWS Secrets Manager
community.aws.aws_secret:
community.aws.secretsmanager_secret:
name: 'test_secret_string'
state: present
secret_type: 'string'
secret: "{{ super_secret_string }}"
- name: Add a secret with resource policy attached
community.aws.aws_secret:
community.aws.secretsmanager_secret:
name: 'test_secret_string'
state: present
secret_type: 'string'
secret: "{{ super_secret_string }}"
resource_policy: "{{ lookup('template', 'templates/resource_policy.json.j2', convert_data=False) | string }}"
- name: remove string from AWS Secrets Manager
community.aws.aws_secret:
community.aws.secretsmanager_secret:
name: 'test_secret_string'
state: absent
secret_type: 'string'
Expand Down
4 changes: 4 additions & 0 deletions meta/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ action_groups:
- s3_metrics_configuration
- s3_sync
- s3_website
- secretsmanager_secret
- ses_identity
- ses_identity_policy
- ses_rule_set
Expand Down Expand Up @@ -355,6 +356,9 @@ plugin_routing:
aws_s3_cors:
# Deprecation for this alias should not *start* prior to 2024-09-01
redirect: community.aws.s3_cors
aws_secret:
# Deprecation for this alias should not *start* prior to 2024-09-01
redirect: community.aws.secretsmanager_secret
aws_ses_identity:
# Deprecation for this alias should not *start* prior to 2024-09-01
redirect: community.aws.ses_identity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@

DOCUMENTATION = r'''
---
module: aws_secret
module: secretsmanager_secret
version_added: 1.0.0
short_description: Manage secrets stored in AWS Secrets Manager
description:
- Create, update, and delete secrets stored in AWS Secrets Manager.
- Prior to release 5.0.0 this module was called C(community.aws.aws_secret).
The usage did not change.
author:
- "REY Remi (@rrey)"
options:
Expand Down Expand Up @@ -80,22 +82,22 @@

EXAMPLES = r'''
- name: Add string to AWS Secrets Manager
community.aws.aws_secret:
community.aws.secretsmanager_secret:
name: 'test_secret_string'
state: present
secret_type: 'string'
secret: "{{ super_secret_string }}"
- name: Add a secret with resource policy attached
community.aws.aws_secret:
community.aws.secretsmanager_secret:
name: 'test_secret_string'
state: present
secret_type: 'string'
secret: "{{ super_secret_string }}"
resource_policy: "{{ lookup('template', 'templates/resource_policy.json.j2', convert_data=False) | string }}"
- name: remove string from AWS Secrets Manager
community.aws.aws_secret:
community.aws.secretsmanager_secret:
name: 'test_secret_string'
state: absent
secret_type: 'string'
Expand Down

0 comments on commit 76fa1ef

Please sign in to comment.