import logging


def get_cluster_details(container_client, cluster_id):
    """
    Gets the GKE cluster's metadata.
    This is passed to check_legacy_abac to validate the configuration.
    """
    try:
        cluster_details = container_client.get_cluster(name=cluster_id)
        return cluster_details
    except:
        logging.error(f"Cloud not get GKE cluster: {cluster_id} details.")
        raise