Skip to content

Commit

Permalink
feat(tft): log TF version (#2323)
Browse files Browse the repository at this point in the history
  • Loading branch information
apeabody authored May 9, 2024
1 parent 9d40fd6 commit 2a2857c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion infra/blueprint-test/pkg/tft/terraform.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import (
"github.com/hashicorp/terraform-config-inspect/tfconfig"
"github.com/mitchellh/go-testing-interface"
"github.com/stretchr/testify/assert"
"github.com/tidwall/gjson"
)

const (
Expand Down Expand Up @@ -259,7 +260,8 @@ func NewTFBlueprintTest(t testing.TB, opts ...tftOption) *TFBlueprintTest {
tft.setupOutputOverrides[k] = v
}

tft.logger.Logf(tft.t, "Running tests TF configs in %s", tft.tfDir)
tftVersion := gjson.Get(terraform.RunTerraformCommand(tft.t, tft.GetTFOptions(), "version", "-json"), "terraform_version")
tft.logger.Logf(tft.t, "Running tests TF configs in %s with version %s", tft.tfDir, tftVersion)
return tft
}

Expand Down

0 comments on commit 2a2857c

Please sign in to comment.