fix a bug
This commit is contained in:
parent
f86f5b958a
commit
1c1991c073
|
@ -788,12 +788,13 @@ func assertRequiredParametersSet(c *Config, errs *packer.MultiError) {
|
||||||
r, err := client.ParseResourceID(rid)
|
r, err := client.ParseResourceID(rid)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
errs = packer.MultiErrorAppend(errs, err)
|
errs = packer.MultiErrorAppend(errs, err)
|
||||||
}
|
} else {
|
||||||
if r.Provider != "" && !strings.EqualFold(r.Provider, "Microsoft.ManagedIdentity") {
|
if !strings.EqualFold(r.Provider, "Microsoft.ManagedIdentity") {
|
||||||
errs = packer.MultiErrorAppend(errs, fmt.Errorf("A valid user assigned managed identity resource id must have a correct resource provider"))
|
errs = packer.MultiErrorAppend(errs, fmt.Errorf("A valid user assigned managed identity resource id must have a correct resource provider"))
|
||||||
}
|
}
|
||||||
if r.ResourceType.String() != "" && !strings.EqualFold(r.ResourceType.String(), "userAssignedIdentities") {
|
if !strings.EqualFold(r.ResourceType.String(), "userAssignedIdentities") {
|
||||||
errs = packer.MultiErrorAppend(errs, fmt.Errorf("A valid user assigned managed identity resource id must have a correct resource type"))
|
errs = packer.MultiErrorAppend(errs, fmt.Errorf("A valid user assigned managed identity resource id must have a correct resource type"))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue