diff --git a/internal/server/api/layers.go b/internal/server/api/layers.go index 9c6c137e6..213e07746 100644 --- a/internal/server/api/layers.go +++ b/internal/server/api/layers.go @@ -62,15 +62,6 @@ func (a *API) LayersHandler(c echo.Context) error { } func (a *API) getLayerState(layer configv1alpha1.TerraformLayer) string { - repository := &configv1alpha1.TerraformRepository{} - err := a.Client.Get(context.Background(), client.ObjectKey{ - Namespace: layer.Spec.Repository.Namespace, - Name: layer.Spec.Repository.Name, - }, repository) - if err != nil { - log.Errorf("could not get terraform repository: %s", err) - return "Unknown" - } state := "success" switch { case len(layer.Status.Conditions) == 0: