Skip to content

{Service Connector} az aks connection create: Add --no-recreate to avoid creating operation for existing connection and update kubernetesResourceName in aks connection response - #32140

Merged
kai ru (kairu-ms) merged 9 commits into
Azure:devfrom
xfz11:svc/connaks2
Sep 23, 2025

Conversation

@xfz11

@xfz11 xfz11 commented Sep 18, 2025

Copy link
Copy Markdown
Contributor

Related command

Description

Testing Guide

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change
[Component Name 2] az command b: Add some customer-facing feature


This checklist is used to make sure that common guidelines for a pull request are followed.

Copilot AI review requested due to automatic review settings September 18, 2025 06:04
@azure-client-tools-bot-prd

azure-client-tools-bot-prd Bot commented Sep 18, 2025 •

Copy link
Copy Markdown
️✔️AzureCLI-FullTest
️✔️acr
️✔️latest
️✔️3.12
️✔️3.13
️✔️acs
️✔️latest
️✔️3.12
️✔️3.13
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.13
️✔️ams
️✔️latest
️✔️3.12
️✔️3.13
️✔️apim
️✔️latest
️✔️3.12
️✔️3.13
️✔️appconfig
️✔️latest
️✔️3.12
️✔️3.13
️✔️appservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️aro
️✔️latest
️✔️3.12
️✔️3.13
️✔️backup
️✔️latest
️✔️3.12
️✔️3.13
️✔️batch
️✔️latest
️✔️3.12
️✔️3.13
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.13
️✔️billing
️✔️latest
️✔️3.12
️✔️3.13
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️cdn
️✔️latest
️✔️3.12
️✔️3.13
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.13
️✔️cognitiveservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.13
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.13
️✔️config
️✔️latest
️✔️3.12
️✔️3.13
️✔️configure
️✔️latest
️✔️3.12
️✔️3.13
️✔️consumption
️✔️latest
️✔️3.12
️✔️3.13
️✔️container
️✔️latest
️✔️3.12
️✔️3.13
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.13
️✔️core
️✔️latest
️✔️3.12
️✔️3.13
️✔️cosmosdb
️✔️latest
️✔️3.12
️✔️3.13
️✔️databoxedge
️✔️latest
️✔️3.12
️✔️3.13
️✔️dls
️✔️latest
️✔️3.12
️✔️3.13
️✔️dms
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventhubs
️✔️latest
️✔️3.12
️✔️3.13
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.13
️✔️find
️✔️latest
️✔️3.12
️✔️3.13
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.13
️✔️identity
️✔️latest
️✔️3.12
️✔️3.13
️✔️iot
️✔️latest
️✔️3.12
️✔️3.13
️✔️keyvault
️✔️latest
️✔️3.12
️✔️3.13
️✔️lab
️✔️latest
️✔️3.12
️✔️3.13
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️maps
️✔️latest
️✔️3.12
️✔️3.13
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.13
️✔️monitor
️✔️latest
️✔️3.12
️✔️3.13
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.13
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.13
️✔️network
️✔️latest
️✔️3.12
️✔️3.13
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.13
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.13
️✔️profile
️✔️latest
️✔️3.12
️✔️3.13
️✔️rdbms
️✔️latest
️✔️3.12
️✔️3.13
️✔️redis
️✔️latest
️✔️3.12
️✔️3.13
️✔️relay
️✔️latest
️✔️3.12
️✔️3.13
️✔️resource
️✔️latest
️✔️3.12
️✔️3.13
️✔️role
️✔️latest
️✔️3.12
️✔️3.13
️✔️search
️✔️latest
️✔️3.12
️✔️3.13
️✔️security
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.13
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.13
️✔️signalr
️✔️latest
️✔️3.12
️✔️3.13
️✔️sql
️✔️latest
️✔️3.12
️✔️3.13
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.13
️✔️storage
️✔️latest
️✔️3.12
️✔️3.13
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.13
️✔️telemetry
️✔️latest
️✔️3.12
️✔️3.13
️✔️util
️✔️latest
️✔️3.12
️✔️3.13
️✔️vm
️✔️latest
️✔️3.12
️✔️3.13

@azure-client-tools-bot-prd

azure-client-tools-bot-prd Bot commented Sep 18, 2025 •

Copy link
Copy Markdown
⚠️AzureCLI-BreakingChangeTest
⚠️serviceconnector
rule cmd_name rule_message suggest_message
⚠️ 1006 - ParaAdd aks connection create app-insights cmd aks connection create app-insights added parameter no_recreate
⚠️ 1006 - ParaAdd aks connection create appconfig cmd aks connection create appconfig added parameter no_recreate
⚠️ 1006 - ParaAdd aks connection create cognitiveservices cmd aks connection create cognitiveservices added parameter no_recreate
⚠️ 1006 - ParaAdd aks connection create cosmos-cassandra cmd aks connection create cosmos-cassandra added parameter no_recreate
⚠️ 1006 - ParaAdd aks connection create cosmos-gremlin cmd aks connection create cosmos-gremlin added parameter no_recreate
⚠️ 1006 - ParaAdd aks connection create cosmos-mongo cmd aks connection create cosmos-mongo added parameter no_recreate
⚠️ 1006 - ParaAdd aks connection create cosmos-sql cmd aks connection create cosmos-sql added parameter no_recreate
⚠️ 1006 - ParaAdd aks connection create cosmos-table cmd aks connection create cosmos-table added parameter no_recreate
⚠️ 1006 - ParaAdd aks connection create eventhub cmd aks connection create eventhub added parameter no_recreate
⚠️ 1006 - ParaAdd aks connection create keyvault cmd aks connection create keyvault added parameter no_recreate
⚠️ 1006 - ParaAdd aks connection create mongodb-atlas cmd aks connection create mongodb-atlas added parameter no_recreate
⚠️ 1006 - ParaAdd aks connection create mysql cmd aks connection create mysql added parameter no_recreate
⚠️ 1006 - ParaAdd aks connection create mysql-flexible cmd aks connection create mysql-flexible added parameter no_recreate
⚠️ 1006 - ParaAdd aks connection create neon-postgres cmd aks connection create neon-postgres added parameter no_recreate
⚠️ 1006 - ParaAdd aks connection create postgres cmd aks connection create postgres added parameter no_recreate
⚠️ 1006 - ParaAdd aks connection create postgres-flexible cmd aks connection create postgres-flexible added parameter no_recreate
⚠️ 1006 - ParaAdd aks connection create redis cmd aks connection create redis added parameter no_recreate
⚠️ 1006 - ParaAdd aks connection create redis-enterprise cmd aks connection create redis-enterprise added parameter no_recreate
⚠️ 1006 - ParaAdd aks connection create servicebus cmd aks connection create servicebus added parameter no_recreate
⚠️ 1006 - ParaAdd aks connection create signalr cmd aks connection create signalr added parameter no_recreate
⚠️ 1006 - ParaAdd aks connection create sql cmd aks connection create sql added parameter no_recreate
⚠️ 1006 - ParaAdd aks connection create storage-blob cmd aks connection create storage-blob added parameter no_recreate
⚠️ 1006 - ParaAdd aks connection create storage-file cmd aks connection create storage-file added parameter no_recreate
⚠️ 1006 - ParaAdd aks connection create storage-queue cmd aks connection create storage-queue added parameter no_recreate
⚠️ 1006 - ParaAdd aks connection create storage-table cmd aks connection create storage-table added parameter no_recreate
⚠️ 1006 - ParaAdd aks connection create webpubsub cmd aks connection create webpubsub added parameter no_recreate
⚠️ 1006 - ParaAdd containerapp connection create app-insights cmd containerapp connection create app-insights added parameter no_recreate
⚠️ 1006 - ParaAdd containerapp connection create appconfig cmd containerapp connection create appconfig added parameter no_recreate
⚠️ 1006 - ParaAdd containerapp connection create cognitiveservices cmd containerapp connection create cognitiveservices added parameter no_recreate
⚠️ 1006 - ParaAdd containerapp connection create containerapp cmd containerapp connection create containerapp added parameter no_recreate
⚠️ 1006 - ParaAdd containerapp connection create cosmos-cassandra cmd containerapp connection create cosmos-cassandra added parameter no_recreate
⚠️ 1006 - ParaAdd containerapp connection create cosmos-gremlin cmd containerapp connection create cosmos-gremlin added parameter no_recreate
⚠️ 1006 - ParaAdd containerapp connection create cosmos-mongo cmd containerapp connection create cosmos-mongo added parameter no_recreate
⚠️ 1006 - ParaAdd containerapp connection create cosmos-sql cmd containerapp connection create cosmos-sql added parameter no_recreate
⚠️ 1006 - ParaAdd containerapp connection create cosmos-table cmd containerapp connection create cosmos-table added parameter no_recreate
⚠️ 1006 - ParaAdd containerapp connection create eventhub cmd containerapp connection create eventhub added parameter no_recreate
⚠️ 1006 - ParaAdd containerapp connection create fabric-sql cmd containerapp connection create fabric-sql added parameter no_recreate
⚠️ 1006 - ParaAdd containerapp connection create keyvault cmd containerapp connection create keyvault added parameter no_recreate
⚠️ 1006 - ParaAdd containerapp connection create mongodb-atlas cmd containerapp connection create mongodb-atlas added parameter no_recreate
⚠️ 1006 - ParaAdd containerapp connection create mysql cmd containerapp connection create mysql added parameter no_recreate
⚠️ 1006 - ParaAdd containerapp connection create mysql-flexible cmd containerapp connection create mysql-flexible added parameter no_recreate
⚠️ 1006 - ParaAdd containerapp connection create neon-postgres cmd containerapp connection create neon-postgres added parameter no_recreate
⚠️ 1006 - ParaAdd containerapp connection create postgres cmd containerapp connection create postgres added parameter no_recreate
⚠️ 1006 - ParaAdd containerapp connection create postgres-flexible cmd containerapp connection create postgres-flexible added parameter no_recreate
⚠️ 1006 - ParaAdd containerapp connection create redis cmd containerapp connection create redis added parameter no_recreate
⚠️ 1006 - ParaAdd containerapp connection create redis-enterprise cmd containerapp connection create redis-enterprise added parameter no_recreate
⚠️ 1006 - ParaAdd containerapp connection create servicebus cmd containerapp connection create servicebus added parameter no_recreate
⚠️ 1006 - ParaAdd containerapp connection create signalr cmd containerapp connection create signalr added parameter no_recreate
⚠️ 1006 - ParaAdd containerapp connection create sql cmd containerapp connection create sql added parameter no_recreate
⚠️ 1006 - ParaAdd containerapp connection create storage-blob cmd containerapp connection create storage-blob added parameter no_recreate
⚠️ 1006 - ParaAdd containerapp connection create storage-file cmd containerapp connection create storage-file added parameter no_recreate
⚠️ 1006 - ParaAdd containerapp connection create storage-queue cmd containerapp connection create storage-queue added parameter no_recreate
⚠️ 1006 - ParaAdd containerapp connection create storage-table cmd containerapp connection create storage-table added parameter no_recreate
⚠️ 1006 - ParaAdd containerapp connection create webpubsub cmd containerapp connection create webpubsub added parameter no_recreate
⚠️ 1006 - ParaAdd functionapp connection create app-insights cmd functionapp connection create app-insights added parameter no_recreate
⚠️ 1006 - ParaAdd functionapp connection create appconfig cmd functionapp connection create appconfig added parameter no_recreate
⚠️ 1006 - ParaAdd functionapp connection create cognitiveservices cmd functionapp connection create cognitiveservices added parameter no_recreate
⚠️ 1006 - ParaAdd functionapp connection create cosmos-cassandra cmd functionapp connection create cosmos-cassandra added parameter no_recreate
⚠️ 1006 - ParaAdd functionapp connection create cosmos-gremlin cmd functionapp connection create cosmos-gremlin added parameter no_recreate
⚠️ 1006 - ParaAdd functionapp connection create cosmos-mongo cmd functionapp connection create cosmos-mongo added parameter no_recreate
⚠️ 1006 - ParaAdd functionapp connection create cosmos-sql cmd functionapp connection create cosmos-sql added parameter no_recreate
⚠️ 1006 - ParaAdd functionapp connection create cosmos-table cmd functionapp connection create cosmos-table added parameter no_recreate
⚠️ 1006 - ParaAdd functionapp connection create eventhub cmd functionapp connection create eventhub added parameter no_recreate
⚠️ 1006 - ParaAdd functionapp connection create fabric-sql cmd functionapp connection create fabric-sql added parameter no_recreate
⚠️ 1006 - ParaAdd functionapp connection create keyvault cmd functionapp connection create keyvault added parameter no_recreate
⚠️ 1006 - ParaAdd functionapp connection create mongodb-atlas cmd functionapp connection create mongodb-atlas added parameter no_recreate
⚠️ 1006 - ParaAdd functionapp connection create mysql cmd functionapp connection create mysql added parameter no_recreate
⚠️ 1006 - ParaAdd functionapp connection create mysql-flexible cmd functionapp connection create mysql-flexible added parameter no_recreate
⚠️ 1006 - ParaAdd functionapp connection create neon-postgres cmd functionapp connection create neon-postgres added parameter no_recreate
⚠️ 1006 - ParaAdd functionapp connection create postgres cmd functionapp connection create postgres added parameter no_recreate
⚠️ 1006 - ParaAdd functionapp connection create postgres-flexible cmd functionapp connection create postgres-flexible added parameter no_recreate
⚠️ 1006 - ParaAdd functionapp connection create redis cmd functionapp connection create redis added parameter no_recreate
⚠️ 1006 - ParaAdd functionapp connection create redis-enterprise cmd functionapp connection create redis-enterprise added parameter no_recreate
⚠️ 1006 - ParaAdd functionapp connection create servicebus cmd functionapp connection create servicebus added parameter no_recreate
⚠️ 1006 - ParaAdd functionapp connection create signalr cmd functionapp connection create signalr added parameter no_recreate
⚠️ 1006 - ParaAdd functionapp connection create sql cmd functionapp connection create sql added parameter no_recreate
⚠️ 1006 - ParaAdd functionapp connection create storage-blob cmd functionapp connection create storage-blob added parameter no_recreate
⚠️ 1006 - ParaAdd functionapp connection create storage-file cmd functionapp connection create storage-file added parameter no_recreate
⚠️ 1006 - ParaAdd functionapp connection create storage-queue cmd functionapp connection create storage-queue added parameter no_recreate
⚠️ 1006 - ParaAdd functionapp connection create storage-table cmd functionapp connection create storage-table added parameter no_recreate
⚠️ 1006 - ParaAdd functionapp connection create webpubsub cmd functionapp connection create webpubsub added parameter no_recreate
⚠️ 1006 - ParaAdd webapp connection create app-insights cmd webapp connection create app-insights added parameter no_recreate
⚠️ 1006 - ParaAdd webapp connection create appconfig cmd webapp connection create appconfig added parameter no_recreate
⚠️ 1006 - ParaAdd webapp connection create cognitiveservices cmd webapp connection create cognitiveservices added parameter no_recreate
⚠️ 1006 - ParaAdd webapp connection create cosmos-cassandra cmd webapp connection create cosmos-cassandra added parameter no_recreate
⚠️ 1006 - ParaAdd webapp connection create cosmos-gremlin cmd webapp connection create cosmos-gremlin added parameter no_recreate
⚠️ 1006 - ParaAdd webapp connection create cosmos-mongo cmd webapp connection create cosmos-mongo added parameter no_recreate
⚠️ 1006 - ParaAdd webapp connection create cosmos-sql cmd webapp connection create cosmos-sql added parameter no_recreate
⚠️ 1006 - ParaAdd webapp connection create cosmos-table cmd webapp connection create cosmos-table added parameter no_recreate
⚠️ 1006 - ParaAdd webapp connection create eventhub cmd webapp connection create eventhub added parameter no_recreate
⚠️ 1006 - ParaAdd webapp connection create fabric-sql cmd webapp connection create fabric-sql added parameter no_recreate
⚠️ 1006 - ParaAdd webapp connection create keyvault cmd webapp connection create keyvault added parameter no_recreate
⚠️ 1006 - ParaAdd webapp connection create mongodb-atlas cmd webapp connection create mongodb-atlas added parameter no_recreate
⚠️ 1006 - ParaAdd webapp connection create mysql cmd webapp connection create mysql added parameter no_recreate
⚠️ 1006 - ParaAdd webapp connection create mysql-flexible cmd webapp connection create mysql-flexible added parameter no_recreate
⚠️ 1006 - ParaAdd webapp connection create neon-postgres cmd webapp connection create neon-postgres added parameter no_recreate
⚠️ 1006 - ParaAdd webapp connection create postgres cmd webapp connection create postgres added parameter no_recreate
⚠️ 1006 - ParaAdd webapp connection create postgres-flexible cmd webapp connection create postgres-flexible added parameter no_recreate
⚠️ 1006 - ParaAdd webapp connection create redis cmd webapp connection create redis added parameter no_recreate
⚠️ 1006 - ParaAdd webapp connection create redis-enterprise cmd webapp connection create redis-enterprise added parameter no_recreate
⚠️ 1006 - ParaAdd webapp connection create servicebus cmd webapp connection create servicebus added parameter no_recreate
⚠️ 1006 - ParaAdd webapp connection create signalr cmd webapp connection create signalr added parameter no_recreate
⚠️ 1006 - ParaAdd webapp connection create sql cmd webapp connection create sql added parameter no_recreate
⚠️ 1006 - ParaAdd webapp connection create storage-blob cmd webapp connection create storage-blob added parameter no_recreate
⚠️ 1006 - ParaAdd webapp connection create storage-file cmd webapp connection create storage-file added parameter no_recreate
⚠️ 1006 - ParaAdd webapp connection create storage-queue cmd webapp connection create storage-queue added parameter no_recreate
⚠️ 1006 - ParaAdd webapp connection create storage-table cmd webapp connection create storage-table added parameter no_recreate
⚠️ 1006 - ParaAdd webapp connection create webpubsub cmd webapp connection create webpubsub added parameter no_recreate

@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>

@yonzhan

Copy link
Copy Markdown
Collaborator

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

@xfz11 xfz11 changed the title {Service Connector} az aks connection create: Add --no-recreate to avoid creating operation in existing connection and update kubernetesResourceName in aks connection response {Service Connector} az aks connection create: Add --no-recreate to avoid creating operation for existing connection and update kubernetesResourceName in aks connection response Sep 18, 2025
@microsoft-github-policy-service microsoft-github-policy-service Bot added the Auto-Assign Auto assign by bot label Sep 18, 2025

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.

Pull Request Overview

This PR adds a --no-recreate flag to the az aks connection create command to avoid creating operations when an existing connection has no changes, and updates the kubernetesResourceName format in AKS connection responses.

  • Adds no_recreate parameter to skip creation when existing connections have no meaningful property changes
  • Updates AKS resource name format from list to dictionary structure for better clarity
  • Adds property comparison logic to detect meaningful changes between new and existing connections

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
custom.py Adds no_recreate parameter and logic to check existing connections before creating new ones
_utils.py Adds property comparison function and updates AKS resource name format to dictionary
_params.py Adds command line argument definition for --no-recreate flag

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread src/azure-cli/azure/cli/command_modules/serviceconnector/_params.py Outdated
Comment thread src/azure-cli/azure/cli/command_modules/serviceconnector/_utils.py Outdated
Comment thread src/azure-cli/azure/cli/command_modules/serviceconnector/custom.py Outdated
@microsoft-github-policy-service microsoft-github-policy-service Bot added the AKS az aks/acs/openshift label Sep 18, 2025
Comment thread src/azure-cli/azure/cli/command_modules/serviceconnector/_utils.py
Comment thread src/azure-cli/azure/cli/command_modules/serviceconnector/custom.py Outdated
@xfz11 xfz11 added the Service Connector az webapp/functionapp/springapp/containerapp connection label Sep 19, 2025
@xfz11

xfz11 commented Sep 22, 2025

Copy link
Copy Markdown
Contributor Author

kai ru (@kairu-ms) This PR is ready. Could you help review and merge it?

@kairu-ms
kai ru (kairu-ms) merged commit 9f3aac4 into Azure:dev Sep 23, 2025
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AKS az aks/acs/openshift Auto-Assign Auto assign by bot Service Connector az webapp/functionapp/springapp/containerapp connection

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants