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

[Microsoft.Sql/servers/databases]: minCapacity should be decimal as string, instead of int | null #2336

Open
1 task done
danim-hub opened this issue Oct 31, 2024 · 0 comments

Comments

@danim-hub
Copy link

Resource Type

Microsoft.Sql/servers/databases

Api Version

2023-05-01-preview

Issue Type

Inaccurate property type(s)

Other Notes

The property type is indicated as json('decimal-as-string') in https://learn.microsoft.com/en-us/azure/templates/microsoft.sql/servers/databases?pivots=deployment-language-bicep.
I have it defined as '0.5', and I have the warning

main.bicep(195,18) : Warning BCP036: The property "minCapacity" expected a value of type "int | null" but the provided value is of type "string". If this is a resource type definition inaccuracy, report it using https://aka.ms/bicep-type-issues. [https://aka.ms/bicep/core-diagnostics#BCP036]

Bicep Repro

main.bicep extract:

resource database 'Microsoft.Sql/servers/databases@2023-05-01-preview' = {
  parent: dbServer
  location: location
  name: '${prefix}-db-${suffix}'
  properties: {
    collation: collation
    maxSizeBytes: maxSizeBytes
    sampleName: sampleName
    zoneRedundant: zoneRedundant
    licenseType: licenseType
    readScale: readScaleOut
    highAvailabilityReplicaCount: numberOfReplicas
    minCapacity: minCapacity
    autoPauseDelay: autoPauseDelay
    requestedBackupStorageRedundancy: requestedBackupStorageRedundancy
    isLedgerOn: false
    availabilityZone: availabilityZone
    useFreeLimit: useFreeLimit
    freeLimitExhaustionBehavior: freeLimitExhaustionBehavior
    maintenanceConfigurationId: maintenanceConfigurationId
  }
  sku: {
    name: skuName
    tier: tier
  }
}

main.bicepparam extract:

param minCapacity string = '0.5'

Confirm

  • I have read the troubleshooting guide and looked for duplicates.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

1 participant