File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
modules/project_cleanup/function_source Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -626,7 +626,7 @@ func invoke(ctx context.Context) {
626626
627627 removeProjectClusters := func (projectId string ) int {
628628 logger .Printf ("Try to remove clusters for [%s]" , projectId )
629- reqLCR := & containerpb.ListClustersRequest {Parent : fmt .Sprintf ("projects/%s/locations/* " , projectId )}
629+ reqLCR := & containerpb.ListClustersRequest {Parent : fmt .Sprintf ("projects/%s/locations/- " , projectId )}
630630 listResponse , err := containerService .ListClusters (ctx , reqLCR )
631631 if err != nil {
632632 logger .Printf ("Failed to list clusters for [%s], error [%s]" , projectId , err .Error ())
@@ -695,6 +695,7 @@ func invoke(ctx context.Context) {
695695 logger .Printf ("Try to remove project [%s]" , projectId )
696696 if clusters := removeProjectClusters (projectId ); clusters != 0 {
697697 logger .Printf ("Defer removing project [%s], %d clusters marked for deletion" , projectId , clusters )
698+ return
698699 }
699700 err := removeProjectById (projectId )
700701 if err != nil {
You can’t perform that action at this time.
0 commit comments