[cloud] Retry WAF actions on WAFStaleDataException (#36405)

Add a util to run functions with AWSRetry to retry on WAFStaleDataExceptions and update ChangeToken for each attempt
This commit is contained in:
Sloane Hertel 2018-02-21 08:14:17 -05:00 committed by Ryan Brown
commit f7d79d4789
5 changed files with 65 additions and 39 deletions

View file

@ -481,10 +481,19 @@
- debug:
msg: "****** TEARDOWN STARTS HERE ******"
- name: delete the web acl
aws_waf_web_acl:
name: "{{ resource_prefix }}_web_acl"
state: absent
purge_rules: yes
<<: *aws_connection_info
ignore_errors: yes
- name: remove second WAF rule
aws_waf_rule:
name: "{{ resource_prefix }}_rule_2"
state: absent
purge_conditions: yes
<<: *aws_connection_info
ignore_errors: yes
@ -492,6 +501,7 @@
aws_waf_rule:
name: "{{ resource_prefix }}_rule"
state: absent
purge_conditions: yes
<<: *aws_connection_info
ignore_errors: yes