This repository provisions an Azure PostgreSQL Flexible Server in a VNet, deploys an Azure Function App (Python) with HTTP CRUD endpoints, and includes Logic App templates to call the functions.
Important: The user previously posted a GitHub Personal Access Token (PAT) publicly. Revoke that token immediately from GitHub Settings → Developer settings → Personal access tokens. Do not reuse that token. Never share PATs in chat.
azure-postgres-crud-demo/
├── README.md
├── infra/
│ ├── deploy-postgres-vnet.ps1
│ ├── cleanup-resources.ps1
│ └── deploy-postgres-vnet.bicep
├── functionapp/
│ ├── requirements.txt
│ ├── local.settings.example.json
│ └── src/
│ ├── Create/__init__.py
│ ├── Read/__init__.py
│ ├── Update/__init__.py
│ ├── Delete/__init__.py
│ └── shared/pg_client.py
├── logicapp/
│ └── logicapp-workflow.json
└── scripts/
└── test-crud.ps1
- Review and edit
infra/deploy-postgres-vnet.ps1or the Bicep file to set names/passwords. - Login to Azure:
az login az account set -s "<subscription-id>"
- Deploy infra (PowerShell):
cd infra ./deploy-postgres-vnet.ps1
- Zip and deploy function app code to the Function App (the infra script can create the Function App and storage account).
- Import the logic app JSON in Logic Apps designer and replace function URL and key.
- Run
scripts/test-crud.ps1to validate endpoints.
- Use Key Vault or Managed Identity in production for DB credentials.
- Revoke any exposed PAT immediately.