-
Notifications
You must be signed in to change notification settings - Fork 728
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to initialize kubernetes provider with listClusterAdminCredential()
#14062
Labels
Comments
Hi @mjlshen, this is by design due to a limitation of the ARM template evaluation engine. The provider config values must be deploy-time constants. If you need to use // main.bicep
resource aks 'Microsoft.ContainerService/managedClusters@2022-05-02-preview' existing = {
name: 'demoAKSCluster'
}
module kubernetesDeploy './kubernetes.bicep' = {
name: 'kubernetesDeploy'
params: {
kubeConfig: aks.listClusterAdminCredential().kubeconfigs[0].value
}
}
// kubernetes.bicep
provider kubernetes with {
kubeConfig: kubeConfig
namespace: 'default'
}
param kubeConfig secureString We will improve the Bicep compiler to make sure the error is captured at compile time. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bicep version
Describe the bug
I am attempting to create an AKS cluster and initialize the Bicep extensibility Kubernetes provider and am unable to do so, running
az deployment group create
I get the following error:To Reproduce
Steps to reproduce the behavior:
Additional context
The text was updated successfully, but these errors were encountered: