Skip to content

Commit

Permalink
Output Terraform compatibility in logs and version string
Browse files Browse the repository at this point in the history
  • Loading branch information
raphink committed Jan 24, 2020
1 parent 37fd318 commit 26ef8e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"io/ioutil"
"os"

tfversion "github.com/hashicorp/terraform/version"
"github.com/jessevdk/go-flags"
log "github.com/sirupsen/logrus"
"gopkg.in/yaml.v2"
Expand Down Expand Up @@ -107,7 +108,7 @@ func LoadConfig(version string) *Config {
}

if c.Version {
fmt.Printf("Terraboard v%v\n", version)
fmt.Printf("Terraboard v%v (built for Terraform v%v)\n", version, tfversion.Version)
os.Exit(0)
}

Expand Down
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"github.com/camptocamp/terraboard/db"
"github.com/camptocamp/terraboard/state"
"github.com/camptocamp/terraboard/util"
tfversion "github.com/hashicorp/terraform/version"
log "github.com/sirupsen/logrus"
)

Expand Down Expand Up @@ -139,7 +140,7 @@ func main() {

util.SetBasePath(c.Web.BaseURL)

log.Infof("Terraboard v%s is starting...", version)
log.Infof("Terraboard v%s (built for Terraform v%s) is starting...", version, tfversion.Version)

err := c.SetupLogging()
if err != nil {
Expand Down

0 comments on commit 26ef8e4

Please sign in to comment.