import tempfile
import tarfile
import io


def create_tar_gz_archive(file_name: str, file_content: str):
    """Create tar.gz archive with a single file with a specific content

    :param str file_name: Name of the file packed in archive
    :param str file_content: File content string
    :return: Absolute path to the file archive
    """

    with tempfile.NamedTemporaryFile('wb', suffix='.tar.gz', delete=False) as f:
        with tarfile.open(fileobj=f, mode='w:gz') as tar:
            data = file_content.encode('utf-8')
            info = tarfile.TarInfo(name=file_name)
            info.size = len(data)
            tar.addfile(tarinfo=info, fileobj=io.BytesIO(data))

    return tar.name