The issue I ran into is that OS and Data Disks associated with VMs are not detected as objects so not shown. It will be great if you can add the ability to display OS/Data disks attached to VMs.
Some non relevant resource objects are removed.
"networkInterfaces_nic_SQL01_name": {
"defaultValue": "nic-SQL01",
"type": "String"
},
"networkInterfaces_nic_WEB01_name": {
"defaultValue": "nic-WEB01",
"type": "String"
},
"virtualNetworks_vnet_testjy_name": {
"defaultValue": "vnet-testjy",
"type": "String"
},
"networkInterfaces_nic_MGMT01_name": {
"defaultValue": "nic-MGMT01",
"type": "String"
},
"networkSecurityGroups_nsg_web_name": {
"defaultValue": "nsg-web",
"type": "String"
},
"networkSecurityGroups_nsg_database_name": {
"defaultValue": "nsg-database",
"type": "String"
},
"networkSecurityGroups_nsg_management_name": {
"defaultValue": "nsg-management",
"type": "String"
},
},
"variables": {},
"resources": [
{
"type": "Microsoft.Network/networkSecurityGroups",
"apiVersion": "2022-05-01",
"name": "[parameters('networkSecurityGroups_nsg_database_name')]",
"location": "northeurope",
"tags": {
"BusinessArea": "Enterprise Architect",
"BusinessCritical": "False",
"Environment": "TestJY",
"OutofHourShutdown": "False",
"Project": "Terraform JY Test Subcription"
},
"properties": {
"securityRules": []
}
},
{
"type": "Microsoft.Network/networkSecurityGroups",
"apiVersion": "2022-05-01",
"name": "[parameters('networkSecurityGroups_nsg_web_name')]",
"location": "northeurope",
"tags": {
"BusinessArea": "Enterprise Architect",
"BusinessCritical": "False",
"Environment": "TestJY",
"OutofHourShutdown": "False",
"Project": "Terraform JY Test Subcription"
},
"properties": {
"securityRules": []
}
},
{
"type": "Microsoft.Network/networkInterfaces",
"apiVersion": "2022-05-01",
"name": "[parameters('networkInterfaces_nic_MGMT01_name')]",
"location": "northeurope",
"dependsOn": [
"[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworks_vnet_testjy_name'), 'management')]"
],
"kind": "Regular",
"properties": {
"ipConfigurations": [
{
"name": "internal",
"id": "[concat(resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaces_nic_MGMT01_name')), '/ipConfigurations/internal')]",
"etag": "W/\"8ae78523-775a-4a58-a497-1f1179b457a5\"",
"type": "Microsoft.Network/networkInterfaces/ipConfigurations",
"properties": {
"provisioningState": "Succeeded",
"privateIPAddress": "10.4.3.4",
"privateIPAllocationMethod": "Dynamic",
"subnet": {
"id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworks_vnet_testjy_name'), 'management')]"
},
"primary": true,
"privateIPAddressVersion": "IPv4"
}
}
],
"dnsSettings": {
"dnsServers": []
},
"enableAcceleratedNetworking": false,
"enableIPForwarding": false,
"disableTcpStateTracking": false,
"nicType": "Standard"
}
},
{
"type": "Microsoft.Network/networkInterfaces",
"apiVersion": "2022-05-01",
"name": "[parameters('networkInterfaces_nic_SQL01_name')]",
"location": "northeurope",
"dependsOn": [
"[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworks_vnet_testjy_name'), 'database')]"
],
"kind": "Regular",
"properties": {
"ipConfigurations": [
{
"name": "internal",
"id": "[concat(resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaces_nic_SQL01_name')), '/ipConfigurations/internal')]",
"etag": "W/\"4ab06398-37fb-479a-8754-69907b91ec84\"",
"type": "Microsoft.Network/networkInterfaces/ipConfigurations",
"properties": {
"provisioningState": "Succeeded",
"privateIPAddress": "10.4.2.4",
"privateIPAllocationMethod": "Dynamic",
"subnet": {
"id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworks_vnet_testjy_name'), 'database')]"
},
"primary": true,
"privateIPAddressVersion": "IPv4"
}
}
],
"dnsSettings": {
"dnsServers": []
},
"enableAcceleratedNetworking": false,
"enableIPForwarding": false,
"disableTcpStateTracking": false,
"nicType": "Standard"
}
},
{
"type": "Microsoft.Network/networkInterfaces",
"apiVersion": "2022-05-01",
"name": "[parameters('networkInterfaces_nic_WEB01_name')]",
"location": "northeurope",
"dependsOn": [
"[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworks_vnet_testjy_name'), 'web')]"
],
"kind": "Regular",
"properties": {
"ipConfigurations": [
{
"name": "internal",
"id": "[concat(resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaces_nic_WEB01_name')), '/ipConfigurations/internal')]",
"etag": "W/\"8faa0fae-1912-4fec-a888-e058ad93cd18\"",
"type": "Microsoft.Network/networkInterfaces/ipConfigurations",
"properties": {
"provisioningState": "Succeeded",
"privateIPAddress": "10.4.1.4",
"privateIPAllocationMethod": "Dynamic",
"subnet": {
"id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworks_vnet_testjy_name'), 'web')]"
},
"primary": true,
"privateIPAddressVersion": "IPv4"
}
}
],
"dnsSettings": {
"dnsServers": []
},
"enableAcceleratedNetworking": false,
"enableIPForwarding": false,
"disableTcpStateTracking": false,
"nicType": "Standard"
}
},
{
"type": "Microsoft.Network/networkSecurityGroups",
"apiVersion": "2022-05-01",
"name": "[parameters('networkSecurityGroups_nsg_management_name')]",
"location": "northeurope",
"dependsOn": [
"[resourceId('Microsoft.Network/networkSecurityGroups/securityRules', parameters('networkSecurityGroups_nsg_management_name'), 'RDP')]"
],
"tags": {
"BusinessArea": "Enterprise Architect",
"BusinessCritical": "False",
"Environment": "TestJY",
"OutofHourShutdown": "False",
"Project": "Terraform JY Test Subcription"
},
"properties": {
"securityRules": [
{
"name": "RDP",
"id": "[resourceId('Microsoft.Network/networkSecurityGroups/securityRules', parameters('networkSecurityGroups_nsg_management_name'), 'RDP')]",
"type": "Microsoft.Network/networkSecurityGroups/securityRules",
"properties": {
"protocol": "Tcp",
"sourcePortRange": "*",
"destinationPortRange": "3389",
"destinationAddressPrefix": "*",
"access": "Allow",
"priority": 100,
"direction": "Inbound",
"sourcePortRanges": [],
"destinationPortRanges": [],
"sourceAddressPrefixes": [
"73.115.86.200"
],
"destinationAddressPrefixes": []
}
}
]
}
},
{
"type": "Microsoft.Network/networkSecurityGroups/securityRules",
"apiVersion": "2022-05-01",
"name": "[concat(parameters('networkSecurityGroups_nsg_management_name'), '/RDP')]",
"dependsOn": [
"[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroups_nsg_management_name'))]"
],
"properties": {
"protocol": "Tcp",
"sourcePortRange": "*",
"destinationPortRange": "3389",
"destinationAddressPrefix": "*",
"access": "Allow",
"priority": 100,
"direction": "Inbound",
"sourcePortRanges": [],
"destinationPortRanges": [],
"sourceAddressPrefixes": [
"73.115.86.200"
],
"destinationAddressPrefixes": []
}
},
{
"type": "Microsoft.RecoveryServices/vaults/backupPolicies",
"apiVersion": "2022-03-01",
"name": "[concat(parameters('vaults_asrvTestJY16888_name'), '/asrv-policy-TestJY16888')]",
"dependsOn": [
"[resourceId('Microsoft.RecoveryServices/vaults', parameters('vaults_asrvTestJY16888_name'))]"
],
{
"type": "Microsoft.Compute/virtualMachines",
"apiVersion": "2022-08-01",
"name": "[parameters('virtualMachines_MGMT01_name')]",
"location": "northeurope",
"dependsOn": [
"[resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaces_nic_MGMT01_name'))]",
"[resourceId('Microsoft.Storage/StorageAccounts', parameters('storageAccounts_stgtestjy16888diag_name'))]"
],
"tags": {
"BusinessArea": "Enterprise Architect",
"BusinessCritical": "False",
"Environment": "TestJY",
"OutofHourShutdown": "False",
"Project": "Terraform JY Test Subcription"
},
"properties": {
"hardwareProfile": {
"vmSize": "Standard_D3_v2"
},
"storageProfile": {
"imageReference": {
"publisher": "MicrosoftWindowsServer",
"offer": "WindowsServer",
"sku": "2019-Datacenter",
"version": "latest"
},
"osDisk": {
"osType": "Windows",
"name": "[concat(parameters('virtualMachines_MGMT01_name'), '_OsDisk_1_8d0522a87f5e4b01bd67ae8976420fef')]",
"createOption": "FromImage",
"caching": "ReadWrite",
"writeAcceleratorEnabled": false,
"managedDisk": {
"id": "[resourceId('Microsoft.Compute/disks', concat(parameters('virtualMachines_MGMT01_name'), '_OsDisk_1_8d0522a87f5e4b01bd67ae8976420fef'))]"
},
"deleteOption": "Detach"
},
"dataDisks": []
},
"osProfile": {
"computerName": "[parameters('virtualMachines_MGMT01_name')]",
"adminUsername": "adminuser",
"windowsConfiguration": {
"provisionVMAgent": true,
"enableAutomaticUpdates": true,
"patchSettings": {
"patchMode": "AutomaticByOS",
"assessmentMode": "ImageDefault",
"enableHotpatching": false
},
"winRM": {
"listeners": []
},
"enableVMAgentPlatformUpdates": false
},
"secrets": [],
"allowExtensionOperations": true,
"requireGuestProvisionSignal": true
},
"networkProfile": {
"networkInterfaces": [
{
"id": "[resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaces_nic_MGMT01_name'))]",
"properties": {
"primary": true
}
}
]
},
"diagnosticsProfile": {
"bootDiagnostics": {
"enabled": true,
"storageUri": "[concat('https://', parameters('storageAccounts_stgtestjy16888diag_name'), '.blob.core.windows.net/')]"
}
},
"priority": "Regular",
"extensionsTimeBudget": "PT1H30M"
}
},
{
"type": "Microsoft.Compute/virtualMachines",
"apiVersion": "2022-08-01",
"name": "[parameters('virtualMachines_SQL01_name')]",
"location": "northeurope",
"dependsOn": [
"[resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaces_nic_SQL01_name'))]",
"[resourceId('Microsoft.Storage/StorageAccounts', parameters('storageAccounts_stgtestjy16888diag_name'))]"
],
"tags": {
"BusinessArea": "Enterprise Architect",
"BusinessCritical": "False",
"Environment": "TestJY",
"OutofHourShutdown": "False",
"Project": "Terraform JY Test Subcription"
},
"properties": {
"hardwareProfile": {
"vmSize": "Standard_D3_v2"
},
"storageProfile": {
"imageReference": {
"publisher": "MicrosoftSQLServer",
"offer": "sql2019-ws2019",
"sku": "enterprise",
"version": "latest"
},
"osDisk": {
"osType": "Windows",
"name": "[concat(parameters('virtualMachines_SQL01_name'), '_OsDisk_1_9326fc156e3d480cb13ac5c6b05b71eb')]",
"createOption": "FromImage",
"caching": "ReadWrite",
"writeAcceleratorEnabled": false,
"managedDisk": {
"id": "[resourceId('Microsoft.Compute/disks', concat(parameters('virtualMachines_SQL01_name'), '_OsDisk_1_9326fc156e3d480cb13ac5c6b05b71eb'))]"
},
"deleteOption": "Detach"
},
"dataDisks": [
{
"lun": 11,
"name": "[concat(parameters('virtualMachines_SQL01_name'), '-Disk2')]",
"createOption": "Attach",
"caching": "ReadWrite",
"writeAcceleratorEnabled": false,
"managedDisk": {
"id": "[resourceId('Microsoft.Compute/disks', concat(parameters('virtualMachines_SQL01_name'), '-Disk2'))]"
},
"deleteOption": "Detach",
"toBeDetached": false
},
{
"lun": 10,
"name": "[concat(parameters('virtualMachines_SQL01_name'), '-Disk1')]",
"createOption": "Attach",
"caching": "ReadWrite",
"writeAcceleratorEnabled": false,
"managedDisk": {
"id": "[resourceId('Microsoft.Compute/disks', concat(parameters('virtualMachines_SQL01_name'), '-Disk1'))]"
},
"deleteOption": "Detach",
"toBeDetached": false
}
]
},
"osProfile": {
"computerName": "[parameters('virtualMachines_SQL01_name')]",
"adminUsername": "adminuser",
"windowsConfiguration": {
"provisionVMAgent": true,
"enableAutomaticUpdates": true,
"patchSettings": {
"patchMode": "AutomaticByOS",
"assessmentMode": "ImageDefault",
"enableHotpatching": false
},
"winRM": {
"listeners": []
},
"enableVMAgentPlatformUpdates": false
},
"secrets": [],
"allowExtensionOperations": true,
"requireGuestProvisionSignal": true
},
"networkProfile": {
"networkInterfaces": [
{
"id": "[resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaces_nic_SQL01_name'))]",
"properties": {
"primary": true
}
}
]
},
"diagnosticsProfile": {
"bootDiagnostics": {
"enabled": true,
"storageUri": "[concat('https://', parameters('storageAccounts_stgtestjy16888diag_name'), '.blob.core.windows.net/')]"
}
},
"priority": "Regular",
"extensionsTimeBudget": "PT1H30M"
}
},
{
"type": "Microsoft.Compute/virtualMachines",
"apiVersion": "2022-08-01",
"name": "[parameters('virtualMachines_WEB01_name')]",
"location": "northeurope",
"dependsOn": [
"[resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaces_nic_WEB01_name'))]",
"[resourceId('Microsoft.Storage/StorageAccounts', parameters('storageAccounts_stgtestjy16888diag_name'))]"
],
"tags": {
"BusinessArea": "Enterprise Architect",
"BusinessCritical": "False",
"Environment": "TestJY",
"OutofHourShutdown": "False",
"Project": "Terraform JY Test Subcription"
},
"properties": {
"hardwareProfile": {
"vmSize": "Standard_D3_v2"
},
"storageProfile": {
"imageReference": {
"publisher": "MicrosoftWindowsServer",
"offer": "WindowsServer",
"sku": "2019-Datacenter",
"version": "latest"
},
"osDisk": {
"osType": "Windows",
"name": "[concat(parameters('virtualMachines_WEB01_name'), '_OsDisk_1_ef654b864da24fdd834ada03bdcd8d69')]",
"createOption": "FromImage",
"caching": "ReadWrite",
"writeAcceleratorEnabled": false,
"managedDisk": {
"id": "[resourceId('Microsoft.Compute/disks', concat(parameters('virtualMachines_WEB01_name'), '_OsDisk_1_ef654b864da24fdd834ada03bdcd8d69'))]"
},
"deleteOption": "Detach"
},
"dataDisks": []
},
"osProfile": {
"computerName": "[parameters('virtualMachines_WEB01_name')]",
"adminUsername": "adminuser",
"windowsConfiguration": {
"provisionVMAgent": true,
"enableAutomaticUpdates": true,
"patchSettings": {
"patchMode": "AutomaticByOS",
"assessmentMode": "ImageDefault",
"enableHotpatching": false
},
"winRM": {
"listeners": []
},
"enableVMAgentPlatformUpdates": false
},
"secrets": [],
"allowExtensionOperations": true,
"requireGuestProvisionSignal": true
},
"networkProfile": {
"networkInterfaces": [
{
"id": "[resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaces_nic_WEB01_name'))]",
"properties": {
"primary": true
}
}
]
},
"diagnosticsProfile": {
"bootDiagnostics": {
"enabled": true,
"storageUri": "[concat('https://', parameters('storageAccounts_stgtestjy16888diag_name'), '.blob.core.windows.net/')]"
}
},
"priority": "Regular",
"extensionsTimeBudget": "PT1H30M"
}
},
{
"type": "Microsoft.Compute/virtualMachines/extensions",
"apiVersion": "2022-08-01",
"name": "[concat(parameters('virtualMachines_MGMT01_name'), '/InitialBuild')]",
"location": "northeurope",
"dependsOn": [
"[resourceId('Microsoft.Compute/virtualMachines', parameters('virtualMachines_MGMT01_name'))]",
"[resourceId('Microsoft.Storage/StorageAccounts', parameters('storageAccounts_stgtestjy16888guest_name'))]"
],
"properties": {
"autoUpgradeMinorVersion": false,
"publisher": "Microsoft.Compute",
"type": "CustomScriptExtension",
"typeHandlerVersion": "1.10",
"settings": {
"commandToExecute": "powershell.exe -ExecutionPolicy Unrestricted -file MGMT01.ps1",
"fileUris": [
"[concat('https://', parameters('storageAccounts_stgtestjy16888guest_name'), '.blob.core.windows.net/scripts/MGMT01.ps1')]"
]
},
"protectedSettings": {}
}
},
{
"type": "Microsoft.Compute/virtualMachines/extensions",
"apiVersion": "2022-08-01",
"name": "[concat(parameters('virtualMachines_SQL01_name'), '/InitialBuild')]",
"location": "northeurope",
"dependsOn": [
"[resourceId('Microsoft.Compute/virtualMachines', parameters('virtualMachines_SQL01_name'))]",
"[resourceId('Microsoft.Storage/StorageAccounts', parameters('storageAccounts_stgtestjy16888guest_name'))]"
],
"properties": {
"autoUpgradeMinorVersion": false,
"publisher": "Microsoft.Compute",
"type": "CustomScriptExtension",
"typeHandlerVersion": "1.10",
"settings": {
"commandToExecute": "powershell.exe -ExecutionPolicy Unrestricted -file SQL01.ps1",
"fileUris": [
"[concat('https://', parameters('storageAccounts_stgtestjy16888guest_name'), '.blob.core.windows.net/scripts/SQL01.ps1')]"
]
},
"protectedSettings": {}
}
},
{
"type": "Microsoft.Compute/virtualMachines/extensions",
"apiVersion": "2022-08-01",
"name": "[concat(parameters('virtualMachines_WEB01_name'), '/InitialBuild')]",
"location": "northeurope",
"dependsOn": [
"[resourceId('Microsoft.Compute/virtualMachines', parameters('virtualMachines_WEB01_name'))]",
"[resourceId('Microsoft.Storage/StorageAccounts', parameters('storageAccounts_stgtestjy16888guest_name'))]"
],
"properties": {
"autoUpgradeMinorVersion": false,
"publisher": "Microsoft.Compute",
"type": "CustomScriptExtension",
"typeHandlerVersion": "1.10",
"settings": {
"commandToExecute": "powershell.exe -ExecutionPolicy Unrestricted -file WEB01.ps1",
"fileUris": [
"[concat('https://', parameters('storageAccounts_stgtestjy16888guest_name'), '.blob.core.windows.net/scripts/WEB01.ps1')]"
]
},
"protectedSettings": {}
}
},
{
"type": "Microsoft.Network/virtualNetworks/subnets",
"apiVersion": "2022-05-01",
"name": "[concat(parameters('virtualNetworks_vnet_testjy_name'), '/database')]",
"dependsOn": [
"[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworks_vnet_testjy_name'))]",
"[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroups_nsg_database_name'))]"
],
"properties": {
"addressPrefix": "10.4.2.0/24",
"networkSecurityGroup": {
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroups_nsg_database_name'))]"
},
"serviceEndpoints": [],
"delegations": [],
"privateEndpointNetworkPolicies": "Enabled",
"privateLinkServiceNetworkPolicies": "Enabled"
}
},
{
"type": "Microsoft.Network/virtualNetworks/subnets",
"apiVersion": "2022-05-01",
"name": "[concat(parameters('virtualNetworks_vnet_testjy_name'), '/management')]",
"dependsOn": [
"[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworks_vnet_testjy_name'))]",
"[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroups_nsg_management_name'))]"
],
"properties": {
"addressPrefix": "10.4.3.0/24",
"networkSecurityGroup": {
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroups_nsg_management_name'))]"
},
"serviceEndpoints": [],
"delegations": [],
"privateEndpointNetworkPolicies": "Enabled",
"privateLinkServiceNetworkPolicies": "Enabled"
}
},
{
"type": "Microsoft.Network/virtualNetworks/subnets",
"apiVersion": "2022-05-01",
"name": "[concat(parameters('virtualNetworks_vnet_testjy_name'), '/web')]",
"dependsOn": [
"[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworks_vnet_testjy_name'))]",
"[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroups_nsg_web_name'))]"
],
"properties": {
"addressPrefix": "10.4.1.0/24",
"networkSecurityGroup": {
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroups_nsg_web_name'))]"
},
"serviceEndpoints": [],
"delegations": [],
"privateEndpointNetworkPolicies": "Enabled",
"privateLinkServiceNetworkPolicies": "Enabled"
}
},