@@ -68,43 +68,43 @@ func mainNoExit() int {
6868
6969 var errors []string
7070
71- err = accountSweeper .SweepAll (client )
71+ err = accountSweeper .SweepAll (client , true )
7272 if err != nil {
7373 log .Printf ("Error sweeping account: %s" , err )
7474 errors = append (errors , fmt .Sprintf ("account: %s" , err ))
7575 }
7676
77- err = applesiliconSweeper .SweepAllLocalities (client )
77+ err = applesiliconSweeper .SweepAllLocalities (client , true )
7878 if err != nil {
7979 log .Printf ("Error sweeping applesilicon: %s" , err )
8080 errors = append (errors , fmt .Sprintf ("applesilicon: %s" , err ))
8181 }
8282
83- err = baremetalSweeper .SweepAllLocalities (client )
83+ err = baremetalSweeper .SweepAllLocalities (client , true )
8484 if err != nil {
8585 log .Printf ("Error sweeping baremetal: %s" , err )
8686 errors = append (errors , fmt .Sprintf ("baremetal: %s" , err ))
8787 }
8888
89- err = cockpitSweeper .SweepAllLocalities (client )
89+ err = cockpitSweeper .SweepAllLocalities (client , true )
9090 if err != nil {
9191 log .Printf ("Error sweeping cockpit: %s" , err )
9292 errors = append (errors , fmt .Sprintf ("cockpit: %s" , err ))
9393 }
9494
95- err = containerSweeper .SweepAllLocalities (client )
95+ err = containerSweeper .SweepAllLocalities (client , true )
9696 if err != nil {
9797 log .Printf ("Error sweeping container: %s" , err )
9898 errors = append (errors , fmt .Sprintf ("container: %s" , err ))
9999 }
100100
101- err = flexibleipSweeper .SweepAllLocalities (client )
101+ err = flexibleipSweeper .SweepAllLocalities (client , true )
102102 if err != nil {
103103 log .Printf ("Error sweeping flexibleip: %s" , err )
104104 errors = append (errors , fmt .Sprintf ("flexibleip: %s" , err ))
105105 }
106106
107- err = functionSweeper .SweepAllLocalities (client )
107+ err = functionSweeper .SweepAllLocalities (client , true )
108108 if err != nil {
109109 log .Printf ("Error sweeping function: %s" , err )
110110 errors = append (errors , fmt .Sprintf ("function: %s" , err ))
@@ -116,113 +116,113 @@ func mainNoExit() int {
116116 errors = append (errors , fmt .Sprintf ("iam: %s" , err ))
117117 }
118118
119- err = inferenceSweeper .SweepAllLocalities (client )
119+ err = inferenceSweeper .SweepAllLocalities (client , true )
120120 if err != nil {
121121 log .Printf ("Error sweeping inference: %s" , err )
122122 errors = append (errors , fmt .Sprintf ("inference: %s" , err ))
123123 }
124124
125- err = instanceSweeper .SweepAllLocalities (client )
125+ err = instanceSweeper .SweepAllLocalities (client , true )
126126 if err != nil {
127127 log .Printf ("Error sweeping instance: %s" , err )
128128 errors = append (errors , fmt .Sprintf ("instance: %s" , err ))
129129 }
130130
131131 // Instance servers need to be swept before volumes and snapshots can be swept
132132 // because volumes and snapshots are attached to servers.
133- err = blockSweeper .SweepAllLocalities (client )
133+ err = blockSweeper .SweepAllLocalities (client , true )
134134 if err != nil {
135135 log .Printf ("Error sweeping block: %s" , err )
136136 errors = append (errors , fmt .Sprintf ("block: %s" , err ))
137137 }
138138
139- err = iotSweeper .SweepAllLocalities (client )
139+ err = iotSweeper .SweepAllLocalities (client , true )
140140 if err != nil {
141141 log .Printf ("Error sweeping iot: %s" , err )
142142 errors = append (errors , fmt .Sprintf ("iot: %s" , err ))
143143 }
144144
145- err = jobsSweeper .SweepAllLocalities (client )
145+ err = jobsSweeper .SweepAllLocalities (client , true )
146146 if err != nil {
147147 log .Printf ("Error sweeping jobs: %s" , err )
148148 errors = append (errors , fmt .Sprintf ("jobs: %s" , err ))
149149 }
150150
151- err = k8sSweeper .SweepAllLocalities (client )
151+ err = k8sSweeper .SweepAllLocalities (client , true )
152152 if err != nil {
153153 log .Printf ("Error sweeping k8s: %s" , err )
154154 errors = append (errors , fmt .Sprintf ("k8s: %s" , err ))
155155 }
156156
157- err = lbSweeper .SweepAllLocalities (client )
157+ err = lbSweeper .SweepAllLocalities (client , true )
158158 if err != nil {
159159 log .Printf ("Error sweeping lb: %s" , err )
160160 errors = append (errors , fmt .Sprintf ("lb: %s" , err ))
161161 }
162162
163- err = mongodbSweeper .SweepAllLocalities (client )
163+ err = mongodbSweeper .SweepAllLocalities (client , true )
164164 if err != nil {
165165 log .Printf ("Error sweeping mongodb: %s" , err )
166166 errors = append (errors , fmt .Sprintf ("mongodb: %s" , err ))
167167 }
168168
169- err = mnqSweeper .SweepAllLocalities (client )
169+ err = mnqSweeper .SweepAllLocalities (client , true )
170170 if err != nil {
171171 log .Printf ("Error sweeping mnq: %s" , err )
172172 errors = append (errors , fmt .Sprintf ("mnq: %s" , err ))
173173 }
174174
175- err = rdbSweeper .SweepAllLocalities (client )
175+ err = rdbSweeper .SweepAllLocalities (client , true )
176176 if err != nil {
177177 log .Printf ("Error sweeping rdb: %s" , err )
178178 errors = append (errors , fmt .Sprintf ("rdb: %s" , err ))
179179 }
180180
181- err = redisSweeper .SweepAllLocalities (client )
181+ err = redisSweeper .SweepAllLocalities (client , true )
182182 if err != nil {
183183 log .Printf ("Error sweeping redis: %s" , err )
184184 errors = append (errors , fmt .Sprintf ("redis: %s" , err ))
185185 }
186186
187- err = registrySweeper .SweepAllLocalities (client )
187+ err = registrySweeper .SweepAllLocalities (client , true )
188188 if err != nil {
189189 log .Printf ("Error sweeping registry: %s" , err )
190190 errors = append (errors , fmt .Sprintf ("registry: %s" , err ))
191191 }
192192
193- err = secretSweeper .SweepAllLocalities (client )
193+ err = secretSweeper .SweepAllLocalities (client , true )
194194 if err != nil {
195195 log .Printf ("Error sweeping secret: %s" , err )
196196 errors = append (errors , fmt .Sprintf ("secret: %s" , err ))
197197 }
198198
199- err = sdbSweeper .SweepAllLocalities (client )
199+ err = sdbSweeper .SweepAllLocalities (client , true )
200200 if err != nil {
201201 log .Printf ("Error sweeping sdb: %s" , err )
202202 errors = append (errors , fmt .Sprintf ("sdb: %s" , err ))
203203 }
204204
205- err = vpcSweeper .SweepAllLocalities (client )
205+ err = vpcSweeper .SweepAllLocalities (client , true )
206206 if err != nil {
207207 log .Printf ("Error sweeping vpc: %s" , err )
208208 errors = append (errors , fmt .Sprintf ("vpc: %s" , err ))
209209 }
210210
211- err = vpcgwSweeper .SweepAllLocalities (client )
211+ err = vpcgwSweeper .SweepAllLocalities (client , true )
212212 if err != nil {
213213 log .Printf ("Error sweeping vpcgw: %s" , err )
214214 errors = append (errors , fmt .Sprintf ("vpcgw: %s" , err ))
215215 }
216216
217- err = webhostingSweeper .SweepAllLocalities (client )
217+ err = webhostingSweeper .SweepAllLocalities (client , true )
218218 if err != nil {
219219 log .Printf ("Error sweeping webhosting: %s" , err )
220220 errors = append (errors , fmt .Sprintf ("webhosting: %s" , err ))
221221 }
222222
223223 // IPAM IPs need to be swept in the end because we need to be sure
224224 // that every resource with an attached ip is destroyed before executing it.
225- err = ipamSweeper .SweepAllLocalities (client )
225+ err = ipamSweeper .SweepAllLocalities (client , true )
226226 if err != nil {
227227 log .Printf ("Error sweeping ipam: %s" , err )
228228 errors = append (errors , fmt .Sprintf ("ipam: %s" , err ))
0 commit comments