Skip to content

Commit

Permalink
Pin Terraform binary version to 1.5.5 (#715)
Browse files Browse the repository at this point in the history
## 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.
  • Loading branch information
pietern authored and lennartkats-db committed Sep 1, 2023
1 parent c44e15f commit 3f14aee
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bundle/deploy/terraform/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 3f14aee

Please sign in to comment.