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

Remove tfinstall package #235

Merged
merged 7 commits into from
Nov 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,12 @@ commands:
go_unit_test:
steps:
- run:
command: go test $(go list ./... | grep -v /tfexec/internal/e2etest | grep -v /tfinstall)
command: go test $(go list ./... | grep -v /tfexec/internal/e2etest)
go_e2e_test:
steps:
- run:
no_output_timeout: 15m
command: go test -timeout=15m -v ./tfexec/internal/e2etest
- run:
no_output_timeout: 15m
command: go test -timeout=15m -v ./tfinstall/...

jobs:
# combined due to slowness of Go install
Expand Down
29 changes: 0 additions & 29 deletions .goreleaser.yml

This file was deleted.

19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,21 @@ import (
"log"

"github.com/hashicorp/terraform-exec/tfexec"
"github.com/hashicorp/terraform-exec/tfinstall"
"github.com/hashicorp/hc-install/releases"
"github.com/hashicorp/hc-install/product"
"github.com/hashicorp/go-version"
)

func main() {
tmpDir, err := ioutil.TempDir("", "tfinstall")
if err != nil {
log.Fatalf("error creating temp dir: %s", err)
installer := &releases.ExactVersion{
Product: product.Terraform,
Version: version.Must(version.NewVersion("1.0.6")),
}
defer os.RemoveAll(tmpDir)

execPath, err := tfinstall.Find(context.Background(), tfinstall.LatestVersion(tmpDir, false))
if err != nil {
log.Fatalf("error locating Terraform binary: %s", err)
}
execPath, err := installer.Install(context.Background())
if err != nil {
log.Fatalf("error installing Terraform: %s", err)
}

workingDir := "/path/to/working/dir"
tf, err := tfexec.NewTerraform(workingDir, execPath)
Expand Down
132 changes: 0 additions & 132 deletions cmd/tfinstall/main.go

This file was deleted.

8 changes: 1 addition & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,12 @@ go 1.14

require (
github.com/andybalholm/crlf v0.0.0-20171020200849-670099aa064f
github.com/go-git/go-git/v5 v5.4.2
github.com/google/go-cmp v0.5.6
github.com/hashicorp/go-checkpoint v0.5.0
github.com/hashicorp/go-cleanhttp v0.5.2
github.com/hashicorp/go-getter v1.5.3
github.com/hashicorp/go-version v1.3.0
github.com/hashicorp/logutils v1.0.0
github.com/hashicorp/hc-install v0.1.0
github.com/hashicorp/terraform-json v0.13.0
github.com/mitchellh/cli v1.1.2
github.com/sergi/go-diff v1.2.0
github.com/stretchr/testify v1.7.0
github.com/zclconf/go-cty v1.9.1
github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️ 🚀

)
Loading