Description
Currently, the tab completers for the Runtime and RuntimeVersion parameters in the New-AzFunctionApp cmdlet are populated upon importing the Az.Functions module. However, this operation requires calling an ARM API with authentication. If there is no active session, this operation will result in an error. Additionally, this operation is used to create a cache with configuration options for creating function apps in the Functions service. To address this behavior, we propose the following steps:
-
When Az.Functions is imported, if there is no active Azure PowerShell session, the tab completers and cache should not be populated.
-
Next, we should populate the tab completer and build the cache only when there is an active Azure PowerShell session and under these conditions:
a. The user invokes the New-AzFunctionApp cmdlet. It is important to note that the tab completers will not be populated until the New-AzFunctionApp cmdlet is invoked for the first time. Subsequently, the tab completers will be available from the second invocation of the New-AzFunctionApp cmdlet onwards.
b. The user invokes any cmdlet from the Az.Functions module.
Issue script & Debug output
Environment data
Module versions
Error output
Description
Currently, the tab completers for the
RuntimeandRuntimeVersionparameters in theNew-AzFunctionAppcmdlet are populated upon importing theAz.Functionsmodule. However, this operation requires calling an ARM API with authentication. If there is no active session, this operation will result in an error. Additionally, this operation is used to create a cache with configuration options for creating function apps in the Functions service. To address this behavior, we propose the following steps:When
Az.Functionsis imported, if there is no active Azure PowerShell session, the tab completers and cache should not be populated.Next, we should populate the tab completer and build the cache only when there is an active Azure PowerShell session and under these conditions:
a. The user invokes the
New-AzFunctionAppcmdlet. It is important to note that the tab completers will not be populated until theNew-AzFunctionAppcmdlet is invoked for the first time. Subsequently, the tab completers will be available from the second invocation of theNew-AzFunctionAppcmdlet onwards.b. The user invokes any cmdlet from the
Az.Functionsmodule.Issue script & Debug output
N/AEnvironment data
N/AModule versions
N/AError output
N/A