Function App App files -requirements.psd1

Shola Lawani 531 Reputation points Microsoft Employee
2021-06-21T16:30:55.697+00:00

Hello experts,

When a function app is created (using the Powershell runtime), it comes with a requirements.psd1 which has this content

This file enables modules to be automatically managed by the Functions service.

See https://aka.ms/functionsmanageddependency for additional information.

@{
# For latest supported version, go to 'https://www.powershellgallery.com/packages/Az'.
# To use the Az module in your function app, please uncomment the line below.

'Az' = '6.*'

}
the line AZ=6.* is commented, is there a way that this line can be uncommented at deployment time using ARM template or Azure Powershell?

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

Accepted answer
  1. Pramod Valavala 20,636 Reputation points Microsoft Employee
    2021-06-22T16:02:36.357+00:00

    anonymous user While an ARM Template won't be able to do this, you could always use bash/PowerShell in your build pipeline to update the file before zipping.

    Another option would be to set the managed dependency setting in host.json by using app settings.

    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.