ConX Admin Module¶
Terraform module for deploying ConX Admin application infrastructure.
Description¶
Provisions complete infrastructure stack for the ConX Admin application including Azure SQL Database, App Service web applications (UI and API), Azure Front Door, and Key Vault.
Resources Created¶
- Azure SQL Database (ConX Admin database)
- App Service Web Apps (UI and API)
- Azure Front Door profiles and endpoints
- Key Vault for secrets management
- Private endpoints for secure connectivity
Usage¶
module "conx_admin" {
source = "../../modules/ConXAdmin"
rg = {
name = "CmgCxRgDev01"
location = "westus2"
}
environment_name = "dev"
naming = "CmgCxAdmin%sDev01"
azure_devops_service_connection_id = "<your-service-connection-id>"
# Networking
private_endpoint_subnet_id = azurerm_subnet.private_endpoints.id
webapp_subnet = {
id = azurerm_subnet.webapp_integration.id
name = "webapp-integration-subnet"
}
webapp_vnet_name = "CmgCxVnetDev01"
# SQL Configuration
azsql_server_id = azurerm_mssql_server.main.id
azsql_db_sku = "S1"
azsql_db_size = 250
# App Services
webapp_plan_id = azurerm_service_plan.main.id
app_insights = {
id = azurerm_application_insights.main.id
connection_string = azurerm_application_insights.main.connection_string
}
container_registry = {
name = "CmgSharedAppContainerRegistryDev01"
resource_group_name = "CmgSharedAppRgDev01"
}
app_services = {
"ui" = {
app_settings = {
"ASPNETCORE_ENVIRONMENT" = "Development"
"ApiUrl" = "https://dev.api.cmghomeloans.com"
}
site_config = { vnet_route_all_enabled = true }
frontdoor_custom_frontends = {}
slots = { deploy = { app_settings = {} } }
connection_strings = {}
}
}
tags = { Environment = "Dev", Product = "ConX Admin" }
}
Inputs¶
| Name | Description | Type | Required |
|---|---|---|---|
| rg | Resource group (name, location) | object | yes |
| environment_name | Environment (dev, qa, uat, prod) | string | yes |
| naming | Naming template with %s placeholder | string | yes |
| azure_devops_service_connection_id | ADO service connection ID | string | yes |
| private_endpoint_subnet_id | Private endpoint subnet ID | string | yes |
| azsql_server_id | Azure SQL Server ID | string | yes |
| azsql_db_sku | Database SKU (S1, P2, etc.) | string | no (default: S1) |
| azsql_db_size | Database max size in GB | number | no (default: 250) |
| azsql_read_replica_count | Read replicas (hyperscale) | number | no (default: 0) |
| azsql_db_enable_read_scale | Enable read scale-out | bool | no (default: false) |
| webapp_plan_id | App Service Plan ID | string | yes |
| webapp_vnet_name | VNet name for integration | string | no |
| webapp_subnet | VNet integration subnet | object | no |
| app_insights | Application Insights config | object | yes |
| container_registry | Container registry config | object | yes |
| app_services | App service configurations | map(object) | yes |
| webapp_network_allowed_ip | Allowed IP ranges | list(map(string)) | no (default: []) |
| webapp_allowed_subnets | Allowed subnet IDs | list(map(string)) | no (default: []) |
Outputs¶
| Name | Description |
|---|---|
| tags | Resource tags applied |
| keyvault | Key Vault module output |
| webapp | Web app module outputs |
| webapp_input | Input configuration for web apps |
| inputs | Complete input variables |