Hi
I have a requirement to create EC2 instance using terraform but I want to create ec2 with static ip address .reserved and created one eni with Ip address in console .How can I build EC2 with static ip (attached eni) using terraform
resource “aws_instance” “EC2” {
ami = “ami-XXX”
instance_type = “m4.large”
subnet_id = “subnet-XXX”
associate_public_ip_address = false
iam_instance_profile = “ROLE”
security_groups = [“sg-XXX”]
user_data = “${file(“userdata.sh”)}”
tags = {
Name = “Testinstance”
POc="xxxx@mail.com"
}