This repository contains comprehensive sample projects demonstrating how to develop and test Azure cloud applications locally using LocalStack for Azure. Each sample provides complete infrastructure-as-code templates, application code, and deployment instructions for seamless local development.
- Docker: Container runtime for LocalStack
- Azure CLI: Azure command-line interface
- azlocal CLI: LocalStack Azure CLI wrapper
- jq: JSON processor for scripting
- Azure Storage Explorer: GUI for Azure Storage
- Azure Functions Core Tools: Local function development
| Sample Name | Description |
|---|---|
| Function App and Storage | Azure Functions App using Blob, Queue, and Table Storage |
| Function App and Front Door | Azure Functions App exposed via Front Door |
| Function App and Managed Identities | Azure Function App using Managed Identities |
| Function App and Service Bus | Azure Function App using Service Bus |
| Web App and CosmosDB for MongoDB API | Azure Web App using CosmosDB for MongoDB API |
| Web App and CosmosDB for NoSQL API | Azure Web App using CosmosDB for NoSQL API |
| Web App and Managed Identities | Azure Web App using Managed Identities |
| Web App and SQL Database | Azure Web App using SQL Database |
| ACI and Blob Storage | Azure Container Instances with ACR, Key Vault, and Blob Storage |
| Azure Service Bus with Spring Boot | Azure Service Bus used by a Spring Boot application |
Each sample project is organized by Azure service and includes:
- Infrastructure templates (Bicep/Terraform) and/or Bash installation scripts.
- Application code with best practices
- Step-by-step deployment guides and tutorials.
- Optionally, testing and validation scripts.
To validate all samples locally, you can run the same test suite used in the CI. This script will start LocalStack, configure the Azure CLI cloud profile, and execute the deployment and test scripts for each sample.
cd localstack-azure-samples
# Set your LOCALSTACK_AUTH_TOKEN
export LOCALSTACK_AUTH_TOKEN=<your-token>
# Or create a .env file:
# echo "LOCALSTACK_AUTH_TOKEN=<your-token>" > .env
./run-samples.shIf you encounter errors like invalid option name or : command not found when running on Linux/WSL, it's likely due to Windows-style line endings (CRLF). You can fix this by running:
find . -name "*.sh" -exec sed -i 's/\r$//' {} +Or by installing and using dos2unix.
Follow the comprehensive setup guide in LocalStack for Azure Quick Start to configure your LocalStack for Azure development environment.
Contributions are welcome! Please read our Contributing Guidelines before submitting pull requests.
- Fork the repository
- Create a feature branch
- Add your sample with complete documentation
- Submit a pull request
This project is licensed under the MIT LICENSE.
- Issues: GitHub Issues
- LocalStack Support: Support Portal
- Community: LocalStack Discuss
Please give a ⭐ to this repository, if you find these samples helpful for your Azure local development workflow!