azure: Fix the error code for nonexistent VMSS resources

This commit is contained in:
Ciprian Hacman 2023-06-27 16:03:28 +03:00
parent df97b95972
commit 3414a68c49
1 changed files with 1 additions and 1 deletions

View File

@ -154,7 +154,7 @@ func (s *VMScaleSet) CompareWithID() *string {
func (s *VMScaleSet) Find(c *fi.CloudupContext) (*VMScaleSet, error) { func (s *VMScaleSet) Find(c *fi.CloudupContext) (*VMScaleSet, error) {
cloud := c.T.Cloud.(azure.AzureCloud) cloud := c.T.Cloud.(azure.AzureCloud)
found, err := cloud.VMScaleSet().Get(context.TODO(), *s.ResourceGroup.Name, *s.Name) found, err := cloud.VMScaleSet().Get(context.TODO(), *s.ResourceGroup.Name, *s.Name)
if err != nil && !strings.Contains(err.Error(), "ResourceNotFound") { if err != nil && !strings.Contains(err.Error(), "NotFound") {
return nil, err return nil, err
} }
if found == nil { if found == nil {