Skip to content

Commit

Permalink
feat: if there's a public ip on tasks run, show it instead of the pri…
Browse files Browse the repository at this point in the history
…vate ip
  • Loading branch information
gumieri committed Jun 10, 2024
1 parent e396c88 commit 9b4528f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/task_definitions_run.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,10 @@ func taskDefinitionsRunRun(cmd *cobra.Command, args []string) {
t.Exitln("failed to describe the EC2 Instance running this task")
}

hostIp := ec2Info.Reservations[0].Instances[0].PrivateIpAddress
hostIp := ec2Info.Reservations[0].Instances[0].PublicIpAddress
if hostIp == nil {
hostIp = ec2Info.Reservations[0].Instances[0].PrivateIpAddress
}

hostPort := tasksStatus.Tasks[0].Containers[0].NetworkBindings[0].HostPort

Expand Down

0 comments on commit 9b4528f

Please sign in to comment.