-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[Compute] Disk encryption set: add --enable-auto-key-rotation #17577
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
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
4e44081
[Compute] Disk encryption set: add --enable-auto-key-rotation
qwordy f12554a
Merge branch 'dev' of https://github.com/Azure/azure-cli into 17064
qwordy 4271085
compute 20.0.0, disk 2020-12-01
qwordy b3497d9
fix test
qwordy 16b42fa
test
qwordy 5fe8056
test_disk_access
qwordy 323bf84
Merge branch 'dev' of https://github.com/Azure/azure-cli into 17064
qwordy e6de147
Merge branch 'dev' of https://github.com/Azure/azure-cli into 17064
qwordy 87d274e
fix network
qwordy c4db032
merge
qwordy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
496 changes: 295 additions & 201 deletions
496
...nd_modules/network/tests/latest/recordings/test_private_endpoint_connection_cosmosdb.yaml
Large diffs are not rendered by default.
Oops, something went wrong.
52 changes: 26 additions & 26 deletions
52
.../command_modules/network/tests/latest/recordings/test_private_link_resource_cosmosdb.yaml
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3663,8 +3663,9 @@ def _set_log_analytics_workspace_extension(cmd, resource_group_name, vm, vm_name | |
|
|
||
|
|
||
| # disk encryption set | ||
| def create_disk_encryption_set(cmd, client, resource_group_name, disk_encryption_set_name, | ||
| key_url, source_vault, encryption_type=None, location=None, tags=None, no_wait=False): | ||
| def create_disk_encryption_set( | ||
| cmd, client, resource_group_name, disk_encryption_set_name, key_url, source_vault, encryption_type=None, | ||
| location=None, tags=None, no_wait=False, enable_auto_key_rotation=None): | ||
| from msrestazure.tools import resource_id, is_valid_resource_id | ||
| from azure.cli.core.commands.client_factory import get_subscription_id | ||
| DiskEncryptionSet, EncryptionSetIdentity, KeyVaultAndKeyReference, SourceVault = cmd.get_models( | ||
|
|
@@ -3674,9 +3675,10 @@ def create_disk_encryption_set(cmd, client, resource_group_name, disk_encryption | |
| source_vault = resource_id(subscription=get_subscription_id(cmd.cli_ctx), resource_group=resource_group_name, | ||
| namespace='Microsoft.KeyVault', type='vaults', name=source_vault) | ||
| source_vault = SourceVault(id=source_vault) | ||
| keyVault_and_key_reference = KeyVaultAndKeyReference(source_vault=source_vault, key_url=key_url) | ||
| key_vault_and_key_reference = KeyVaultAndKeyReference(source_vault=source_vault, key_url=key_url) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. minor, but old name makes more sense |
||
| disk_encryption_set = DiskEncryptionSet(location=location, tags=tags, identity=encryption_set_identity, | ||
| active_key=keyVault_and_key_reference, encryption_type=encryption_type) | ||
| active_key=key_vault_and_key_reference, encryption_type=encryption_type, | ||
| rotation_to_latest_key_version_enabled=enable_auto_key_rotation) | ||
| return sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name, disk_encryption_set_name, | ||
| disk_encryption_set) | ||
|
|
||
|
|
@@ -3687,7 +3689,8 @@ def list_disk_encryption_sets(cmd, client, resource_group_name=None): | |
| return client.list() | ||
|
|
||
|
|
||
| def update_disk_encryption_set(cmd, instance, client, resource_group_name, key_url=None, source_vault=None): | ||
| def update_disk_encryption_set(cmd, instance, client, resource_group_name, key_url=None, source_vault=None, | ||
| enable_auto_key_rotation=None): | ||
| from msrestazure.tools import resource_id, is_valid_resource_id | ||
| from azure.cli.core.commands.client_factory import get_subscription_id | ||
| if not is_valid_resource_id(source_vault): | ||
|
|
@@ -3697,6 +3700,8 @@ def update_disk_encryption_set(cmd, instance, client, resource_group_name, key_u | |
| instance.active_key.key_url = key_url | ||
| if source_vault: | ||
| instance.active_key.source_vault.id = source_vault | ||
| if enable_auto_key_rotation is not None: | ||
| instance.rotation_to_latest_key_version_enabled = enable_auto_key_rotation | ||
| return instance | ||
|
|
||
| # endregion | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
re-recording tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No SDK now. I wrote this PR in advance.