Skip to content

Commit

Permalink
[MM-61282] added keycloak support for the ssh command (#869)
Browse files Browse the repository at this point in the history
* feat: added keycloak support for the ssh command

* chore: add missing comment
  • Loading branch information
fmartingr authored Dec 12, 2024
1 parent 4247ec2 commit bd1d937
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/ltctl/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ func RunSSHListCmdF(cmd *cobra.Command, args []string) error {
if output.HasMetrics() {
fmt.Printf(" - %s\n", output.MetricsServer.Tags.Name)
}
if output.HasKeycloak() {
fmt.Printf(" - %s\n", output.KeycloakServer.Tags.Name)
}
return nil
}

Expand Down
5 changes: 5 additions & 0 deletions deployment/terraform/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ func (t *Terraform) makeCmdForResource(resource string) (*exec.Cmd, error) {
}
}

// Match against the keycloak server
if output.KeycloakServer.Tags.Name == resource {
return exec.Command("ssh", fmt.Sprintf("ubuntu@%s", output.KeycloakServer.PublicIP)), nil
}

// Match against the metrics servers, as well as convenient aliases.
switch resource {
case "metrics", "prometheus", "grafana", output.MetricsServer.Tags.Name:
Expand Down

0 comments on commit bd1d937

Please sign in to comment.