Merge pull request #1046 from shawnsi/vpc-route-table

Check mode support for VPC route table creation
This commit is contained in:
Brian Coca 2015-10-19 11:31:21 -04:00
commit 618ed0012c

View file

@ -498,9 +498,12 @@ def ensure_route_table_present(connection, module):
# If no route table returned then create new route table
if route_table is None:
try:
route_table = connection.create_route_table(vpc_id, check_mode)
route_table = connection.create_route_table(vpc_id, module.check_mode)
changed = True
except EC2ResponseError, e:
except EC2ResponseError as e:
if e.error_code == 'DryRunOperation':
module.exit_json(changed=True)
module.fail_json(msg=e.message)
if routes is not None: