DNS
All applications in a environment will be deployed to a subdomain of oslo.systems.
The default domain for your environment is {Environment}.oslo.systems. Each new application will use a subdomain of
this domain.
Step 1: Add and configure the dns package
Step 2: Install and apply the package
Once terraform apply completes, name servers will be printed to the console.
name_servers = tolist([
"ns-123.awsdns-44.org",
"ns-321.awsdns-29.co.uk",
"ns-213.awsdns-35.com",
"ns-231.awsdns-18.net",
])
Step 3: Verify
Step 4: Add DNS Name Servers
The output from Step 2 are the name servers for the root domain specified in _gp_dns.tf. Because oslo.systems was specified as the root domain, follow the guide Adding a subdomain to oslo.systems to complete the setup.
To override default configuration, set the root_domain variable in dns/config_override.tf.
The domain pirates-dev.oslo.systems should now resolve to applications you deploy.
Step 5: Verify
To verify the subdomain is properly registered with a name server (after completing step 4):
This should return name servers corresponding to the list printed after terraform apply in step 2.
If you don't have dig installed, use this DNS lookup tool to check {your-subdomain}.oslo.systems.
Step 6: Add DNS for oslo.kommune.no (optional)
If you require a subdomain on oslo.kommune.no you need to follow these steps.
Step 6a: Create a Route53 zone for subdomain
locals {
my_product_root_domain = "my-product-root-domain.oslo.kommune.no"
}
resource "aws_route53_zone" "my_product_root_domain" {
name = local.my_product_root_domain
}
output "name_servers" {
value = aws_route53_zone.my_product_root_domain.name_servers
description = "A list of name servers in associated delegation set. The root domain zone needs these name servers as NS records for your domain."
}
Step 6b: Request DNS changes on oslo.kommune.no
Use the output from 6a to request a DNS change:
- Go to the #origo-kjøremiljø-support channel on Slack
- Paste the value from the output in step 6a together with the URL for your IaC repository
- Team Kjøremiljø is going to request the DNS change on your behalf
Step 6c: Verify
After team Kjøremiljø completes the DNS change, you are contacted on Slack. Then, verify the new subdomain with:
Any update or change that results in an updated name_servers output requires submitting a new DNS change request to team Kjøremiljø.
Next step
Set up networking.