Debian Codegraph @

ansible_collections/community/aws/tests/integration/targets/wafv2/tasks/waf_resources.yml

raw
1 ################################
2 # test wafv2 resouces
3 # bind ALB to WAFv2 ACL
4 ################################
5 - name: check_mode add test alb to test waf
6 wafv2_resources:
7 name: "{{ web_acl_name }}"
8 scope: REGIONAL
9 state: present
10 arn: "{{ alb.load_balancer_arn }}"
11 check_mode: yes
12 register: out
13
14 - name: verify check_mode create
15 assert:
16 that:
17 - out is changed
18
19 - name: add test alb to test waf
20 wafv2_resources:
21 name: "{{ web_acl_name }}"
22 scope: REGIONAL
23 state: present
24 arn: "{{ alb.load_balancer_arn }}"
25 register: out
26 retries: 10
27 delay: 15
28 until: out.failed == false
29
30 - name: verify create
31 assert:
32 that:
33 - out is changed
34
35 - name: get web acl
36 wafv2_resources_info:
37 name: "{{ web_acl_name }}"
38 scope: REGIONAL
39 register: out
40
41 - name: immutable add test alb from test waf
42 wafv2_resources:
43 name: "{{ web_acl_name }}"
44 scope: REGIONAL
45 state: present
46 arn: "{{ alb.load_balancer_arn }}"
47 register: out
48
49 - name: verify immutable create
50 assert:
51 that:
52 - out is not changed
53
54 - name: remove test alb from test waf
55 wafv2_resources:
56 name: "{{ web_acl_name }}"
57 scope: REGIONAL
58 state: absent
59 arn: "{{ alb.load_balancer_arn }}"