turbot/aws_compliance

Query: ec2_instance_uses_imdsv2

Usage

powerpipe query aws_compliance.query.ec2_instance_uses_imdsv2

Steampipe Tables

SQL

select
arn as resource,
case
when metadata_options ->> 'HttpTokens' = 'optional' then 'alarm'
else 'ok'
end as status,
case
when metadata_options ->> 'HttpTokens' = 'optional' then title || ' not configured to use Instance Metadata Service Version 2 (IMDSv2).'
else title || ' configured to use Instance Metadata Service Version 2 (IMDSv2).'
end as reason
, region, account_id
from
aws_ec2_instance;

Controls

The query is being used by the following controls: