diff --git a/docs/examples/ref_destroy.rb b/docs/examples/ref_destroy.rb index a3d4bda2..350fe16c 100644 --- a/docs/examples/ref_destroy.rb +++ b/docs/examples/ref_destroy.rb @@ -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 diff --git a/lib/chef/resource/aws_subnet.rb b/lib/chef/resource/aws_subnet.rb index 7baa05ce..6e22e2a2 100644 --- a/lib/chef/resource/aws_subnet.rb +++ b/lib/chef/resource/aws_subnet.rb @@ -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 diff --git a/lib/chef/resource/aws_vpc.rb b/lib/chef/resource/aws_vpc.rb index 8ae995d8..06df66fb 100644 --- a/lib/chef/resource/aws_vpc.rb +++ b/lib/chef/resource/aws_vpc.rb @@ -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.