Skip to content

Commit dea5e58

Browse files
authored
{Compute} az disk-encryption-set update: Set source vault to None when --source-vault is not input (#31678)
1 parent f451cbe commit dea5e58

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/azure-cli/azure/cli/command_modules/vm/operations/disk_encryption_set.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,8 @@ def pre_operations(self):
6565
if has_value(args.source_vault):
6666
vault = args.source_vault.to_serialized_data()
6767
args.source_vault = vault if is_valid_resource_id(vault) else KV_RID_TEMPLATE.format(self.ctx.subscription_id, args.resource_group, vault)
68+
69+
def pre_instance_update(self, instance):
70+
args = self.ctx.args
71+
if not has_value(args.source_vault):
72+
instance.properties.active_key.source_vault = None

0 commit comments

Comments
 (0)