#!/usr/bin/env python
"""Invoke the Terraform environment manager."""
from __future__ import print_function

import subprocess
import sys

from runway.env_mgr.tfenv import TFEnvManager

if __name__ == "__main__":
    # No immediate plans to remove. Not to be done prior to 2.0
    print(
        'DEPRECATION NOTICE: the "tf-runway" command has been deprecated '
        'in favor of "runway tfenv run"',
        file=sys.stderr,
    )
    tf_bin = TFEnvManager().install()
    sys.exit(subprocess.call([tf_bin] + sys.argv[1:]))
