Skip to content

[ACR] az acr create: Add --endpoint-protocol and --data-endpoint-enabled parameters#33472

Open
johnsonshi wants to merge 1 commit into
Azure:devfrom
johnsonshi:johsh/acr-create-endpoint-protocol
Open

[ACR] az acr create: Add --endpoint-protocol and --data-endpoint-enabled parameters#33472
johnsonshi wants to merge 1 commit into
Azure:devfrom
johnsonshi:johsh/acr-create-endpoint-protocol

Conversation

@johnsonshi
Copy link
Copy Markdown

@johnsonshi johnsonshi commented May 29, 2026

Description

Add support for --endpoint-protocol and --data-endpoint-enabled parameters on az acr create, complementing the existing support on az acr update (added in #33089).

Changes

  • --endpoint-protocol (Preview): Allows specifying the endpoint protocol (IPv4 or IPv4AndIPv6) at registry creation time. Requires --data-endpoint-enabled true when using IPv4AndIPv6.
  • --data-endpoint-enabled: Allows enabling dedicated data endpoints at registry creation time instead of requiring a separate az acr update call.
  • Both parameters are shared between az acr create and az acr update in the Network Rule argument group.
  • Added help text examples showing combined usage.
  • Added unit tests for both new parameters with @live_only() decorator.

Testing

Unit Tests

  • 20 passed, 7 skipped (live-only), 1 pre-existing failure (unrelated azure-mgmt-monitor import issue in test_acr_create_with_audits — not caused by this PR)
  • New tests added:
    • test_acr_create_with_dual_stack_endpoints — creates with --data-endpoint-enabled true --endpoint-protocol IPv4AndIPv6, verifies output
    • test_acr_create_with_data_endpoint — creates with --data-endpoint-enabled true, verifies output

Dogfood Validation

All dogfood tests run in southeastasia region, resource group johshacrdf, using the locally-built CLI against Dogfood (api-dogfood.resources.windows-int.net).

Each test follows the pattern: az acr createaz acr showaz acr updateaz acr show, verifying state at each step.


Round 1: Initial Endpoint Protocol Tests (before --data-endpoint-enabled on create)

These tests validated --endpoint-protocol on az acr create before DDE-on-create was added.

# Registry Step 1: Create Step 2: Show Step 3: Update Step 4: Show Result
1 johshacrdfsea1 az acr create --sku Premium (default) ep=IPv4, DDE=false az acr update --data-endpoint-enabled true then --endpoint-protocol IPv4AndIPv6 ep=IPv4AndIPv6, DDE=true ✅ Pass
2 johshacrdfsea2 az acr create --sku Premium --endpoint-protocol IPv4 ep=IPv4, DDE=false az acr update --data-endpoint-enabled true --endpoint-protocol IPv4AndIPv6 then back to --endpoint-protocol IPv4 ep=IPv4, DDE=true ✅ Pass
3 johshacrdfsea3 az acr create --sku Premium --endpoint-protocol IPv4 ep=IPv4 Toggle: IPv4 → IPv4AndIPv6 → IPv4 → IPv4AndIPv6 (with DDE enabled) ep=IPv4AndIPv6, DDE=true ✅ Pass

Round 2: Comprehensive Test Matrix (with --data-endpoint-enabled on create)

Category A: Dedicated Data Endpoint (DDE) Only
# Registry Step 1: az acr create Step 2: az acr show Step 3: az acr update Step 4: az acr show Result
dde1 johshdfseadde1 --sku Premium --data-endpoint-enabled true dataEndpointEnabled: true --data-endpoint-enabled false dataEndpointEnabled: false ✅ Pass
dde2 johshdfseadde2 --sku Premium (no DDE flag) dataEndpointEnabled: false --data-endpoint-enabled true dataEndpointEnabled: true ✅ Pass
dde3 johshdfseadde3 --sku Premium --data-endpoint-enabled false dataEndpointEnabled: false --data-endpoint-enabled true dataEndpointEnabled: true ✅ Pass
Category B: Dual-Stack Endpoint Protocol Only
# Registry Step 1: az acr create Step 2: az acr show Step 3: az acr update Step 4: az acr show Result
ds1 johshdfsead1 --sku Premium --endpoint-protocol IPv4 endpointProtocol: IPv4, dataEndpointEnabled: false --data-endpoint-enabled true --endpoint-protocol IPv4AndIPv6 endpointProtocol: IPv4AndIPv6, dataEndpointEnabled: true ✅ Pass
ds2 johshdfsead2 --sku Premium (no ep flag) endpointProtocol: IPv4, dataEndpointEnabled: false --data-endpoint-enabled true --endpoint-protocol IPv4AndIPv6 endpointProtocol: IPv4AndIPv6, dataEndpointEnabled: true ✅ Pass
ds3 johshdfsead3 --sku Premium --data-endpoint-enabled true --endpoint-protocol IPv4AndIPv6 endpointProtocol: IPv4AndIPv6, dataEndpointEnabled: true --endpoint-protocol IPv4 endpointProtocol: IPv4, dataEndpointEnabled: true ✅ Pass
Category C: Combined DDE + Dual-Stack
# Registry Step 1: az acr create Step 2: az acr show Step 3: az acr update Step 4: az acr show Result
both1 johshdfseab1 --sku Premium --data-endpoint-enabled true --endpoint-protocol IPv4AndIPv6 dataEndpointEnabled: true, endpointProtocol: IPv4AndIPv6 --data-endpoint-enabled false --endpoint-protocol IPv4 dataEndpointEnabled: false, endpointProtocol: IPv4 ✅ Pass
both2 johshdfseab2 --sku Premium (default, no flags) dataEndpointEnabled: false, endpointProtocol: IPv4 --data-endpoint-enabled true --endpoint-protocol IPv4AndIPv6 dataEndpointEnabled: true, endpointProtocol: IPv4AndIPv6 ✅ Pass
both3 johshdfseab3 --sku Premium --data-endpoint-enabled true dataEndpointEnabled: true, endpointProtocol: IPv4 --endpoint-protocol IPv4AndIPv6 → show → --endpoint-protocol IPv4 --data-endpoint-enabled false dataEndpointEnabled: false, endpointProtocol: IPv4 ✅ Pass

both3 detail (multi-step):

  1. az acr create -n johshdfseab3 --sku Premium --data-endpoint-enabled true → DDE=true, ep=IPv4
  2. az acr show → DDE=true, ep=IPv4 ✅
  3. az acr update --endpoint-protocol IPv4AndIPv6 → DDE=true, ep=IPv4AndIPv6
  4. az acr show → DDE=true, ep=IPv4AndIPv6 ✅
  5. az acr update --endpoint-protocol IPv4 --data-endpoint-enabled false → DDE=false, ep=IPv4
  6. az acr show → DDE=false, ep=IPv4 ✅

Summary

  • 12 dogfood registries tested across 2 rounds, all in southeastasia
  • All 12/12 tests passed
  • Tests cover: create with/without flags, show to verify state, update to toggle, show to confirm toggle
  • Validated server-side constraint: IPv4AndIPv6 requires dataEndpointEnabled: true

Related PR

Copilot AI review requested due to automatic review settings May 29, 2026 15:56
@azure-client-tools-bot-prd
Copy link
Copy Markdown

Validation for Azure CLI Full Test Starting...

Thanks for your contribution!

@azure-client-tools-bot-prd
Copy link
Copy Markdown

Validation for Breaking Change Starting...

Thanks for your contribution!

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented May 29, 2026

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link
Copy Markdown

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

Add support for --endpoint-protocol and --data-endpoint-enabled parameters
on az acr create, complementing the existing support on az acr update.

- --endpoint-protocol: Allows creating a registry with IPv4AndIPv6 (dual-stack)
  endpoint protocol. Requires --data-endpoint-enabled true.
- --data-endpoint-enabled: Allows enabling dedicated data endpoints at
  registry creation time instead of requiring a separate update call.
- Added help text examples showing combined usage.
- Added unit tests for both new parameters.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@johnsonshi johnsonshi force-pushed the johsh/acr-create-endpoint-protocol branch from e49971b to 54697d5 Compare May 29, 2026 19:07
@johnsonshi johnsonshi changed the title [ACR] az acr create: Add --endpoint-protocol parameter to support specifying the endpoint protocol at registry creation [ACR] az acr create: Add --endpoint-protocol and --data-endpoint-enabled parameters May 29, 2026
Copy link
Copy Markdown
Member

@northtyphoon northtyphoon left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants