def METHOD_NAME(tfstate):
    """
    Parses the terraform state file passing different resource types to the right handler  terraform version < v0.13.0
    """
    ret = {}
    modules = tfstate.get("modules")
    if not modules:
        log.error("Malformed tfstate file. No modules found")
        return ret
    for module in modules:
        resources = module.get("resources", [])
        for resource_name, resource in resources.items():
            roster_entry = None
            if resource["type"] == "salt_host":
                roster_entry = _handle_old_salt_host_resource(resource)
            if not roster_entry:
                continue
            minion_id = roster_entry.get(MINION_ID, resource.get("id"))
            if not minion_id:
                continue
            if MINION_ID in roster_entry:
                del roster_entry[MINION_ID]
            _add_ssh_key(roster_entry)
            ret[minion_id] = roster_entry
    return ret