python-terraform
python-terraform copied to clipboard
Support for terraform 0.15
Terraform version 0.15.0 did remove flat --var-file, which is used for creating temporary file:
cmds += [f"-var-file={filename}"]
Terraform release note https://github.com/hashicorp/terraform/blob/v0.15/CHANGELOG.md:
The -var and -var-file options are no longer available on terraform validate. These were deprecated and have had no effect since Terraform v0.12
User see output:
error: b'Too many command line arguments. Did you mean to use -chdir?\n'
Given the slew of differences between Terraform below 0.12.x and above 0.12.x, does it make sense to drop support of 0.11 and below in the next major release?
@Spikeophant I found this post:
A coworker and I are going to rewrite this entire project, focusing on tf 12 and fully supporting all functionality therein, as well as decoupling somethings that we feel should not be coupled as tightly as they are in the options building that we have today. If anyone is interested in working with us on this we feel it will take 2 weekends of work, and one of those will be planning so we can address all bugs in the backlog. My work is sponsoring us to do this, so he and I will be able to host code reviews online, planning online, etc. I have been very busy at work and we use this project heavily, we'd like to finally get the improvements I have been wanting to do out the door. The new python terraform version will rev to 0.12.0, and we'll leave the 0.10 codebase out there for bugfixes if anyone wants to do so. We will ONLY support TF 12+ in the rewrite however, and ONLY python 3.6+. Let me know if you are interested and I'll get you info on dates. Thanks! Spikeophant
I'm quite invested in python-terraform and am I interested on the status. Is this going to be a new package? Is the current work published to GitHub?
0.15.2 and 1.0.0 are probably more important targets at this time.
for those running into this issue, I managed to get around it by calling Terraform().cmd() directly, like this:
from python_terraform import Terraform
tf = Terraform()
tf.cmd("init -reconfigure -backend=true")
ugly, I know. but does the job while this issue is not properly fixed.
For me personally the issue is with 0.15+ but as I prefer sticking to the latest version if https://github.com/beelit94/python-terraform/issues/116 will be merged and allow us to work with the latest terraform 1.x.x I'll be happy closing this ticket