I am creating an alb using terraform and I have 2 ssl certs that I need to upload. Currently I do this in my terraform file to upload them
resource "aws_acm_certificate" "cert1" {
private_key=file("/mydir/cert1.key")
certificate_body = file("/mydir/cert1.cer")
certificate_chain=file("mydir/cert1_interm.cer")
}
resource "aws_acm_certificate" "cert2" {
private_key=file("/mydir/cert2.key")
certificate_body = file("/mydir/cert2.cer")
certificate_chain=file("mydir/cert2_interm.cer")
}
I want to combine those 2 uploads in to one. Like for example
loop
read the private,inter and actual cert from a location
and uplaod them
instead of defining 2 times like how i have.