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

ResourceDefinedTypes - Emit warning for type mismatches #14869

Closed
levimatheri opened this issue Aug 21, 2024 · 0 comments · Fixed by #14989
Closed

ResourceDefinedTypes - Emit warning for type mismatches #14869

levimatheri opened this issue Aug 21, 2024 · 0 comments · Fixed by #14989
Assignees

Comments

@levimatheri
Copy link
Contributor

Is your feature request related to a problem? Please describe.
When using resource defined types, assigning a mismatched type to a property does not emit a warning.
For example:

param container resource<'Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers@2024-05-15'>.properties.resource.indexingPolicy

resource sa 'Microsoft.Storage/storageAccounts@2023-05-01'  = {
  location: resourceGroup().location
  sku: { name: 'Standard_GRS' }
  kind: 'StorageV2'
  name: 'my-sa'
  properties: {
    accessTier: 'Hot'
    azureFilesIdentityBasedAuthentication: container // does not emit warning
  }
}

image

Describe the solution you'd like
In the example above, it would be nice if the compiler emitted a warning indicating that the container param type did not match expected AzureFilesIdentityBasedAuthentication.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants