WIP: Import changes from gitlab/dda/python-terraform#123
WIP: Import changes from gitlab/dda/python-terraform#123Th0masL wants to merge 2 commits intobeelit94:developfrom
Conversation
| var_file: Optional[str] = None, | ||
| terraform_bin_path: Optional[str] = None, | ||
| is_env_vars_included: bool = True, | ||
| terraform_version: Optional[float] = 0.13 |
There was a problem hiding this comment.
Maybe we can find here sth better than float to encode terraform versions?
We will need comparison operators on the encoded versions.
Any idea?
There was a problem hiding this comment.
What is the purpose of this value ? Can't we detect the version that is currently installed and use it ?
There was a problem hiding this comment.
I've added a second comment at a location where we use the terraform version. There are many more locations like the commented one.
There was a problem hiding this comment.
Implemented your suggestion on our repo:
https://gitlab.com/domaindrivenarchitecture/python-terraform/-/merge_requests/2
What do you think ?
If you agree I will sqash & merge. You can bring back my change by cherry pick?
|
I think, we should reflect all changes since june 21 in the PR ... |
|
I've re-applied the changes since June 2021. Let me know if you see any other thing missing |
| default = kwargs.copy() | ||
| default["force"] = force | ||
| # force is no longer a flag in version >= 1.0 | ||
| if self.terraform_version < 1.0: |
There was a problem hiding this comment.
Here we use the terraform_version in order to distinguishe between 0.x & 1.x
|
Reintegrated the upstream changes & got green tests |
| def list_workspace(self) -> List[str]: | ||
| """List of workspaces | ||
|
|
There was a problem hiding this comment.
global_opts = self._generate_default_general_options(False) is needed here.
| def list_workspace(self) -> List[str]: | ||
| """List of workspaces | ||
|
|
There was a problem hiding this comment.
Line 454 should be (self.cmd(global_opts, "workspace", "list")[1] or '').split()
This PR contains the changes to support Terraform version 1.x, that have been applied on the gitlab repository dda/python-terraform