terraspec icon indicating copy to clipboard operation
terraspec copied to clipboard

Use and support Terraform 1.x

Open yitsushi opened this issue 3 years ago • 5 comments

Right the master uses github.com/hashicorp/terraform v0.14.9. As Terraform 1.0 was announced. Everything should work from v0.15, but Terraspec uses v0.14 which can be an issue (should not).

Starting with Terraform 0.15 and continuing through the lifecycle of 1.x, you can now upgrade to a new Terraform version and your workflows will continue to be operational, just as they were in those prior versions. There is no requirement for upgrade tools, refactoring, or other changes in order to use Terraform 1.x.

At the same time "Terraform Plugin SDK v1 End of Life".

A separate branch for that would be good/enough to start experimenting with it.

We will start updating our tooling in a few weeks, so we will try to update it and come back if something blows up. If everything is working, we will come back with a PR if it's not resolved yet.

yitsushi avatar Jun 29 '21 09:06 yitsushi

Hello

I started to check if I could upgrade terraform dependency to 1.x but quickly found that : https://github.com/hashicorp/terraform/pull/28723 Basically all terraform code terraspec was relying on has been moved to internal package, making it impossible to use anymore.

With a huuuge refactoring, I may be able to keep mocking all plugin calls thanks to the TF_REATTACH_PROVIDER environment variable (https://github.com/hashicorp/terraform/blob/main/main.go#L252). This environment variable exists in official documentation so I can hope this will be supported in the long term :crossed_fingers:

It's a very important piece of work to move to that approach. I hope I'll find time to manage it

nhurel avatar Jun 29 '21 17:06 nhurel

It's sad, thanks for checking it.

yitsushi avatar Jun 30 '21 07:06 yitsushi

Hi @nhurel I know we had been working on trying to get it working with newer tf versions and IIRC you'd had a branch working on it. Is there any chance of getting a new release with support for 1.x?

wyardley avatar Jan 07 '22 00:01 wyardley

Hello @wyardley , Unfortunately, with terraform code moved to an internal package in their source code, I can't add support for terraform 1.x.

nhurel avatar Jan 08 '22 21:01 nhurel

Ok, thanks for responding.

wyardley avatar Jan 08 '22 22:01 wyardley