Azure / Azure/bicep-types-az

etag Property is not correctly recognized in Log Analytics Saved Search Bicep Resource Type.

Open
#1,998 12 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
108
Forks
44
Avg merge
18h 53m
Merged PRs (30d)
29

Description

**Bicep version**
v0.4.1008

**Describe the bug**
When using the **etag** property in a savedSearch Bicep Template, the following message appears:

```log
The property "etag" is not allowed on objects of type "SavedSearchProperties".
Permissible properties include "functionAlias", "functionParameters", "tags", "version".
If this is an inaccuracy in the documentation, please report it to the Bicep Team.
```

The **etag** property shouldn't produce this response when used under **properties** of a savedSearch Bicep Template.

**To Reproduce**
Steps to reproduce the behavior:

Attempt to use the **etag** property in a savedSearch Bicep Template (in Visual Studio Code) as shown in the example below:

```bicep
/*

Template: logAnalyticsSavedSearches.bicep

*/

// Standard Parameters.
param logSavedSearchName string
param logWorkspaceName string
param logSavedSearchCategory string
param logSavedSearchDisplayName string
param logSavedSearchQuery string

// Log Analytics Saved Search Template.
resource logAnalyticsSavedSearch 'Microsoft.OperationalInsights/workspaces/savedSearches@2020-08-01' = {
name: '${logWorkspaceName}/${logSavedSearchName}'
properties: {
etag: '*'
category: logSavedSearchCategory
displayName: logSavedSearchDisplayName
query: logSavedSearchQuery
}
}
```

**Additional context**
The Template will deploy successfully, but will return the following warning:

```log
Warning BCP037: The property "etag" is not allowed on objects of type "SavedSearchProperties".
Permissible properties include "functionAlias", "functionParameters", "tags", "version".
```

Additionally, the Official Documentation in the link below reflects incorrectly the location of where to use the **etag** property. It has it shown in use in the root of the resource instead of under **properties**.

[Microsoft.OperationalInsights workspaces/savedSearches
](https://docs.microsoft.com/en-us/azure/templates/microsoft.operationalinsights/workspaces/savedsearches?tabs=bicep)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the Microsoft.OperationalInsights/workspaces/savedSearches@2020-08-01 type definition and compare etag placement with the official template documentation. Reproduce BCP037 using the supplied Bicep template, then update the definition and documentation so the reported placement is consistent and the warning is gone.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.