Azure/azure-rest-api-specs

[BUG] Snapshots REST API returns certain segments of Disk Access ID in uppercase

rizkybiz opened this issue · 1 comments

API Spec link

https://github.com/Azure/azure-rest-api-specs/blob/main/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-03-01/storagesync.json

API Spec version

2020-03-01

Describe the bug

I'm working on integrating disk_access_id into the Azure Terraform provider for Snapshots. I'm encountering an issue where Terraform is throwing a diff error for the disk access ID based on what's retrieved from the REST API.

Expected behavior

Expected behavior would be to have the Disk Access ID returned formatted as it was set during creation.

Actual behavior

Actual behavior is capitalization of certain segments of the Disk Access ID.

Reproduction Steps

// Create snapshot resource
PUT https://management.azure.com/subscriptions/***/resourceGroups/example-resources/providers/Microsoft.Compute/snapshots/acctestss?api-version=2022-03-02
{
  "name": "acctestss",
  "id": "/subscriptions/***/resourceGroups/example-resources/providers/Microsoft.Compute/snapshots/acctestss",
  "type": "Microsoft.Compute/snapshots",
  "location": "eastus",
  "tags": {},
  "properties": {
    "creationData": {
      "createOption": "Copy",
      "sourceUri": "/subscriptions/***/resourceGroups/example-resources/providers/Microsoft.Compute/disks/acctestmd"
    },
    "diskSizeGB": 20,
    "encryptionSettingsCollection": {
      "enabled": false
    },
    "incremental": false,
    "diskAccessId": "/subscriptions/***/resourceGroups/example-resources/providers/Microsoft.Compute/diskAccesses/test-da",
    "networkAccessPolicy": "AllowPrivate",
    "publicNetworkAccess": "Enabled",
    "provisioningState": "Updating"
  }
}

// Read snapshot resource
GET https://management.azure.com/subscriptions/***/resourceGroups/example-resources/providers/Microsoft.Compute/snapshots/acctestss?api-version=2022-03-02

{
  "name": "acctestss",
  "id": "/subscriptions/***/resourceGroups/example-resources/providers/Microsoft.Compute/snapshots/acctestss",
  "type": "Microsoft.Compute/snapshots",
  "location": "eastus",
  "tags": {},
  "sku": {
    "name": "Standard_LRS",
    "tier": "Standard"
  },
  "properties": {
    "creationData": {
      "createOption": "Copy",
      "sourceResourceId": "/subscriptions/***/resourceGroups/example-resources/providers/Microsoft.Compute/disks/acctestmd",
      "sourceUniqueId": "***"
    },
    "diskSizeGB": 20,
    "encryptionSettingsCollection": {
      "enabled": false,
      "encryptionSettings": [],
      "encryptionSettingsVersion": "1.0"
    },
    "encryption": {
      "type": "EncryptionAtRestWithPlatformKey"
    },
    "incremental": false,
    "diskAccessId": "/subscriptions/***/resourceGroups/EXAMPLE-RESOURCES/providers/Microsoft.Compute/diskAccesses/test-da",
    "networkAccessPolicy": "AllowPrivate",
    "publicNetworkAccess": "Enabled",
    "timeCreated": "2024-05-21T15:53:26.5564391+00:00",
    "provisioningState": "Succeeded",
    "diskState": "Unattached",
    "diskSizeBytes": 21474836480,
    "uniqueId": "***"
  }
}

Environment

Terraform local provider development MacOSX

@anpint Please help have a look, thank you.