def get_backend_service_outputs(res_name, backend_name, region):
    """ Creates outputs for the backend service. """

    outputs = [
        {
            'name': 'name',
            'value': backend_name
        },
        {
            'name': 'selfLink',
            'value': '$(ref.{}.selfLink)'.format(res_name)
        }
    ]

    if region:
        outputs.append({'name': 'region', 'value': region})

    return outputs