Skip to content

Commit

Permalink
azurerm_key_vault_managed_hardware_security_module_role_assignment
Browse files Browse the repository at this point in the history
…- fix nil panic in error message (#26972)
  • Loading branch information
jackofallops authored Aug 8, 2024
1 parent 61f652e commit 0dfb122
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,14 +159,14 @@ func (r KeyVaultManagedHSMRoleAssignmentResource) Create() sdk.ResourceFunc {
}
endpoint, err = parse.ManagedHSMEndpoint(*baseUri, domainSuffix)
if err != nil {
return fmt.Errorf("parsing the Data Plane Endpoint %q: %+v", *endpoint, err)
return fmt.Errorf("parsing the Data Plane Endpoint %q: %+v", pointer.From(endpoint), err)
}
}

if managedHsmId == nil && !features.FourPointOhBeta() {
endpoint, err = parse.ManagedHSMEndpoint(config.VaultBaseUrl, domainSuffix)
if err != nil {
return fmt.Errorf("parsing the Data Plane Endpoint %q: %+v", *endpoint, err)
return fmt.Errorf("parsing the Data Plane Endpoint %q: %+v", pointer.From(endpoint), err)
}
subscriptionId := commonids.NewSubscriptionID(metadata.Client.Account.SubscriptionId)
managedHsmId, err = metadata.Client.ManagedHSMs.ManagedHSMIDFromBaseUrl(ctx, subscriptionId, endpoint.BaseURI(), domainSuffix)
Expand Down

0 comments on commit 0dfb122

Please sign in to comment.