Skip to content

Commit

Permalink
use the terraform v1.1.0-alpha version when absent
Browse files Browse the repository at this point in the history
  • Loading branch information
magodo committed Aug 24, 2021
1 parent 6e386b5 commit 226b35d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ import (
"github.com/hashicorp/terraform-exec/tfexec"
)

// The minimun required terraform version that has the `terraform add` command.
var minRequiredTFVersion = version.Must(version.NewSemver("1.1.0-alpha20210811"))

type Meta struct {
subscriptionId string
resourceGroup string
Expand Down Expand Up @@ -63,7 +66,7 @@ func NewMeta(ctx context.Context, rg string) (*Meta, error) {
}

// Initialize the Terraform
execPath, err := FindTerraform(ctx, tfDir, version.Must(version.NewVersion("1.1.0")))
execPath, err := FindTerraform(ctx, tfDir, minRequiredTFVersion)
if err != nil {
return nil, fmt.Errorf("error finding a terraform exectuable: %w", err)
}
Expand Down

0 comments on commit 226b35d

Please sign in to comment.