Skip to content

Commit

Permalink
Merge pull request #2928 from DFE-Digital/feature/deploy-application
Browse files Browse the repository at this point in the history
Deploy application
  • Loading branch information
temitope777 authored Aug 1, 2023
2 parents b30ae87 + ff8d2bb commit 291e646
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
42 changes: 42 additions & 0 deletions terraform/aks/application.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
module "application_configuration" {
source = "./vendor/modules/aks//aks/application_configuration"

namespace = var.namespace
environment = var.environment
azure_resource_prefix = var.azure_resource_prefix
service_short = var.service_short
config_short = var.config_short
secret_key_vault_short = "app"

# Delete for non rails apps
is_rails_application = true

config_variables = {
ENVIRONMENT_NAME = var.environment
PGSSLMODE = local.postgres_ssl_mode
}
secret_variables = {
DATABASE_URL = module.postgres.url
REDIS_URL = module.redis-cache.url

}
}

module "web_application" {
source = "./vendor/modules/aks//aks/application"

is_web = true

namespace = var.namespace
environment = var.environment
service_name = var.service_name

cluster_configuration_map = module.cluster_data.configuration_map
kubernetes_config_map_name = module.application_configuration.kubernetes_config_map_name
kubernetes_secret_name = module.application_configuration.kubernetes_secret_name

docker_image = var.docker_image
command = ["/app/docker-entrypoint.sh", "-m", "-f"]
probe_path = null

}
1 change: 1 addition & 0 deletions terraform/aks/database.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ module "postgres" {
azure_enable_monitoring = var.enable_monitoring
server_version = "14"
azure_enable_backup_storage = var.azure_enable_backup_storage
azure_extensions = ["POSTGIS", "address_standardizer", "plpgsql"]
}

module "redis-cache" {
Expand Down

0 comments on commit 291e646

Please sign in to comment.