Validation and cert created for tmper

This commit is contained in:
shockrah 2023-10-05 23:41:18 -07:00
parent d02b5de48c
commit a83debde34
2 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,30 @@
# Base cerificate for shockrah_xyz
##################################
resource "aws_acm_certificate" "temper_tv" {
domain_name = "*.temper.tv"
subject_alternative_names = [ "temper.tv" ]
validation_method = "DNS"
lifecycle {
create_before_destroy = true
}
}
# DNS RECORDS
#############
resource "aws_route53_record" "temper_tv_cert" {
zone_id = var.temper_zone
name = tolist(aws_acm_certificate.temper_tv.domain_validation_options)[0].resource_record_name
type = tolist(aws_acm_certificate.temper_tv.domain_validation_options)[0].resource_record_type
records = [ tolist(aws_acm_certificate.temper_tv.domain_validation_options)[0].resource_record_value ]
ttl = 300
}
# Validation configuration blocks used by terraform
###################################################
resource "aws_acm_certificate_validation" "temper_tv" {
certificate_arn = aws_acm_certificate.temper_tv.arn
validation_record_fqdns = [ aws_route53_record.temper_tv_cert.fqdn ]
}

View File

@ -51,3 +51,6 @@ variable "project_athens_zone" {
type = string type = string
} }
variable "temper_zone" {
type = string
}