-
Notifications
You must be signed in to change notification settings - Fork 403
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
735 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
bugfixes: | ||
- wafv2_web_acl - consistently return web ACL info as described in module documentation (https://github.com/ansible-collections/community.aws/pull/1216). | ||
- wafv2_web_acl - fix ``changed`` status when description not specified (https://github.com/ansible-collections/community.aws/pull/1216). | ||
minor_changes: | ||
- wafv2_web_acl - relax botocore requirement to bare minimum required (https://github.com/ansible-collections/community.aws/pull/1216). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
cloud/aws | ||
|
||
wafv2_web_acl_info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
web_acl_name: '{{ tiny_prefix }}-web-acl' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
dependencies: | ||
- role: setup_botocore_pip | ||
vars: | ||
botocore_version: "1.20.40" |
131 changes: 131 additions & 0 deletions
131
tests/integration/targets/wafv2_web_acl/tasks/description.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
- name: Tests relating to setting descriptions on wavf2_web_acl | ||
vars: | ||
description_one: 'a Description - {{ resource_prefix }}' | ||
description_two: 'Another_Description - {{ resource_prefix }}' | ||
# Mandatory settings | ||
module_defaults: | ||
community.aws.wafv2_web_acl: | ||
name: '{{ web_acl_name }}' | ||
state: present | ||
scope: REGIONAL | ||
purge_rules: no | ||
rules: [] | ||
default_action: Allow | ||
community.aws.wafv2_web_acl_info: | ||
name: '{{ web_acl_name }}' | ||
scope: REGIONAL | ||
block: | ||
|
||
- name: test setting description wafv2_web_acl (check mode) | ||
wafv2_web_acl: | ||
description: '{{ description_one }}' | ||
register: update_result | ||
check_mode: yes | ||
- name: assert that update succeeded | ||
assert: | ||
that: | ||
- update_result is changed | ||
|
||
- name: test setting description wafv2_web_acl | ||
wafv2_web_acl: | ||
description: '{{ description_one }}' | ||
register: update_result | ||
- name: assert that update succeeded | ||
assert: | ||
that: | ||
- update_result is changed | ||
- update_result.description == description_one | ||
|
||
- name: test setting description wafv2_web_acl - idempotency (check mode) | ||
wafv2_web_acl: | ||
description: '{{ description_one }}' | ||
register: update_result | ||
check_mode: yes | ||
- name: assert that update succeeded | ||
assert: | ||
that: | ||
- update_result is not changed | ||
|
||
- name: test setting description wafv2_web_acl - idempotency | ||
wafv2_web_acl: | ||
description: '{{ description_one }}' | ||
register: update_result | ||
- name: assert that update succeeded | ||
assert: | ||
that: | ||
- update_result is not changed | ||
- update_result.description == description_one | ||
|
||
### | ||
|
||
- name: test updating description on wafv2_web_acl (check mode) | ||
wafv2_web_acl: | ||
description: '{{ description_two }}' | ||
register: update_result | ||
check_mode: yes | ||
- name: assert that update succeeded | ||
assert: | ||
that: | ||
- update_result is changed | ||
|
||
- name: test updating description on wafv2_web_acl | ||
wafv2_web_acl: | ||
description: '{{ description_two }}' | ||
register: update_result | ||
- name: assert that update succeeded | ||
assert: | ||
that: | ||
- update_result is changed | ||
- update_result.description == description_two | ||
|
||
- name: test updating description on wafv2_web_acl - idempotency (check mode) | ||
wafv2_web_acl: | ||
description: '{{ description_two }}' | ||
register: update_result | ||
check_mode: yes | ||
- name: assert that update succeeded | ||
assert: | ||
that: | ||
- update_result is not changed | ||
|
||
- name: test updating description on wafv2_web_acl - idempotency | ||
wafv2_web_acl: | ||
description: '{{ description_two }}' | ||
register: update_result | ||
- name: assert that update succeeded | ||
assert: | ||
that: | ||
- update_result is not changed | ||
- update_result.description == description_two | ||
|
||
### | ||
|
||
- name: test that wafv2_web_acl_info returns the description | ||
wafv2_web_acl_info: | ||
register: tag_info | ||
- name: assert description present | ||
assert: | ||
that: | ||
- tag_info.description == description_two | ||
|
||
### | ||
|
||
- name: test no description param wafv2_web_acl (check mode) | ||
wafv2_web_acl: {} | ||
register: update_result | ||
check_mode: yes | ||
- name: assert no change | ||
assert: | ||
that: | ||
- update_result is not changed | ||
- update_result.description == description_two | ||
|
||
|
||
- name: test no description param wafv2_web_acl | ||
wafv2_web_acl: {} | ||
register: update_result | ||
- name: assert no change | ||
assert: | ||
that: | ||
- update_result is not changed | ||
- update_result.description == description_two |
Oops, something went wrong.