-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Description
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.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 theNew-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 theAz.Functionsmodule.
Issue script & Debug output
N/AEnvironment data
N/AModule versions
N/AError output
N/A