Creating cert for alpha LB

This commit is contained in:
shockrah 2023-10-02 22:05:25 -07:00
parent 687e6a173b
commit 5c025dad33
2 changed files with 18 additions and 3 deletions

View File

@ -3,7 +3,7 @@
# alpha does not depend on this resource and thus is our problem
resource "aws_acm_certificate" "website" {
domain_name = "temper.tv"
domain_name = "*.temper.tv"
subject_alternative_names = [ "temper.tv" ]
validation_method = "DNS"
@ -12,3 +12,18 @@ resource "aws_acm_certificate" "website" {
}
}
resource "aws_route53_record" "website_cert_record" {
for_each = {
for dvo in aws_acm_certificate.website.domain_validation_options : dvo.domain_name => {
name = dvo.resource_record_name
record = dvo.resource_record_value
type = dvo.resource_record_type
}
}
name = each.value.name
type = each.value.type
records = [ each.value.record ]
zone_id = aws_route53_zone.main.id
ttl = 60
}

View File

@ -9,7 +9,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.0"
version = "4.13.0"
}
}
}