-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
azurerm_mobile_network_sim_group
- update schema
#20474
Conversation
@@ -64,7 +64,7 @@ func (r SimGroupResource) Arguments() map[string]*pluginsdk.Schema { | |||
ValidateFunc: validation.IsURLWithHTTPorHTTPS, | |||
}, | |||
|
|||
"identity": commonschema.SystemOrUserAssignedIdentityOptional(), | |||
"identity": commonschema.UserAssignedIdentityOptional(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we also need to update the Expand and Flatten functions to account for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the typed model is correct so I think these functions are ok?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so if the service were to support system assigned, the provider would crash due to the flattened schema not matching what's defined in the schema - we'll need to ensure these are all using the user assigned
values here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont think it will crash? with the flatten code accept both SystemAssigned and UserAssigned but only use the UserAssgined one .
func flattenMobileNetworkUserAssignedToNetworkLegacyIdentity(input *identity.LegacySystemAndUserAssignedMap) ([]identity.ModelUserAssigned, error) {
if input == nil {
return nil, nil
}
tmp := identity.UserAssignedMap{
Type: input.Type,
IdentityIds: input.IdentityIds,
}
output, err := identity.FlattenUserAssignedMapToModel(&tmp)
if err != nil {
return nil, fmt.Errorf("expanding `identity`: %+v", err)
}
return *output, nil
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ziyeqf LGTM 🍐
This functionality has been released in v3.45.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
update per #20339 (comment)
test