Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Terraform v1.6 #157

Merged
merged 5 commits into from
Oct 5, 2023
Merged

Add support for Terraform v1.6 #157

merged 5 commits into from
Oct 5, 2023

Conversation

minamijoyo
Copy link
Owner

@minamijoyo minamijoyo commented Oct 2, 2023

All fixes we needed are related to tests:

  • Add Terraform v1.6.0 to the test matrix.
  • Fix an issue of localstack with the s3 backend.
  • Fix an issue of asserting switch-back test error messages.

@minamijoyo minamijoyo force-pushed the tf-1.6 branch 3 times, most recently from 3ecce3e to 4d5e981 Compare October 3, 2023 14:03
Starting from Terraform v1.6, the s3 backend configuration has changed,
and the tfmigrate acceptance test fails. I suspect that the
authentication mechanism may have been changed with the migration to
aws-sdk-go-v2; I have tried a few things and found that I can
authenticate by specifying the `iam_endpoint`. The `iam_endpoint`
argument has been deprecated since Terraformv1.6. It is recommended to
use the newly added `endpoints` argument, though, for running tests on
multiple Terraform versions, the test settings must remain compatible
with the older versions. This is a test-only issue, so I'll use the
deprecated `iam_endpoint` for now. In the future, we should change the
backend configuration depending on the Terraform version.
SwitchBackToRemoteFuncError tests verify error messages, but the error
message for missing bucket key in the s3 backend differs depending on
the Terraform version.
Define a helper function to hide the difference.
The hashicorp/go-version returns false when comparing pre-releases, for
example 1.6.0-rc1 >= 0.13. This is counter-intuitive for determining the
presence or absence of a feature, so remove the pre-release information
before comparing.
@minamijoyo minamijoyo force-pushed the tf-1.6 branch 3 times, most recently from a6096e9 to 9adfe7e Compare October 5, 2023 01:46
@minamijoyo minamijoyo changed the title [WIP] Add support for Terraform v1.6 Add support for Terraform v1.6 Oct 5, 2023
@minamijoyo minamijoyo merged commit 2c48951 into master Oct 5, 2023
@minamijoyo minamijoyo deleted the tf-1.6 branch October 5, 2023 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant