Skip to content

Commit

Permalink
more debug
Browse files Browse the repository at this point in the history
  • Loading branch information
trichardsonjr78 committed May 17, 2024
1 parent 2b333a5 commit 2a6a7fb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion pkg/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions pkg/api/get_record.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand All @@ -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"`,
Expand Down

0 comments on commit 2a6a7fb

Please sign in to comment.