Skip to content

Commit c3c929a

Browse files
authored
Merge pull request #46 from remerge/CORE-774
Add support for apex record in delegated zone
2 parents 25944a3 + e122fef commit c3c929a

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

domain/delegation/main.tf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,15 @@ resource "google_certificate_manager_certificate_map_entry" "default" {
9191
map = google_certificate_manager_certificate_map.default.name
9292
}
9393

94+
resource "google_dns_record_set" "apex" {
95+
count = length(var.apex_record) > 0 ? 1 : 0
96+
managed_zone = google_dns_managed_zone.public.name
97+
name = google_dns_managed_zone.public.dns_name
98+
type = "A"
99+
ttl = 300
100+
rrdatas = var.apex_record
101+
}
102+
94103
resource "google_dns_record_set" "main" {
95104
for_each = var.dns_records
96105
managed_zone = google_dns_managed_zone.public.name

domain/delegation/variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ variable "domain" {
1010
type = string
1111
}
1212

13+
variable "apex_record" {
14+
type = list(string)
15+
default = []
16+
}
17+
1318
variable "dns_records" {
1419
type = map(list(string))
1520
default = {}

0 commit comments

Comments
 (0)