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 May 7, 2024
1 parent c065fd3 commit 1435a04
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 @@ -322,7 +322,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 1435a04

Please sign in to comment.