Hello all - i am getting this error when creating a AKS resource , i have created AKS several times and have not seen this error in the past. some solutions suggest creating a ssh pair and uploading it in the location but that doesnt sound like an elegant solution. Especially when no documentation suggests that we wouldnt need to do that
Error: Invalid function argument
on k8s.tf line 37, in resource "azurerm_kubernetes_cluster" "main":
37: key_data = file(var.ssh_public_key)
|----------------
| var.ssh_public_key is "~/.ssh/id_rsa.pub"
Invalid value for "path" parameter: no file exists at
C:\Users\.ssh\id_rsa.pub; this function works only with files that are
distributed as part of the configuration source code, so if this file will be
created by a resource in this configuration you must instead obtain this
result from an attribute of that resource.