def get_deploy_without_precheck_recommended_roles()

in google_cloud_automlops/utils/utils.py [0:0]


def get_deploy_without_precheck_recommended_roles(defaults: dict) -> list:
    """Creates the list of recommended roles to run the deploy() step based on the user tooling
    selection determined during the generate() step. This function is called when precheck=False,
    which decreases the required list of permissions.

    Args:
        defaults (dict): Contents of the Defaults yaml file (config/defaults.yaml).

    Returns:
        list: Recommended roles to deploy with precheck=False.
    """
    recommended_roles = []
    if not defaults['tooling']['use_ci']:
        recommended_roles.extend(['roles/cloudbuild.builds.editor', 'roles/storage.admin', 'roles/aiplatform.user'])
    return recommended_roles