diff --git a/internal/controllers/terraformlayer/states.go b/internal/controllers/terraformlayer/states.go index d0fecd9b..9a9945b2 100644 --- a/internal/controllers/terraformlayer/states.go +++ b/internal/controllers/terraformlayer/states.go @@ -107,5 +107,5 @@ func getRemediationStrategy(repo *configv1alpha1.TerraformRepository, layer *con func getStateString(state State) string { t := strings.Split(fmt.Sprintf("%T", state), "/") - return t[len(t)] + return t[len(t)-1] }