Hi!
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 = var.testResGroup.name
network_interface_ids = [var.network_interface.id]
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.
packages:
- nginx
- httpd
- haproxy
- git
package_update: true
runcmd:
- git clone -b current --single-branch https://github.com/vyos/vyos-build
Yet nothing happens when the vm is created.
Please what am I doing wrong?