From 46b999ed426ac122a0b915ad8a49bd7eec809493 Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Wed, 30 Aug 2023 16:08:37 +0200 Subject: [PATCH] Pin Terraform binary version to 1.5.5 (#715) ## Changes The installer doesn't respect the version constraints if they are specified. Source: [the vc argument is not used](https://github.com/hashicorp/hc-install/blob/850464c6016513fc7ad47114d010080ec16f32cb/releases/latest_version.go#L158-L177). ## Tests Confirmed manually. --- bundle/deploy/terraform/init.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bundle/deploy/terraform/init.go b/bundle/deploy/terraform/init.go index 924c1f090..6df7b8d48 100644 --- a/bundle/deploy/terraform/init.go +++ b/bundle/deploy/terraform/init.go @@ -55,10 +55,10 @@ func (m *initialize) findExecPath(ctx context.Context, b *bundle.Bundle, tf *con } // Download Terraform to private bin directory. - installer := &releases.LatestVersion{ - Product: product.Terraform, - Constraints: version.MustConstraints(version.NewConstraint("<=1.5.5")), - InstallDir: binDir, + installer := &releases.ExactVersion{ + Product: product.Terraform, + Version: version.Must(version.NewVersion("1.5.5")), + InstallDir: binDir, } execPath, err = installer.Install(ctx) if err != nil {