AKS: Support AsExisting() for pre-provisioned clusters
Open
area-deployment
azure
kubernetes
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 991
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 196
Description
## Problem
`AsExisting()` is not implemented for `AzureKubernetesEnvironmentResource`. Users cannot reference a pre-provisioned AKS cluster — they must always provision a new one.
## Expected
```csharp
var nameParam = builder.AddParameter("aks-name");
var rgParam = builder.AddParameter("aks-rg");
var aks = builder.AddAzureKubernetesEnvironment("aks")
.AsExisting(nameParam, rgParam);
```
Should use the established `ExistingAzureResourceAnnotation` pattern and skip Bicep generation for the cluster itself while still supporting workload identity, Helm deployment, etc.
## Related
Part of AKS hosting support (PR #16088)
Contributor guide
Assessment
This issue has not been assessed yet.