Skip to content

Instantly share code, notes, and snippets.

@jesseloudon
Created November 9, 2020 23:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jesseloudon/5b2de9e73b218950a91a37bc4c19b1f9 to your computer and use it in GitHub Desktop.
Save jesseloudon/5b2de9e73b218950a91a37bc4c19b1f9 to your computer and use it in GitHub Desktop.
ansible on azure part 2
variable "vmShutdownTime" {
type = string
description = "virtual machine daily shutdown time"
default = "1900"
}
variable "vmShutdownTimeZone" {
type = string
description = "virtual machine daily shutdown time zone"
default = "AUS Eastern Standard Time"
}
resource "azurerm_dev_test_global_vm_shutdown_schedule" "vm1" {
virtual_machine_id = azurerm_linux_virtual_machine.vm1.id
location = azurerm_resource_group.rg1.location
enabled = true
daily_recurrence_time = var.vmShutdownTime
timezone = var.vmShutdownTimeZone
notification_settings {
enabled = false
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment