resource "aws_instance" "appserver1" {
ami = var.imageid
instance_type = var.instancetype
key_name = var.key
security_groups = [aws_security_group.allow_all.name]
connection {
user = "ubuntu"
private_key = file(var.privatekeypath)
}
provisioner "remote-exec" {
inline = [
"sudo apt-get update",
"sudo apt-get install tomcat7 -y"
]
}
}
"terraform validate" gives me the error:
Error: Missing required argument
on main.tf line 52, in resource "aws_instance" "appserver1": 52: connection {
The argument "host" is required, but no definition was found.