provide more helpful error message than the one returned by the client, without context
This commit is contained in:
parent
6a8f49ad1d
commit
aede34079d
|
@ -787,6 +787,10 @@ func assertRequiredParametersSet(c *Config, errs *packer.MultiError) {
|
|||
for _, rid := range c.UserAssignedManagedIdentities {
|
||||
r, err := client.ParseResourceID(rid)
|
||||
if err != nil {
|
||||
err := fmt.Errorf("Error parsing resource ID from `user_assigned_managed_identities`; please make sure"+
|
||||
" that this value follows the full resource id format: "+
|
||||
"/subscriptions/<SUBSCRIPTON_ID>/resourcegroups/<RESOURCE_GROUP>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/<USER_ASSIGNED_IDENTITY_NAME>.\n"+
|
||||
" Original error: %s", err)
|
||||
errs = packer.MultiErrorAppend(errs, err)
|
||||
} else {
|
||||
if !strings.EqualFold(r.Provider, "Microsoft.ManagedIdentity") {
|
||||
|
|
Loading…
Reference in New Issue