Skip to content

WebApp: Tags removing after running Powershell cmdlet Set-AzAppServicePlan while implementing Policy #15005

@Kotasudhakarreddy

Description

@Kotasudhakarreddy

Description

• When the PS cmdlet Set-AzAppServicePlan is run, the request body does not include the collection of existing tags.

• This leads to the existing custom initiative, which contains policies to enforce required tags (Customer and Environment) on targeted resource types that include the App Service Plan resource type, to evaluate the required tags as missing.

• Since these tags are evaluated as missing (due to them not being included in the request body), the policy creates a completely new tags property object value that only contains the required tags (Customer/Environment) and submits this new object value to the Resource provider (Microsoft.Web) as part of the request body to update the App Service Plan.

• With that being the case, the new object value for the tags property (which only includes tags required by policy) replaces the existing tags property value and once the update operation is complete, the only tags present are the required tags that were added via policy.

• We believe if the response body would include the existing tags then this issue would not occur.

Steps to reproduce

Environment data


Module versions

Debug output


Error output


Metadata

Metadata

Labels

App Servicesaka WebSitesService AttentionThis issue is responsible by Azure service team.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions