Manages a Lab Service Plan.
resource "azurerm_resource_group" "example" {
name = "example-resources"
location = "West Europe"
}
resource "azurerm_lab_service_plan" "example" {
name = "example-lp"
resource_group_name = azurerm_resource_group.example.name
location = azurerm_resource_group.example.location
allowed_regions = [azurerm_resource_group.example.location]
}
The following arguments are supported:
name
- (Required) The name of the Lab Service Plan. Changing this forces a new resource to be created.
resource_group_name
- (Required) The name of the Resource Group where the Lab Service Plan should exist. Changing this forces a new resource to be created.
location
- (Required) The Azure Region where the Lab Service Plan should exist. Changing this forces a new resource to be created.
allowed_regions
- (Required) The allowed regions for the lab creator to use when creating labs using this Lab Service Plan. The allowed region's count must be between 1
and 28
.
default_auto_shutdown
- (Optional) A default_auto_shutdown
block as defined below.
default_connection
- (Optional) A default_connection
block as defined below.
default_network_subnet_id
- (Optional) The resource ID of the Subnet for the Lab Service Plan network profile.
shared_gallery_id
- (Optional) The resource ID of the Shared Image Gallery attached to this Lab Service Plan. When saving a lab template virtual machine image it will be persisted in this gallery. The shared images from the gallery can be made available to use when creating new labs.
support
- (Optional) A support
block as defined below.
tags
- (Optional) A mapping of tags which should be assigned to the Lab Service Plan.
A default_auto_shutdown
block supports the following:
disconnect_delay
- (Optional) The amount of time a VM will stay running after a user disconnects if this behavior is enabled. This value must be formatted as an ISO 8601 string.
idle_delay
- (Optional) The amount of time a VM will idle before it is shutdown if this behavior is enabled. This value must be formatted as an ISO 8601 string.
no_connect_delay
- (Optional) The amount of time a VM will stay running before it is shutdown if no connection is made and this behavior is enabled. This value must be formatted as an ISO 8601 string.
shutdown_on_idle
- (Optional) Will a VM get shutdown when it has idled for a period of time? Possible values are LowUsage
and UserAbsence
.
A default_connection
block supports the following:
client_rdp_access
- (Optional) The enabled access level for Client Access over RDP. Possible values are Private
and Public
.client_ssh_access
- (Optional) The enabled access level for Client Access over SSH. Possible values are Private
and Public
.web_rdp_access
- (Optional) The enabled access level for Web Access over RDP. Possible values are Private
and Public
.web_ssh_access
- (Optional) The enabled access level for Web Access over SSH. Possible values are Private
and Public
.A support
block supports the following:
email
- (Optional) The email address for the support contact.
instructions
- (Optional) The instructions for users of the Lab Service Plan.
phone
- (Optional) The phone number for the support contact.
url
- (Optional) The web address for users of the Lab Service Plan.
In addition to the Arguments listed above - the following Attributes are exported:
id
- The ID of the Lab Service Plan.The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 30 minutes) Used when creating the Lab Service Plan.read
- (Defaults to 5 minutes) Used when retrieving the Lab Service Plan.update
- (Defaults to 30 minutes) Used when updating the Lab Service Plan.delete
- (Defaults to 30 minutes) Used when deleting the Lab Service Plan.Lab Service Plans can be imported using the resource id
, e.g.
terraform import azurerm_lab_service_plan.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.LabServices/labPlans/labPlan1