DjangoDeployment API¶
Import:
HostDefinition¶
| Member | Meaning |
|---|---|
host |
Primary hostname |
aliases |
Optional alias hostnames (sorted) |
identifier |
Property: dots replaced with hyphens |
all_hosts |
Property: [host] + aliases |
DjangoDeployment(...)¶
Shared infrastructure constructor parameters:
| Parameter | Required | Description |
|---|---|---|
name |
yes | Resource name prefix |
tenant_id |
yes | Entra tenant for Postgres AAD |
resource_group_name |
yes | Target resource group |
vnet |
yes | Existing VirtualNetwork |
pgsql_sku |
yes | Flexible Server SKU |
pgsql_ip_prefix |
yes | Postgres subnet CIDR |
app_service_ip_prefix |
yes | App Service subnet CIDR |
app_service_sku |
yes | Shared Linux plan SKU |
storage_account_name |
yes | Globally unique storage name |
storage_allowed_origins |
no | Blob CORS origins |
pgsql_version |
no | Default "17" |
pgsql_parameters |
no | Server parameters |
pgadmin_access_ip |
no | pgAdmin IP allowlist |
cdn_host |
no | Custom CDN hostname (str \| None) |
Class constant: HEALTH_CHECK_PATH = "/health-check".
Shared exports¶
cdn_cname, optional CDN validation TXT exportspgsql_hostpgadmin_url
add_database_administrator(object_id, user_name)¶
Registers an Entra user as Postgres administrator. Tenant is taken from the deployment.
add_django_website(...)¶
| Parameter | Default | Description |
|---|---|---|
name |
required | Per-app prefix |
db_name |
required | Database name |
repository_url |
required | Git repo URL |
repository_branch |
required | Branch to deploy |
website_hosts |
required | list[HostDefinition] |
django_settings_module |
required | Settings module path |
python_version |
"3.14" |
App Service Python version |
environment_variables |
None |
Extra app settings — prefer {} |
secrets |
None |
Pulumi config name → env prefix — prefer {} |
comms_data_location |
None |
ACS data location |
comms_domains |
None |
ACS email custom domains |
dedicated_app_service_sku |
None |
Dedicated plan for this app |
vault_administrators |
None |
Entra object IDs |
redis_sidecar |
True |
Redis sidecar container |
django_tasks |
True |
Requires Redis |
startup_timeout |
600 |
Container start time limit (seconds) |
log_retention_days |
7 |
HTTP log retention; 0 skips setting |
Per-app exports¶
{name}_site_principal_id{name}_site_db_user{name}_site_domain_verification_id{name}_site_domain_cname{name}_site_virtual_ip{name}_deploy_url{name}_deploy_ssh_key_url
Returns the azure.web.WebApp resource.