Skip to content

Commit

Permalink
Rename WAF (v1) modules (#1299)
Browse files Browse the repository at this point in the history
Rename WAF (v1) modules

SUMMARY
In line with the new naming guidelines drop "aws_" from the start of the WAFv1 modules
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
plugins/modules/aws_waf_condition.py
plugins/modules/aws_waf_info.py
plugins/modules/aws_waf_rule.py
plugins/modules/aws_waf_web_acl.py
plugins/modules/waf_condition.py
plugins/modules/waf_info.py
plugins/modules/waf_rule.py
plugins/modules/waf_web_acl.py
ADDITIONAL INFORMATION

Reviewed-by: Alina Buzachis <None>
  • Loading branch information
tremble authored Jul 4, 2022
1 parent c9b1b02 commit 3bb2a70
Show file tree
Hide file tree
Showing 15 changed files with 324 additions and 299 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,6 @@ Name | Description
[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
[community.aws.aws_step_functions_state_machine](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.aws_step_functions_state_machine_module.rst)|Manage AWS Step Functions state machines
[community.aws.aws_step_functions_state_machine_execution](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.aws_step_functions_state_machine_execution_module.rst)|Start or stop execution of an AWS Step Functions state machine.
[community.aws.aws_waf_condition](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.aws_waf_condition_module.rst)|Create and delete WAF Conditions
[community.aws.aws_waf_info](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.aws_waf_info_module.rst)|Retrieve information for WAF ACLs, Rule , Conditions and Filters.
[community.aws.aws_waf_rule](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.aws_waf_rule_module.rst)|Create and delete WAF Rules
[community.aws.aws_waf_web_acl](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.aws_waf_web_acl_module.rst)|Create and delete WAF Web ACLs
[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 @@ -217,6 +213,10 @@ Name | Description
[community.aws.storagegateway_info](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.storagegateway_info_module.rst)|Fetch AWS Storage Gateway information
[community.aws.sts_assume_role](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.sts_assume_role_module.rst)|Assume a role using AWS Security Token Service and obtain temporary credentials
[community.aws.sts_session_token](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.sts_session_token_module.rst)|Obtain a session token from the AWS Security Token Service
[community.aws.waf_condition](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.waf_condition_module.rst)|Create and delete WAF Conditions
[community.aws.waf_info](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.waf_info_module.rst)|Retrieve information for WAF ACLs, Rules, Conditions and Filters
[community.aws.waf_rule](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.waf_rule_module.rst)|Create and delete WAF Rules
[community.aws.waf_web_acl](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.waf_web_acl_module.rst)|Create and delete WAF Web ACLs
[community.aws.wafv2_ip_set](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.wafv2_ip_set_module.rst)|wafv2_ip_set
[community.aws.wafv2_ip_set_info](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.wafv2_ip_set_info_module.rst)|Get information about wafv2 ip sets
[community.aws.wafv2_resources](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.wafv2_resources_module.rst)|wafv2_web_acl
Expand Down
5 changes: 5 additions & 0 deletions changelogs/fragments/1299-waf-renames.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
minor_changes:
- aws_waf_condition - the ``aws_waf_condition`` module has been renamed to ``waf_condition``, ``aws_waf_condition`` remains as an alias (https://github.com/ansible-collections/community.aws/pull/1299).
- aws_waf_info - the ``aws_waf_info`` module has been renamed to ``waf_info``, ``aws_waf_info`` remains as an alias (https://github.com/ansible-collections/community.aws/pull/1299).
- aws_waf_rule - the ``aws_waf_rule`` module has been renamed to ``waf_rule``, ``aws_waf_rule`` remains as an alias (https://github.com/ansible-collections/community.aws/pull/1299).
- aws_waf_web_acl - the ``aws_waf_web_acl`` module has been renamed to ``waf_web_acl``, ``aws_waf_web_acl`` remains as an alias (https://github.com/ansible-collections/community.aws/pull/1299).
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.. _community.aws.aws_waf_condition_module:
.. _community.aws.waf_condition_module:


*******************************
community.aws.aws_waf_condition
*******************************
***************************
community.aws.waf_condition
***************************

**Create and delete WAF Conditions**

Expand All @@ -18,6 +18,7 @@ Version added: 1.0.0
Synopsis
--------
- Read the AWS documentation for WAF https://aws.amazon.com/documentation/waf/
- Prior to release 5.0.0 this module was called ``community.aws.aws_waf_condition``. The usage did not change.



Expand Down Expand Up @@ -569,7 +570,7 @@ Parameters
</ul>
</td>
<td>
<div>Whether to use waf-regional module.</div>
<div>Whether to use <code>waf-regional</code> module.</div>
</td>
</tr>
</table>
Expand All @@ -592,7 +593,7 @@ Examples
.. code-block:: yaml
- name: create WAF byte condition
community.aws.aws_waf_condition:
community.aws.waf_condition:
name: my_byte_condition
filters:
- field_to_match: header
Expand All @@ -602,7 +603,7 @@ Examples
type: byte
- name: create WAF geo condition
community.aws.aws_waf_condition:
community.aws.waf_condition:
name: my_geo_condition
filters:
- country: US
Expand All @@ -611,15 +612,15 @@ Examples
type: geo
- name: create IP address condition
community.aws.aws_waf_condition:
community.aws.waf_condition:
name: "{{ resource_prefix }}_ip_condition"
filters:
- ip_address: "10.0.0.0/8"
- ip_address: "192.168.0.0/24"
type: ip
- name: create WAF regex condition
community.aws.aws_waf_condition:
community.aws.waf_condition:
name: my_regex_condition
filters:
- field_to_match: query_string
Expand All @@ -632,7 +633,7 @@ Examples
type: regex
- name: create WAF size condition
community.aws.aws_waf_condition:
community.aws.waf_condition:
name: my_size_condition
filters:
- field_to_match: query_string
Expand All @@ -641,15 +642,15 @@ Examples
type: size
- name: create WAF sql injection condition
community.aws.aws_waf_condition:
community.aws.waf_condition:
name: my_sql_condition
filters:
- field_to_match: query_string
transformation: url_decode
type: sql
- name: create WAF xss condition
community.aws.aws_waf_condition:
community.aws.waf_condition:
name: my_xss_condition
filters:
- field_to_match: query_string
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
.. _community.aws.aws_waf_info_module:
.. _community.aws.waf_info_module:


**************************
community.aws.aws_waf_info
**************************
**********************
community.aws.waf_info
**********************

**Retrieve information for WAF ACLs, Rule , Conditions and Filters.**
**Retrieve information for WAF ACLs, Rules, Conditions and Filters**


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

Synopsis
--------
- Retrieve information for WAF ACLs, Rule , Conditions and Filters.
- Retrieve information for WAF ACLs, Rules, Conditions and Filters.
- Prior to release 5.0.0 this module was called ``community.aws.aws_waf_info``. The usage did not change.



Expand Down Expand Up @@ -242,7 +243,7 @@ Parameters
</ul>
</td>
<td>
<div>Whether to use the waf-regional module.</div>
<div>Whether to use the <code>waf-regional</code> module.</div>
</td>
</tr>
</table>
Expand All @@ -265,14 +266,14 @@ Examples
.. code-block:: yaml
- name: obtain all WAF information
community.aws.aws_waf_info:
community.aws.waf_info:
- name: obtain all information for a single WAF
community.aws.aws_waf_info:
community.aws.waf_info:
name: test_waf
- name: obtain all information for a single WAF Regional
community.aws.aws_waf_info:
community.aws.waf_info:
name: test_waf
waf_regional: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.. _community.aws.aws_waf_rule_module:
.. _community.aws.waf_rule_module:


**************************
community.aws.aws_waf_rule
**************************
**********************
community.aws.waf_rule
**********************

**Create and delete WAF Rules**

Expand All @@ -18,6 +18,7 @@ Version added: 1.0.0
Synopsis
--------
- Read the AWS documentation for WAF https://aws.amazon.com/documentation/waf/.
- Prior to release 5.0.0 this module was called ``community.aws.aws_waf_rule``. The usage did not change.



Expand Down Expand Up @@ -120,7 +121,7 @@ Parameters
<td>
</td>
<td>
<div>List of conditions used in the rule. <span class='module'>community.aws.aws_waf_condition</span> can be used to create new conditions.</div>
<div>List of conditions used in the rule. <span class='module'>community.aws.waf_condition</span> can be used to create new conditions.</div>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -235,7 +236,7 @@ Parameters
</td>
<td>
<div>A friendly name or description for the metrics for the rule.</div>
<div>The name can contain only alphanumeric characters (A-Z, a-z, 0-9); the name can&#x27;t contain whitespace.</div>
<div>The name can contain only alphanumeric characters (A-Z, a-z, 0-9); the name may not contain whitespace.</div>
<div>You can&#x27;t change <em>metric_name</em> after you create the rule.</div>
<div>Defaults to the same as <em>name</em> with disallowed characters removed.</div>
</td>
Expand Down Expand Up @@ -379,7 +380,7 @@ Parameters
</ul>
</td>
<td>
<div>Whether to use waf-regional module.</div>
<div>Whether to use <code>waf-regional</code> module.</div>
</td>
</tr>
</table>
Expand All @@ -402,7 +403,7 @@ Examples
.. code-block:: yaml
- name: create WAF rule
community.aws.aws_waf_rule:
community.aws.waf_rule:
name: my_waf_rule
conditions:
- name: my_regex_condition
Expand All @@ -416,7 +417,7 @@ Examples
negated: yes
- name: remove WAF rule
community.aws.aws_waf_rule:
community.aws.waf_rule:
name: "my_waf_rule"
state: absent
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.. _community.aws.aws_waf_web_acl_module:
.. _community.aws.waf_web_acl_module:


*****************************
community.aws.aws_waf_web_acl
*****************************
*************************
community.aws.waf_web_acl
*************************

**Create and delete WAF Web ACLs**

Expand All @@ -19,6 +19,7 @@ Synopsis
--------
- Module for WAF classic, for WAF v2 use the *wafv2_** modules.
- Read the AWS documentation for WAF https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html.
- Prior to release 5.0.0 this module was called ``community.aws.aws_waf_web_acl``. The usage did not change.



Expand Down Expand Up @@ -408,7 +409,7 @@ Parameters
</ul>
</td>
<td>
<div>Whether to use waf-regional module.</div>
<div>Whether to use <code>waf-regional</code> module.</div>
</td>
</tr>
</table>
Expand All @@ -431,7 +432,7 @@ Examples
.. code-block:: yaml
- name: create web ACL
community.aws.aws_waf_web_acl:
community.aws.waf_web_acl:
name: my_web_acl
rules:
- name: my_rule
Expand All @@ -442,7 +443,7 @@ Examples
state: present
- name: delete the web acl
community.aws.aws_waf_web_acl:
community.aws.waf_web_acl:
name: my_web_acl
state: absent
Expand Down
16 changes: 16 additions & 0 deletions meta/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,10 @@ action_groups:
- sts_assume_role
- sts_session_token
- storagegateway_info
- waf_condition
- waf_info
- waf_rule
- waf_web_acl
- wafv2_ip_set
- wafv2_ip_set_info
- wafv2_resources
Expand Down Expand Up @@ -285,6 +289,18 @@ plugin_routing:
aws_sgw_info:
# Deprecation for this alias should not *start* prior to 2024-09-01
redirect: community.aws.storagegateway_info
aws_waf_condition:
# Deprecation for this alias should not *start* prior to 2024-09-01
redirect: community.aws.waf_condition
aws_waf_info:
# Deprecation for this alias should not *start* prior to 2024-09-01
redirect: community.aws.waf_info
aws_waf_rule:
# Deprecation for this alias should not *start* prior to 2024-09-01
redirect: community.aws.waf_rule
aws_waf_web_acl:
# Deprecation for this alias should not *start* prior to 2024-09-01
redirect: community.aws.waf_web_acl
ec2_elb:
redirect: community.aws.elb_instance
ec2_instance:
Expand Down
Loading

0 comments on commit 3bb2a70

Please sign in to comment.