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

wafv2_rule_group_info: remove state parameter #1555

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
2 changes: 2 additions & 0 deletions changelogs/fragments/1555-wafv2_rule_group_info.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
minor_changes:
- wafv2_rule_group_info - remove unused and deprecated ``state`` parameter (https://github.com/ansible-collections/community.aws/pull/1555).
13 changes: 0 additions & 13 deletions plugins/modules/wafv2_rule_group_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -43,7 +38,6 @@
- name: rule group info
community.aws.wafv2_rule_group_info:
name: test02
state: present
scope: REGIONAL
'''

Expand Down Expand Up @@ -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'])
)
Expand All @@ -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
Expand Down
3 changes: 0 additions & 3 deletions tests/integration/targets/wafv2/tasks/rule_group.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
- name: rule group info
wafv2_rule_group_info:
name: "{{ rule_group_name }}"
state: present
scope: REGIONAL
register: out

Expand Down Expand Up @@ -554,7 +553,6 @@
- name: rule group info
wafv2_rule_group_info:
name: "{{ rule_group_name }}"
state: present
scope: REGIONAL
register: out

Expand Down Expand Up @@ -671,7 +669,6 @@
- name: rule group info
wafv2_rule_group_info:
name: "{{ rule_group_name }}"
state: present
scope: REGIONAL
register: out

Expand Down
3 changes: 0 additions & 3 deletions tests/integration/targets/wafv2_rule_group/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@
- name: rule group info
wafv2_rule_group_info:
name: "{{ rule_group_name }}"
state: present
scope: REGIONAL
register: out

Expand Down Expand Up @@ -562,7 +561,6 @@
- name: rule group info
wafv2_rule_group_info:
name: "{{ rule_group_name }}"
state: present
scope: REGIONAL
register: out

Expand Down Expand Up @@ -679,7 +677,6 @@
- name: rule group info
wafv2_rule_group_info:
name: "{{ rule_group_name }}"
state: present
scope: REGIONAL
register: out

Expand Down
1 change: 0 additions & 1 deletion tests/sanity/ignore-2.11.txt
Original file line number Diff line number Diff line change
@@ -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
1 change: 0 additions & 1 deletion tests/sanity/ignore-2.12.txt
Original file line number Diff line number Diff line change
@@ -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
1 change: 0 additions & 1 deletion tests/sanity/ignore-2.13.txt
Original file line number Diff line number Diff line change
@@ -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
1 change: 0 additions & 1 deletion tests/sanity/ignore-2.14.txt
Original file line number Diff line number Diff line change
@@ -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
1 change: 0 additions & 1 deletion tests/sanity/ignore-2.15.txt
Original file line number Diff line number Diff line change
@@ -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