> ## Documentation Index
> Fetch the complete documentation index at: https://docs.soundchecklive.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Infrastructure Overview

> Azure infrastructure for the Soundcheck platform

Soundcheck's infrastructure is hosted on Microsoft Azure and managed with Terraform. This enables consistent, version-controlled infrastructure across all environments.

## Architecture

The infrastructure is organized into modular components:

```
infra/
├── environments/          # Environment-specific configs
│   ├── dev/              # Development environment
│   ├── qa/               # QA environment
│   └── prod/             # Production environment
├── modules/              # Reusable Terraform modules
│   ├── networking/       # VNet, subnets, VPN
│   ├── backend/          # App Service for API (prod only)
│   ├── database/         # PostgreSQL
│   ├── frontend/         # Static Web App
│   ├── platform/         # Container Registry, Key Vault
│   ├── security/         # RBAC, managed identities
│   └── monitoring/       # Observability
└── state/                # State backend setup
```

***

## Environments

| Environment | Branch | Purpose | Azure Subscription |
| - | - | - | - |
| Sandbox | N/A | Manual testing | Azure Sponsorship |
| Dev | `dev` | Development integration | dev-soundcheck |
| QA | `qa` | Quality assurance | qa-soundcheck |
| Prod | `main` | Production | prod-soundcheck |

***

## Modules

### Networking

* Azure Virtual WAN
* Virtual Hub with Azure Firewall
* Point-to-Site VPN
* Private DNS zones

### Backend

* Azure App Service for API (production only; disabled in `dev` and `qa`)
* Auto-scaling configuration
* Health checks

### Database

* PostgreSQL Flexible Server
* Private network access
* Automated backups

### Frontend

* Azure Static Web Apps
* CDN configuration
* Custom domains

### Security

* Key Vault for secrets
* Managed identities
* RBAC policies

### Monitoring

* Application Insights
* Log Analytics
* Sentry integration

***

## VPN access

Protected resources are accessible via VPN in dev:

1. Database resources
2. Management endpoints
3. Monitoring dashboards
4. Internal APIs

### VPN setup

**1. Get Azure AD Account**

Account is provisioned via the user onboarding workflow

**2. Install Azure VPN Client**

* **Windows**: [Microsoft Store](https://apps.microsoft.com/detail/9np355qt2sqb)
* **Mac**: App Store

**3. Import Configuration**

Import `azurevpnconfig.xml` from 1Password

**4. Connect**

Uses Azure AD authentication (no certificates required)

***

## GitHub workflows

### Terraform apply

Automates infrastructure deployment:

1. **Trigger**: Pushes to main, qa, dev branches
2. **Process**:
   * Initialize Terraform
   * Security scan with tfsec
   * Plan changes
   * Apply with approval

### User onboarding

Manages Azure user access:

1. **Trigger**: Manual workflow dispatch
2. **Process**:
   * Create Azure AD accounts
   * Assign roles
   * Send credentials via email

***

## Deployment workflow

```
1. Create feature branch from dev
2. Make infrastructure changes
3. Open PR → dev
   └── Workflow runs: plan only
   └── Review plan output
4. Merge PR → dev
   └── Workflow runs: apply to Dev
5. Open PR: dev → qa
   └── Workflow runs: plan only
6. Merge PR → qa
   └── Workflow runs: apply to QA
7. Open PR: qa → main
   └── Requires approval
8. Merge PR → main
   └── Workflow runs: apply to Production
```

***

## State management

Terraform state is stored in Azure Blob Storage:

| Environment | Storage Account | Container | State Key |
| - | - | - | - |
| Dev | `soundchecktfstatedev` | `tfstate` | `dev.tfstate` |
| QA | `soundchecktfstateqa` | `tfstate` | `qa.tfstate` |
| Prod | `soundchecktfstateprod` | `tfstate` | `prod.tfstate` |

***

## Next steps

> [card] [Terraform](https://docs.soundchecklive.io/engineering/infrastructure/terraform.md)
>
> Deployment workflow and commands

> [card] [Environments](https://docs.soundchecklive.io/engineering/infrastructure/environments.md)
>
> Environment-specific details

> [card] [Monitoring](https://docs.soundchecklive.io/engineering/infrastructure/monitoring.md)
>
> Sentry and observability


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.