azurerm_dev_test_schedule

Manages automated startup and shutdown schedules for Azure Dev Test Lab.

Example Usage

resource "azurerm_resource_group" "example" {
  name     = "example-resources"
  location = "West Europe"
}

resource "azurerm_dev_test_lab" "example" {
  name                = "YourDevTestLab"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name
}

resource "azurerm_dev_test_schedule" "example" {
  name                = "LabVmAutoStart"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name
  lab_name            = azurerm_dev_test_lab.example.name
  status              = "Enabled"

  weekly_recurrence {
    time      = "1100"
    week_days = ["Monday", "Tuesday"]
  }

  time_zone_id = "Pacific Standard Time"
  task_type    = "LabVmsStartupTask"

  notification_settings {
  }

  tags = {
    environment = "Production"
  }
}

Argument Reference

The following arguments are supported:


A weekly_recurrence block supports the following:


A daily_recurrence block supports the following:


A hourly_recurrence block supports the following:


A notification_settings block supports the following:

Attributes Reference

In addition to the Arguments listed above - the following Attributes are exported:

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

Import

DevTest Schedule's can be imported using the resource id, e.g.

terraform import azurerm_dev_test_schedule.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.DevTestLab/labs/myDevTestLab/schedules/labvmautostart