Ver código fonte

fix switch statement for provisioner destroy

Alexander Belanger 4 anos atrás
pai
commit
222ec2bedc

+ 2 - 6
provisioner/server/handlers/state/delete_resource.go

@@ -68,13 +68,9 @@ func (c *DeleteResourceHandler) ServeHTTP(w http.ResponseWriter, r *http.Request
 
 	// switch on the kind of resource and write the corresponding objects to the database
 	switch infra.Kind {
-	case types.InfraECR:
-	case types.InfraGCR:
-	case types.InfraDOCR:
+	case types.InfraECR, types.InfraGCR, types.InfraDOCR:
 		_, err = deleteRegistry(c.Config, infra, operation)
-	case types.InfraEKS:
-	case types.InfraDOKS:
-	case types.InfraGKE:
+	case types.InfraEKS, types.InfraDOKS, types.InfraGKE:
 		_, err = deleteCluster(c.Config, infra, operation)
 	case types.InfraRDS:
 		_, err = deleteDatabase(c.Config, infra, operation)