Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fast, searchable viewer for 70,000+ Azure Policy aliases with Tokyo Night theme

License

Notifications You must be signed in to change notification settings

jeircul/AzPolicyAlias

Repository files navigation

🔍 Azure Policy Aliases Viewer

Fast, searchable viewer for 70,000+ Azure Policy aliases with a beautiful Tokyo Night theme.

Docker Python FastAPI

✨ Features

  • 🚀 Blazing fast - Loads 72,000+ aliases in ~10 seconds
  • 🔎 Instant search - Filter by namespace, resource type, or alias name
  • 📊 Smart sorting - Sort any column with one click
  • 📥 CSV export - Download filtered results
  • 🎨 Beautiful UI - Tokyo Night theme with responsive design
  • 💾 Smart caching - 1-hour cache reduces API calls
  • Live updates - Manual refresh when you need fresh data

🚀 Quick Start

# Local development
uv sync
az login
export SUBSCRIPTION_ID=$(az account show --query id -o tsv)
task dev

Visit http://localhost:8000

🚢 Deployment

Prerequisites:

  • Azure Service Principal with Reader role on the subscription
  • Kubernetes secret with service principal credentials

Create the secret:

kubectl create secret generic azpolicyalias-secrets \
  --from-literal=AZURE_CLIENT_ID=<service-principal-app-id> \
  --from-literal=AZURE_TENANT_ID=<tenant-id> \
  --from-literal=AZURE_CLIENT_SECRET=<service-principal-secret> \
  --from-literal=SUBSCRIPTION_ID=<subscription-id>

Deploy:

kubectl apply -f k8s/helmrelease.yaml

CI/CD builds and pushes the Docker image automatically.

🔧 Configuration

Local: Uses Azure CLI credentials (az login)

Production: Kubernetes secret azpolicyalias-secrets with:

  • SUBSCRIPTION_ID - Your Azure subscription ID
  • AZURE_CLIENT_ID - Service principal application ID
  • AZURE_TENANT_ID - Azure tenant ID
  • AZURE_CLIENT_SECRET - Service principal secret

🎯 Usage

  1. Search - Type in the search box (Ctrl/Cmd+K)
  2. Filter - Select a namespace from the dropdown
  3. Sort - Click any column header
  4. Export - Click "Export CSV" to download results
  5. Refresh - Click "Refresh Cache" for latest data

🏗️ Architecture

  • Backend: FastAPI with Azure SDK
  • Frontend: Vanilla JS with Tokyo Night theme
  • Caching: In-memory with 1-hour TTL
  • Auth: ChainedTokenCredential (CLI → Service Principal → Default)

📖 Documentation

📝 License

MIT License - see LICENSE file for details.

About

Fast, searchable viewer for 70,000+ Azure Policy aliases with Tokyo Night theme

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors 2

  •  
  •