Skip to content

Commit

Permalink
Update storage_account_customer_managed_key_resource.go
Browse files Browse the repository at this point in the history
err != nil -> err == nil
  • Loading branch information
mbfrahry authored May 2, 2024
1 parent 2af83e0 commit 82b4a2e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,11 @@ func resourceStorageAccountCustomerManagedKeyCreateUpdate(d *pluginsdk.ResourceD
keyVersion = d.Get("key_version").(string)
keyVaultURI = *keyVaultBaseURL
} else if managedHSMKeyId, ok := d.GetOk("managed_hsm_key_id"); ok {
if keyId, err := parse.ManagedHSMDataPlaneVersionedKeyID(managedHSMKeyId.(string), nil); err != nil {
if keyId, err := parse.ManagedHSMDataPlaneVersionedKeyID(managedHSMKeyId.(string), nil); err == nil {
keyName = keyId.KeyName
keyVersion = keyId.KeyVersion
keyVaultURI = keyId.BaseUri()
} else if keyId, err := parse.ManagedHSMDataPlaneVersionlessKeyID(managedHSMKeyId.(string), nil); err != nil {
} else if keyId, err := parse.ManagedHSMDataPlaneVersionlessKeyID(managedHSMKeyId.(string), nil); err == nil {
keyName = keyId.KeyName
keyVersion = ""
keyVaultURI = keyId.BaseUri()
Expand Down

0 comments on commit 82b4a2e

Please sign in to comment.