diff --git a/pkg/api/api.go b/pkg/api/api.go index 5b3e04a..4cf51cb 100644 --- a/pkg/api/api.go +++ b/pkg/api/api.go @@ -113,7 +113,6 @@ func (h APIHandler) RegisterRoutes() { cluster.GET("/:cluster_name/resource/:namespace/:name/debug", h.Debugger) cluster.GET("/:cluster_name/debug/:namespace/:name", h.Debugger) // Alias cluster.GET("/:cluster_name/resource/:namespace/:name/unlock", h.UnlockTFO) - cluster.GET("/:cluster_name/unlock/:namespace/:name", h.UnlockTFO) // Alias cluster.GET("/:cluster_name/resource/:namespace/:name/status", h.ResourceStatusCheck) cluster.GET("/:cluster_name/status/:namespace/:name", h.ResourceStatusCheck) // Alias cluster.GET("/:cluster_name/resource/:namespace/:name/last-task-log", h.LastTaskLog) diff --git a/pkg/api/get_record.go b/pkg/api/get_record.go index 0b25dcd..8466c72 100644 --- a/pkg/api/get_record.go +++ b/pkg/api/get_record.go @@ -815,9 +815,9 @@ func (h APIHandler) UnlockTFO(c *gin.Context) { "/bin/bash", "-c", `cd $TFO_MAIN_MODULE && \ - echo "TFO_MAIN_MODULE $TFO_MAIN_MODULE" \ + echo "TFO_MAIN_MODULE $TFO_MAIN_MODULE" && \ file=mktemp && \ - echo "Starting tfplan" + echo "Starting tfplan" && \ terraform plan -no-color 2>$file && \ echo "finished terraform plan && \ cat $file && \ @@ -829,7 +829,7 @@ func (h APIHandler) UnlockTFO(c *gin.Context) { echo lock=$lock && \ echo lock_id=$lock_id && \ if [ -n "$lock_id" ]; then - echo "starting" \ + echo "starting" && \ terraform force-unlock -force $lock_id fi && \ echo "Done"`,