Skip to content

[Chore]: Migrate to Azure Verified Module for Cognitive Services/Accounts #50

@PlagueHO

Description

@PlagueHO

Area

Infrastructure (Bicep/infra)

Chore Type

Dependency update

Description

Update the infrastructure to use the official Azure Verified Module (AVM) for Microsoft.CognitiveServices/accounts instead of the current custom module once support for Azure AI Foundry V2 projects and connections is available.

Currently, we're using a custom Bicep module at infra/cognitive-services/accounts/main.bicep because the official AVM doesn't support the Azure AI Foundry V2 features (projects, connections, and project/connections) that are required for this solution accelerator.

The upstream issue Azure/bicep-registry-modules#5390 has been created to add support for these child resources to the official AVM module:

  • Microsoft.CognitiveServices/accounts/projects
  • Microsoft.CognitiveServices/accounts/connections
  • Microsoft.CognitiveServices/accounts/projects/connections

Justification

  • Improves maintainability: Using the official AVM reduces maintenance overhead and ensures we benefit from community contributions and Microsoft support
  • Enhances reliability: Official AVM modules undergo rigorous testing and follow Azure best practices
  • Reduces technical debt: Eliminates the need to maintain our own custom implementation
  • Improves security posture: AVM modules are regularly updated with security fixes and improvements
  • Better compliance: AVM modules follow Azure Well-Architected Framework principles

Acceptance Criteria

  • Monitor [AVM Module Issue]: Add Projects & Connections child resources to Microsoft.CognitiveServices/accounts Azure/bicep-registry-modules#5390 for resolution
  • Once the AVM supports projects and connections, update infra/main.bicep to use the official AVM module
  • Replace the custom module reference with br/public:avm/res/cognitive-services/account:X.Y.Z
  • Remove the custom module directory infra/cognitive-services/
  • Update all parameter mappings to match the AVM module interface
  • Verify all deployments work correctly with the new module
  • Update documentation to reflect the change
  • Run full integration tests to ensure no regressions
  • Update any related GitHub Actions workflows if needed

Priority

Medium - Should be addressed in next few releases

Additional Context

Dependencies:

Related Files:

  • infra/main.bicep (line ~429 where the custom module is referenced)
  • infra/cognitive-services/accounts/main.bicep (custom module to be replaced)
  • infra/cognitive-services/accounts/project/main.bicep (project submodule)
  • infra/cognitive-services/accounts/connection/main.bicep (connection submodule)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions