I am trying to perform a check/test using chef inspec on resources in aws for the below attributes:
EC2:
1 : ec2-instance-detailed-monitoring-enabled (part of aws_launch_confiuration but not aws_ec2_instance)
2: Check instances for specified tenancy (part of aws_vpc but not aws_ec2_instance)
3; Check the Amazon EC2 instances in your account are managed by AWS Systems Manager
4: Enabled termination protection
5: Check that security groups are attached to Amazon Elastic Compute Cloud (Amazon EC2) instances
I cant find any above property/attribute for these resources in documentation.
Apologies for such a long list, but just want to get the ides for how to test for these.
OK, so a link for additional properties in the docs give the attributes that i am looking for but on using it it throws error as undefined method. please help
describe aws_ec2_instance(instanceid) do
its('monitoring.state') { should cmp "enabled"}
end
the above test throws error as "monitoring method is undefined"