Skip to content

Instantly share code, notes, and snippets.

@refayathaque
Last active March 21, 2021 19:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save refayathaque/999546170efe381a6c9e2bc7e0f2df11 to your computer and use it in GitHub Desktop.
Save refayathaque/999546170efe381a6c9e2bc7e0f2df11 to your computer and use it in GitHub Desktop.
Part of "Automate hosting a static website on AWS with Terraform" post
resource "aws_acm_certificate" "certificate" {
domain_name = var.DOMAIN_NAME
validation_method = "DNS"
lifecycle {
create_before_destroy = true
}
}
resource "aws_acm_certificate_validation" "certificate" {
certificate_arn = aws_acm_certificate.certificate.arn
validation_record_fqdns = [for record in aws_route53_record.certificate_validation : record.fqdn]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment