Skip to content
This repository was archived by the owner on Nov 23, 2024. It is now read-only.
Open
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
6 changes: 5 additions & 1 deletion cmd/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,22 @@ func init() {

RootCmd.PersistentFlags().StringVar(&ConfigFile, "config", "", "config file (default is $HOME/.goship.yaml)")

RootCmd.PersistentFlags().BoolVarP(&forceUncache, "uncache", "", false, "Drop any existing cache before obtaining resource list")
RootCmd.PersistentFlags().StringP("username", "u", "", "Username to use when logging into resources")
RootCmd.PersistentFlags().BoolP("use-ec2-connect", "e", false, "Use EC2 Instance Connect to push your SSH key before connecting to the instance ")
RootCmd.PersistentFlags().StringP("ec2-connect-key-path", "k", "~/.ssh/id_rsa.pub", "Path to public SSH key file used to connect via EC2 Instance Connect")
RootCmd.PersistentFlags().StringP("ssh-command", "c", "", "command to be executed via SSH (applicable to ssh command only)")
RootCmd.PersistentFlags().BoolP("verbose", "v", false, "Be more verbose")
RootCmd.PersistentFlags().BoolP("use-private-network", "p", false, "Use private resource identification")
RootCmd.PersistentFlags().BoolP("use-dns", "d", false, "Use DNS instead of Resource IP")

RootCmd.PersistentFlags().BoolVarP(&forceUncache, "uncache", "", false, "Drop any existing cache before obtaining resource list")
RootCmd.PersistentFlags().StringP("cache-directory", "", "/tmp", "Cache directory (default is /tmp)")
RootCmd.PersistentFlags().StringP("cache-file-prefix", "", "goship_cache_", "Cache file prefix")
RootCmd.PersistentFlags().UintP("cache-validity", "t", 300, "Cache validity in seconds")

_ = viper.BindPFlag("username", RootCmd.PersistentFlags().Lookup("username"))
_ = viper.BindPFlag("use-ec2-connect", RootCmd.PersistentFlags().Lookup("use-ec2-connect"))
_ = viper.BindPFlag("ec2-connect-key-path", RootCmd.PersistentFlags().Lookup("ec2-connect-key-path"))
_ = viper.BindPFlag("ssh-command", RootCmd.PersistentFlags().Lookup("ssh-command"))
_ = viper.BindPFlag("use_private_network", RootCmd.PersistentFlags().Lookup("use-private-network"))
_ = viper.BindPFlag("use_dns", RootCmd.PersistentFlags().Lookup("use-dns"))
Expand Down
32 changes: 30 additions & 2 deletions cmd/configure.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,15 @@ import (
"strconv"
)

// helloCmd represents the hello command
// default Providers configuration, for easier user onboarding
var defaultProviderConfig = `
providers:
aws.ec2:
- profile: default
regions:
- us-east-1
`

var configureCmd = &cobra.Command{
Use: "configure",
Short: "Runs configuration process for basic options",
Expand Down Expand Up @@ -59,6 +67,24 @@ func configureCmdFunc(cmd *cobra.Command, args []string) {
Reader: os.Stdin,
}

useEC2Connect, _ := ui.Ask("Use EC2 Instance Connect to connect to instances?", &input.Options{
Required: true,
Loop: true,
Default: RootCmd.PersistentFlags().Lookup("use-ec2-connect").DefValue,
ValidateFunc: validateBool,
})

config.GlobalConfig.UseEC2Connect, _ = strconv.ParseBool(useEC2Connect)

if config.GlobalConfig.UseEC2Connect {
config.GlobalConfig.CacheDirectory, _ = ui.Ask("Path to SSH key file (.pub or .pem) used to connect via EC2 Instance Connect", &input.Options{
Required: true,
Default: RootCmd.PersistentFlags().Lookup("ec2-connect-key-path").DefValue,
Loop: true,
ValidateFunc: validatePath,
})
}

config.GlobalConfig.LoginUsername, _ = ui.Ask("What username should be used when connecting to remote resources?", &input.Options{
Required: true,
Loop: true,
Expand Down Expand Up @@ -125,6 +151,7 @@ func configureCmdFunc(cmd *cobra.Command, args []string) {
})

c, _ := yaml.Marshal(config.GlobalConfig)
c = append(c, defaultProviderConfig...)
fmt.Printf("Config file: %s", viper.ConfigFileUsed())
cacheFile, err := os.Create(ConfigFile)
if err != nil {
Expand All @@ -138,5 +165,6 @@ func configureCmdFunc(cmd *cobra.Command, args []string) {
color.PrintRed(fmt.Sprintf("Error while writing config file %s: %s\n", ConfigFile, err.Error()))
os.Exit(1)
}
color.PrintGreen(fmt.Sprintf("Config file saved to `%s`. Please refer to documentation in order to configure cloud providers\n", ConfigFile))

color.PrintGreen(fmt.Sprintf("Config file saved to `%s`. Please refer to documentation in order to customize cloud providers\n", ConfigFile))
}
48 changes: 48 additions & 0 deletions cmd/push-key.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
package cmd

import (
"fmt"
"github.com/spf13/cobra"
"github.com/zendesk/goship/config"
"github.com/zendesk/goship/utils"
"os"
)

var pushkeyCmd = &cobra.Command{
Use: "push-key <search_keyword> [environment]",
Short: "Push key to instance via EC2 Instance Connect",
Long: "Push key to instance via EC2 Instance Connect",
PreRun: setSSHArgsFunc,
Args: cobra.MinimumNArgs(1),
Run: pushkeyCmdFunc,
}

func init() {
RootCmd.AddCommand(pushkeyCmd)
}

func pushkeyCmdFunc(cmd *cobra.Command, args []string) {

cacheList := getCacheList()

output := filterCacheList(&cacheList, cmd.Annotations)

if len(output) == 0 {
fmt.Printf("Could not find any matches for identifier %s", cmd.Annotations["resource"])
os.Exit(1)
}

resource, err := utils.ChooseFromList(output)
if err != nil {
fmt.Printf("Error: %s", err)
os.Exit(1)
}

if config.GlobalConfig.UseEC2Connect {
err := pushSSHKey(resource)
if err != nil {
fmt.Printf("Failed to push SSH key: %v", err)
os.Exit(1)
}
}
}
10 changes: 10 additions & 0 deletions cmd/scp.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,16 @@ func scpCmdFunc(cmd *cobra.Command, args []string) {
} else {
baseCommand = append(baseCommand, command.CopyToRemoteCmd()...)
}

if config.GlobalConfig.UseEC2Connect {
err := pushSSHKey(resource)
if err != nil {
fmt.Printf("Failed to push SSH key: %v", err)
os.Exit(1)
}
baseCommand = append(baseCommand, "-i", sshPrivKeyPath(config.GlobalConfig.EC2ConnectKeyPath))
}

color.PrintGreen(fmt.Sprintf("Copying %s %s (%s)\n",
cmd.Annotations["direction"], resource.Name(),
resource.GetTag("environment")))
Expand Down
9 changes: 9 additions & 0 deletions cmd/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@ func sshCmdFunc(cmd *cobra.Command, args []string) {
baseCommand := []string{config.GlobalConfig.SSHBinary}
baseCommand = append(baseCommand, config.GlobalConfig.SSHExtraParams...)

if config.GlobalConfig.UseEC2Connect {
err := pushSSHKey(resource)
if err != nil {
fmt.Printf("Failed to push SSH key: %v", err)
os.Exit(1)
}
baseCommand = append(baseCommand, "-i", sshPrivKeyPath(config.GlobalConfig.EC2ConnectKeyPath))
}

sshCommandWithArgs := append(baseCommand, []string{
fmt.Sprintf(
"%s@%s",
Expand Down
9 changes: 9 additions & 0 deletions cmd/tunnel.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,15 @@ func tunnelCmdFunc(cmd *cobra.Command, args []string) {
baseCommand := []string{config.GlobalConfig.SSHBinary}
baseCommand = append(baseCommand, config.GlobalConfig.SSHExtraParams...)

if config.GlobalConfig.UseEC2Connect {
err := pushSSHKey(resource)
if err != nil {
fmt.Printf("Failed to push SSH key: %v", err)
os.Exit(1)
}
baseCommand = append(baseCommand, "-i", config.GlobalConfig.EC2ConnectKeyPath)
}

tunnelCommand := append(baseCommand, []string{
fmt.Sprintf(
"%s@%s",
Expand Down
20 changes: 20 additions & 0 deletions cmd/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,3 +148,23 @@ func checkIfRemotePath(p string) bool {
func parseScpURL(p string) (string, string) {
return strings.Split(p, ":")[0], strings.Split(p, ":")[1]
}

// pushSSHKey executes PushSSKey on EC2 resource types
func pushSSHKey(r resources.Resource) error {
ec2, ok := r.(*resources.Ec2Instance)
if !ok {
return fmt.Errorf("pushing SSH key is supported only for EC2 instances")
}
color.PrintGreen(fmt.Sprintf("Sending SSH key to AWS SSM for %s (%s) in %s\n",
r.Name(), r.GetTag("environment"), r.GetZone()))
return ec2.PushSSHKey(config.GlobalConfig.EC2ConnectKeyPath)
}

// sshPrivKeyPath returns SSH private key path for a given public key
func sshPrivKeyPath(publicKeyPath string) string {
if strings.HasSuffix(publicKeyPath, ".pem") {
return publicKeyPath
} else {
return strings.TrimSuffix(publicKeyPath, ".pub")
}
}
2 changes: 2 additions & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ package config

// Config represents goship config
type Config struct {
UseEC2Connect bool `mapstructure:"use_ec2_connect" yaml:"use_ec2_connect"`
EC2ConnectKeyPath string `mapstructure:"ec2_connect_key_path" yaml:"ec2_connect_key_path"`
LoginUsername string `mapstructure:"username" yaml:"username"`
UsePrivateNetwork bool `mapstructure:"use_private_network" yaml:"use_private_network"`
UseDNS bool `mapstructure:"use_dns" yaml:"use_dns"`
Expand Down
22 changes: 13 additions & 9 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,22 @@ module github.com/zendesk/goship
go 1.14

require (
github.com/BurntSushi/toml v0.3.1 // indirect
github.com/aws/aws-sdk-go v1.16.5
github.com/google/go-github v3.0.0+incompatible // indirect
github.com/google/go-querystring v1.0.0 // indirect
github.com/hashicorp/go-version v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/aws/aws-sdk-go v1.30.4
github.com/google/go-github v3.0.0+incompatible
github.com/google/go-querystring v1.0.0
github.com/hashicorp/go-version v1.0.0
github.com/inconshreveable/mousetrap v1.0.0
github.com/jmespath/go-jmespath v0.3.0
github.com/mitchellh/go-homedir v1.0.0
github.com/pelletier/go-toml v1.7.0 // indirect
github.com/spf13/cobra v0.0.3
github.com/spf13/pflag v1.0.3
github.com/spf13/viper v1.3.1
github.com/tcnksm/go-input v0.0.0-20180404061846-548a7d7a8ee8
github.com/tcnksm/go-latest v0.0.0-20150414090734-86500ab1363a
golang.org/x/net v0.0.0-20181213202711-891ebc4b82d6 // indirect
golang.org/x/sys v0.0.0-20181213200352-4d1cda033e06 // indirect
gopkg.in/yaml.v2 v2.2.2
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
golang.org/x/net v0.0.0-20200202094626-16171245cfb2
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a
golang.org/x/text v0.3.0
gopkg.in/yaml.v2 v2.2.8
)
28 changes: 20 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
github.com/aws/aws-sdk-go v1.16.5 h1:NVxzZXIuwX828VcJrpNxxWjur1tlOBISdMdDdHIKHcc=
github.com/aws/aws-sdk-go v1.16.5/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
github.com/aws/aws-sdk-go v1.30.4 h1:dpQgypC3rld2Uuz+/2u+0nbfmmyEWxau6v1hdAlvoc8=
github.com/aws/aws-sdk-go v1.30.4/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0=
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk=
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
github.com/google/go-github v3.0.0+incompatible h1:lsf+ZqlC8Jm53WVfjFavvCCIamHR13YTWhhkB9j549Y=
github.com/google/go-github v3.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ=
github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk=
Expand All @@ -20,8 +22,8 @@ github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM=
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
github.com/jmespath/go-jmespath v0.3.0 h1:OS12ieG61fsCg5+qLJ+SsW9NicxNkg3b25OyT2yCeUc=
github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik=
github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY=
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/mitchellh/go-homedir v1.0.0 h1:vKb8ShqSby24Yrqr/yDYkuFz8d0WUjys40rvnGC8aR0=
Expand All @@ -30,6 +32,9 @@ github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQz
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc=
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
github.com/pelletier/go-toml v1.7.0 h1:7utD74fnzVc/cpcyy8sjrlFr5vYpypUixARcHIMIGuI=
github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI=
Expand All @@ -44,8 +49,11 @@ github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg=
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/spf13/viper v1.3.1 h1:5+8j8FTpnFV4nEImW/ofkzEt8VoOiLXxdYIDsB73T38=
github.com/spf13/viper v1.3.1/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/tcnksm/go-input v0.0.0-20180404061846-548a7d7a8ee8 h1:RB0v+/pc8oMzPsN97aZYEwNuJ6ouRJ2uhjxemJ9zvrY=
github.com/tcnksm/go-input v0.0.0-20180404061846-548a7d7a8ee8/go.mod h1:IlWNj9v/13q7xFbaK4mbyzMNwrZLaWSHx/aibKIZuIg=
github.com/tcnksm/go-latest v0.0.0-20150414090734-86500ab1363a h1:wbEDEdzfcZdlxF29ApySgKuP05i1I5dD/d0+NHXbCDo=
Expand All @@ -54,14 +62,18 @@ github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljT
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9 h1:mKdxBk7AujPs8kU4m80U72y/zjbZ3UcXC7dClwKbUI0=
golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/net v0.0.0-20181213202711-891ebc4b82d6 h1:gT0Y6H7hbVPUtvtk0YGxMXPgN+p8fYlqWkgJeUCZcaQ=
golang.org/x/net v0.0.0-20181213202711-891ebc4b82d6/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/net v0.0.0-20200202094626-16171245cfb2 h1:CCH4IOTTfewWjGOlSp+zGcjutRKlBEZQ6wTn8ozI/nI=
golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181213200352-4d1cda033e06 h1:0oC8rFnE+74kEmuHZ46F6KHsMr5Gx2gUQPuNz28iQZM=
golang.org/x/sys v0.0.0-20181213200352-4d1cda033e06/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
1 change: 1 addition & 0 deletions providers/aws_ec2.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ func (p *AwsEc2Provider) GetResources() (resourcesList resources.ResourceList, e
for _, inst := range res.Instances {
r := resources.NewEc2Instance()
r.NativeObject = *inst
r.ProfileName = p.AwsProfileName
resourcesList = append(resourcesList, r)
}
}
Expand Down
Loading