78049/how-to-attach-elastic-ip-in-ec2-instance-using-terraform-code
Hi Guys,
I have launch one EC2 instance in AWS using Terraform code. Now I want to add one Elastic IP to this instance. How can I do that?
Hi@akhtar,
You can use aws_eip resource in your Terraform code. You have to associate your EIP with your instance id. You can use the below-given example.
resource "aws_eip" "lb" { instance = "${aws_instance.web.id}" vpc = true }
Hi@akhtar, To ssh in your EC2 instance, you ...READ MORE
Hi, I think you can use aws_db_instance resource to ...READ MORE
Hi, In your Terraform code, you have written ...READ MORE
Hi@akhtar, You can use aws_route_table resources in your ...READ MORE
You can also create a snapshot using ...READ MORE
Hi, It totally depends on your understanding and ...READ MORE
Security groups present in a VPC provides ...READ MORE
Security groups in a VPC is basically ...READ MORE
Hi@akhtar, You can use aws_elb_attachment resource in Terraform. ...READ MORE
Hi@akhtar, You can use aws_volume_attachment resource to attach ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.