diff --git a/.github/workflows/load-testing.yml b/.github/workflows/load-testing.yml index 1ea58e3d..a4027227 100644 --- a/.github/workflows/load-testing.yml +++ b/.github/workflows/load-testing.yml @@ -25,6 +25,7 @@ jobs: TF_VAR_cpd_delivery_key: ${{secrets.TF_VAR_CPD_DELIVERY_KEY}} TF_VAR_cpd_clarity: ${{secrets.TF_VAR_CPD_CLARITY}} TF_VAR_cpd_image_tag: ${{vars.TF_VAR_CPD_IMAGE_TAG}} + TF_VAR_cpd_feature_polling_interval: ${{vars.TF_VAR_CPD_FEATURE_POLLING_INTERVAL}} TF_WORKSPACE: Load-Test SITE_URL: https://20.107.65.156/ steps: diff --git a/.github/workflows/terraform-destroy.yml b/.github/workflows/terraform-destroy.yml index 6921d84f..fabb48cc 100644 --- a/.github/workflows/terraform-destroy.yml +++ b/.github/workflows/terraform-destroy.yml @@ -35,6 +35,7 @@ jobs: TF_VAR_cpd_delivery_key: ${{secrets.TF_VAR_CPD_DELIVERY_KEY}} TF_VAR_cpd_clarity: ${{secrets.TF_VAR_CPD_CLARITY}} TF_VAR_cpd_image_tag: ${{vars.TF_VAR_CPD_IMAGE_TAG}} + TF_VAR_cpd_feature_polling_interval: ${{vars.TF_VAR_CPD_FEATURE_POLLING_INTERVAL}} TF_WORKSPACE: ${{inputs.workspace}} defaults: diff --git a/.github/workflows/terraform-plan.yml b/.github/workflows/terraform-plan.yml index 253c2ad5..8d02ed91 100644 --- a/.github/workflows/terraform-plan.yml +++ b/.github/workflows/terraform-plan.yml @@ -38,6 +38,7 @@ jobs: TF_VAR_cpd_delivery_key: ${{secrets.TF_VAR_CPD_DELIVERY_KEY}} TF_VAR_cpd_clarity: ${{secrets.TF_VAR_CPD_CLARITY}} TF_VAR_cpd_image_tag: ${{vars.TF_VAR_CPD_IMAGE_TAG}} + TF_VAR_cpd_feature_polling_interval: ${{vars.TF_VAR_CPD_FEATURE_POLLING_INTERVAL}} TF_WORKSPACE: ${{inputs.workspace}} defaults: diff --git a/.github/workflows/terraform.yml b/.github/workflows/terraform.yml index 002e6a52..b6258daf 100644 --- a/.github/workflows/terraform.yml +++ b/.github/workflows/terraform.yml @@ -38,6 +38,7 @@ jobs: TF_VAR_cpd_delivery_key: ${{secrets.TF_VAR_CPD_DELIVERY_KEY}} TF_VAR_cpd_clarity: ${{secrets.TF_VAR_CPD_CLARITY}} TF_VAR_cpd_image_tag: ${{vars.TF_VAR_CPD_IMAGE_TAG}} + TF_VAR_cpd_feature_polling_interval: ${{vars.TF_VAR_CPD_FEATURE_POLLING_INTERVAL}} TF_WORKSPACE: ${{inputs.workspace}} defaults: diff --git a/Terraform-bootstrap/Error-pages/403.html b/Terraform-bootstrap/Error-pages/403.html new file mode 100644 index 00000000..01cbf026 --- /dev/null +++ b/Terraform-bootstrap/Error-pages/403.html @@ -0,0 +1,9313 @@ + + + + + Service unavailable – Develop your career in child and family social work + + + + + + + + Skip to main content + +
+
+ +
+
+

Sorry, the service is unavailable

+

+ You will be able to use the service later. +

+

+ Contact the Develop your career in child and family social work team if you need to speak to someone. +

+
+
+
+
+ + + \ No newline at end of file diff --git a/Terraform-bootstrap/Error-pages/502.html b/Terraform-bootstrap/Error-pages/502.html new file mode 100644 index 00000000..01cbf026 --- /dev/null +++ b/Terraform-bootstrap/Error-pages/502.html @@ -0,0 +1,9313 @@ + + + + + Service unavailable – Develop your career in child and family social work + + + + + + + + Skip to main content + +
+
+ +
+
+

Sorry, the service is unavailable

+

+ You will be able to use the service later. +

+

+ Contact the Develop your career in child and family social work team if you need to speak to someone. +

+
+
+
+
+ + + \ No newline at end of file diff --git a/Terraform-bootstrap/errorpage-blob.tf b/Terraform-bootstrap/errorpage-blob.tf new file mode 100644 index 00000000..fd9fe119 --- /dev/null +++ b/Terraform-bootstrap/errorpage-blob.tf @@ -0,0 +1,28 @@ +resource "azurerm_storage_account" "s185errorpage-sa" { + name = "s185errorpage" + resource_group_name = var.key_vault_rg[terraform.workspace] + account_replication_type = "LRS" + account_tier = "Standard" + location = azurerm_resource_group.rg.location +} + +resource "azurerm_storage_container" "s185errorpage-sc" { + name = "s185errorpage" + storage_account_name = azurerm_storage_account.s185errorpage-sa.name +} + +resource "azurerm_storage_blob" "error-403" { + name = "403.html" + storage_account_name = azurerm_storage_account.s185errorpage-sa.name + storage_container_name = azurerm_storage_container.s185errorpage-sc.name + type = "Block" + source = "./Error-pages/403.html" +} + +resource "azurerm_storage_blob" "error-502" { + name = "502.html" + storage_account_name = azurerm_storage_account.s185errorpage-sa.name + storage_container_name = azurerm_storage_container.s185errorpage-sc.name + type = "Block" + source = "./Error-pages/502.html" +} diff --git a/Terraform/README.md b/Terraform/README.md index 0ed7f230..58734d3c 100644 --- a/Terraform/README.md +++ b/Terraform/README.md @@ -22,14 +22,7 @@ No modules. | [azurerm_application_gateway.appgw](https://registry.terraform.io/providers/hashicorp/azurerm/3.52.0/docs/resources/application_gateway) | resource | | [azurerm_linux_web_app.linux-web-app](https://registry.terraform.io/providers/hashicorp/azurerm/3.52.0/docs/resources/linux_web_app) | resource | | [azurerm_linux_web_app_slot.staging](https://registry.terraform.io/providers/hashicorp/azurerm/3.52.0/docs/resources/linux_web_app_slot) | resource | -| [azurerm_monitor_action_group.main](https://registry.terraform.io/providers/hashicorp/azurerm/3.52.0/docs/resources/monitor_action_group) | resource | -| [azurerm_monitor_activity_log_alert.appgw-health](https://registry.terraform.io/providers/hashicorp/azurerm/3.52.0/docs/resources/monitor_activity_log_alert) | resource | | [azurerm_monitor_autoscale_setting.autoscale](https://registry.terraform.io/providers/hashicorp/azurerm/3.52.0/docs/resources/monitor_autoscale_setting) | resource | -| [azurerm_monitor_metric_alert.appgw-backend-connect-time](https://registry.terraform.io/providers/hashicorp/azurerm/3.52.0/docs/resources/monitor_metric_alert) | resource | -| [azurerm_monitor_metric_alert.appgw-managed-rules](https://registry.terraform.io/providers/hashicorp/azurerm/3.52.0/docs/resources/monitor_metric_alert) | resource | -| [azurerm_monitor_metric_alert.container-avg-resp-time](https://registry.terraform.io/providers/hashicorp/azurerm/3.52.0/docs/resources/monitor_metric_alert) | resource | -| [azurerm_monitor_metric_alert.container-cpu](https://registry.terraform.io/providers/hashicorp/azurerm/3.52.0/docs/resources/monitor_metric_alert) | resource | -| [azurerm_monitor_metric_alert.failed-requests](https://registry.terraform.io/providers/hashicorp/azurerm/3.52.0/docs/resources/monitor_metric_alert) | resource | | [azurerm_network_interface.nic](https://registry.terraform.io/providers/hashicorp/azurerm/3.52.0/docs/resources/network_interface) | resource | | [azurerm_network_security_group.nsg](https://registry.terraform.io/providers/hashicorp/azurerm/3.52.0/docs/resources/network_security_group) | resource | | [azurerm_network_security_rule.dev-whitelist-rules](https://registry.terraform.io/providers/hashicorp/azurerm/3.52.0/docs/resources/network_security_rule) | resource | @@ -46,7 +39,6 @@ No modules. | [azurerm_application_insights.appinsights](https://registry.terraform.io/providers/hashicorp/azurerm/3.52.0/docs/data-sources/application_insights) | data source | | [azurerm_key_vault.kv](https://registry.terraform.io/providers/hashicorp/azurerm/3.52.0/docs/data-sources/key_vault) | data source | | [azurerm_key_vault_secret.dev-ips](https://registry.terraform.io/providers/hashicorp/azurerm/3.52.0/docs/data-sources/key_vault_secret) | data source | -| [azurerm_key_vault_secret.email](https://registry.terraform.io/providers/hashicorp/azurerm/3.52.0/docs/data-sources/key_vault_secret) | data source | | [azurerm_key_vault_secret.ips](https://registry.terraform.io/providers/hashicorp/azurerm/3.52.0/docs/data-sources/key_vault_secret) | data source | | [azurerm_log_analytics_workspace.log-analytics-ws](https://registry.terraform.io/providers/hashicorp/azurerm/3.52.0/docs/data-sources/log_analytics_workspace) | data source | | [azurerm_public_ip.pip1](https://registry.terraform.io/providers/hashicorp/azurerm/3.52.0/docs/data-sources/public_ip) | data source | @@ -77,6 +69,7 @@ No modules. | [cpd\_clarity](#input\_cpd\_clarity) | MS Clarity Secret | `string` | n/a | yes | | [cpd\_contentful\_env](#input\_cpd\_contentful\_env) | Contentful Environment Name | `map(string)` |
{
"Dev": "dev",
"Load-Test": "test",
"Pre-Prod": "prod",
"Prod": "prod",
"Test": "test"
}
| no | | [cpd\_delivery\_key](#input\_cpd\_delivery\_key) | Contentful Delivery Key | `string` | n/a | yes | +| [cpd\_feature\_polling\_interval](#input\_cpd\_feature\_polling\_interval) | Feature polling interval | `number` | n/a | yes | | [cpd\_googleanalyticstag](#input\_cpd\_googleanalyticstag) | Google Analytics Tag | `string` | n/a | yes | | [cpd\_image\_tag](#input\_cpd\_image\_tag) | Docker image tag of application | `string` | n/a | yes | | [cpd\_preview\_key](#input\_cpd\_preview\_key) | Contentful Preview Key | `string` | n/a | yes | diff --git a/Terraform/alerts.tf b/Terraform/alerts.tf.bak similarity index 100% rename from Terraform/alerts.tf rename to Terraform/alerts.tf.bak diff --git a/Terraform/application.tf b/Terraform/application.tf index 6bfe7e82..0153f4d0 100644 --- a/Terraform/application.tf +++ b/Terraform/application.tf @@ -25,7 +25,7 @@ resource "azurerm_linux_web_app" "linux-web-app" { CPD_CONTENTFUL_ENVIRONMENT = var.cpd_contentful_env[terraform.workspace] CPD_INSTRUMENTATION_CONNECTIONSTRING = data.azurerm_application_insights.appinsights.connection_string CPD_CLARITY = var.cpd_clarity - CPD_FEATURE_POLLING_INTERVAL = 300 + CPD_FEATURE_POLLING_INTERVAL = var.cpd_feature_polling_interval DOCKER_ENABLE_CI = "true" } @@ -64,7 +64,7 @@ resource "azurerm_linux_web_app_slot" "staging" { CPD_CONTENTFUL_ENVIRONMENT = var.cpd_contentful_env[terraform.workspace] CPD_INSTRUMENTATION_CONNECTIONSTRING = data.azurerm_application_insights.appinsights.connection_string CPD_CLARITY = var.cpd_clarity - CPD_FEATURE_POLLING_INTERVAL = 300 + CPD_FEATURE_POLLING_INTERVAL = var.cpd_feature_polling_interval DOCKER_ENABLE_CI = "true" } diff --git a/Terraform/variables.tf b/Terraform/variables.tf index 09214f8a..0269a2fd 100644 --- a/Terraform/variables.tf +++ b/Terraform/variables.tf @@ -630,6 +630,12 @@ variable "cpd_clarity" { description = "MS Clarity Secret" } +variable "cpd_feature_polling_interval" { + type = number + sensitive = true + description = "Feature polling interval" +} + variable "cpd_contentful_env" { type = map(string) default = {