We use the Amazon NAT gateways but Chef Provisioning AWS does not yet have support. So, I thought I would roll up my sleeves and use a ruby_block to create them. That went well and I stored the id of the NAT gateway in a databag (similar to the way that Chef Provisioning does). Then, i went to use that string in a aws_route_table resource block and I’m getting an error that I’m not sure how to debug:
RuntimeError
------------
Chef::Resource::AwsInstance[nat-0cea5be928cc9ac09] does not exist!
My NAT gateway is nat-0cea5be928cc9ac09. The resource block in question is:
private_route_table_1 = aws_route_table “private-route-table1-#{node[‘firstfuel’][‘vpc’][‘vpc_name’]}” do
vpc node[‘firstfuel’][‘vpc’][‘vpc_name’]
routes ‘0.0.0.0/0’ => "#{nat_gateway_1[‘reference’][‘id’]}"
aws_tags :chef_type => "aws_route_table"
end
Am I doing something wrong or does the Chef Provisioning AWS gem only support AWS objects that it understands natively?