inspec/test/integration/default/verify/controls/aws_route_table.rb

34 lines
722 B
Ruby
Raw Normal View History

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