How to specify csproj file for Bicep's SourceControl resource?

Siegfried Heintze 1,791 Reputation points
2023-07-10T19:34:23.1633333+00:00

I've been encourage to cross post! Here is the original: https://github.com/Azure/bicep/discussions/10728

To summarize:

This example (https://github.com/Azure-Samples/azure-event-grid-viewer) works because there is a single SLN file that contains a single CSPROJ file for a single web app.

How do I use the SourceControl Resource in my bicep code if my SLN file contains lots of CSPROJ files and only one of the CSPROJ files contains the code for the Azure Web App (or Azure Function app) that I want to deploy?

A working example would be lovely!

Thanks

Siegfried

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,022 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,533 questions
0 comments No comments
{count} votes

Accepted answer
  1. Ryan Hill 24,546 Reputation points Microsoft Employee
    2023-07-12T02:16:41.0466667+00:00

    In reviewing Microsoft.Web/sites/sourcecontrols - Bicep, ARM template & Terraform AzAPI reference | Microsoft Learn, I don't think setting an individual csproj is possible. I don't see how GitHubActionCodeConfiguration will be helpful because your stack will be same. I believe the best course of action is using GitHubActionConfiguration to generate a workflow file from bicep into the repo and then updating that workflow file after the fact with the artifacts you want.

    0 comments No comments

0 additional answers

Sort by: Most helpful