Skip to content

Commit

Permalink
Merge pull request #494 from chef/v2_route_table
Browse files Browse the repository at this point in the history
Fixing some errors I ran across with not using the V2 Route Table object
  • Loading branch information
tyler-ball authored Aug 3, 2016
2 parents e55953f + f54ddbf commit e4d35db
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion docs/examples/ref_destroy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@
# and finally delete the VPC (which deletes the main route table)
aws_vpc 'ref-vpc' do
main_route_table lazy {
self.aws_object.route_tables.select {|r| !r.main?}.first
rt = self.aws_object.route_tables.select {|r| !r.main?}.first
rt.id if rt
}
only_if { !self.aws_object.nil? }
end
Expand Down
2 changes: 1 addition & 1 deletion lib/chef/resource/aws_subnet.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class Chef::Resource::AwsSubnet < Chef::Provisioning::AWSDriver::AWSResourceWith
#
# By default, an implicit association with the main route table is made (`:default_to_main`)
#
attribute :route_table#, kind_of: [ String, AwsRouteTable, AWS::EC2::RouteTable ], equal_to: [ :default_to_main ]
attribute :route_table#, kind_of: [ String, AwsRouteTable, ::Aws::EC2::RouteTable ], equal_to: [ :default_to_main ]

#
# The Network ACL to associate with this subnet. Subnets may only
Expand Down
2 changes: 1 addition & 1 deletion lib/chef/resource/aws_vpc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class Chef::Resource::AwsVpc < Chef::Provisioning::AWSDriver::AWSResourceWithEnt
# - An actual `aws_route_table` resource.
# - An AWS `route_table` object.
#
attribute :main_route_table, kind_of: [ String, AwsRouteTable, AWS::EC2::RouteTable ]
attribute :main_route_table, kind_of: [ String, AwsRouteTable, ::Aws::EC2::RouteTable ]

#
# The routes for the main route table.
Expand Down

0 comments on commit e4d35db

Please sign in to comment.