-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1398 from DFE-Digital/680-add-redirect-to-aks-env…
…ironment-domain-module [680] Front door custom domains
- Loading branch information
Showing
21 changed files
with
261 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
terraform 1.2.8 | ||
terraform 1.5.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
AZURE_SUBSCRIPTION=s189-teacher-services-cloud-production | ||
AZURE_RESOURCE_PREFIX=s189p01 | ||
CONFIG_SHORT=dom | ||
DISABLE_KEYVAULTS=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
CONFIG=production | ||
ENVIRONMENT=production |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
CONFIG=staging | ||
ENVIRONMENT=staging |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
20 changes: 20 additions & 0 deletions
20
terraform/domains/environment_domains/config/production.tfvars.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"hosted_zone": { | ||
"adviser-getintoteaching.education.gov.uk": { | ||
"front_door_name": "s189p01-tta-dom-fd", | ||
"resource_group_name": "s189p01-tta-dom-rg", | ||
"domains": [ | ||
"apex" | ||
], | ||
"environment_short": "pd", | ||
"redirect_rules": [ | ||
{ | ||
"from-domain": "apex", | ||
"to-domain": "getintoteaching.education.gov.uk", | ||
"to-path": "/teacher-training-adviser/sign_up/identity", | ||
"to-query-string": "utm_source=adviser-getintoteaching.education.gov.uk&utm_medium=referral&utm_campaign=adviser_redirect" | ||
} | ||
] | ||
} | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
terraform/domains/environment_domains/config/production_Terrafile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
domains: | ||
source: "https://github.com/DFE-Digital/terraform-modules" | ||
version: "main" |
20 changes: 20 additions & 0 deletions
20
terraform/domains/environment_domains/config/staging.tfvars.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"hosted_zone": { | ||
"adviser-getintoteaching.education.gov.uk": { | ||
"front_door_name": "s189p01-tta-dom-fd", | ||
"resource_group_name": "s189p01-tta-dom-rg", | ||
"domains": [ | ||
"staging" | ||
], | ||
"environment_short": "st", | ||
"redirect_rules": [ | ||
{ | ||
"from-domain": "staging", | ||
"to-domain": "staging.getintoteaching.education.gov.uk", | ||
"to-path": "/teacher-training-adviser/sign_up/identity", | ||
"to-query-string": "utm_source=staging.adviser-getintoteaching.education.gov.uk&utm_medium=referral&utm_campaign=adviser_redirect" | ||
} | ||
] | ||
} | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
terraform/domains/environment_domains/config/staging_Terrafile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
domains: | ||
source: "https://github.com/DFE-Digital/terraform-modules" | ||
version: "main" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Used to create domains to be managed by front door. | ||
module "domains" { | ||
for_each = var.hosted_zone | ||
source = "./vendor/modules/domains//domains/environment_domains" | ||
zone = each.key | ||
front_door_name = each.value.front_door_name | ||
resource_group_name = each.value.resource_group_name | ||
domains = each.value.domains | ||
environment = each.value.environment_short | ||
null_host_header = try(each.value.null_host_header, false) | ||
cached_paths = try(each.value.cached_paths, []) | ||
redirect_rules = try(each.value.redirect_rules, []) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
terraform { | ||
|
||
required_version = "= 1.5.1" | ||
required_providers { | ||
azurerm = { | ||
source = "hashicorp/azurerm" | ||
version = "3.62.1" | ||
} | ||
} | ||
backend "azurerm" { | ||
container_name = "terraform-state" | ||
} | ||
} | ||
|
||
provider "azurerm" { | ||
features {} | ||
|
||
skip_provider_registration = true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
variable "hosted_zone" { | ||
type = map(any) | ||
default = {} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"hosted_zone": { | ||
"adviser-getintoteaching.education.gov.uk": { | ||
"caa_records": {}, | ||
"txt_records": {}, | ||
"resource_group_name": "s189p01-tta-dom-rg", | ||
"front_door_name": "s189p01-tta-dom-fd" | ||
} | ||
}, | ||
"deploy_default_records": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
domains: | ||
source: "https://github.com/DFE-Digital/terraform-modules" | ||
version: "stable" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module "domains_infrastructure" { | ||
source = "./vendor/modules/domains//domains/infrastructure" | ||
hosted_zone = var.hosted_zone | ||
deploy_default_records = var.deploy_default_records | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
terraform { | ||
required_version = "= 1.5.1" | ||
|
||
required_providers { | ||
azurerm = { | ||
source = "hashicorp/azurerm" | ||
version = "3.62.1" | ||
} | ||
} | ||
backend "azurerm" { | ||
container_name = "terraform-state" | ||
} | ||
} | ||
|
||
provider "azurerm" { | ||
features {} | ||
|
||
skip_provider_registration = true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
variable "hosted_zone" { | ||
type = map(any) | ||
} | ||
|
||
variable "deploy_default_records" { | ||
default = true | ||
} |