Merge pull request #1046 from shawnsi/vpc-route-table
Check mode support for VPC route table creation
This commit is contained in:
commit
618ed0012c
1 changed files with 5 additions and 2 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue