I want to associate some permanent IP address to a load balancer on AWS. How do I do that? Do I use an EIP?
I'm new to AWS, and I'm new to Terraform. I had made the assumption that I could create an EIP in the console, and then connect it to a load balancer, but I see no documentation on that, so maybe I got that wrong.
If I go here:
https://www.typeerror.org/docs/terraform/providers/aws/r/eip_association
then I see this example:
resource "aws_eip_association" "eip_assoc" {
instance_id = "${aws_instance.web.id}"
allocation_id = "${aws_eip.example.id}"
}
This shows how to connect an EIP to a specific EC2 instance, but I could not find an example that connects an EIP to a classic aws_elb load balancer.
0 Answers