def METHOD_NAME(context):
    """ Entry point for the deployment resources. """
    properties = context.properties
    name = properties.get('name', context.env['name'])
    project_id = properties.get('project', context.env['project'])
    image = context.properties.get('image')
    region = properties['region']
    cluster_config = get_gce_cluster_config(properties)
    cluster = {
        'name': context.env['name'],
        # https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.clusters
        'type': 'gcp-types/dataproc-v1:projects.regions.clusters',
        'properties':
            {
                'clusterName': name,
                'projectId': project_id,
                'region': region,
                'config': {
                    'gceClusterConfig': cluster_config,
                }
            }
    }
    for prop in ['configBucket', 'softwareConfig', 'initializationActions', 'encryptionConfig']:
        add_optional_property(cluster['properties']['config'], properties, prop)
    add_optional_property(cluster['properties'], properties, 'labels')
    outputs = [
        {
            'name': 'name',
            'value': name
        },
        {
            'name': 'configBucket',
            'value': '$(ref.{}.config.configBucket)'.format(context.env['name'])
        }
    ]
    for instance_group in ['master', 'worker', 'secondaryWorker']:
        if instance_group in properties:
            instance_group_output = set_instance_group_config(
                properties,
                cluster,
                image,
                instance_group
            )
            outputs.append(instance_group_output)
    return {'resources': [cluster], 'outputs': outputs}