Skip to content

Commit

Permalink
Add domain validation record
Browse files Browse the repository at this point in the history
  • Loading branch information
major committed Jul 29, 2024
1 parent f8d4b83 commit 1d41aa1
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion cidv2.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# CNAME for custom domain for expirimental fly.io deployment.
# https://fly.io/docs/networking/custom-domain/
resource "aws_route53_record" "experimental_api" {
resource "aws_route53_record" "fly_experimental_api" {
zone_id = data.aws_route53_zone.imagedirectory_cloud.zone_id
name = "api"
type = "CNAME"
Expand All @@ -13,5 +13,22 @@ resource "aws_route53_record" "experimental_api" {
create_before_destroy = true
}

ttl = "3600"
}

# Domain validation record for fly.io certificate.
resource "aws_route53_record" "flyio_domain_validation" {
zone_id = data.aws_route53_zone.imagedirectory_cloud.zone_id
name = "_acme-challenge.api"
type = "CNAME"

records = [
"api.imagedirectory.cloud.rgdx8e.flydns.net",
]

lifecycle {
create_before_destroy = true
}

ttl = "3600"
}

0 comments on commit 1d41aa1

Please sign in to comment.