🧠 AWS EC2 Launch Template Latest Version is not configured to require IMDSv2 - prod.logic.yaml🟢
- Contextual name: 🧠 prod.logic.yaml🟢
- ID:
/ce/ca/aws/ec2/launch-template-imdsv2/prod.logic.yaml - Tags:
Uses
Test Results 🟢
Generated at: 2026-04-25T12:02:35.796018066Z Open
| Result | Id | Condition Index | Condition Text | Runtime Error |
|---|---|---|---|---|
| 🟢 | test1 | ✔️ 99 | ✔️ isDisappeared(CA10A1__disappearanceTime__c) | ✔️ null |
| 🟢 | test2 | ✔️ 199 | ✔️ isEmptyLookup('CA10A1__latestVersion__r') | ✔️ null |
| 🟢 | test3 | ✔️ 199 | ✔️ isEmptyLookup('CA10A1__latestVersion__r') | ✔️ null |
| 🟢 | test4 | ✔️ 299 | ✔️ extract('CA10A1__latestVersion__r.CA10A1__metadataHttpEndpoint__c') == 'disabled' | ✔️ null |
| 🟢 | test5 | ✔️ 399 | ✔️ extract('CA10A1__latestVersion__r.CA10A1__metadataHttpTokens__c') == 'required' | ✔️ null |
| 🟢 | test6 | ✔️ 399 | ✔️ extract('CA10A1__latestVersion__r.CA10A1__metadataHttpTokens__c') == 'required' | ✔️ null |
| 🟢 | test7 | ✔️ 400 | ✔️ otherwise | ✔️ null |
| 🟢 | test8 | ✔️ 400 | ✔️ otherwise | ✔️ null |
Generation Bundle
| File | MD5 | |
|---|---|---|
| Open | /ce/ca/aws/ec2/launch-template-imdsv2/policy.yaml | 05B796343E2D1F15435B451FBD0CDD99 |
| Open | /ce/ca/aws/ec2/launch-template-imdsv2/prod.logic.yaml | 80F6AB6AA06F10F6B8B899BC6CF0909E |
| Open | /ce/ca/aws/ec2/launch-template-imdsv2/test-data.json | 80DC2BD5E9124CE9AA2CFA58FC7C5100 |
| Open | /types/CA10A1__CaAwsEc2LaunchTemplateVersion__c/object.extracts.yaml | 0CF0050EB6BA851041A4284E9AEA6611 |
Available Commands
repo-manager policies generate FULL /ce/ca/aws/ec2/launch-template-imdsv2/prod.logic.yaml
repo-manager policies generate DEBUG /ce/ca/aws/ec2/launch-template-imdsv2/prod.logic.yaml
repo-manager policies generate CAPTURE_TEST_DATA /ce/ca/aws/ec2/launch-template-imdsv2/prod.logic.yaml
repo-manager policies generate TESTS /ce/ca/aws/ec2/launch-template-imdsv2/prod.logic.yaml
# Execute tests
repo-manager policies test /ce/ca/aws/ec2/launch-template-imdsv2/prod.logic.yaml
Content
---
inputType: "CA10A1__CaAwsEc2LaunchTemplate__c"
importExtracts:
- file: "/types/CA10A1__CaAwsEc2LaunchTemplateVersion__c/object.extracts.yaml"
testData:
- file: "test-data.json"
conditions:
- status: "UNDETERMINED"
currentStateMessage: "The latest launch template version is not present in the CMDB."
check:
IS_EMPTY_LOOKUP: "CA10A1__latestVersion__r"
- status: "INCOMPLIANT"
currentStateMessage: "The latest launch template version disables the instance metadata service HTTP endpoint."
remediationMessage: "Publish a new launch template version with the instance metadata service HTTP endpoint enabled and IMDSv2 required."
check:
IS_EQUAL:
left:
EXTRACT: "CA10A1__latestVersion__r.CA10A1__metadataHttpEndpoint__c"
right:
TEXT: "disabled"
- status: "COMPLIANT"
currentStateMessage: "The latest launch template version requires IMDSv2."
check:
IS_EQUAL:
left:
EXTRACT: "CA10A1__latestVersion__r.CA10A1__metadataHttpTokens__c"
right:
TEXT: "required"
otherwise:
status: "INCOMPLIANT"
currentStateMessage: "The latest launch template version does not require IMDSv2."
remediationMessage: "Publish a new launch template version that requires IMDSv2."