Microsoft.ContainerService/managedClusters: Immutable Property enableEncryptionAtHost intermittently pass validation
- Dominant language
- TypeScript
- Stars
- 108
- Forks
- 44
- Avg merge
- 18h 53m
- Merged PRs (30d)
- 29
Description
### Resource Type
Microsoft.ContainerService/managedClusters
### Api Version
Microsoft.ContainerService/managedClusters@2025-01-01
### Issue Type
Property(s) do not have expected effect on deployment
### Other Notes
Experiencing intermittent false positive validations during deployment pipelines.
The `enableEncryptionAtHost` property under `agentPoolProfiles` is marked as immutable, but the deployment sometimes pass the what-if validations.
Error message: "Preflight validation check for resource(s) for container service XXX-aks in resource group XXXX failed. Message: Changing property 'properties.enableEncryptionAtHost' is not allowed"
This appears to be a resource type definition inaccuracy where ARM template deployment incorrectly handles the comparison of immutable properties.
The issue occurs redeploying the pipelines, deployment logs sometimes show:
```
~ properties.agentPoolProfiles: [
~ 0:
~ enableEncryptionAtHost: false => true
```
Despite no actual change being made in the template i can see the two options appearing intermittently.
### Bicep Repro
```bicep
resource aks 'Microsoft.ContainerService/managedClusters@2025-01-01' = {
name: 'example-aks'
location: location
properties: {
dnsPrefix: 'example'
kubernetesVersion: '1.22.6'
agentPoolProfiles: [
{
name: 'nodepool1'
count: 3
vmSize: 'Standard_DS2_v2'
mode: 'System'
enableEncryptionAtHost: true // This immutable property sometimes pass correctly
}
]
}
identity: {
type: 'SystemAssigned'
}
}
```
### Confirm
- [x] I have read the troubleshooting guide and looked for duplicates.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the provided Bicep repro for Microsoft.ContainerService/managedClusters@2025-01-01 and compare repeated what-if validation results for agentPoolProfiles.enableEncryptionAtHost. Done means unchanged templates produce consistent validation output and genuine changes to the immutable property are still rejected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure
- Domain
- cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100