Skip to content

Commit

Permalink
wafv2_rule_group_info: remove state parameter (ansible-collections#1555)
Browse files Browse the repository at this point in the history
wafv2_rule_group_info: remove state parameter

SUMMARY
closes ansible-collections#1547
ISSUE TYPE

COMPONENT NAME
wafv2_rule_group_info
ADDITIONAL INFORMATION

Reviewed-by: Mark Chappell <None>
  • Loading branch information
markuman authored and abikouo committed Sep 18, 2023
1 parent 86cd528 commit 1f1a946
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions 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

0 comments on commit 1f1a946

Please sign in to comment.