CONTEXT
Whe deploy an Azure Function with a vnet integration with a code like this:
$properties = @{ subnetResourceId = $subnet.Id } $vNetParams = @{ ResourceName = "$webapp/VirtualNetwork" Location = $Location ResourceGroupName = $ResourceGroupName ResourceType = "Microsoft.Web/sites/networkConfig" PropertyObject = $properties } $result = New-AzResource @vNetParams -Force
This works fine.
The project get $subnet by looking an available subnet into a spoke VNET. So I don't want to run the previous code when a VNET integration already exists.
WHAT I NEED
A way to know if a Function has already a VNET integration
WHAT I TESTED
Get-AzFunctionApp -ResourceGroupName $ResourceGroupName -Name $webapp Get-AzFunctionAppPlan -ResourceGroupName $ResourceGroupName -Name $servicePlan Get-AzAppServicePlan -ResourceGroupName $ResourceGroupName -Name $servicePlan
Returns no vnet informations
Get-AzResource doesn't work with this resource: "$webapp/VirtualNetwork" (not found)
https://stackoverflow.com/questions/65428502/getting-vnet-integration-infos-from-a-service-plan December 24, 2020 at 01:31AM
没有评论:
发表评论