Skip to content

Commit

Permalink
Merge pull request #14 from hazelops/TOOLS-67-bastion_tunnel
Browse files Browse the repository at this point in the history
TOOLS-67 bastion tunnel
  • Loading branch information
psihachina authored Oct 25, 2021
2 parents ead2cbe + 0261d5d commit 723f241
Show file tree
Hide file tree
Showing 3 changed files with 544 additions and 2 deletions.
1 change: 1 addition & 0 deletions internal/commands/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ func (b *commandsBuilder) addAll() *commandsBuilder {
b.newTerraformCmd(),
b.newConfigCmd(),
b.newEnvCmd(),
b.newTunnelCmd(),
)

return b
Expand Down
5 changes: 3 additions & 2 deletions internal/commands/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package commands
import (
"fmt"
"io/ioutil"
"os"

"github.com/aws/aws-sdk-go/service/sts"
"github.com/hazelops/ize/internal/aws/utils"
Expand Down Expand Up @@ -70,8 +71,8 @@ func (b *commandsBuilder) newEnvCmd() *envCmd {
pterm.Success.Printfln("Read SSH public key")
cc.log.Debug("Read SSH public key")

// TODO: FIX
key, err := ioutil.ReadFile("/home/psih/.ssh/id_rsa.pub")
home, _ := os.UserHomeDir()
key, err := ioutil.ReadFile(fmt.Sprintf("%s/.ssh/id_rsa.pub", home))
if err != nil {
pterm.DefaultSection.Println("Generate terrafrom file not completed")
return err
Expand Down
Loading

0 comments on commit 723f241

Please sign in to comment.