Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
28 lines (22 sloc) 1.1 KB
Param(
[string] $AppService_RG = '<app-service-rg>',
[string] $AppService_Name = '<app-service-name>',
[string] $LogicApp_RG = '<logic-app-rg>',
[string] $LogicApp_Name = '<logic-app-name>',
[string] $subscriptionId = '<subscription-id>'
)
Login-AzureRmAccount
$subscription = Get-AzureRmSubscription -SubscriptionId $subscriptionId
$appserviceplan = Get-AzureRmResource -ResourceType "Microsoft.Web/serverFarms" -ResourceGroupName $AppService_RG -ResourceName $AppService_Name
$logicapp = Get-AzureRmResource -ResourceType "Microsoft.Logic/workflows" -ResourceGroupName $LogicApp_RG -ResourceName $LogicApp_Name
$sku = @{
"name" = $appservicePlan.Sku.tier;
"plan" = @{
"id" = $appserviceplan.ResourceId;
"type" = "Microsoft.Web/ServerFarms";
"name" = $appserviceplan.Name
}
}
$updatedProperties = $logicapp.Properties | Add-Member @{sku = $sku;} -PassThru
$updatedLA = Set-AzureRmResource -ResourceId $logicapp.ResourceId -Properties $updatedProperties -ApiVersion 2015-08-01-preview
Write-Output "Logic App now associated with App Service Plan: $appserviceplan.Name"