Skip to content

Commit

Permalink
Add redirect to new domain
Browse files Browse the repository at this point in the history
  • Loading branch information
johnake committed Jul 17, 2024
1 parent 5ec72d4 commit 682841a
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 24 deletions.
29 changes: 14 additions & 15 deletions terraform/custom_domains/environment_domains/.terraform.lock.hcl

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

1 change: 1 addition & 0 deletions terraform/custom_domains/environment_domains/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ module "domains" {
null_host_header = try(each.value.null_host_header, false)
cached_paths = try(each.value.cached_paths, [])
exclude_cnames = try(each.value.exclude_cnames, [])
redirect_rules = try(each.value.redirect_rules, null)
}

# Takes values from hosted_zone.domain_name.cnames (or txt_records, a-records). Use for domains which are not associated with front door.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,24 @@
"front_door_name": "s189p01-ftt-svc-domains-fd",
"resource_group_name": "s189p01-fttdomains-rg",
"domains": [
"www"
"www", "apex"
],
"cached_paths": [
"/assets/*"
],
"environment_short": "pd",
"origin_hostname": "publish-production.teacherservices.cloud",
"null_host_header": true
"null_host_header": true,
"redirect_rules": [
{
"from-domain": "apex",
"to-domain": "find-teacher-training-courses.service.gov.uk"
},
{
"from-domain": "www",
"to-domain": "find-teacher-training-courses.service.gov.uk"
}
]
},
"find-teacher-training-courses.service.gov.uk": {
"front_door_name": "s189p01-fttc-svc-domains-fd",
Expand All @@ -24,7 +34,8 @@
],
"environment_short": "pd",
"origin_hostname": "publish-production.teacherservices.cloud",
"null_host_header": true
"null_host_header": true,
"redirect_rules": []
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@
],
"environment_short": "qa",
"origin_hostname": "publish-qa.test.teacherservices.cloud",
"null_host_header": true
"null_host_header": true,
"redirect_rules": [
{
"from-domain": "qa",
"to-domain": "qa.find-teacher-training-courses.service.gov.uk"
}
]
},
"find-teacher-training-courses.service.gov.uk": {
"front_door_name": "s189p01-fttc-svc-domains-fd",
Expand All @@ -24,7 +30,8 @@
],
"environment_short": "qa",
"origin_hostname": "publish-qa.test.teacherservices.cloud",
"null_host_header": true
"null_host_header": true,
"redirect_rules": []
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@
],
"environment_short": "sbx",
"origin_hostname": "publish-sandbox.teacherservices.cloud",
"null_host_header": true
"null_host_header": true,
"redirect_rules": [
{
"from-domain": "sandbox",
"to-domain": "sandbox.find-teacher-training-courses.service.gov.uk"
}
]
},
"find-teacher-training-courses.service.gov.uk": {
"front_door_name": "s189p01-fttc-svc-domains-fd",
Expand All @@ -24,7 +30,8 @@
],
"environment_short": "sbx",
"origin_hostname": "publish-sandbox.teacherservices.cloud",
"null_host_header": true
"null_host_header": true,
"redirect_rules": []
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@
],
"environment_short": "stg",
"origin_hostname": "publish-staging.test.teacherservices.cloud",
"null_host_header": true
"null_host_header": true,
"redirect_rules": [
{
"from-domain": "staging",
"to-domain": "staging.find-teacher-training-courses.service.gov.uk"
}
]
},
"find-teacher-training-courses.service.gov.uk": {
"front_door_name": "s189p01-fttc-svc-domains-fd",
Expand All @@ -24,7 +30,8 @@
],
"environment_short": "stg",
"origin_hostname": "publish-staging.test.teacherservices.cloud",
"null_host_header": true
"null_host_header": true,
"redirect_rules": []
}
}
}

0 comments on commit 682841a

Please sign in to comment.