diff --git a/.travis.yml b/.travis.yml index 28d4bc3..a310b33 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,9 +12,8 @@ python: before_install: 'sudo apt-get install unzip' before_script: - 'wget https://releases.hashicorp.com/terraform/0.7.11/terraform_0.7.11_linux_amd64.zip' - - 'mkdir terraform' - - 'unzip terraform_0.7.11_linux_amd64.zip -d terraform' - - 'sudo ln -s $PWD/terraform/terraform /usr/local/terraform' + - 'unzip terraform_0.7.11_linux_amd64.zip' + - './terraform --version' install: - "pip install -r test/requirements.txt" diff --git a/python_terraform/__init__.py b/python_terraform/__init__.py index d9067ac..5b947a3 100644 --- a/python_terraform/__init__.py +++ b/python_terraform/__init__.py @@ -19,13 +19,15 @@ class Terraform: state=None, variables=None, parallelism=None, - var_file=None): + var_file=None, + terraform_bin_path=None): self.working_dir = working_dir self.state = state self.targets = [] if targets is None else targets self.variables = dict() if variables is None else variables self.parallelism = parallelism - self.terraform_bin_path = 'terraform' + self.terraform_bin_path = terraform_bin_path \ + if terraform_bin_path else 'terraform' self.var_file = var_file self.input = False