Skip to content

[ACR] az acr create/encryption rotate-key: Add managed HSM key guidance - #34118

Merged
Julie Zhu (yanzhudd) merged 1 commit into
Azure:devfrom
cshung:acr-managed-hsm-help
Sep 23, 2026
Merged

Julie Zhu (yanzhudd) merged 1 commit into
Azure:devfrom
cshung:acr-managed-hsm-help

Conversation

@cshung

@cshung Andrew Au (cshung) commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

🤖 PR Validation — ️✔️ All clear

Breaking Changes Tests
️✔️ None ️✔️ 130/130

Related command

az acr create

az acr encryption rotate-key

Description

Clarify that --key-encryption-key accepts Azure Key Vault and Managed HSM key URIs.

Add examples for creating an ACR registry with a Managed HSM key and rotating an existing customer-managed encryption key. Add focused tests verifying that versioned and versionless Managed HSM URIs are passed to the ACR resource provider unchanged.

This PR does not change runtime behavior or add client-side endpoint validation. The ACR resource provider remains the authoritative validator, preserving compatibility with newly supported Azure clouds and endpoints.

Testing Guide

  • Ran azdev linter acr --ci-exclusions.
  • Ran azdev style acr.
  • Ran the ACR module test suite: 97 passed, 13 skipped, and 47 subtests passed.
  • Generated and verified the packaged command/help indices; they were already up to date.
  • Validated the existing runtime path against a real Managed HSM:
    • Created a Premium registry using a versionless Managed HSM key.
    • Imported an image successfully.
    • Rotated to another Managed HSM key.
    • Imported another image successfully after rotation.
    • Deleted the disposable registry.

…M key guidance

Clarify that customer-managed encryption accepts Azure Key Vault and Managed HSM key URIs, add creation and rotation examples, and protect URI pass-through behavior with focused tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@cshung
Andrew Au (cshung) requested a review from a team as a code owner September 23, 2026 02:38
Copilot AI lite review requested due to automatic review settings September 23, 2026 02:38
@azure-client-tools-bot-prd

Copy link
Copy Markdown

Hi Andrew Au (@cshung),
Since the current milestone time is less than 7 days, this pr will be reviewed in the next milestone.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@microsoft-github-policy-service microsoft-github-policy-service Bot added the customer-reported Issues that are reported by GitHub users external to the Azure organization. label Sep 23, 2026
@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

Thank you for your contribution Andrew Au (@cshung)! We will review the pull request and get back to you soon.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

No unresolved blocking issues were identified.

Review effort: Lite
Findings: None

What changed in this PR

Clarifies ACR customer-managed encryption key support for Azure Key Vault and Managed HSM URIs.

Changes:

  • Updates command guidance and examples.
  • Adds Managed HSM creation and rotation examples.
  • Adds URI preservation tests.
File Description
src/​azure-cli/​azure/​cli/​command_modules/​acr/​tests/​latest/​test_acr_encryption.py Tests versioned and versionless Managed HSM URI handling.
src/​azure-cli/​azure/​cli/​command_modules/​acr/​_params.py Updates argument guidance.
src/​azure-cli/​azure/​cli/​command_modules/​acr/​_help.py Adds Managed HSM documentation and examples.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

@yanzhudd Julie Zhu (yanzhudd) changed the title [ACR] az acr create, az acr encryption rotate-key: Add Managed HSM key guidance [ACR] az acr create/encryption rotate-key: Add managed HSM key guidance Sep 23, 2026
@yanzhudd
Julie Zhu (yanzhudd) merged commit 8121e08 into Azure:dev Sep 23, 2026
55 checks passed
@cshung
Andrew Au (cshung) deleted the acr-managed-hsm-help branch September 23, 2026 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

customer-reported Issues that are reported by GitHub users external to the Azure organization.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants