[ACS] BREAKING CHANGE: az aks create: Make --no-ssh-key default behaviour#32254
[ACS] BREAKING CHANGE: az aks create: Make --no-ssh-key default behaviour#32254
az aks create: Make --no-ssh-key default behaviour#32254Conversation
Enhanced help text to clarify default SSH key behavior for AKS clusters. Updated SSH key validation logic to default to server-side key generation when no local key is present. Added and updated tests to cover scenarios without SSH keys.
️✔️AzureCLI-FullTest
|
|
| rule | cmd_name | rule_message | suggest_message |
|---|---|---|---|
| aks create | cmd aks create removed property deprecate_info_target |
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
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). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
There was a problem hiding this comment.
Pull Request Overview
This PR implements a breaking change to the az aks create command to make --no-ssh-key the default behavior when no SSH-related parameters are provided. Previously, the command would fail if no SSH parameters were provided, now it defaults to using server-side generated keys.
Key changes:
- Updated SSH key validation logic to default to
--no-ssh-keybehavior when no valid SSH key is found - Added a comprehensive test case to verify the new default behavior
- Updated help documentation to reflect the behavior change
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| test_aks_commands.py | Added new test test_aks_create_no_ssh_key to verify cluster creation without SSH parameters |
| test_aks_create_no_ssh_key.yaml | Test recording file for the new SSH-less cluster creation test |
| _validators.py | Modified SSH key validation to default to no_ssh_key=True when no valid key is found |
| _help.py | Updated help text for --ssh-key-value and --no-ssh-key parameters to document new behavior |
Comments suppressed due to low confidence (1)
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
I believe this is a good time to merge this PR, but don't forget to fix the failed CI check, there's a recent change that bumps the SDK and default API version to 2025-09-01.
|
|
Please remove the breaking change pre-announcement in |
Deleted _breaking_change.py which registered a logic breaking change for default SSH key handling in 'az aks create'. This cleanup removes an outdated breaking change registration.
|
|
||
| @AllowLargeResponse() | ||
| @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') | ||
| def test_aks_create_no_ssh_key(self, resource_group, resource_group_location): |
Related command
aks
Description
az aks create: Pre-announce--no-ssh-keydefault behaviour breaking change #32205Testing Guide
This checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.