I'm having issues when trying to match a certificate I have created at AWS ACM in a classic load balancer in terraform.
According to the documentation and examples, terraform expects me to provide a SSL certificate I have uploaded to AWS IAM. See documentation But this doesn't makes a lot of sense, because I have my certificate in ACM. Someone know how I can configure this certificate with terraform?
This is the error I'm getting
Error: Error creating ELB: ValidationError: Secure Listeners need to specify a SSLCertificateId
status code: 400, request id: c16d2c09-32b7-484f-9c51-e8a2d8fed1fe
on modules/ec2/loadbalancer.tf line 3, in resource "aws_elb" "bar":
3: resource "aws_elb" "sprint0_elb" {
resource "aws_elb" "bar" {
name = "foobar-terraform-elb"
availability_zones = ["us-east-2a", "us-east-2b", "us-east-2c"]
access_logs {
bucket = "foo"
bucket_prefix = "bar"
interval = 60
}
listener {
instance_port = 8000
instance_protocol = "http"
lb_port = 80
lb_protocol = "http"
}
listener {
instance_port = 8000
instance_protocol = "http"
lb_port = 443
lb_protocol = "https"
ssl_certificate_id = "arn:aws:acm:us-east-1:xxxxxxxxxxxxxxx:certificate/xxxxxx-xxxx-xxx-xxx-xxxxxxxxxx"
}