Azure / Azure/azure-rest-api-specs
Type Mismatch: VirtualMachineScaleSet.virtualMachineProfile.storageProfile.diskControllerType: string vs string[]
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 444
Description
The Azure Rest API expects and returns a `string` value for the `diskControllerType` option on the storage profile for VM Scaleset VM profiles.
Documentation can be found here: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2023-03-01/virtualMachineScaleSet.json#L4092
Public facing documentation specifies that this value should instead be a `string[]`: https://learn.microsoft.com/en-us/rest/api/compute/virtual-machine-scale-sets/create-or-update?tabs=HTTP#virtualmachinescalesetstorageprofile
As a result, downstream tools (Pulumi's azure-native provider) provide / expect a string array - and encounter an error when a string is provided back, or the provided string array is rejected.
Related Issue: https://github.com/pulumi/pulumi-azure-native/issues/2639
Contributor guide
Research direction
Inspect the virtualMachineScaleSet.json specification at the linked diskControllerType definition, then compare it with the public REST documentation and the related Pulumi issue. Done means the specification and published documentation agree on whether this value is a string or an array, eliminating the downstream type mismatch.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, openapi
- Domain
- api, cloud
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100