A showcase project demonstrating private networks and private endpoints on Azure with Terraform.
- Virtual Network Inbound / Outbound protection (NSG)
- Cosmos DB Network Restrictions
- Cosmos DB Private Endpoints + Standard Private DNS Zone
- App Services
Log into Azure with your favorite tool:
az login
Deploy the resources:
cd ./infrastructure
terraform init
terraform plan
terraform apply -auto-approve
This will take a long time.
Begin by entering the API module:
cd ./api
docker pull mongo
docker run -d --name mongodb -p 27017:27017 -e MONGO_INITDB_ROOT_USERNAME="app" \
-e MONGO_INITDB_ROOT_PASSWORD="p4ssw0rd" mongo
Setup the .env
file environment variables:
cp resources/development.env .env
Start the app
# Dependencies
pipenv shell
pipenv install
# App
export FLASK_ENV=development
export FLASK_APP=src/app
python3 -m flask run
# pull/build
docker pull mongo
sudo docker build -t big-aztf-app .
# compose up
docker-compose up -d