Skip to content
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

{RDBMS} az postgres flexible-server identity_remove: Add a check to determine whether the user identity is used for geo backup data encryption #30588

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -982,6 +982,11 @@ def flexible_server_identity_remove(cmd, client, resource_group_name, server_nam
if primary_id and primary_id.lower() in [identity.lower() for identity in identities]:
raise CLIError("Cannot remove identity {} because it's used for data encryption.".format(primary_id))

geo_backup_id = instance.data_encryption.geo_backup_user_assigned_identity_id

if geo_backup_id and geo_backup_id.lower() in [identity.lower() for identity in identities]:
raise CLIError("Cannot remove identity {} because it's used for geo backup data encryption.".format(geo_backup_id))

identities_map = {}
for identity in identities:
identities_map[identity] = None
Expand Down
Loading