Azure Dev Test Global Vm Shutdown Schedule

This page shows how to write Terraform for Dev Test Global Vm Shutdown Schedule and write them securely.

azurerm_dev_test_global_vm_shutdown_schedule (Terraform)

The Global Vm Shutdown Schedule in Dev Test can be configured in Terraform with the resource name azurerm_dev_test_global_vm_shutdown_schedule. The following sections describe 10 examples of how to use the resource and its parameters.

Example Usage from GitHub

vm_shutdown_schedule.tf#L1
resource "azurerm_dev_test_global_vm_shutdown_schedule" "shutdown-pa" {

  count = var.pa_scale

  virtual_machine_id = module.PA[count.index].azurerm_virtual_machine_id
  location           = var.location
jumpbox-vm.tf#L38
resource "azurerm_dev_test_global_vm_shutdown_schedule" "jumpbox_01_shutdown_schedule" {
  virtual_machine_id = azurerm_windows_virtual_machine.jumpbox_01.id
  location           = azurerm_resource_group.region_01.location
  enabled            = true

  daily_recurrence_time = "1700"
vm-k3s.tf#L58
resource "azurerm_dev_test_global_vm_shutdown_schedule" "k3s-server1-vm-schedule" {
  virtual_machine_id = azurerm_linux_virtual_machine.vm-k3s-server1.id
  location           = azurerm_resource_group.tf-k3s.location
  enabled            = true

  daily_recurrence_time = "1900"
wvdhost.tf#L50
resource "azurerm_dev_test_global_vm_shutdown_schedule" "wvdhost" {
  location              = var.vm.location
  virtual_machine_id    = azurerm_windows_virtual_machine.wvdhost.id
  enabled               = true
  daily_recurrence_time = "2200"
  timezone              = "Tokyo Standard Time"
vm.tf#L43
resource "azurerm_dev_test_global_vm_shutdown_schedule" "shutdown_vm01" {
  virtual_machine_id = azurerm_windows_virtual_machine.vm01.id
  provider = azurerm.sub
  location = "canadaCentral"
  enabled = true
  daily_recurrence_time = "1700"
vm_spoke.tf#L49
resource "azurerm_dev_test_global_vm_shutdown_schedule" "example" {
  virtual_machine_id = azurerm_linux_virtual_machine.example.id
  location           = azurerm_resource_group.poc-vnet.location
  enabled            = true

  daily_recurrence_time = "1700"
jumphost.tf#L79
resource "azurerm_dev_test_global_vm_shutdown_schedule" "jumphost_schedule" {
  virtual_machine_id = azurerm_virtual_machine.jumphost.id
  location           = azurerm_resource_group.syn_rg.location
  enabled            = true

  daily_recurrence_time = "2000"
spoke.tf#L244
resource "azurerm_dev_test_global_vm_shutdown_schedule" "spoke-1-vm" {
  virtual_machine_id = azurerm_windows_virtual_machine.spoke-1-vm.id
  location              = var.location
  enabled            = true

  daily_recurrence_time = "2200"
jumphost.tf#L79
resource "azurerm_dev_test_global_vm_shutdown_schedule" "jumphost_schedule" {
  virtual_machine_id = azurerm_virtual_machine.jumphost.id
  location           = azurerm_resource_group.syn_rg.location
  enabled            = true

  daily_recurrence_time = "2000"
vm.tf#L43
resource "azurerm_dev_test_global_vm_shutdown_schedule" "shutdown_vm01" {
  virtual_machine_id = azurerm_windows_virtual_machine.vm01.id
  provider = azurerm.sub
  location = "canadaCentral"
  enabled = true
  daily_recurrence_time = "1700"

Review your Terraform file for Azure best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

Explanation in Terraform Registry

Manages automated shutdown schedules for Azure VMs that are not within an Azure DevTest Lab. While this is part of the DevTest Labs service in Azure, this resource applies only to standard VMs, not DevTest Lab VMs. To manage automated shutdown schedules for DevTest Lab VMs, reference the azurerm_dev_test_schedule resource

Azure Resource Manager Example

Azure Resource Manager code does not have the related resource.

Frequently asked questions

What is Azure Dev Test Global Vm Shutdown Schedule?

Azure Dev Test Global Vm Shutdown Schedule is a resource for Dev Test of Microsoft Azure. Settings can be wrote in Terraform.

Where can I find the example code for the Azure Dev Test Global Vm Shutdown Schedule?

For Terraform, the myers-dev/NVA_connections, ardacetinkaya/terraform-azure-vm-scale-set and mgugger/terraform source code examples are useful. See the Terraform Example section for further details.

security-icon

Automate config file reviews on your commits

Fix issues in your infrastructure as code with auto-generated patches.