-
Notifications
You must be signed in to change notification settings - Fork 0
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 #858 from DFE-Digital/2048-aytq-migrate-domains
2048 aytq migrate domains
- Loading branch information
Showing
20 changed files
with
241 additions
and
0 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
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 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
18 changes: 18 additions & 0 deletions
18
terraform/domains/environment_domains/config/preprod.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,18 @@ | ||
{ | ||
"hosted_zone": { | ||
"access-your-teaching-qualifications.education.gov.uk": { | ||
"front_door_name": "s189p01-aytq-dom-fd", | ||
"resource_group_name": "s189p01-aytq-dom-rg", | ||
"domains": ["preprod"], | ||
"environment_short": "pp", | ||
"origin_hostname": "s165t01-aytq-preprod-app.azurewebsites.net" | ||
}, | ||
"check-a-teachers-record.education.gov.uk": { | ||
"front_door_name": "s189p01-ctr-dom-fd", | ||
"resource_group_name": "s189p01-aytq-dom-rg", | ||
"domains": ["preprod"], | ||
"environment_short": "pp", | ||
"origin_hostname": "s165t01-aytq-preprod-app.azurewebsites.net" | ||
} | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
terraform/domains/environment_domains/config/preprod_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: "testing" |
30 changes: 30 additions & 0 deletions
30
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,30 @@ | ||
{ | ||
"hosted_zone": { | ||
"access-your-teaching-qualifications.education.gov.uk": { | ||
"front_door_name": "s189p01-aytq-dom-fd", | ||
"resource_group_name": "s189p01-aytq-dom-rg", | ||
"domains": ["apex", "www"], | ||
"environment_short": "pd", | ||
"redirect_rules": [ | ||
{ | ||
"from-domain": "www", | ||
"to-domain": "access-your-teaching-qualifications.education.gov.uk" | ||
} | ||
], | ||
"origin_hostname": "s165p01-aytq-production-app.azurewebsites.net" | ||
}, | ||
"check-a-teachers-record.education.gov.uk": { | ||
"front_door_name": "s189p01-ctr-dom-fd", | ||
"resource_group_name": "s189p01-aytq-dom-rg", | ||
"domains": ["apex", "www"], | ||
"environment_short": "pd", | ||
"redirect_rules": [ | ||
{ | ||
"from-domain": "www", | ||
"to-domain": "check-a-teachers-record.education.gov.uk" | ||
} | ||
], | ||
"origin_hostname": "s165p01-aytq-production-app.azurewebsites.net" | ||
} | ||
} | ||
} |
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: "stable" |
18 changes: 18 additions & 0 deletions
18
terraform/domains/environment_domains/config/test.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,18 @@ | ||
{ | ||
"hosted_zone": { | ||
"access-your-teaching-qualifications.education.gov.uk": { | ||
"front_door_name": "s189p01-aytq-dom-fd", | ||
"resource_group_name": "s189p01-aytq-dom-rg", | ||
"domains": ["test"], | ||
"environment_short": "test", | ||
"origin_hostname": "s165t01-aytq-test-app.azurewebsites.net" | ||
}, | ||
"check-a-teachers-record.education.gov.uk": { | ||
"front_door_name": "s189p01-ctr-dom-fd", | ||
"resource_group_name": "s189p01-aytq-dom-rg", | ||
"domains": ["test"], | ||
"environment_short": "test", | ||
"origin_hostname": "s165t01-aytq-test-app.azurewebsites.net" | ||
} | ||
} | ||
} |
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: "testing" |
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,14 @@ | ||
# 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 | ||
host_name = each.value.origin_hostname | ||
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.6.4" | ||
required_providers { | ||
azurerm = { | ||
source = "hashicorp/azurerm" | ||
version = "3.116.0" | ||
} | ||
} | ||
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,12 @@ | ||
{ | ||
"hosted_zone": { | ||
"access-your-teaching-qualifications.education.gov.uk": { | ||
"resource_group_name": "s189p01-aytq-dom-rg", | ||
"front_door_name": "s189p01-aytq-dom-fd" | ||
}, | ||
"check-a-teachers-record.education.gov.uk": { | ||
"resource_group_name": "s189p01-aytq-dom-rg", | ||
"front_door_name": "s189p01-ctr-dom-fd" | ||
} | ||
} | ||
} |
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.6.4" | ||
|
||
required_providers { | ||
azurerm = { | ||
source = "hashicorp/azurerm" | ||
version = "3.116.0" | ||
} | ||
} | ||
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 | ||
} |
Submodule domains
added at
799927