-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Can't import portal-created AKS clusters #1806
Comments
@holmesb Thanks for opening this issue, I can reproduce the issue reported by you. The linuxProfile is required field by AKS REST SPEC: If we don't pass it while calling API, it will reject the request. We're currently working with AKS team to get more information, please stay tuned for further updates. |
can you get rid of the whole linux profile to create cluster? since Linux profile is optional, but if you specifying linux_profile, the admin_usernakme and ssh_key are required.
|
@zqingqing1 that will not be helpful. Even we made the linux_profile be optional from schema definition on terraform client side, the SDK constraint validation still reject it:
|
it is saying the admin_username you provide is nil, and that field is required, because you give the admin_username = "". Let me try to remove it from terraform, then you don't need to specify linuxProfile. Meanwhile, I will apply the new change to see if that will pass. |
@zqingqing1 Please see linked PR, we updated the code to pass |
This has been fixed via #1821 which will be released as a part of v1.14.0 - as such I'm going to close this issue :) |
hey @holmesb Just to let you know that this has been released in v1.14.0 of the AzureRM Provider which is now available: https://github.com/terraform-providers/terraform-provider-azurerm/blob/v1.14.0/CHANGELOG.md Thanks! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
AKS clusters created using the portal cannot be imported. Since GA, there is no longer a Portal option to choose an SSH key. Yet specifying an SSH key is a requirement in the kubernetes_cluster resource. After importing, any ssh_key value forces the cluster to be recreated. Even an empty ssh_key such as:
when planned, results in :
Hence it's impossible to import portal-created AKS clusters. No matter what value is used for linux_profile.ssh_key, it forces cluster recreation.
Steps to Reproduce
The text was updated successfully, but these errors were encountered: