https://github.com/epomatti/azure-terraform-private-endpoints
Private networks & private endpoints
https://github.com/epomatti/azure-terraform-private-endpoints
azure azure-private-dns-zone azure-private-endpoints azure-private-link azurerm-terraform-provider cosmosdb terraform
Last synced: 3 months ago
JSON representation
Private networks & private endpoints
- Host: GitHub
- URL: https://github.com/epomatti/azure-terraform-private-endpoints
- Owner: epomatti
- License: mit
- Created: 2021-08-10T21:48:17.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-18T12:58:22.000Z (about 3 years ago)
- Last Synced: 2025-01-17T18:44:18.817Z (5 months ago)
- Topics: azure, azure-private-dns-zone, azure-private-endpoints, azure-private-link, azurerm-terraform-provider, cosmosdb, terraform
- Language: HCL
- Homepage:
- Size: 149 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Azure-Terraform Private Network
A showcase project demonstrating private networks and private endpoints on Azure with Terraform.
- [x] Virtual Network Inbound / Outbound protection (NSG)
- [x] Cosmos DB Network Restrictions
- [x] Cosmos DB Private Endpoints + Standard Private DNS Zone
- [x] App Services
## Running it
Log into Azure with your favorite tool:
```sh
az login
```Deploy the resources:
```sh
cd ./infrastructureterraform init
terraform plan
terraform apply -auto-approve
```This will take a long time.
## API local development
Begin by entering the API module:
```sh
cd ./api
```### Mongo DB
```bash
docker pull mongodocker run -d --name mongodb -p 27017:27017 -e MONGO_INITDB_ROOT_USERNAME="app" \
-e MONGO_INITDB_ROOT_PASSWORD="p4ssw0rd" mongo
```### Python API
Setup the `.env` file environment variables:
```bash
cp resources/development.env .env
```Start the app
```bash
# Dependencies
pipenv shell
pipenv install# App
export FLASK_ENV=development
export FLASK_APP=src/apppython3 -m flask run
```## Compose
```bash
# pull/build
docker pull mongo
sudo docker build -t big-aztf-app .# compose up
docker-compose up -d
```