Skip to content

Commit

Permalink
Merge pull request #176 from Mark-Simulacrum/dns-delegation
Browse files Browse the repository at this point in the history
Delegate DNS to docs-rs-staging
  • Loading branch information
Mark-Simulacrum committed Dec 20, 2022
2 parents 87abaa3 + 599ac66 commit f9cb7ef
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 0 deletions.
25 changes: 25 additions & 0 deletions terraform/dns-delegation/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 33 additions & 0 deletions terraform/dns-delegation/_terraform.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Configuration for Terraform itself.

terraform {
required_version = ">= 1"

required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 4.48"
}
}

backend "s3" {
bucket = "rust-terraform"
key = "simpleinfra/dns-delegation.tfstate"
region = "us-west-1"
dynamodb_table = "terraform-state-lock"
encrypt = true
}
}

data "terraform_remote_state" "shared" {
backend = "s3"
config = {
bucket = "rust-terraform"
key = "simpleinfra/shared.tfstate"
region = "us-west-1"
}
}

provider "aws" {
region = "us-west-1"
}
16 changes: 16 additions & 0 deletions terraform/dns-delegation/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
data "aws_route53_zone" "rust_lang_net" {
name = "rust-lang.net"
}

resource "aws_route53_record" "docs_rs_staging" {
zone_id = data.aws_route53_zone.rust_lang_net.zone_id
name = "docs-rs-staging.rust-lang.net"
type = "NS"
ttl = 300
records = [
"ns-1654.awsdns-14.co.uk.",
"ns-95.awsdns-11.com.",
"ns-549.awsdns-04.net.",
"ns-1057.awsdns-04.org.",
]
}

0 comments on commit f9cb7ef

Please sign in to comment.