Azure / Azure/azure-rest-api-specs
[RecoveryServiceBackup] ProtectedItemResource/AzureIaaSComputeVMProtectedItem sometimes returns the `SourceResourceID` with the resource group name in UPPER CASE
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 444
Description
Original reported: https://github.com/terraform-providers/terraform-provider-azurerm/issues/8009
The `SourceResourceID` was assigned to `/subscriptions/xxxxxxxxx-xxxx-xxxxxxx-xxxxxxxx/resourceGroups/abc123-rg/providers/Microsoft.Compute/virtualMachines/abc123-vm0f11` but returned with the value of `/subscriptions/xxxxxxxxx-xxxx-xxxxxxx-xxxxxxxx/resourceGroups/ABC123-RG/providers/Microsoft.Compute/virtualMachines/abc123-vm0f11`
```
# module.core.module.server1.azurerm_backup_protected_vm.main[0] must be replaced
-/+ resource "azurerm_backup_protected_vm" "main" {
backup_policy_id = "/subscriptions/xxxxxxxxx-xxxx-xxxxxxx-xxxxxxxx/resourceGroups/abc123-rg/providers/Microsoft.RecoveryServices/vaults/abc123rv/backupPolicies/abc123-rp"
~ id = "/subscriptions/xxxxxxxxx-xxxx-xxxxxxx-xxxxxxxx/resourceGroups/abc123-rg/providers/Microsoft.RecoveryServices/vaults/abc123rv/backupFabrics/Azure/protectionContainers/IaasVMContainer;iaasvmcontainerv2;abc123-rg;abc123-vm0f11/protectedItems/VM;iaasvmcontainerv2;abc123-rg;abc123-vm0f11" -> (known after apply)
recovery_vault_name = "abc123rv"
resource_group_name = "abc123-rg"
~ source_vm_id = "/subscriptions/xxxxxxxxx-xxxx-xxxxxxx-xxxxxxxx/resourceGroups/ABC123-RG/providers/Microsoft.Compute/virtualMachines/abc123-vm0f11" -> "/subscriptions/xxxxxxxxx-xxxx-xxxxxxx-xxxxxxxx/resourceGroups/abc123-rg/providers/Microsoft.Compute/virtualMachines/abc123-vm0f11" # forces replacement
- tags = {} -> null
}
```
Contributor guide
Research direction
Start by locating the RecoveryServiceBackup definition for ProtectedItemResource/AzureIaaSComputeVMProtectedItem and inspect how SourceResourceID is specified. Compare the documented casing with the reported uppercase resource-group response, then verify the corrected specification against the relevant API contract or validation checks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure
- Domain
- backend-api-design, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100