# alexandre-pares/terraform-azure-finops-focus-billing-export architecture

> Architecture diagram of the GitHub repository alexandre-pares/terraform-azure-finops-focus-billing-export, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/alexandre-pares/terraform-azure-finops-focus-billing-export
- Repository: https://github.com/alexandre-pares/terraform-azure-finops-focus-billing-export

## Overview

This Terraform module provisions Azure FOCUS billing exports. A user supplies the billing scope, export version, destination storage details, and date settings; Terraform then configures the export and can enable historical backfill. The README documents EA, MCA, MPA, subscription, and resource-group scopes, plus several FOCUS versions. Source excerpts were not available, so implementation links below rely only on relationships explicitly documented in the README; the exact Terraform internals are not verified.

Main entry points: [`variables.tf`](https://github.com/alexandre-pares/terraform-azure-finops-focus-billing-export/blob/main/variables.tf) (Export settings), [`main.tf`](https://github.com/alexandre-pares/terraform-azure-finops-focus-billing-export/blob/main/main.tf) (Billing export), [`locals.months_to_backfill.tf`](https://github.com/alexandre-pares/terraform-azure-finops-focus-billing-export/blob/main/locals.months_to_backfill.tf) (Date and backfill), [`outputs.tf`](https://github.com/alexandre-pares/terraform-azure-finops-focus-billing-export/blob/main/outputs.tf) (Module outputs)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["Export configuration"]
  node_settings["Export settings<br/>[variables.tf]"]
  node_scope["Billing scopes<br/>[main.tf]"]
  node_versions["FOCUS versions<br/>[variables.tf]"]
  node_dates["Date and backfill"]
end

subgraph group_provisioning["Azure provisioning"]
  node_export["Billing export<br/>[main.tf]"]
  node_backfill["Backfill jobs<br/>[main.tf]"]
end

subgraph group_results["Export destination"]
  node_storage[("Azure storage")]
  node_outputs["Module outputs<br/>[outputs.tf]"]
end

node_user(("Terraform user"))
node_azure{{"Azure Cost Management"}}

node_user -->|"configures"| node_settings
node_settings -->|"selects scope"| node_scope
node_settings -->|"selects version"| node_versions
node_settings -->|"sets dates"| node_dates
node_user -->|"requests export"| node_export
node_export -->|"creates export"| node_azure
node_export -->|"targets storage"| node_storage
node_dates -->|"enables backfill"| node_backfill
node_backfill -->|"runs backfill"| node_azure
node_export -.->|"provides outputs"| node_outputs

click node_settings "https://github.com/alexandre-pares/terraform-azure-finops-focus-billing-export/blob/main/variables.tf"
click node_scope "https://github.com/alexandre-pares/terraform-azure-finops-focus-billing-export/blob/main/main.tf"
click node_versions "https://github.com/alexandre-pares/terraform-azure-finops-focus-billing-export/blob/main/variables.tf"
click node_dates "https://github.com/alexandre-pares/terraform-azure-finops-focus-billing-export/blob/main/locals.months_to_backfill.tf"
click node_export "https://github.com/alexandre-pares/terraform-azure-finops-focus-billing-export/blob/main/main.tf"
click node_backfill "https://github.com/alexandre-pares/terraform-azure-finops-focus-billing-export/blob/main/main.tf"
click node_outputs "https://github.com/alexandre-pares/terraform-azure-finops-focus-billing-export/blob/main/outputs.tf"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_settings,node_scope,node_versions,node_dates,node_user toneBlue
class node_export,node_backfill toneAmber
class node_storage,node_outputs toneMint
class node_azure toneIndigo
```

## Components

### Export configuration

- [Export settings](https://github.com/alexandre-pares/terraform-azure-finops-focus-billing-export/blob/main/variables.tf): `variables.tf`
- [Billing scopes](https://github.com/alexandre-pares/terraform-azure-finops-focus-billing-export/blob/main/main.tf): `main.tf`
- [FOCUS versions](https://github.com/alexandre-pares/terraform-azure-finops-focus-billing-export/blob/main/variables.tf): `variables.tf`
- [Date and backfill](https://github.com/alexandre-pares/terraform-azure-finops-focus-billing-export/blob/main/locals.months_to_backfill.tf): `locals.months_to_backfill.tf`

### Azure provisioning

- [Billing export](https://github.com/alexandre-pares/terraform-azure-finops-focus-billing-export/blob/main/main.tf): `main.tf`
- [Backfill jobs](https://github.com/alexandre-pares/terraform-azure-finops-focus-billing-export/blob/main/main.tf): `main.tf`

### Export destination

- **Azure storage**
- [Module outputs](https://github.com/alexandre-pares/terraform-azure-finops-focus-billing-export/blob/main/outputs.tf): `outputs.tf`

### Other components

- **Terraform user**
- **Azure Cost Management**

## Connections

- Terraform user → Export settings: configures (evidence: `README.md`)
- Export settings → Billing scopes: selects scope (evidence: `README.md`)
- Export settings → FOCUS versions: selects version (evidence: `README.md`)
- Export settings → Date and backfill: sets dates (evidence: `README.md`)
- Terraform user → Billing export: requests export (evidence: `README.md`)
- Billing export → Azure Cost Management: creates export (evidence: `README.md`)
- Billing export → Azure storage: targets storage (evidence: `README.md`)
- Date and backfill → Backfill jobs: enables backfill (evidence: `README.md`)
- Backfill jobs → Azure Cost Management: runs backfill (evidence: `README.md`)
- Billing export → Module outputs: provides outputs
