import requests


def get_metadata_value(key):
    """
    Fetch the key from the metadata server
    """
    url = 'http://metadata/computeMetadata/v1/instance/' + key
    headers = {'content-type': 'application/json', 'Metadata-Flavor': 'Google'}
    r = requests.get(url, headers=headers)
    return r.text