---
inputType: "CA10__CaAwsEfsMountTarget__c"
importExtracts:
  - file: "/types/CA10__CaAwsSubnet__c/object.extracts.yaml"
testData:
  - file: "test-data.json"
conditions:
  - status: "UNDETERMINED"
    currentStateMessage: "Unable to determine the subnet configuration for the EFS Mount Target."
    check:
      IS_EMPTY_LOOKUP: CA10__subnet__r
  - status: "INCOMPLIANT"
    currentStateMessage: "The EFS Mount Target is in a subnet configured to automatically assign public IP addresses."
    remediationMessage: "Move the EFS Mount Target to a private subnet or disable the 'Auto-assign public IPv4 address' setting on the current subnet."
    check:
      IS_EQUAL:
        left:
          EXTRACT: "CA10__subnet__r.CA10__mapPublicIpOnLaunch__c"
        right:
          BOOLEAN: true
otherwise:
  status: COMPLIANT
  currentStateMessage: "The EFS Mount Target is in a subnet that does not automatically assign public IP addresses."