title: custom_data parameter is not triggered in terraform script
body: <p>I am creating virtual machine in azure using terraform in which i am passing custom data parameter which should actually trigger a yaml file which does few installations. But it's not being triggered. Could you please advise on this issue.<code>enter code here</code></p>
  
  <h1>Controller VM</h1>
  
  <pre><code>resource "azurerm_virtual_machine" "controller-vm" {
  name                  = "controller-vm"`enter code here`
  location              = var.region
  
  resource_group_name   = azurerm_resource_group.resourcegroup.name
  network_interface_ids = [azurerm_network_interface.controllernic.id]
  vm_size               = var.ctr_instance_type
  
  storage_os_disk {
      name              = "controller-os-disk"
      caching           = "ReadWrite"
      create_option     = "FromImage"
      disk_size_gb      = "400"
      managed_disk_type = "Standard_LRS"
  }
  
  storage_data_disk {
      name              = "controller-data-disk0"
      caching           = "ReadWrite"
      create_option     = "Empty"
      managed_disk_type = "Standard_LRS"
      disk_size_gb      = "512"
      lun               = 1
  }
  
  storage_data_disk {
      name              = "controller-data-disk1"
      caching           = "ReadWrite"
      create_option     = "Empty"
      managed_disk_type = "Standard_LRS"
      disk_size_gb      = "512"
      lun               = 2
  }
  
  storage_image_reference {
      publisher = "OpenLogic"
      offer     = "CentOS-CI"
      sku       = "7-CI"
      version   = "latest"
  }
  
  os_profile {
      computer_name  = "controller.${var.project_id}.local"
      admin_username = var.user
      custom_data = file(pathexpand(var.ctr_cloud_init_file))
  }
  
  os_profile_linux_config {
      disable_password_authentication = true
      ssh_keys {
          path     = "/home/${var.user}/.ssh/authorized_keys"
          key_data = file(pathexpand(var.ssh_pub_key_path))
      }
  }
  
  boot_diagnostics {
      enabled     = "true"
      storage_uri = azurerm_storage_account.storageaccount.primary_blob_endpoint
  }
  
  tags = {
      environment = var.project_id,
      user = var.user
  }
  
  }
  </code></pre>
  
  <p>The above code has a custom_data = file(pathexpand(var.ctr_cloud_init_file)) which should actually call the yaml file. which is not happened here.</p>
  
  <p>Please find the yaml file i am using. ctr_cloud_init_file</p>
  
  <pre><code>users:
  - name: bluedata
    groups: [sudo, wheel]
    shell: /bin/bash
    sudo: ['ALL=(ALL) NOPASSWD:ALL']
    ssh-authorized-keys: 
    ### SSH Public Key Here
    - ssh-rsa ...
  
  package_upgrade: true
  packages: 
    - epel-release
    - firewalld
  repo_update: true
  repo_upgrade: all
  </code></pre>