Skip to content

Instantly share code, notes, and snippets.

@imartinflores
Last active June 30, 2023 14:48
Show Gist options
  • Save imartinflores/542c21cc1664f7c4d63b0f71d17d0b90 to your computer and use it in GitHub Desktop.
Save imartinflores/542c21cc1664f7c4d63b0f71d17d0b90 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