Skip to content

Commit

Permalink
fix(api): show success when plan is empty (#211)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanLonguet authored Dec 13, 2023
1 parent 9e8c060 commit da56078
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/server/api/layers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down

0 comments on commit da56078

Please sign in to comment.