I'm trying to create an AWS EC2 instance with a network interface associated to an elastic IP, but it seems like the aws_eip resource doesn't accept a network_interface, when running terraform plan I get:
resource "aws_instance" "java" {
ami = "${lookup(var.java_amis, var.region)}"
key_name = "${var.key_name}"
instance_type = "t2.micro"
subnet_id = "${lookup(var.subnet_ids, var.region)}"
}
resource "aws_network_interface" "java" {
subnet_id = "${lookup(var.subnet_ids, var.region)}"
attachment {
device_index = 1
}
}
resource "aws_eip" "java" {
}
output "ip" {
value = "${aws_eip.java.public_ip}"
}