Policy Packs
Enforce IMDSv2 for AWS EC2 Instances

Policy Setting: AWS > EC2 > Instance > Metadata Service

Policies

This policy setting is dependent on the following policy types:

Source

resource "turbot_policy_setting" "aws_ec2_instance_metadata_service" {
resource = turbot_policy_pack.main.id
type = "tmod:@turbot/aws-ec2#/policy/types/instanceMetadataService"
value = "Check: Enabled for V2 only"
# value = "Check: Enabled for V1 and V2"
# value = "Enforce: Enabled for V1 and V2"
# value = "Enforce: Enabled for V2 only"
}