Azure / Azure/azure-powershell

webapp:Feature Request: Support Azure Site Extensions (Azure App Service)

Open
#7,627 15 comments 4 reactions 1 assignee Assigned to @panchagnula View on GitHub
act-observability-squad App Services customer-reported feature-request Service Attention
Dominant language
C#
Stars
4.8k
Forks
4.3k
Avg merge
2d 17h
Merged PRs (30d)
51

Description

# Background

It's not currently possible to use either Azure PowerShell, or Azure CLI, to add/remove Azure Site Extensions. It can only be done using ARM templates, the REST API (steep learning curves for beginners, see below) or manually through the Azure Portal. I would like it to be easily scriptable alongside existing CLI or PowerShell scripts I use, including in Azure Cloud Shell.

# Proposed Solution

Add the following commands:

```powershell
Get-AzureRmWebAppExtension
[[-Name] ]
[-ResourceGroupName]
[-WebAppName]
[[-Slot] ]
[-DefaultProfile ]
[]

Remove-AzureRmWebAppExtension
[-Name]
[-Force]
[-ResourceGroupName]
[-WebAppName]
[[-Slot] ]
[-DefaultProfile ]
[-WhatIf]
[-Confirm]
[]

New-AzureRmWebAppExtension
[-ResourceGroupName]
[-WebAppName]
[[-Slot] ]
[-Name]
[-Version]
[-DefaultProfile ]
[]
```

Where `Name` would be the name of the nuget package, e.g. `RemoveCustomHeaders` (https://www.nuget.org/packages/RemoveCustomHeaders).

The `New` command could also update to either the latest version, or the specified version if already installed?

# Alternatives

It's possible to configure Site Extensions using ARM templates but unless you are already using ARM templates, it's potentially a lot of work to get set up, especially for beginners: https://developer.rackspace.com/blog/Azure-WebApp-Extensions-with-ARM/

It's possible to call the Kudu REST API directly, though as you can see from this blog post, it's not straightforward: http://poshdb.com/home/install-azure-app-extension-powershell/

# Additional context

Documentation on what Azure Site Extensions are: https://github.com/projectkudu/kudu/wiki/Azure-Site-Extensions

Blog post describing how to install and manage extensions via the Azure Portal: https://www.michaelcrump.net/azure-tips-and-tricks21/

Note that all Site Extensions are hosted on NuGet, with a tag of `AzureSiteExtension`: https://www.nuget.org/packages?q=Tags%3A%22AzureSiteExtension%22

Copying in @davidebbo (Dev manager on Azure Functions and Azure App Service).

I have raised a similar feature request for the Azure CLI here: https://github.com/Azure/azure-cli/issues/7617

Thanks.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.