Skip to content

Adding more domains

Sometimes a client application needs to be reachable from more than one URL. More URLs can be added as follows:

main.tf
module "application" {
  source = "git@github.com:BYM-IKT/terraform-byks-module.git?ref=v12"

  # ...

  cloudfront_distributions = {
    kattehotell = {
      additional_domains = [
        {
          domain_name = "hotell-for-katter.test.bymoslo.net"
          zone_name   = "test.bymoslo.net"
        }
      ]
    }
  }
}

This provisions a client application reachable from 2 different URLs:

  • https://kattehotell.test.bymoslo.net (default)
  • https://hotell-for-katter.test.bymoslo.net