mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
[cloud]Ensure SGs in default VPCs get default egress rule (#38018)
SGs created when a VPC ID was not specified would not necessarily get the default egress rule, even when no explicit egress rules were set. Add some checks for egress rules in results from existing tests
This commit is contained in:
parent
9dfb665e43
commit
98b29f8ad6
2 changed files with 7 additions and 1 deletions
|
@ -422,6 +422,8 @@
|
|||
that:
|
||||
- 'result.changed'
|
||||
- 'result.group_id.startswith("sg-")'
|
||||
- 'result.ip_permissions|length == 1'
|
||||
- 'result.ip_permissions_egress|length == 1'
|
||||
|
||||
# ============================================================
|
||||
- name: add same rule to the existing group (expected changed=false)
|
||||
|
@ -464,6 +466,7 @@
|
|||
- result.ip_permissions|length == 2
|
||||
- result.ip_permissions[0].user_id_group_pairs or
|
||||
result.ip_permissions[1].user_id_group_pairs
|
||||
- 'result.ip_permissions_egress[0].ip_protocol == "-1"'
|
||||
|
||||
# ============================================================
|
||||
- name: test ip rules convert port numbers from string to int (expected changed=true)
|
||||
|
@ -489,6 +492,9 @@
|
|||
that:
|
||||
- 'result.changed'
|
||||
- 'result.group_id.startswith("sg-")'
|
||||
- 'result.ip_permissions|length == 1'
|
||||
- 'result.ip_permissions_egress[0].ip_protocol == "tcp"'
|
||||
|
||||
|
||||
# ============================================================
|
||||
- name: test group rules convert port numbers from string to int (expected changed=true)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue