Advertisement
Guest User

Untitled

a guest
Oct 13th, 2019
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. aws_vpc_id = input('vpc_id')
  2. subnets_list = input(:subnets_list)
  3.  
  4. control 'aws-subnets-loop' do
  5.  
  6. impact 1.0
  7. title 'Loop across AWS VPC Subnets resource for detail.'
  8.  
  9. aws_subnets.where { vpc_id == aws_vpc_id }.subnet_ids.each do |subnet|
  10. describe aws_subnet(subnet) do
  11. it { should be_available }
  12. it { should_not be_mapping_public_ip_on_launch }
  13. its ('vpc_id') { should eq aws_vpc_id }
  14. its ('cidr_block') { should cmp subnets_list[subnet]['subnet_cidr'] }
  15. its ('availability_zone') { should cmp subnets_list[subnet]['subnet_az']}
  16. end
  17. end
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement