Skip to content

pulumi-django-azure

Opinionated helpers to deploy Django applications on Azure with Pulumi.

The package has three surfaces that often live in separate consumer repositories:

  1. Pulumi IaCDjangoDeployment / HostDefinition provision shared and per-app Azure resources.
  2. Django runtime — settings, middleware, context processors, and management commands for Azure App Service.
  3. Deploy scripts — Oryx pre/post build and App Service startup scripts, bootstrapped from https://bootstrap.django-azu.re.

What you get

  • Storage account for media and static files, with Azure Front Door CDN in front
  • PostgreSQL Flexible Server with Entra ID authentication only
  • Azure Communication Services for email (optional per app)
  • Linux App Service Web Apps with custom hostnames and managed certificates
  • Key Vault per application
  • Optional Redis sidecar and django-tasks RQ workers
  • pgAdmin on the shared App Service plan

Documentation for humans and LLMs

Resource URL
This site https://django-azu.re
LLM index (llms.txt) https://django-azu.re/llms.txt
Full LLM context (llms-full.txt) https://django-azu.re/llms-full.txt

Start with Scope (what this package owns) and For consuming projects if you are wiring this into another repo’s agent docs.

Install

poetry add pulumi-django-azure

Or pin a Git branch:

pulumi-django-azure = { git = "https://gitlab.com/MaartenUreel/pulumi-django-azure.git", branch = "main" }

Correct imports

Pulumi stacks (do not import Django settings here):

from pulumi_django_azure.django_deployment import DjangoDeployment, HostDefinition

Django apps:

from pulumi_django_azure.settings import *  # noqa: F403
from pulumi_django_azure.settings import patch_django_settings_for_azure

See Getting started for a full walkthrough.