Added Compute Instance and Compute Cluster Resources

This commit is contained in:
David Apolinar 2021-09-16 11:49:49 -04:00
parent 22055a70a0
commit 0c5c67244a
2 changed files with 30 additions and 1 deletions

View File

@ -4,7 +4,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "=2.56.0"
version = "=2.76.0"
}
}
}

View File

@ -50,4 +50,33 @@ resource "azurerm_machine_learning_workspace" "default" {
identity {
type = "SystemAssigned"
}
}
# Compite Instance
resource "azurerm_machine_learning_compute_instance" "compute_instance" {
name = "default-instance"
location = azurerm_resource_group.default.location
machine_learning_workspace_id = azurerm_machine_learning_workspace.default.id
virtual_machine_size = "STANDARD_DS2_V2"
}
# Compute Cluster
resource "azurerm_machine_learning_compute_cluster" "compute" {
name = "default-compute"
location = azurerm_resource_group.default.location
machine_learning_workspace_id = azurerm_machine_learning_workspace.default.id
vm_priority = "Dedicated"
vm_size = "STANDARD_DS2_V2"
identity {
type = "SystemAssigned"
}
scale_settings {
min_node_count = 0
max_node_count = 3
scale_down_nodes_after_idle_duration = "PT5M" # 30 seconds
}
}