Skip to content

Instantly share code, notes, and snippets.

@imartinflores
Created June 30, 2023 14:50
Show Gist options
  • Save imartinflores/a5b4cc28c6c0e779e16cac44ef24966c to your computer and use it in GitHub Desktop.
Save imartinflores/a5b4cc28c6c0e779e16cac44ef24966c to your computer and use it in GitHub Desktop.
resource "azurerm_virtual_machine_extension" "vmExtension" {
name = "hostname"
virtual_machine_id = azurerm_linux_virtual_machine.yourvmname.id
publisher = "Microsoft.Azure.Extensions"
type = "CustomScript"
type_handler_version = "2.0"
settings = <<SETTINGS
{
"commandToExecute": "curl -fsSL https://get.docker.com -o get-docker.sh && sudo sh get-docker.sh"
}
SETTINGS
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment