def METHOD_NAME(terraform_file, contents):
    logger.info('Writing Terraform File: {0:s}'.format(terraform_file))
    with closing(open(terraform_file, 'w')) as f:
        if isinstance(contents, list):
            for resource in contents:
                f.write('{0:s}\n'.format(resource))
        else:
            f.write('{0:s}\n'.format(contents))
    return