inspec/test/integration/default/verify/controls/aws_route_table.rb
Miah Johnson 046b2ef419 Skeletal Resource: aws_route_table (#217)
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2018-02-07 10:48:55 -05:00

33 lines
722 B
Ruby

fixtures = {}
[
'routetable_rtb_route_table_id',
'routetable_rtb_vpc_id',
].each do |fixture_name|
fixtures[fixture_name] = attribute(
fixture_name,
default: "default.#{fixture_name}",
description: 'See ../build/route_table.tf',
)
end
control "aws_route_table exists" do
describe aws_route_table do
it { should exist }
end
end
control "aws_route_table recall" do
describe aws_route_table(fixtures['routetable_rtb_route_table_id']) do
it { should exist}
end
end
control "aws_route_tables dont exist" do
describe aws_route_table('rtb-123abcde') do
it { should_not exist }
end
describe aws_route_table(route_table_id: 'rtb-123abcde') do
it { should_not exist }
end
end