Skip to content

Commit

Permalink
fixes ec2_transit_gateway bug with empty description.
Browse files Browse the repository at this point in the history
sets a default description of  ""
  • Loading branch information
paulczar authored and GomathiselviS committed Sep 23, 2024
1 parent 008b515 commit 213fd92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/modules/ec2_transit_gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ def get_matching_tgw(self, tgw_id, description=None, skip_deleted=True):
tgws.extend(response["TransitGateways"])

for gateway in response.get("TransitGateways", []):
if description == gateway["Description"] and gateway["State"] != "deleted":
if description == gateway.get("Description", "") and gateway["State"] != "deleted":
tgws.append(gateway)

if len(tgws) > 1:
Expand Down

0 comments on commit 213fd92

Please sign in to comment.