Unable to install Custom extension on Azure linux VM
Khandu Shinde
110
Reputation points
Hi All
I am running a script inside Azure virtual machine extension in Linux virtual machine. Currently this script's parameters length become more than 256 kb. I have checked blog on custom script extension on github which shows this length becomes limitation. To avoid this, it gives one option to use gzip as per below
My question is: How to use gzip below script which is creating on the fly inside below resource?
resource "azurerm_virtual_machine_extension" "linux-vm-setup" {
depends_on = [
virtual_machine_id = azurerm_linux_virtual_machine.cicd-vm.id
name = "setup-vm"
publisher = "Microsoft.Azure.Extensions"
type = "CustomScript"
type_handler_version = "2.0"
protected_settings = jsonencode({
script = base64encode(<<SCRIPT
#!/bin/bash
set -e
SCRIPT
)
})
}
Sign in to answer