cn-terraform / terraform-aws-s3-static-website

Terraform Module for AWS to host Static Website on S3
https://registry.terraform.io/modules/cn-terraform/s3-static-website/aws
Apache License 2.0
20 stars 33 forks source link

Unable to use custom ACM certificate #29

Closed Yukesh4791 closed 2 years ago

Yukesh4791 commented 2 years ago

I have been trying to use this module to host static website from S3 bucket. I'm unable to use custom ACM certificate when create_acm_certificate is set to false and acm_certificate_arn_to_use is used.

I always get the below error,

╷
│ Error: Invalid index
│ 
│   on main.tf line 74, in resource "aws_route53_record" "acm_certificate_validation_records":
│   74:     for dvo in aws_acm_certificate.cert[0].domain_validation_options : dvo.domain_name => {
│     ├────────────────
│     │ aws_acm_certificate.cert is empty tuple
│ 
│ The given key does not identify an element in this collection value: the
│ collection has no elements.

Any leads to this could be helpful.

jnonino commented 2 years ago

Hi, please try the new version 0.0.15

Yukesh4791 commented 2 years ago

worked perfect! thanks :)