π§ AWS Account EBS Volume Encryption Attribute is not enabled in all regions - prod.logic.yaml π’
- Contextual name: π§ prod.logic.yaml π’
- ID:
/ce/ca/aws/account/ebs-volume-encryption-attribute-in-all-regions/prod.logic.yaml
- Located in: π AWS Account EBS Volume Encryption Attribute is not enabled in all regions π’
Flagsβ
- π’ Logic test success
- π’ Logic with extracts
- π’ Logic with test data
Input Typeβ
Type | API Name | Extracts | Extract Files | Logic Files | |
---|---|---|---|---|---|
π | π AWS Account | CA10__CaAwsAccount__c | 1 | 1 | 11 |
Usesβ
- π AWS Account Region - object.extracts.yaml
- π AWS Account - object.extracts.yaml
- π§ͺ test-data.json
Test Results π’β
Generated at: 2025-04-24T23:44:07.434669248Z Open
Result | Id | Condition Index | Condition Text | Runtime Error |
---|---|---|---|---|
π’ | a01 | βοΈ 199 | βοΈ CA10__AWS_Account_Regions__r.has(INCOMPLIANT) | βοΈ null |
π’ | a02 | βοΈ 299 | βοΈ CA10__AWS_Account_Regions__r.has(UNDETERMINED) | βοΈ null |
π’ | a03 | βοΈ 399 | βοΈ CA10__AWS_Account_Regions__r.has(COMPLIANT) | βοΈ null |
π’ | a04 | βοΈ 400 | βοΈ otherwise | βοΈ null |
Generationβ
File | MD5 | |
---|---|---|
Open | /ce/ca/aws/account/ebs-volume-encryption-attribute-in-all-regions/policy.yaml | 1098E00504C14BFE621CC615231D0845 |
Open | /ce/ca/aws/account/ebs-volume-encryption-attribute-in-all-regions/prod.logic.yaml | 5827CA8DE9AF040F66AF5D74622CA621 |
Open | /ce/ca/aws/account/ebs-volume-encryption-attribute-in-all-regions/test-data.json | 5ADF34894BF702702382EF2ECD3C4D35 |
Open | /types/CA10__CaAwsAccountRegion__c/object.extracts.yaml | B5D54D4844B8E77238E14E730ABEE3C4 |
Open | /types/CA10__CaAwsAccount__c/object.extracts.yaml | FF575E27BEBAF3C8E85968E44798945B |
Generate FULL scriptβ
java -jar repo-manager.jar policies generate FULL /ce/ca/aws/account/ebs-volume-encryption-attribute-in-all-regions/prod.logic.yaml
Generate DEBUG scriptβ
java -jar repo-manager.jar policies generate DEBUG /ce/ca/aws/account/ebs-volume-encryption-attribute-in-all-regions/prod.logic.yaml
Generate CAPTURE_TEST_DATA scriptβ
java -jar repo-manager.jar policies generate CAPTURE_TEST_DATA /ce/ca/aws/account/ebs-volume-encryption-attribute-in-all-regions/prod.logic.yaml
Generate TESTS scriptβ
java -jar repo-manager.jar policies generate TESTS /ce/ca/aws/account/ebs-volume-encryption-attribute-in-all-regions/prod.logic.yaml
Execute testsβ
java -jar repo-manager.jar policies test /ce/ca/aws/account/ebs-volume-encryption-attribute-in-all-regions/prod.logic.yaml
Contentβ
---
inputType: "CA10__CaAwsAccount__c"
testData:
- file: test-data.json
importExtracts:
- file: /types/CA10__CaAwsAccount__c/object.extracts.yaml
conditions:
- status: "INCOMPLIANT"
currentStateMessage: "Default encryption of EBS volume disabled"
remediationMessage: "Enable EBS Volume Encryption"
check:
RELATED_LIST_HAS:
status: "INCOMPLIANT"
relationshipName: "CA10__AWS_Account_Regions__r"
- status: "UNDETERMINED"
currentStateMessage: "Can't determine default status of EBS encryption"
check:
RELATED_LIST_HAS:
status: "UNDETERMINED"
relationshipName: "CA10__AWS_Account_Regions__r"
- status: "COMPLIANT"
currentStateMessage: "Default encryption of EBS volume enabled"
check:
RELATED_LIST_HAS:
status: "COMPLIANT"
relationshipName: "CA10__AWS_Account_Regions__r"
otherwise:
status: "INAPPLICABLE"
currentStateMessage: "Region not in use"
relatedLists:
- relationshipName: "CA10__AWS_Account_Regions__r"
importExtracts:
- file: "/types/CA10__CaAwsAccountRegion__c/object.extracts.yaml"
conditions:
- status: "UNDETERMINED"
currentStateMessage: "Can't determine default status of EBS encryption"
check:
AND:
args:
- NOT_EQUAL:
left:
EXTRACT: "CA10__status__c"
right:
TEXT: "not-opted-in"
- IS_EMPTY:
arg:
EXTRACT: "CA10__ebsStorageEncryption__c"
- status: "INCOMPLIANT"
currentStateMessage: "Default encryption of EBS volume disabled for region"
check:
AND:
args:
- NOT_EQUAL:
left:
EXTRACT: "CA10__status__c"
right:
TEXT: "not-opted-in"
- IS_EQUAL:
left:
EXTRACT: "CA10__ebsStorageEncryption__c"
right:
TEXT: "Disabled"
- status: "COMPLIANT"
currentStateMessage: "Default encryption of EBS volume enabled for region"
check:
AND:
args:
- NOT_EQUAL:
left:
EXTRACT: "CA10__status__c"
right:
TEXT: "not-opted-in"
- IS_EQUAL:
left:
EXTRACT: "CA10__ebsStorageEncryption__c"
right:
TEXT: "Enabled"
otherwise:
status: "INAPPLICABLE"
currentStateMessage: "Region should be in-use."