57 lines
2.1 KiB
HCL
57 lines
2.1 KiB
HCL
# 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"
|
|
}
|
|
} |