diff --git a/cmd/fwdrem.go b/cmd/fwdrem.go index dc08c4a..4302ae2 100644 --- a/cmd/fwdrem.go +++ b/cmd/fwdrem.go @@ -30,7 +30,7 @@ var ( ) // get target - argTarget := strings.TrimSpace(viper.GetString("fwd-target")) + argTarget := strings.TrimSpace(viper.GetString("fwdrem-target")) if argTarget != "" { table, err := internal.FindInstances(ctx, *_credential.awsConfig) if err != nil { @@ -51,8 +51,8 @@ var ( } // get port - argRemotePort := strings.TrimSpace(viper.GetString("fwd-remote-port")) - argLocalPort := strings.TrimSpace(viper.GetString("fwd-local-port")) + argRemotePort := strings.TrimSpace(viper.GetString("fwdrem-remote-port")) + argLocalPort := strings.TrimSpace(viper.GetString("fwdrem-local-port")) if argRemotePort == "" { askPort, err := internal.AskPorts() if err != nil { @@ -68,7 +68,7 @@ var ( } } - argHost := strings.TrimSpace(viper.GetString("fwd-host")) + argHost := strings.TrimSpace(viper.GetString("fwdrem-host")) if argHost == "" { askHost, err := internal.AskHost() if err != nil { @@ -133,10 +133,10 @@ func init() { fwdremCommand.Flags().StringP("host", "a", "", "[optional] it is remote host address to proxy to.") // mapping viper - viper.BindPFlag("fwd-remote-port", fwdremCommand.Flags().Lookup("remote")) - viper.BindPFlag("fwd-local-port", fwdremCommand.Flags().Lookup("local")) - viper.BindPFlag("fwd-target", fwdremCommand.Flags().Lookup("target")) - viper.BindPFlag("fwd-host", fwdremCommand.Flags().Lookup("host")) + viper.BindPFlag("fwdrem-remote-port", fwdremCommand.Flags().Lookup("remote")) + viper.BindPFlag("fwdrem-local-port", fwdremCommand.Flags().Lookup("local")) + viper.BindPFlag("fwdrem-target", fwdremCommand.Flags().Lookup("target")) + viper.BindPFlag("fwdrem-host", fwdremCommand.Flags().Lookup("host")) rootCmd.AddCommand(fwdremCommand) } diff --git a/internal/ssm.go b/internal/ssm.go index dba8457..9e410f6 100644 --- a/internal/ssm.go +++ b/internal/ssm.go @@ -31,13 +31,13 @@ var ( // default aws regions defaultAwsRegions = []string{ "af-south-1", - "ap-east-1", "ap-northeast-1", "ap-northeast-2", "ap-northeast-3", "ap-south-1", "ap-southeast-2", "ap-southeast-3", + "ap-east-1", "ap-northeast-1", "ap-southeast-1", "ap-northeast-2", "ap-northeast-3", "ap-south-1", "ap-south-2", "ap-southeast-2", "ap-southeast-3", "ap-southeast-4", "ca-central-1", "cn-north-1", "cn-northwest-1", - "eu-central-1", "eu-north-1", "eu-south-1", "eu-west-1", "eu-west-2", "eu-west-3", - "me-south-1", + "eu-central-1", "eu-central-2", "eu-north-1", "eu-south-1", "eu-west-1", "eu-west-2", "eu-west-3", "eu-south-2", + "me-south-1", "me-central-1", "sa-east-1", - "us-east-1", "us-east-2", "us-gov-east-1", "us-gov-west-2", "us-west-1", "us-west-2", + "us-east-1", "us-east-2", "us-gov-east-1", "us-gov-west-1", "us-west-1", "us-west-2", } )