inspec/test/aws/default/verify/controls/aws_route_table.rb
Clinton Wolfe 532f42df89 Move files to locations for core - inspec AWS PR 219 and other new resources
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-02-08 09:36:20 -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