Skip to content

Commit

Permalink
fix update
Browse files Browse the repository at this point in the history
  • Loading branch information
catriona-m committed Feb 13, 2025
1 parent 704e006 commit 0f0461e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ func (r DataProtectionBackupVaultCustomerManagedKeyResource) Update() sdk.Resour
return fmt.Errorf("retrieving %s: `model` is nil", *id)
}

if resp.Model.Properties.SecuritySettings != nil && resp.Model.Properties.SecuritySettings.EncryptionSettings != nil {
return metadata.ResourceRequiresImport(r.ResourceType(), *id)
if resp.Model.Properties.SecuritySettings == nil || resp.Model.Properties.SecuritySettings.EncryptionSettings == nil {
return fmt.Errorf("retrieving %s: Customer Managed Key was not found", *id)
}

payload := resp.Model
Expand Down

0 comments on commit 0f0461e

Please sign in to comment.