Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
saliceti committed Nov 5, 2024
1 parent 61197d6 commit 6ce294b
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 63 deletions.
5 changes: 5 additions & 0 deletions terraform/aks/.terraform.lock.hcl

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

9 changes: 2 additions & 7 deletions terraform/aks/config/review.tfvars.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,13 @@
"azure_enable_backup_storage": false,
"deploy_azure_backing_services": false,
"enable_monitoring": false,
"key_vault_name": "s189t01-gse-rv-app-kv",
"infra_key_vault_name": "s189t01-gse-rv-inf-kv",
"key_vault_resource_group": "s189t01-gse-rv-rg",
"review_db_dbname": "review-db-name",
"review_db_hostname": "review-db-host",
"review_db_username": "review-db-username",
"review_db_password": "review-db-password",
"review_url_redis_name": "review-redis-url",
"statuscake_password_name": "SC-PASSWORD",
"sidekiq_replicas" : 1,
"sidekiq_memory_max" : "1Gi",
"create_dsi_ingress": true,
"enable_logit": true,
"webapp_command": ["/app/docker-entrypoint.sh", "-e", "-f"]
"webapp_command": ["/app/docker-entrypoint.sh", "-e", "-f"],
"create_database": false
}
2 changes: 1 addition & 1 deletion terraform/aks/config/review_Terrafile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
aks:
source: "https://github.com/DFE-Digital/terraform-modules"
version: "main"
version: "2115-make-create-db-optional"
2 changes: 1 addition & 1 deletion terraform/aks/config/staging_Terrafile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
aks:
source: "https://github.com/DFE-Digital/terraform-modules"
version: "testing"
version: "2115-make-create-db-optional"
6 changes: 0 additions & 6 deletions terraform/aks/data.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
data "azurerm_key_vault" "app_secret_vault" {
count = 1
name = var.key_vault_name
resource_group_name = var.key_vault_resource_group
}

data "azurerm_key_vault" "infra_secret_vault" {
name = var.infra_key_vault_name
resource_group_name = var.key_vault_resource_group
Expand Down
1 change: 1 addition & 0 deletions terraform/aks/database.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ module "postgres" {
azure_enable_high_availability = var.postgres_enable_high_availability
azure_maintenance_window = var.azure_maintenance_window
server_docker_image = "postgis/postgis:14-3.4"
create_database = var.create_database
}

module "redis-cache" {
Expand Down
51 changes: 3 additions & 48 deletions terraform/aks/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,6 @@ variable "app_replicas" {
default = 1
}



variable "external_url" {
default = null
description = "Healthcheck URL for StatusCake monitoring"
}
variable "statuscake_contact_groups" {
default = []
description = "ID of the contact group in statuscake web UI"
}
variable "enable_monitoring" {
default = false
description = "Enable monitoring and alerting"
Expand All @@ -68,10 +58,6 @@ variable "azure_enable_backup_storage" {
default = true
description = "Create storage account for database backup"
}
variable "key_vault_name" {
default = null
description = "The name of the key vault to get postgres and redis"
}

variable "infra_key_vault_name" {
default = null
Expand All @@ -91,27 +77,6 @@ variable "postgres_enable_high_availability" {
default = false
}

variable "review_db_dbname" {
default = null
description = "The name of the secret storing review db name"
}
variable "review_db_password" {
default = null
description = "The name of the secret storing review db password"
}

variable "worker_apps" {
type = map(
object({
startup_command = optional(list(string), [])
probe_command = optional(list(string), [])
replicas = optional(number, 1)
memory_max = optional(string, "1Gi")
})
)
default = {}
}

variable "statuscake_alerts" {
type = map(
object({
Expand All @@ -123,19 +88,6 @@ variable "statuscake_alerts" {
default = {}
}

variable "review_db_username" {
default = null
description = "The name of the secret storing review db username"
}
variable "review_db_hostname" {
default = null
description = "The name of the secret storing review db host"
}
variable "review_url_redis_name" {
default = null
description = "The name of the secret storing review redis url"
}

variable "statuscake_password_name" {
default = "SC-PASSWORD"
description = "The name of the statuscake password"
Expand All @@ -157,6 +109,9 @@ variable "webapp_command" {
default = ["/app/docker-entrypoint.sh", "-m", "-f"]
description = "Start command to initialise and run the web app"
}
variable "create_database" {
default = true
}

locals {
azure_credentials = try(jsondecode(var.azure_credentials_json), null)
Expand Down

0 comments on commit 6ce294b

Please sign in to comment.