Add the acme-challenge delegation.

This commit is contained in:
Andrea Dell'Amico 2023-11-07 02:22:04 +01:00
parent 45c0bc42c5
commit e8c4fa142c
Signed by untrusted user: andrea.dellamico
GPG Key ID: 147ABE6CEB9E20FF
2 changed files with 17 additions and 0 deletions

3
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"svn.ignoreMissingSvnWarning": true
}

View File

@ -54,6 +54,20 @@ resource "openstack_networking_router_interface_v2" "private-network-routing" {
subnet_id = openstack_networking_subnet_v2.main-private-subnet.id
}
locals {
acme_challenge_recordset_name = "_acme-challenge.${var.dns_zone.zone_name}"
acme_challenge_delegation = "_acme-challenge.d4science.net."
}
resource "openstack_dns_recordset_v2" "acme_challenge_recordset" {
zone_id = var.dns_zone_id
name = local.acme_challenge_recordset_name
description = "ACME challenge delegation"
ttl = 8600
type = "CNAME"
records = [local.acme_challenge_delegation]
}
output "main_private_network_id" {
description = "Main private network id"
value = openstack_networking_network_v2.main-private-network.id