Added two Azure ML quickstart templates

This commit is contained in:
Dennis Eikelenboom
2021-08-05 14:52:54 -07:00
parent cefacf9966
commit 5e52a3836b
7 changed files with 317 additions and 0 deletions

View File

@ -0,0 +1,11 @@
provider "azurerm" {
version = "~>2.0"
features {}
}
data "azurerm_client_config" "current" {}
resource "azurerm_resource_group" "default" {
name = "${var.name}-${var.environment}-rgp"
location = "${var.location}"
}

View File

@ -0,0 +1,17 @@
variable "name" {
type = string
description = "Name of the deployment"
default = "azureml999"
}
variable "environment" {
type = string
description = "Name of the environment"
default = "dev"
}
variable "location" {
type = string
description = "Location of the resources"
default = "East US"
}

View File

@ -0,0 +1,57 @@
# Dependent resources for Azure Machine Learning
resource "azurerm_application_insights" "default" {
name = "${var.name}-${var.environment}-ain"
location = azurerm_resource_group.default.location
resource_group_name = azurerm_resource_group.default.name
application_type = "web"
}
resource "azurerm_key_vault" "default" {
name = "${var.name}${var.environment}kv"
location = azurerm_resource_group.default.location
resource_group_name = azurerm_resource_group.default.name
tenant_id = data.azurerm_client_config.current.tenant_id
sku_name = "premium"
purge_protection_enabled = false
network_acls {
default_action = "Deny"
bypass = "AzureServices"
}
}
resource "azurerm_storage_account" "default" {
name = "${var.name}${var.environment}sa"
location = azurerm_resource_group.default.location
resource_group_name = azurerm_resource_group.default.name
account_tier = "Standard"
account_replication_type = "GRS"
network_rules {
default_action = "Deny"
bypass = ["AzureServices"]
}
}
resource "azurerm_container_registry" "default" {
name = "${var.name}${var.environment}cr"
location = azurerm_resource_group.default.location
resource_group_name = azurerm_resource_group.default.name
sku = "Premium"
admin_enabled = true
}
# Machine Learning workspace
resource "azurerm_machine_learning_workspace" "default" {
name = "${var.name}-${var.environment}-aml"
location = azurerm_resource_group.default.location
resource_group_name = azurerm_resource_group.default.name
application_insights_id = azurerm_application_insights.default.id
key_vault_id = azurerm_key_vault.default.id
storage_account_id = azurerm_storage_account.default.id
container_registry_id = azurerm_container_registry.default.id
identity {
type = "SystemAssigned"
}
}