# ec2\_vpc\_route\_table not working with NAT gateways

**URL:** <https://forum.ansible.com/t/ec2-vpc-route-table-not-working-with-nat-gateways/20786>\
**Category:** Ansible Project\
**Created:** [March 6, 2016, 4:28pm UTC](https://forum.ansible.com/t/ec2-vpc-route-table-not-working-with-nat-gateways/20786 "2016-03-06T16:28:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dean\_Mills](https://avatars.discourse-cdn.com/v4/letter/d/77aa72/32.png) [@Dean\_Mills](https://forum.ansible.com/u/Dean_Mills)\
**Post date:** [March 6, 2016, 4:28pm UTC](https://forum.ansible.com/t/ec2-vpc-route-table-not-working-with-nat-gateways/20786/1 "2016-03-06T16:28:16Z")

</div>

Having troubles trying to setup the route tables in a VPC with a NAT gateway as the target.

`

- name: Create Private B route tables  
ec2\_vpc\_route\_table:  
vpc\_id: ‘{{ vpc\_id }}’  
region: ‘{{ vpc\_region }}’  
subnets:
- ‘{{ vpc\_subnet\_private\_b }}’  
routes:
- dest: 0.0.0.0/0  
instance\_id: ‘nat-0f0e9840ce4984705’  
resource\_tags: { “Name”:‘Private B’ }  
register: vpc\_private\_b\_route\_table

`

The route table is created, but only has the default local route and not the one I am trying to create to the NAT gateway. Any ideas on what is going on or what I am doing wrong greatly appreciated!
