Advertisement
Guest User

Untitled

a guest
Oct 13th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. title "DemoECS: Test AWS VPC Checks"
  2.  
  3. vpc_id = attribute('vpc_id')
  4. vpc_cidr = attribute('vpc_cidr')
  5.  
  6. control "aws-vpc-DemoEcs" do
  7. title "Check DemoECS VPC"
  8. desc "
  9. Check AWS VPC
  10. "
  11. impact 1.0
  12. describe aws_vpc(vpc_id) do
  13. it { should exist }
  14. its("cidr_block") { should cmp vpc_cidr }
  15. its("dhcp_options_id") { should cmp "dopt-20df8947" }
  16. its("instance_tenancy") { should cmp "default" }
  17. end
  18. end
  19.  
  20.  
  21. control "Check AWC VPC Flow Logs Enabled" do
  22. title "Check AWC VPC Flow Logs Enabled"
  23. desc "
  24. Check AWC VPC Flow Logs Enabled
  25. "
  26. impact 1.0
  27.  
  28. aws_vpcs.vpc_ids.each do |vpc|
  29. describe aws_flow_log(vpc_id: vpc) do
  30. it { should exist }
  31. end
  32. end
  33. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement