From ed79b58dcc32ddaf132179b9d06c5fe55eb936bc Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Tue, 23 Aug 2022 23:28:41 +0000 Subject: [PATCH] ec2_security_group: Set rules->group_name's datatype as raw (#971) (#974) [PR #971/9e7ae6cf backport][stable-4] ec2_security_group: Set rules->group_name's datatype as raw This is a backport of PR #971 as merged into main (9e7ae6c). Signed-off-by: GomathiselviS gomathiselvi@gmail.com SUMMARY rules-> group_name can accept values of type list and str. ISSUE TYPE Docs Pull Request COMPONENT NAME ec2_security_group.py ADDITIONAL INFORMATION --- .../fragments/638-ec2_security_group_group_name_datatype.yml | 2 ++ plugins/modules/ec2_group.py | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/638-ec2_security_group_group_name_datatype.yml diff --git a/changelogs/fragments/638-ec2_security_group_group_name_datatype.yml b/changelogs/fragments/638-ec2_security_group_group_name_datatype.yml new file mode 100644 index 00000000000..15087856308 --- /dev/null +++ b/changelogs/fragments/638-ec2_security_group_group_name_datatype.yml @@ -0,0 +1,2 @@ +minor_changes: +- ec2_security_group - set type as ``list`` for rules->group_name as it can accept both ``str`` and ``list`` (https://github.com/ansible-collections/amazon.aws/pull/971). diff --git a/plugins/modules/ec2_group.py b/plugins/modules/ec2_group.py index 7de410f849e..6ba9e69f341 100644 --- a/plugins/modules/ec2_group.py +++ b/plugins/modules/ec2_group.py @@ -79,11 +79,13 @@ - You can specify only one of I(cidr_ip), I(cidr_ipv6), I(ip_prefix), I(group_id) and I(group_name). group_name: - type: str + type: list + elements: str description: - Name of the Security Group that traffic is coming from. - If the Security Group doesn't exist a new Security Group will be created with I(group_desc) as the description. + - I(group_name) can accept values of type str and list. - You can specify only one of I(cidr_ip), I(cidr_ipv6), I(ip_prefix), I(group_id) and I(group_name). group_desc: