AZU005 - Password authentication in use instead of SSH keys.

Explanation

Access to instances should be authenticated using SSH keys. Removing the option of password authentication enforces more secure methods while removing the risks inherent with passwords.

Insecure Example

The following example will fail the AZU005 check.

resource "azurerm_virtual_machine" "bad_example" {
	os_profile_linux_config {
		disable_password_authentication = false
	}
}

Secure Example

The following example will pass the AZU005 check.

resource "azurerm_virtual_machine" "good_example" {
	os_profile_linux_config {
		disable_password_authentication = true
	}
}