Cloud-init not running on azurerm virtual machine creation


  template = "${file("${path.module}/cloud-init.yaml")}"

data "template_cloudinit_config" "config" {
  gzip = true
  base64_encode = true

  part {
    filename = "init.cfg"
    content_type = "text/cloud-config"
    content = "${data.template_file.cloud_config.rendered}"

# Create virtual machine
resource "azurerm_linux_virtual_machine" "test_vm" {
  name = "debian10-0"
  location = var.location
  resource_group_name =
  network_interface_ids = []
  size = "Standard_DS1_v2"
  custom_data = data.template_cloudinit_config.config.rendered

Hi all. Been trying to understand why my cloud-init isnt applied. terraform is happy with it, everything validates and runs.
My cloud-init file is a basic file that install packages (including git), and tries to runcmd a git clone command.

  - nginx
  - httpd
  - haproxy
  - git 
package_update: true
  - git clone -b current --single-branch

Yet nothing happens when the vm is created.

Please what am I doing wrong?