Skip to content

Commit

Permalink
Made url dynamic
Browse files Browse the repository at this point in the history
  • Loading branch information
JKetelaar committed Jan 29, 2025
1 parent 650204b commit 3719016
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
7 changes: 5 additions & 2 deletions cmd/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,18 @@ import (
"strings"
)

const boundaryUrl = "https://controller.boundary.intercube.cloud"

var sshUsername = "root"

// loginCmd represents the login command
var loginCmd = &cobra.Command{
Use: "login",
Short: "Login with your API token",
Run: func(cmd *cobra.Command, args []string) {
boundaryUrl := config.Login.InstanceUrl
if boundaryUrl == "" {
boundaryUrl = "https://controller.boundary.intercube.cloud"
}

boundaryPath, err := exec.LookPath("boundary")
if err != nil {
panic("Boundary not installed on this machine. Download & install boundary before using the login function (https://learn.hashicorp.com/tutorials/boundary/getting-started-install)")
Expand Down
9 changes: 5 additions & 4 deletions util/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ type MagentoBaseUrl struct {
}

type Login struct {
Username string
Password string
Scope string
AuthMethod string `mapstructure:"auth_method"`
Username string
Password string
Scope string
AuthMethod string `mapstructure:"auth_method"`
InstanceUrl string `mapstructure:"instance_url"`
}

0 comments on commit 3719016

Please sign in to comment.