microsoft / microsoft/finops-toolkit
[Hubs] FinOps hub apps
@flanakin is already working on this.
Since Mar 14, 2025.
- Dominant language
- PowerShell
- Stars
- 603
- Forks
- 248
- Avg merge
- 7d 11h
- Merged PRs (30d)
- 11
Description
📝 Scenario
As an engineer, I need to extend FinOps hubs safely in order to add new or change existing features to meet specific requirements at scale in a way that can be deployed across many hub instances
💎 Solution
Goal
Build an extensibility model in FinOps hubs that allows customers and partners to extend FinOps hubs without risk of upgrades breaking them.
Summary
The FinOps hubs extensibility model embraces traditional infrastructure as code (IaC) patterns and is enabled via bicep (and eventually terraform) modules. Use of the hub modules is not explicitly required but can save time and avoid conflicts in the future as FinOps hubs evolves.
Open issues
- How can we guarantee that apps maintain the same version of the hub instance?
- Should events follow .NET standards or simplify a bit?
- Microsoft.FinOpsToolkit.Hubs.IngestionManifest.Adding/Added (.NET)
- Microsoft.FinOpsToolkit.Hubs.AddIngestionManifest.Before/After (simpler code, more readable)
- Microsoft.FinOpsToolkit.Hubs.IngestionManifest.Add.Before/After (simpler code, less readable)
Tasks
- Create reusable modules
- finops-hub-app to register an app with the hub instance
- Parameters:
hubIdstringpublisherstringnamespacestringappNamestringdisplayNamestringfeaturesstring array = [ Pipeline, Storage, Vault ]eventsstring array- TODO: How do we identify when ADF/storage resources need to be created?
- TODO: Declare required permissions
- Create a telemetry deployment for the app
- Create app manifest in storage: config/apps/{publisher}/{app-name}.json
- Create storage account, if registered
- Create Data Factory instance, if registered
- If storage is used, create an ADF linked service for the storage account
- TODO: If events are specified, create pipeline to publish events back to the main factory
- TODO: Grant Data Factory managed identity permissions
- Outputs:
dataFactoryIdresource IDstorageIdresource ID
- Parameters:
- finops-hub-storage to create containers and upload files
- Parameters:
containerstring
- Create container
- Upload files
- Enforce retention
- Outputs:
resourceIdresource IDresourceNameresource name
- Parameters:
- finops-hub-event-trigger to create ADF triggers that publish events
- Parameters:
namestringstoragePathstringfrequencystring (Daily, Monthly)startTimestringdaysnumber arraybeforeEventstringafterEventstring
- Create trigger based on the storagePath
- Create pipeline that runs the before and after events
- Parameters:
- finops-hub-pipeline to create ADF pipelines that subscribe to events
- Parameters:
namestringpropertiesobjecteventstring
- Create pipeline
- Register the pipeline as an event listener in config/events.json
- Parameters:
- finops-hub-vault to save secrets
- Parameters:
secretsobject array (?)
- Create secrets
- Outputs:
vaultIdresource ID
- Parameters:
- finops-hub-database to run database scripts
- Parameters:
namestringscriptsobject (key-value pair of file names/contents)
- Create the database
- Create scripts
- Outputs:
clusterUridatabaseName
- Parameters:
- finops-hub-app to register an app with the hub instance
- Extract Microsoft.FinOpsToolkit.Hubs.Core basics from hub.bicep
- Use finops-hub-app to register the app, track telemetry, and create resources (ADF, Storage)
- Use finops-hub-storage to create a
configcontainer - Create/update settings.json
- Use the finops-hub-container module to create the
ingestionscontainer - Use the finops-hub-event-trigger module to create the
ingestion_ManifestAddedtrigger (IngestionManifestAddedevent)
- Implement storage retention
- Update the finops-hub-container module to support daily and monthly data retention
- Add eventing
- Create the apps_PublishEvent pipeline to run subscribers
- Create/update events.json to track who's subscribed to which events
- Microsoft.FinOpsToolkit.Hubs.Core managed exports infrastructure
- Use finops-hub-event-trigger to create the
config_SettingsUpdatedtrigger - Use finops-hub-pipeline to create the
config_DetectChangespipeline that identifies scope changes- Listens to the
Settings.Updatingevent - Triggers the
Scopes.Adding/edandScopes.Removing/edevents
- Listens to the
- Use the finops-hub-event-trigger module to create the
config_DailyDataRefreshtrigger (DataRefreshStartedevent) - Use the finops-hub-event-trigger module to create the
config_MonthlyDataRefreshtrigger (DataRefreshStartedevent) - Use the finops-hub-pipeline module to create the
config_RunBackfillpipeline- Triggers the
Backfill.Startedevent - TODO: Should this be the same as
DataRefresh.Starting/ed? - TODO: Should this use finops-hub-event-trigger with an option for manual triggers?
- Triggers the
- Use finops-hub-event-trigger to create the
- Microsoft.FinOpsToolkit.Hubs.RemoteHub
- Use finops-hub-app to register the remote hub app, track telemetry, and create resources (Key Vault)
- Depends on Microsoft.FinOpsToolkit.Hubs.Core
- Use the finops-hub-vault module to store the remote hub URI and key
- Use the finops-hub-pipeline module to create the
ingestion_ETL_remoteHubpipeline- Copy individual files to the remote hub ingestion container
- Copy the manifest to the remote hub ingestion container
- Use the finops-hub-pipeline module to create the
ingestion_PublishToRemoteHubpipeline- Listens to the
IngestionManifest.Addedevent - Runs the ingestion_ETL_remoteHub pipeline
- Listens to the
- Use finops-hub-app to register the remote hub app, track telemetry, and create resources (Key Vault)
- Microsoft.FinOpsToolkit.Hubs.Analytics
- Use finops-hub-app to register the analytics app and track telemetry
- Depends on Microsoft.FinOpsToolkit.Hubs.Core
- Use the finops-hub-database module to create the
Ingestiondatabase and run scripts - Use the finops-hub-database module to create the
Hubdatabase and run scripts - Use the finops-hub-pipeline module to create the
config_InitializeDataExplorerpipeline- Listes to the
Settings.Updatedevent - Setup the open data tables
- Update the HubSettingsLog table
- Listes to the
- Use the finops-hub-pipeline module to create the
ingestion_ETL_dataExplorerpipeline- Same as current implementation
- Use the finops-hub-pipeline module to create the
ingestion_ExecuteETLpipeline- Listens to the
IngestionManifest.Addedevent - Same as current implementation
- Runs the ingestion_ETL_dataExplorer pipeline
- TODO: Consider renaming to be more generic
- Listens to the
- Use finops-hub-app to register the analytics app and track telemetry
- Microsoft.CostManagement.Exports / Microsoft.FinOpsToolkit.CostManagement app
- Use finops-hub-app to register the CM exports app, track telemetry, and create resources (ADF, storage)
- Depends on Microsoft.FinOpsToolkit.Hubs.Core
- Use finops-hub-storage to upload schema files to the
schemascontainer - Use finops-hub-storage to create a
msexportscontainer - Use the finops-hub-event-trigger module to create the
msexports_ManifestAddedtrigger (ExportManifestAddedevent) - Use the finops-hub-pipeline module to create the
msexports_ETL_ingestionpipeline- Same as current implementation
- Use the finops-hub-pipeline module to create the
msexports_ExecuteETLpipeline- Listens to the
ExportManifestAddedevent - Same as current implementation
- Runs the ingestion_ETL_dataExplorer pipeline
- Listens to the
- Use the finops-hub-pipeline module to create the
config_AddExportspipeline- Listens to the
Scopes.ScopesAddedevent - Create new exports
- Listens to the
- Use the finops-hub-pipeline module to create the
config_AddExportspipeline- Listens to the
Scopes.ScopesRemovedevent - Delete existing exports
- Listens to the
- Use the finops-hub-pipeline module to create the
config_RunBackfillJobpipeline- Same as current implementation
- TODO: Consider renaming to dataRefresh_RunBackfillJob
- TODO: Consider merging with config_RunExportJobs
- Use the finops-hub-pipeline module to create the
config_StartBackfillProcesspipeline- Listens to the Microsoft.FinOpsToolkit.Hubs.BackfillStarted event
- Same as current implementation
- Runs config_RunBackfillJob
- TODO: Consider merging with config_StartExportProcess
- Use the finops-hub-pipeline module to create the
config_RunExportJobspipeline- Same as current implementation
- TODO: Consider renaming to dataRefresh_RunExportJobs
- Use the finops-hub-pipeline module to create the
config_StartExportProcesspipeline- Listens to the Microsoft.FinOpsToolkit.Hubs.DataRefreshStarted event
- Same as current implementation
- Runs config_RunExportJobs
- Use finops-hub-app to register the CM exports app, track telemetry, and create resources (ADF, storage)
- Demo IaC setup
- Use the finops-hub-instance module to enable supported apps:
- HubCore (implicitly required)
- RemoteHub
- Analytics (Data Explorer)
- CM Exports
- Use the finops-hub-instance module to enable supported apps:
🙋♀️ Ask for the community
We could use your help:
- Please vote this issue up (👍) to prioritize it.
- Leave comments to help us solidify the vision.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.