зеркало из https://github.com/Azure/ARO-RP.git
don't try to delete resources in an RG that doesn't exist
This commit is contained in:
Родитель
0c8f352db6
Коммит
57b6126a4f
|
@ -127,6 +127,11 @@ func (m *manager) deleteResources(ctx context.Context) error {
|
|||
resourceGroup := stringutils.LastTokenByte(m.doc.OpenShiftCluster.Properties.ClusterProfile.ResourceGroupID, '/')
|
||||
|
||||
resources, err := m.resources.ListByResourceGroup(ctx, resourceGroup, "", "", nil)
|
||||
if detailedErr, ok := err.(autorest.DetailedError); ok &&
|
||||
(detailedErr.StatusCode == http.StatusNotFound ||
|
||||
detailedErr.StatusCode == http.StatusForbidden) {
|
||||
return nil
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче