│ Error: file provisioner error
│
│ with azurerm_linux_virtual_machine.myterraformvm,
│ on azure_resources.tf line 171, in resource "azurerm_linux_virtual_machine" "myterraformvm":
│ 171: provisioner "file" {
│
│ host for provisioner cannot be empty
╵
PS E:\terraform\azure4> terraform destroy
╷
│ Error: Unsupported argument
│
│ on azure_resources.tf line 172, in resource "azurerm_linux_virtual_machine" "myterraformvm":
│ 172: host = "${azurerm_public_ip.myterraformpublicip.fqdn}"
│
│ An argument named "host" is not expected here.
│ Error: Incorrect attribute value type
│
│ on azure_resources.tf line 163, in resource "azurerm_linux_virtual_machine" "myterraformvm":
│ 163: host = self.public_ip_addresses
│ ├────────────────
│ │ self.public_ip_addresses is list of string with 1 element
│
│ Inappropriate value for attribute "host": string required.
connection {
host = self.public_ip_addresses
user = "azureuser"
type = "ssh"
private_key = "${file("~/.ssh/id_rsa")}"
timeout = "4m"
agent = true
}
connection {
type = "ssh"
user = "ec2-user"
private_key = file("~/.ssh/terraform")
host = self.public_ip
}
│ Error: file provisioner error
│
│ with azurerm_linux_virtual_machine.myterraformvm,
│ on azure_resources.tf line 171, in resource "azurerm_linux_virtual_machine" "myterraformvm":
│ 171: provisioner "file" {
│
│ SSH agent requested but Pageant not running
Solution in Windows - Make agent = false
connection {
host = self.public_ip_addresses
user = "azureuser"
type = "ssh"
private_key = "${file("~/.ssh/id_rsa")}"
timeout = "4m"
agent = false
}
│ Error: file provisioner error
│
│ with azurerm_linux_virtual_machine.myterraformvm,
│ on azure_resources.tf line 171, in resource "azurerm_linux_virtual_machine" "myterraformvm":
│ 171: provisioner "file" {
│
│ timeout - last error: dial tcp: lookup self.public_ip_address: no such host
╵
Latest posts by rajeshkumar (see all)
- AWS Error: Access denied by EC2 Instance Connect - December 4, 2023
- How to get Blackduck Trial version? - December 3, 2023
- PHP ionCube Error: cannot be decoded by this version of the ionCube Loader - December 2, 2023