mirror of https://github.com/kubernetes/kops.git
azure: Tolerate missing resource group when creating the cluster
This commit is contained in:
parent
0b2f67a524
commit
cb25daafe5
|
@ -61,7 +61,7 @@ func (s *Subnet) Find(c *fi.CloudupContext) (*Subnet, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
var azErr *azcore.ResponseError
|
var azErr *azcore.ResponseError
|
||||||
if errors.As(err, &azErr) {
|
if errors.As(err, &azErr) {
|
||||||
if azErr.ErrorCode == "ResourceNotFound" {
|
if azErr.ErrorCode == "ResourceNotFound" || azErr.ErrorCode == "ResourceGroupNotFound" {
|
||||||
return nil, nil
|
return nil, nil
|
||||||
} else {
|
} else {
|
||||||
return nil, azErr
|
return nil, azErr
|
||||||
|
|
Loading…
Reference in New Issue