Azure / Azure/bicep-types-az

Microsoft.CostManagement/views@2022-10-01 - problem with eTag property

Open
#1,928 2 comments 0 reactions 0 assignees View on GitHub
Cost Management and Consumption Service Attention
Dominant language
TypeScript
Stars
108
Forks
44
Avg merge
18h 53m
Merged PRs (30d)
29

Description

Hi, I have a problem with eTag for 'Microsoft.CostManagement/views@2022-10-01', I'm getting error message

_'Could not find member 'eTag' on object of type 'TemplateResource'. Path 'properties.template.resources[1].eTag', line 1, position 2579.'_

_**Template file:**_
targetScope = 'subscription'

param sName string = 'costAnomalyAlert'
param enabled bool = true
param resourceTags object = {}
param kind string
param status string
param email string
param displayName string
param message string
param subject string
param baseTime string = utcNow('u')
param to array = []

param vName string = 'CostAnomalyView'
param veTag string
param vdisplayName string = 'CostAnomaly'
param vchart string = 'Table'
param vmetric string = 'ActualCost'
param vgranularity string = 'Daily'
param severity int

@description('ISO 8601 duration format')

resource costAnomalyAlert 'Microsoft.CostManagement/scheduledActions@2022-10-01' = {
name: sName
kind: kind
properties: {
displayName: displayName
notification: {
message: message
subject: subject
to: to
}
notificationEmail: email
schedule: {
frequency: 'Daily'
hourOfDay: 9
startDate: baseTime
endDate: dateTimeAdd(baseTime,'-P7D')
}
status: status
viewId: costAnomalyView.id
}
}

resource costAnomalyView 'Microsoft.CostManagement/views@2022-10-01' = {
name: vName
eTag: veTag
properties: {
accumulated: 'string'
chart: vchart
displayName: vdisplayName
metric: vmetric
query: {
dataSet: {
aggregation: {
totalCost: {
function: 'Sum'
name: 'PreTaxCost'
}
}
granularity: vgranularity
grouping: [
{
name: 'SubscriptionId'
type: 'Dimension'
}
]
sorting: [
{
direction: 'Descending'
name: 'Subscription'
}
]
}
timeframe: 'WeekToDate'
type: 'Usage'
}
}
}

_**Module:**_
module costAnomalyAlert '../Templates/costAnomalyAlert.bicep' = {
name: 'anomaly-alert'
scope: subscription()
params: {
vName: 'costAnomalyAlertTest'
veTag: '*'
email: NotificationEmail
displayName: 'TestDisplayName'
sName: AnomalyAlertName
kind: 'Email'
subject: 'Test Subject'
message: 'Test Description'
to: [
'testuser@mail.com'
]
status: 'Enabled'
severity: 1
}
}

Is there anything wrong in my input data?

I'll appreciate for any help.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the reported costAnomalyAlert template and its Microsoft.CostManagement/views@2022-10-01 resource declaration, then compare the eTag placement with the resource definition used by this repository. Reproduce the deployment error and determine whether the input is invalid or the published type definition is missing the property.

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.