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) {
626
626
627
627
removeProjectClusters := func (projectId string ) int {
628
628
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 )}
630
630
listResponse , err := containerService .ListClusters (ctx , reqLCR )
631
631
if err != nil {
632
632
logger .Printf ("Failed to list clusters for [%s], error [%s]" , projectId , err .Error ())
@@ -695,6 +695,7 @@ func invoke(ctx context.Context) {
695
695
logger .Printf ("Try to remove project [%s]" , projectId )
696
696
if clusters := removeProjectClusters (projectId ); clusters != 0 {
697
697
logger .Printf ("Defer removing project [%s], %d clusters marked for deletion" , projectId , clusters )
698
+ return
698
699
}
699
700
err := removeProjectById (projectId )
700
701
if err != nil {
You can’t perform that action at this time.
0 commit comments