From dd0869eec8e870cb582e55eec000fe6cc982fa92 Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Tue, 9 Apr 2024 14:05:17 +0000 Subject: [PATCH] Remove use of ignored boto3 parameter (#2075) (#2076) [PR #2075/b5d4ea70 backport][stable-7] Remove use of ignored boto3 parameter This is a backport of PR #2075 as merged into main (b5d4ea7). SUMMARY get_ec2_security_group_ids_from_names() has ignored the boto3 parameter since release 4.0.0, drop the use. ISSUE TYPE Feature Pull Request COMPONENT NAME plugins/modules/glue_connection.py plugins/modules/autoscaling_launch_config.py ADDITIONAL INFORMATION Reviewed-by: Mark Chappell --- changelogs/fragments/boto3_equals.yml | 3 +++ plugins/modules/autoscaling_launch_config.py | 2 +- plugins/modules/glue_connection.py | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/boto3_equals.yml diff --git a/changelogs/fragments/boto3_equals.yml b/changelogs/fragments/boto3_equals.yml new file mode 100644 index 00000000000..4566bc77b04 --- /dev/null +++ b/changelogs/fragments/boto3_equals.yml @@ -0,0 +1,3 @@ +trivial: +- glue_connection - stop passing ``boto3`` into ``get_ec2_security_group_ids_from_names()`` it is no longer used. +- autoscaling_launch_config - stop passing ``boto3`` into ``get_ec2_security_group_ids_from_names()`` it is no longer used. diff --git a/plugins/modules/autoscaling_launch_config.py b/plugins/modules/autoscaling_launch_config.py index 78b7ee23352..cd411e57606 100644 --- a/plugins/modules/autoscaling_launch_config.py +++ b/plugins/modules/autoscaling_launch_config.py @@ -533,7 +533,7 @@ def create_launch_config(connection, module): module.fail_json_aws(e, msg="Failed to connect to AWS") try: security_groups = get_ec2_security_group_ids_from_names( - module.params.get("security_groups"), ec2_connection, vpc_id=vpc_id, boto3=True + module.params.get("security_groups"), ec2_connection, vpc_id=vpc_id ) except (botocore.exceptions.ClientError, botocore.exceptions.BotoCoreError) as e: module.fail_json_aws(e, msg="Failed to get Security Group IDs") diff --git a/plugins/modules/glue_connection.py b/plugins/modules/glue_connection.py index 18039a8616d..f8667116237 100644 --- a/plugins/modules/glue_connection.py +++ b/plugins/modules/glue_connection.py @@ -299,7 +299,7 @@ def create_or_update_glue_connection(connection, connection_ec2, module, glue_co if module.params.get("security_groups") is not None: # Get security group IDs from names security_group_ids = get_ec2_security_group_ids_from_names( - module.params.get("security_groups"), connection_ec2, boto3=True + module.params.get("security_groups"), connection_ec2 ) params["ConnectionInput"]["PhysicalConnectionRequirements"]["SecurityGroupIdList"] = security_group_ids if module.params.get("subnet_id") is not None: