make a filename variable for a module definition

Rob Joosen 86 Reputation points
2023-01-05T11:00:20.643+00:00

Hi,

I have a Bicep file for an azure function, which is generic. But, I want to use this generic file to deploy several azure functions, which have different appSettings. So I have my AppSettings in a different file:

276406-image.png

Now, I would like to have this filename 'appSettings.bicep' as a variable like 'appSettings${processName}.bicep' so I can use that in my pipeline.

Is this possible? It seems not ?

Rob

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,331 questions
0 comments No comments
{count} votes

Accepted answer
  1. MuthuKumaranMurugaachari-MSFT 22,381 Reputation points
    2023-01-05T19:09:29.217+00:00

    @Rob Joosen Thank you for reaching out to Microsoft Q&A. Based on my understanding, you are looking to define the module path (appSettings.bicep) in variable so that you can use it in your pipeline. Please correct me if it is incorrect. I found a similar feature in GH: #2100 and however, this was not implemented. I have discussed with our product team and confirmed all module file references must be literal strings.

    Hence you cannot define module path as module appSettings 'appSettings${processName}.bicep' or like below:

    276655-image.png

    But if you have any idea or like to share feedback directly with our product team, please feel to submit via https://github.com/Azure/bicep/discussions. Also, I can pass it internally on your behalf as well. I hope this answers your question and feel free to add a comment if you have any other questions. We would be happy to assist you. Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.