Repository: ansible-collections/community.aws

Issue:
[6.0.0] wafv2_rule_group_info - Remove deprecated `state` argument 
### Summary

The `state` argument does nothing and never has (likely a copy&paste mistake).  Remove it for consistency

### Issue Type

Feature Idea

### Component Name

plugins/modules/wafv2_rule_group_info.py

### Additional Information

Originally deprecated as part of #1210

### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct


Discussion:
Files identified in the description:
* [`plugins/modules/wafv2_rule_group_info.py`](https://github.com/['ansible-collections/amazon.aws', 'ansible-collections/community.aws', 'ansible-collections/community.vmware']/blob/main/plugins/modules/wafv2_rule_group_info.py)

If these files are inaccurate, please update the `component name` section of the description or use the `!component` bot command.

[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)
<!--- boilerplate: components_banner --->
cc @jillr @markuman @s-hertel
[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)
<!--- boilerplate: notify --->

Resolving patch:
diff --git a/plugins/modules/wafv2_rule_group_info.py b/plugins/modules/wafv2_rule_group_info.py
--- a/plugins/modules/wafv2_rule_group_info.py
+++ b/plugins/modules/wafv2_rule_group_info.py
@@ -15,11 +15,6 @@
 description:
   - Get informations about existing wafv2 rule groups.
 options:
-    state:
-      description:
-        - This option does nothing, has been deprecated, and will be removed in a release after 2022-12-01.
-      required: false
-      type: str
     name:
       description:
         - The name of the rule group.
@@ -43,7 +38,6 @@
 - name: rule group info
   community.aws.wafv2_rule_group_info:
     name: test02
-    state: present
     scope: REGIONAL
 '''
 
@@ -119,7 +113,6 @@ def get_rule_group(wafv2, name, scope, id, fail_json_aws):
 
 def main():
     arg_spec = dict(
-        state=dict(type='str', required=False),
         name=dict(type='str', required=True),
         scope=dict(type='str', required=True, choices=['CLOUDFRONT', 'REGIONAL'])
     )
@@ -129,17 +122,11 @@ def main():
         supports_check_mode=True
     )
 
-    state = module.params.get("state")
     name = module.params.get("name")
     scope = module.params.get("scope")
 
     wafv2 = module.client('wafv2')
 
-    if state:
-        module.deprecate(
-            'The state parameter does nothing, has been deprecated, and will be removed in a future release.',
-            version='6.0.0', collection_name='community.aws')
-
     # check if rule group exists
     response = wafv2_list_rule_groups(wafv2, scope, module.fail_json_aws)
     id = None


Test patch:
diff --git a/tests/integration/targets/wafv2/tasks/rule_group.yml b/tests/integration/targets/wafv2/tasks/rule_group.yml
--- a/tests/integration/targets/wafv2/tasks/rule_group.yml
+++ b/tests/integration/targets/wafv2/tasks/rule_group.yml
@@ -79,7 +79,6 @@
 - name: rule group info
   wafv2_rule_group_info:
     name: "{{ rule_group_name }}"
-    state: present
     scope: REGIONAL
   register: out
 
@@ -554,7 +553,6 @@
 - name: rule group info
   wafv2_rule_group_info:
     name: "{{ rule_group_name }}"
-    state: present
     scope: REGIONAL
   register: out
 
@@ -671,7 +669,6 @@
 - name: rule group info
   wafv2_rule_group_info:
     name: "{{ rule_group_name }}"
-    state: present
     scope: REGIONAL
   register: out
 
diff --git a/tests/integration/targets/wafv2_rule_group/tasks/main.yml b/tests/integration/targets/wafv2_rule_group/tasks/main.yml
--- a/tests/integration/targets/wafv2_rule_group/tasks/main.yml
+++ b/tests/integration/targets/wafv2_rule_group/tasks/main.yml
@@ -87,7 +87,6 @@
     - name: rule group info
       wafv2_rule_group_info:
         name: "{{ rule_group_name }}"
-        state: present
         scope: REGIONAL
       register: out
 
@@ -562,7 +561,6 @@
     - name: rule group info
       wafv2_rule_group_info:
         name: "{{ rule_group_name }}"
-        state: present
         scope: REGIONAL
       register: out
 
@@ -679,7 +677,6 @@
     - name: rule group info
       wafv2_rule_group_info:
         name: "{{ rule_group_name }}"
-        state: present
         scope: REGIONAL
       register: out
 
diff --git a/tests/sanity/ignore-2.11.txt b/tests/sanity/ignore-2.11.txt
--- a/tests/sanity/ignore-2.11.txt
+++ b/tests/sanity/ignore-2.11.txt
@@ -1,3 +1,2 @@
 plugins/modules/cloudfront_distribution_info.py pylint:unnecessary-comprehension # (new test) Should be an easy fix, but testing is a challenge - test are broken and aliases require a wildcard cert in ACM
 plugins/modules/codebuild_project.py pylint:collection-deprecated-version # https://github.com/ansible-collections/community.aws/issues/1546
-plugins/modules/wafv2_rule_group_info.py pylint:collection-deprecated-version # https://github.com/ansible-collections/community.aws/issues/1547
diff --git a/tests/sanity/ignore-2.12.txt b/tests/sanity/ignore-2.12.txt
--- a/tests/sanity/ignore-2.12.txt
+++ b/tests/sanity/ignore-2.12.txt
@@ -1,3 +1,2 @@
 plugins/modules/cloudfront_distribution_info.py pylint:unnecessary-comprehension # (new test) Should be an easy fix, but testing is a challenge - test are broken and aliases require a wildcard cert in ACM
 plugins/modules/codebuild_project.py pylint:collection-deprecated-version # https://github.com/ansible-collections/community.aws/issues/1546
-plugins/modules/wafv2_rule_group_info.py pylint:collection-deprecated-version # https://github.com/ansible-collections/community.aws/issues/1547
diff --git a/tests/sanity/ignore-2.13.txt b/tests/sanity/ignore-2.13.txt
--- a/tests/sanity/ignore-2.13.txt
+++ b/tests/sanity/ignore-2.13.txt
@@ -1,3 +1,2 @@
 plugins/modules/cloudfront_distribution_info.py pylint:unnecessary-comprehension # (new test) Should be an easy fix, but testing is a challenge - test are broken and aliases require a wildcard cert in ACM
 plugins/modules/codebuild_project.py pylint:collection-deprecated-version # https://github.com/ansible-collections/community.aws/issues/1546
-plugins/modules/wafv2_rule_group_info.py pylint:collection-deprecated-version # https://github.com/ansible-collections/community.aws/issues/1547
diff --git a/tests/sanity/ignore-2.14.txt b/tests/sanity/ignore-2.14.txt
--- a/tests/sanity/ignore-2.14.txt
+++ b/tests/sanity/ignore-2.14.txt
@@ -1,3 +1,2 @@
 plugins/modules/cloudfront_distribution_info.py pylint:unnecessary-comprehension # (new test) Should be an easy fix, but testing is a challenge - test are broken and aliases require a wildcard cert in ACM
 plugins/modules/codebuild_project.py pylint:collection-deprecated-version # https://github.com/ansible-collections/community.aws/issues/1546
-plugins/modules/wafv2_rule_group_info.py pylint:collection-deprecated-version # https://github.com/ansible-collections/community.aws/issues/1547
diff --git a/tests/sanity/ignore-2.15.txt b/tests/sanity/ignore-2.15.txt
--- a/tests/sanity/ignore-2.15.txt
+++ b/tests/sanity/ignore-2.15.txt
@@ -1,3 +1,2 @@
 plugins/modules/cloudfront_distribution_info.py pylint:unnecessary-comprehension # (new test) Should be an easy fix, but testing is a challenge - test are broken and aliases require a wildcard cert in ACM
 plugins/modules/codebuild_project.py pylint:collection-deprecated-version # https://github.com/ansible-collections/community.aws/issues/1546
-plugins/modules/wafv2_rule_group_info.py pylint:collection-deprecated-version # https://github.com/ansible-collections/community.aws/issues/1547