From 9975f3f203c0d61f24240747a4b24d9b7cc81477 Mon Sep 17 00:00:00 2001 From: Alan Date: Wed, 13 Dec 2023 15:05:07 +0100 Subject: [PATCH] fix(api): show success when plan is empty --- internal/server/api/layers.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/server/api/layers.go b/internal/server/api/layers.go index a9af0c21..9c6c137e 100644 --- a/internal/server/api/layers.go +++ b/internal/server/api/layers.go @@ -76,7 +76,11 @@ func (a *API) getLayerState(layer configv1alpha1.TerraformLayer) string { case len(layer.Status.Conditions) == 0: state = "disabled" case layer.Status.State == "ApplyNeeded": - state = "warning" + if layer.Status.LastResult == "Plan: 0 to create, 0 to update, 0 to delete" { + state = "success" + } else { + state = "warning" + } case layer.Status.State == "PlanNeeded": state = "warning" }