File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
infrastructure/modules/container-apps Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change 1+ module "db_setup" {
2+ source = " ../dtos-devops-templates/infrastructure/modules/container-app-job"
3+
4+ name = " ${ var . app_short_name } -dbm-${ var . environment } "
5+ container_app_environment_id = var. container_app_environment_id
6+ resource_group_name = azurerm_resource_group. main . name
7+
8+ container_command = [" /bin/sh" , " -c" ]
9+
10+ container_args = [
11+ " python manage.py migrate"
12+ ]
13+ secret_variables = var. deploy_database_as_container ? { DATABASE_PASSWORD = resource.random_password.admin_password[0 ].result } : {}
14+ docker_image = var. docker_image
15+ user_assigned_identity_ids = flatten ([
16+ [module . azure_blob_storage_identity . id ],
17+ [module . azure_queue_storage_identity . id ],
18+ var . deploy_database_as_container ? [] : [module . db_connect_identity [0 ]. id ]
19+ ])
20+ environment_variables = merge (
21+ local. common_env ,
22+ var. deploy_database_as_container ? local. container_db_env : local. azure_db_env
23+ )
24+ depends_on = [
25+ module . queue_storage_role_assignment ,
26+ module . blob_storage_role_assignment
27+ ]
28+
29+ }
You can’t perform that action at this time.
0 commit comments