Skip to content

Commit

Permalink
Merge pull request #1195 from alphagov/samsimpson1/govuk-aws
Browse files Browse the repository at this point in the history
Manage root DNS zones
  • Loading branch information
samsimpson1 authored Apr 2, 2024
2 parents 1bf1dc2 + c4a0395 commit 1f09c6a
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions terraform/deployments/vpc/root_dns_zones.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
resource "aws_route53_zone" "internal_zone" {
name = "${var.govuk_environment}.govuk-internal.digital."

vpc {
vpc_id = aws_vpc.vpc.id
}
}

resource "aws_route53_zone" "external_zone" {
name = "${var.govuk_environment}.govuk.digital."
}

// Imports (temporary)

data "aws_route53_zone" "internal" {
name = "${var.govuk_environment}.govuk-internal.digital."
private_zone = true
}

data "aws_route53_zone" "external" {
name = "${var.govuk_environment}.govuk.digital."
}

import {
to = aws_route53_zone.external_zone
id = data.aws_route53_zone.external.zone_id
}

import {
to = aws_route53_zone.internal_zone
id = data.aws_route53_zone.internal.zone_id
}

0 comments on commit 1f09c6a

Please sign in to comment.