diff --git a/internal/client/client_manager.go b/internal/client/client_manager.go index 753faae..f76c463 100644 --- a/internal/client/client_manager.go +++ b/internal/client/client_manager.go @@ -40,7 +40,7 @@ func (c ClientManager) connection(typeName string, settings map[string]string) ( }, nil case "aws-ssm": return &AWSSSMConnection{ - InstanceId: settings["instance_id"], + InstanceID: settings["instance_id"], Region: settings["region"], }, nil } diff --git a/internal/client/connection_aws_ssm.go b/internal/client/connection_aws_ssm.go index c9e9b0f..5698e08 100644 --- a/internal/client/connection_aws_ssm.go +++ b/internal/client/connection_aws_ssm.go @@ -13,14 +13,14 @@ import ( ) type AWSSSMConnection struct { - InstanceId string + InstanceID string Region string Client *ssm.Client SessionId *string } func (a *AWSSSMConnection) Info() string { - return fmt.Sprintf("ssm: instance='%s', region='%s'", a.InstanceId, a.Region) + return fmt.Sprintf("ssm: instance='%s', region='%s'", a.InstanceID, a.Region) } func (a *AWSSSMConnection) User() string { @@ -41,7 +41,7 @@ func (a *AWSSSMConnection) Connect() error { } startSessionInput := &ssm.StartSessionInput{ - Target: aws.String(a.InstanceId), + Target: aws.String(a.InstanceID), } startSessionOutput, err := client.StartSession(context.Background(), startSessionInput) @@ -74,7 +74,7 @@ func (a *AWSSSMConnection) Command(cmdLine []string) ([]byte, error) { command := strings.Join(cmdLine, " ") runCommandInput := &ssm.SendCommandInput{ DocumentName: aws.String("AWS-RunShellScript"), - InstanceIds: []string{a.InstanceId}, + InstanceIds: []string{a.InstanceID}, Parameters: map[string][]string{ "commands": {command}, }, @@ -89,7 +89,7 @@ func (a *AWSSSMConnection) Command(cmdLine []string) ([]byte, error) { commandInvocationInput := &ssm.GetCommandInvocationInput{ CommandId: commandId, - InstanceId: aws.String(a.InstanceId), + InstanceId: aws.String(a.InstanceID), } waiter := ssm.NewCommandExecutedWaiter(a.Client)