Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mandar242 committed Oct 23, 2024
1 parent b9f5670 commit 0a10ea6
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions plugins/modules/ec2_transit_gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
RETURN = r"""
transit_gateway:
description: The attributes of the transit gateway.
type: complex
type: dict
returned: I(state=present)
contains:
creation_time:
Expand All @@ -130,7 +130,7 @@
options:
description: The options attributes of the transit gateway.
returned: always
type: complex
type: dict
contains:
amazon_side_asn:
description:
Expand Down Expand Up @@ -219,7 +219,6 @@

from ansible.module_utils.common.dict_transformations import camel_dict_to_snake_dict

from ansible_collections.amazon.aws.plugins.module_utils.ec2 import AnsibleEC2Error
from ansible_collections.amazon.aws.plugins.module_utils.ec2 import create_ec2_transit_gateway
from ansible_collections.amazon.aws.plugins.module_utils.ec2 import delete_ec2_transit_gateway
from ansible_collections.amazon.aws.plugins.module_utils.ec2 import describe_ec2_transit_gateways
Expand Down Expand Up @@ -348,10 +347,7 @@ def create_tgw(self, description: str) -> Dict[str, Any]:

params = {"Description": description, "Options": options}

try:
response = create_ec2_transit_gateway(self._connection, **params)
except AnsibleEC2Error as e:
self._module.fail_json_aws_error(e)
response = create_ec2_transit_gateway(self._connection, **params)

tgw_id = response["TransitGatewayId"]

Expand Down

0 comments on commit 0a10ea6

Please sign in to comment.