Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The property "" expected a value of type but the provided value is of type "any".bicep(BCP036) #3617

Closed
slavizh opened this issue Jul 15, 2021 · 1 comment · Fixed by #3805
Assignees
Labels
bug Something isn't working top 10 committed
Milestone

Comments

@slavizh
Copy link
Contributor

slavizh commented Jul 15, 2021

Bicep version
Bicep CLI version 0.4.63 (7ebed03)

Describe the bug
I have the following code:

resource eventSubscription 'Microsoft.EventGrid/systemTopics/eventSubscriptions@2020-10-15-preview' = {
  name: '${eventGridSystemTopicName}/${subscription.name}'
  properties: {
    deliveryWithResourceIdentity: subscription.destination.useIdentity ? endPointPropertiesWithIdentity[toLower(subscription.destination.type)] : null
    destination: subscription.destination.useIdentity ? null : endPointProperties[toLower(subscription.destination.type)]
    filter: {
      subjectBeginsWith: subscription.filter.beginsWith
      subjectEndsWith: subscription.filter.endsWith
      includedEventTypes: subscription.filter.eventTypes
      isSubjectCaseSensitive: subscription.filter.caseSensitive
      enableAdvancedFilteringOnArrays: subscription.filter.enableAdvancedFilteringOnArrays
      advancedFilters: [for advancedFilter in subscription.filter.advancedFilters: {
        key: advancedFilter.key
        operatorType: advancedFilter.operator
        value: union(defaultAdvancedFilterObject, advancedFilter).value
        values: union(defaultAdvancedFilterObject, advancedFilter).values
      }]
    }
  }
}

This results in warning message:

The property "operatorType" expected a value of type "'BoolEquals' | 'IsNotNull' | 'IsNullOrUndefined' | 'NumberGreaterThan' | 'NumberGreaterThanOrEquals' | 'NumberIn' | 'NumberInRange' | 'NumberLessThan' | 'NumberLessThanOrEquals' | 'NumberNotIn' | 'NumberNotInRange' | 'StringBeginsWith' | 'StringContains' | 'StringEndsWith' | 'StringIn' | 'StringNotBeginsWith' | 'StringNotContains' | 'StringNotEndsWith' | 'StringNotIn'" but the provided value is of type "any".bicep(BCP036)

image

This should not result in such warning as far as I understand.

@ghost ghost added the Needs: Triage 🔍 label Jul 15, 2021
@majastrz
Copy link
Member

Good find! This is definitely not expected.

@majastrz majastrz self-assigned this Jul 15, 2021
@alex-frankel alex-frankel added bug Something isn't working top 10 committed and removed Needs: Triage 🔍 labels Jul 22, 2021
@alex-frankel alex-frankel added this to the v0.5 milestone Jul 22, 2021
@ghost ghost locked as resolved and limited conversation to collaborators May 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working top 10 committed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants