Skip to content

Commit

Permalink
Merge branch 'Feature/ResourcesContentModels' of https://github.com/D…
Browse files Browse the repository at this point in the history
…FE-Digital/childrens-social-care-cpd into Feature/ResourcesContentModels
  • Loading branch information
nileshgnagepatil committed Sep 26, 2023
2 parents dbb8e7c + 6a027e5 commit 10e7f8b
Show file tree
Hide file tree
Showing 11 changed files with 18,667 additions and 10 deletions.
1 change: 1 addition & 0 deletions .github/workflows/load-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/terraform-destroy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/terraform-plan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
9,313 changes: 9,313 additions & 0 deletions Terraform-bootstrap/Error-pages/403.html

Large diffs are not rendered by default.

9,313 changes: 9,313 additions & 0 deletions Terraform-bootstrap/Error-pages/502.html

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions Terraform-bootstrap/errorpage-blob.tf
Original file line number Diff line number Diff line change
@@ -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"
}
9 changes: 1 addition & 8 deletions Terraform/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand All @@ -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 |
Expand Down Expand Up @@ -77,6 +69,7 @@ No modules.
| <a name="input_cpd_clarity"></a> [cpd\_clarity](#input\_cpd\_clarity) | MS Clarity Secret | `string` | n/a | yes |
| <a name="input_cpd_contentful_env"></a> [cpd\_contentful\_env](#input\_cpd\_contentful\_env) | Contentful Environment Name | `map(string)` | <pre>{<br> "Dev": "dev",<br> "Load-Test": "test",<br> "Pre-Prod": "prod",<br> "Prod": "prod",<br> "Test": "test"<br>}</pre> | no |
| <a name="input_cpd_delivery_key"></a> [cpd\_delivery\_key](#input\_cpd\_delivery\_key) | Contentful Delivery Key | `string` | n/a | yes |
| <a name="input_cpd_feature_polling_interval"></a> [cpd\_feature\_polling\_interval](#input\_cpd\_feature\_polling\_interval) | Feature polling interval | `number` | n/a | yes |
| <a name="input_cpd_googleanalyticstag"></a> [cpd\_googleanalyticstag](#input\_cpd\_googleanalyticstag) | Google Analytics Tag | `string` | n/a | yes |
| <a name="input_cpd_image_tag"></a> [cpd\_image\_tag](#input\_cpd\_image\_tag) | Docker image tag of application | `string` | n/a | yes |
| <a name="input_cpd_preview_key"></a> [cpd\_preview\_key](#input\_cpd\_preview\_key) | Contentful Preview Key | `string` | n/a | yes |
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions Terraform/application.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

Expand Down Expand Up @@ -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"
}

Expand Down
6 changes: 6 additions & 0 deletions Terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 10e7f8b

Please sign in to comment.