Skip to content

Commit

Permalink
ID casing fixes
Browse files Browse the repository at this point in the history
`azurerm_monitor_diagnostic_settings`: fix casing parsing
`azurerm_user_assigned_identity`: fix casing parsing
`azurerm_security_center_workspace`: fix casing parsing

Fixes #18346
Fixes #14853
Fixes #18360
  • Loading branch information
favoretti committed Sep 21, 2022
1 parent 5883bc1 commit eb1c537
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ func resourceMonitorDiagnosticSettingRead(d *pluginsdk.ResourceData, meta interf

workspaceId := ""
if props.WorkspaceId != nil && *props.WorkspaceId != "" {
parsedId, err := workspaces.ParseWorkspaceID(*props.WorkspaceId)
parsedId, err := workspaces.ParseWorkspaceIDInsensitively(*props.WorkspaceId)
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion internal/services/msi/user_assigned_identity_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func resourceArmUserAssignedIdentityRead(d *pluginsdk.ResourceData, meta interfa
ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d)
defer cancel()

id, err := commonids.ParseUserAssignedIdentityID(d.Id())
id, err := commonids.ParseUserAssignedIdentityIDInsensitively(d.Id())
if err != nil {
return err
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ func resourceSecurityCenterWorkspaceRead(d *pluginsdk.ResourceData, meta interfa
d.Set("scope", properties.Scope)
workspaceId := ""
if properties.WorkspaceID != nil {
id, err := workspaces.ParseWorkspaceID(*properties.WorkspaceID)
id, err := workspaces.ParseWorkspaceIDInsensitively(*properties.WorkspaceID)
if err != nil {
return fmt.Errorf("Reading Security Center Log Analytics Workspace ID: %+v", err)
}
Expand Down

0 comments on commit eb1c537

Please sign in to comment.