Skip to content

Break out bicep modules for hubs extensibility - #1800

Merged
Michael Flanakin (flanakin) merged 14 commits into
devfrom
flanakin/hubs-ext
Oct 11, 2025
Merged

Break out bicep modules for hubs extensibility#1800
Michael Flanakin (flanakin) merged 14 commits into
devfrom
flanakin/hubs-ext

Conversation

@flanakin

Copy link
Copy Markdown
Collaborator

🛠️ Description

This PR reorganizes FinOps hubs bicep into a cleaner, more extensible structure while fixing build issues and improving maintainability.

  • Moved all JSON schemas into relevant module directories
  • Split large monolithic files (e.g., 5K+ line dataFactory.bicep) into smaller modules
  • Moved all framework modules into the fx folder
  • Organized apps into X.Y/Z folders for each publisher/app:
    • Microsoft.CostManagement/Exports – Cost export functionality
    • Microsoft.CostManagement/ManagedExports – Managed exports
    • Microsoft.FinOpsHubs/Analytics – Data Explorer and analytics
    • Microsoft.FinOpsHubs/Core – Core hub infrastructure
    • Microsoft.FinOpsHubs/RemoteHub – Remote hub functionality
  • Resolved all Bicep compilation errors/warnings
  • Added #disable-next-line BCP318 with explanations for null safety
  • Fixed Build-Toolkit.ps1 param generation bug
  • Updated PowerShell build scripts with correct paths

📋 Checklist

🔬 How did you test this change?

  • 🤏 Lint tests
  • 🤞 PS -WhatIf / az validate
  • 👍 Manually deployed + verified
  • 💪 Unit tests
  • 🙌 Integration tests

🙋‍♀️ Do any of the following that apply?

  • 🚨 This is a breaking change.
  • 🤏 The change is less than 20 lines of code.

📑 Did you update docs/changelog.md?

  • ✅ Updated changelog (required for dev PRs)
  • ➡️ Will add log in a future PR (feature branch PRs only)
  • ❎ Log not needed (small/internal change)

📖 Did you update documentation?

  • ✅ Public docs in docs (required for dev)
  • ✅ Internal dev docs in src (required for dev)
  • ➡️ Will add docs in a future PR (feature branch PRs only)
  • ❎ Docs not needed (small/internal change)

@flanakin
Michael Flanakin (flanakin) marked this pull request as draft August 12, 2025 07:21
@flanakin
Michael Flanakin (flanakin) marked this pull request as ready for review August 12, 2025 10:45
@RolandKrummenacher

Roland Krummenacher (RolandKrummenacher) commented Aug 20, 2025

Copy link
Copy Markdown
Collaborator

I'm getting an error while deploying from your branch, since I'm using a hub name that is a bit longer:

image

I'm trying to update an existing deployment.

@flanakin

Copy link
Copy Markdown
Collaborator Author

Roland Krummenacher (@RolandKrummenacher) Sorry for the delay. I fixed this.

@RolandKrummenacher

Copy link
Copy Markdown
Collaborator

Roland Krummenacher (@RolandKrummenacher) Sorry for the delay. I fixed this.

Works now. Thanks.

@MSBrett

Copy link
Copy Markdown
Contributor
image Getting a bunch of timing related failures.

- Add @maxlength(22) to clusterName parameter in Analytics app.bicep
- Implement automatic truncation in deployment script
- Ensure hub names up to 18 chars work (18 + 4 for '-adx' = 22 max)
- Prevent deployment failures for longer hub names

@MSBrett Brett Wilson (MSBrett) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM - Tested and validated

Deployments tested successfully:

  • ✅ Public networking (eastus2)
  • ✅ Private networking (eastus2)
  • ✅ Long hub names with ADX truncation
  • ✅ Multiple subscriptions

Changes validated:

  • ✅ Modular bicep organization works
  • ✅ ADX cluster name validation fixed (Max Furlong (@maxlength)(22))
  • ✅ Private endpoints correctly configured
  • ✅ Resource creation and networking successful

Note for future optimization:
Multiple StopTriggers deployment scripts (one per module) run sequentially with private endpoints, adding ~1 min overhead per script. Consider consolidating into a single script in a future PR for efficiency.

Commits added:

  • b4b1b13: Fix ADX cluster name length validation

@MSBrett Brett Wilson (MSBrett) removed the Needs: Review 👀 PR that is ready to be reviewed label Oct 1, 2025
@flanakin

Copy link
Copy Markdown
Collaborator Author

@microsoft-github-policy-service agree [company="Xerilium"]

@flanakin

Copy link
Copy Markdown
Collaborator Author

@microsoft-github-policy-service agree company="Xerilium"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants