π§ AWS Account IAM Access Analyzer is not enabled for all regions - prod.logic.yaml π’
- Contextual name: π§ prod.logic.yaml π’
- ID:
/ce/ca/aws/account/iam-external-access-analyzer-for-all-regions/prod.logic.yaml
- Located in: π AWS Account IAM Access Analyzer is not enabled for 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 IAM Access Analyzer - object.extracts.yaml
- π AWS Account Region - object.extracts.yaml
- π AWS Account - object.extracts.yaml
- π§ͺ test-data.json
Test Results π’β
Generated at: 2025-04-24T23:44:08.494994346Z Open
Result | Id | Condition Index | Condition Text | Runtime Error |
---|---|---|---|---|
π’ | test1 | βοΈ 200 | βοΈ otherwise | βοΈ null |
π’ | test2 | βοΈ 199 | βοΈ CA10A1__AWS_IAM_Access_Analyzers__r.count(COMPLIANT) == CA10__AWS_Account_Regions__r.count(COMPLIANT) | βοΈ null |
Generationβ
File | MD5 | |
---|---|---|
Open | /ce/ca/aws/account/iam-external-access-analyzer-for-all-regions/policy.yaml | 60B6AA2A70CCCAB14C844CC20D1C6E6B |
Open | /ce/ca/aws/account/iam-external-access-analyzer-for-all-regions/prod.logic.yaml | 2C6E705582C8B0BA2E0960984E485181 |
Open | /types/CA10A1__CaAwsIamAccessAnalyzer__c/object.extracts.yaml | 72D380FE6BF927AAF32782CD4F6277F7 |
Open | /ce/ca/aws/account/iam-external-access-analyzer-for-all-regions/test-data.json | 98EEF7F281AADBE8F102C11F1CDE7AB7 |
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/iam-external-access-analyzer-for-all-regions/prod.logic.yaml
Generate DEBUG scriptβ
java -jar repo-manager.jar policies generate DEBUG /ce/ca/aws/account/iam-external-access-analyzer-for-all-regions/prod.logic.yaml
Generate CAPTURE_TEST_DATA scriptβ
java -jar repo-manager.jar policies generate CAPTURE_TEST_DATA /ce/ca/aws/account/iam-external-access-analyzer-for-all-regions/prod.logic.yaml
Generate TESTS scriptβ
java -jar repo-manager.jar policies generate TESTS /ce/ca/aws/account/iam-external-access-analyzer-for-all-regions/prod.logic.yaml
Execute testsβ
java -jar repo-manager.jar policies test /ce/ca/aws/account/iam-external-access-analyzer-for-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: "COMPLIANT"
currentStateMessage: "IAM Access analyzer is enabled for all regions."
check:
IS_EQUAL:
left:
RELATED_LIST_COUNT:
status: "COMPLIANT"
relationshipName: "CA10A1__AWS_IAM_Access_Analyzers__r"
right:
RELATED_LIST_COUNT:
status: "COMPLIANT"
relationshipName: "CA10__AWS_Account_Regions__r"
otherwise:
status: "INCOMPLIANT"
currentStateMessage: "IAM Access analyzer is not enabled for all regions."
remediationMessage: "Configure the IAM Access analyzer in each active region."
relatedLists:
- relationshipName: "CA10A1__AWS_IAM_Access_Analyzers__r"
importExtracts:
- file: /types/CA10A1__CaAwsIamAccessAnalyzer__c/object.extracts.yaml
conditions:
- status: "INAPPLICABLE"
currentStateMessage: "This is not an External Access Analyzer."
check:
AND:
args:
- NOT_EQUAL:
left:
EXTRACT: "CA10A1__type__c"
right:
TEXT: "ACCOUNT"
- NOT_EQUAL:
left:
EXTRACT: "CA10A1__type__c"
right:
TEXT: "ORGANIZATION"
- status: "COMPLIANT"
currentStateMessage: "Active AWS IAM External Access Analyzer."
check:
IS_EQUAL:
left:
EXTRACT: "CA10A1__status__c"
right:
TEXT: "ACTIVE"
otherwise:
status: "INAPPLICABLE"
currentStateMessage: "There is no active AWS IAM External Access Analyzer."
- relationshipName: "CA10__AWS_Account_Regions__r"
importExtracts:
- file: /types/CA10__CaAwsAccountRegion__c/object.extracts.yaml
conditions:
- status: "COMPLIANT"
currentStateMessage: "Active AWS Account Region."
check:
NOT_EQUAL:
left:
EXTRACT: "CA10__status__c"
right:
TEXT: "not-opted-in"
otherwise:
status: "INAPPLICABLE"
currentStateMessage: "This AWS Account Region not active."