Terraform how to associate an SSH Key or SSH username and password to azurerm_windows_virtual_machine

Viewed 21

I have multiple VM created and managed by terraform using azurerm_windows_virtual_machine, i don't find a way to associate ssh key or shh username and password to these VM and only i find this block

admin_ssh_key {
   username = "azureroot"
   public_key = file("~/.ssh/id_rsa.pub")}
}

that could be associated to a azurerm_linux_virtual_machine, but i use windows VM and not Linux VM

1 Answers

I resolved the problem by using username and password vm admin as a user of ssh key ;)

Related