Skip to content

Instantly share code, notes, and snippets.

@artisticcheese
Created August 31, 2024 18:37
Show Gist options
  • Save artisticcheese/3456c4f431310e1845ef94b948350cd1 to your computer and use it in GitHub Desktop.
Save artisticcheese/3456c4f431310e1845ef94b948350cd1 to your computer and use it in GitHub Desktop.
resource "azapi_resource_action" "stop-vm" {
count = var.rdsh_count
type = "Microsoft.Compute/virtualMachines@2024-03-01"
resource_id = azurerm_windows_virtual_machine.avd_vm.*.id[count.index]
action = "deallocate"
response_export_values = ["*"]
depends_on = [
azurerm_virtual_machine_extension.boot_strap
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment