<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Associate multiple disks in azure vm using terraform in VM-Series in the Public Cloud</title>
    <link>https://live.paloaltonetworks.com/t5/vm-series-in-the-public-cloud/associate-multiple-disks-in-azure-vm-using-terraform/m-p/366636#M1067</link>
    <description>&lt;P&gt;I am trying to create multiple vms and managed disk to associate after creation. I could see the disks are created and getting associated only for the first VM in the list. I am not sure how to assign the right index number in the below code.&lt;/P&gt;&lt;P&gt;I believe Virtual_Machine_id is creating this issue, has any one came across the similar, please advice.&lt;/P&gt;&lt;PRE&gt;'''resource “azurerm_managed_disk” “app_managed_disk” {

  count = “${length(var.data_disk_names)}”

  name = “ var.apphostname−{var.data_disk_names[count.index %length(var.data_disk_names)]}”

  location = azurerm_resource_group.poc_rg.location

  resource_group_name = azurerm_resource_group.poc_rg.name

  storage_account_type = var.app_disk_type

  create_option = “Empty”

  disk_size_gb = “${var.data_disk_sizes[count.index % length(var.data_disk_sizes)]}”

}

resource “azurerm_virtual_machine_data_disk_attachment” “app_disk_attach” {

  count = “${length(var.data_disk_names)}”

  vm_count = length(var.vm_app_name)

  managed_disk_id = “${azurerm_managed_disk.app_managed_disk[count.index % length(azurerm_managed_disk.app_managed_disk)].id}”

  virtual_machine_id = azurerm_linux_virtual_machine.app-vm-pas[0].id

  lun = “${count.index + 1}”

  caching = “ReadWrite”

}&lt;BR /&gt;'''&lt;/PRE&gt;</description>
    <pubDate>Tue, 01 Dec 2020 21:58:55 GMT</pubDate>
    <dc:creator>janapb_devops</dc:creator>
    <dc:date>2020-12-01T21:58:55Z</dc:date>
    <item>
      <title>Associate multiple disks in azure vm using terraform</title>
      <link>https://live.paloaltonetworks.com/t5/vm-series-in-the-public-cloud/associate-multiple-disks-in-azure-vm-using-terraform/m-p/366636#M1067</link>
      <description>&lt;P&gt;I am trying to create multiple vms and managed disk to associate after creation. I could see the disks are created and getting associated only for the first VM in the list. I am not sure how to assign the right index number in the below code.&lt;/P&gt;&lt;P&gt;I believe Virtual_Machine_id is creating this issue, has any one came across the similar, please advice.&lt;/P&gt;&lt;PRE&gt;'''resource “azurerm_managed_disk” “app_managed_disk” {

  count = “${length(var.data_disk_names)}”

  name = “ var.apphostname−{var.data_disk_names[count.index %length(var.data_disk_names)]}”

  location = azurerm_resource_group.poc_rg.location

  resource_group_name = azurerm_resource_group.poc_rg.name

  storage_account_type = var.app_disk_type

  create_option = “Empty”

  disk_size_gb = “${var.data_disk_sizes[count.index % length(var.data_disk_sizes)]}”

}

resource “azurerm_virtual_machine_data_disk_attachment” “app_disk_attach” {

  count = “${length(var.data_disk_names)}”

  vm_count = length(var.vm_app_name)

  managed_disk_id = “${azurerm_managed_disk.app_managed_disk[count.index % length(azurerm_managed_disk.app_managed_disk)].id}”

  virtual_machine_id = azurerm_linux_virtual_machine.app-vm-pas[0].id

  lun = “${count.index + 1}”

  caching = “ReadWrite”

}&lt;BR /&gt;'''&lt;/PRE&gt;</description>
      <pubDate>Tue, 01 Dec 2020 21:58:55 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/vm-series-in-the-public-cloud/associate-multiple-disks-in-azure-vm-using-terraform/m-p/366636#M1067</guid>
      <dc:creator>janapb_devops</dc:creator>
      <dc:date>2020-12-01T21:58:55Z</dc:date>
    </item>
  </channel>
</rss>

