Skip to content

Commit

Permalink
Add plan-patch for AWS DNS delegation
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenehret authored and rkoster committed Jun 8, 2023
1 parent 0ae20af commit bd2a1cd
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
8 changes: 8 additions & 0 deletions plan-patches/dns-delegation-aws/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## AWS DNS Delegation

If you have a DNS parent zone, this plan-patch creates the required "NS" record for DNS delegation. Can be used if `parent_zone` is empty, see:
https://github.com/cloudfoundry/bosh-bootloader/blob/2a4d71fd093a77f6895e411c56fa6c14329b9d3f/terraform/aws/templates/cf_dns.tf#L5
```
cp -r bosh-bootloader/plan-patches/dns-delegation-aws/. some-env/
bbl up
```
13 changes: 13 additions & 0 deletions plan-patches/dns-delegation-aws/terraform/aws_parent_ns.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
variable "parent_zone_id" {
type = "string"
description = "The AWS Route53 hosted zone ID for the 'parent' of the zone that bbl will create, used to set up DNS delegation"
}

resource "aws_route53_record" "perf-test" {
name = "${var.system_domain}"
ttl = 172800
type = "NS"
zone_id = "${var.parent_zone_id}"

records = ["${aws_route53_zone.env_dns_zone.name_servers}"]
}

0 comments on commit bd2a1cd

Please sign in to comment.