Added two Azure ML quickstart templates
This commit is contained in:
11
quickstart/101-machine-learning/main.tf
Normal file
11
quickstart/101-machine-learning/main.tf
Normal 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}"
|
||||
}
|
17
quickstart/101-machine-learning/variables.tf
Normal file
17
quickstart/101-machine-learning/variables.tf
Normal 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"
|
||||
}
|
57
quickstart/101-machine-learning/workspace.tf
Normal file
57
quickstart/101-machine-learning/workspace.tf
Normal 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"
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user