"az aks create" broke idempotency
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
**Describe the bug**
Previously `az aks create` was idempotent and would not throw errors. We now see:
```
Operation failed with status: 'Bad Request'. Details: Changing property 'linuxProfile.ssh.publicKeys.keyData' is not allowed.
```
**To Reproduce**
re-run this command:
```bash
msi=$(az identity create -nxx -g xx -l westeurope --query id -o tsv)
az aks create -n 'otomi-aks-ont' -g 'xx' --vnet-subnet-id \
'/subscriptions/xx/resourceGroups/xx/providers/Microsoft.Network/virtualNetworks/xxt/subnets/xx' \
--assign-identity $msi --zones 1 2 --enable-cluster-autoscaler --generate-ssh-keys \
--network-plugin 'azure' --network-policy 'calico' --nodepool-name 'systempool' \
--kubernetes-version '1.20.9' --max-count '9' --max-pods '42' --min-count '3' \
--node-osdisk-size '200' --node-vm-size 'Standard_DS3_v2'
```
**Expected behavior**
idempotency when running the command
**Environment summary**
az --version:
```
azure-cli 2.27.0 *
core 2.27.0 *
telemetry 1.0.6
Extensions:
aks-preview 0.4.73
ai-examples 0.2.5
ssh 0.1.5
Python location '/opt/az/bin/python3'
Extensions directory '/home/admfaber002/.azure/cliextensions'
Extensions system directory '/opt/az/lib/python3.6/site-packages/azure-cli-extensions'
Python (Linux) 3.6.10 (default, Jul 30 2021, 11:24:13)
[GCC 8.3.0
```
**Additional context**
Contributor guide
Assessment
This issue has not been assessed yet.