-
Notifications
You must be signed in to change notification settings - Fork 708
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from aztfmod/RS-analytics
Fixed issue executing AIRS launchpad
- Loading branch information
Showing
7 changed files
with
139 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
module aml_workspaces { | ||
source = "./modules/analytics/azure_aml" | ||
for_each = local.database.aml_workspaces | ||
|
||
location = lookup(each.value, "region", null) == null ? module.resource_groups[each.value.resource_group_key].location : local.global_settings.regions[each.value.region] | ||
resource_group_name = module.resource_groups[each.value.resource_group_key].name | ||
global_settings = local.global_settings | ||
settings = each.value | ||
virtual_network_id = lookup(each.value.custom_parameters, "vnet_key") == null ? null : module.networking[each.value.custom_parameters.vnet_key].id | ||
public_subnet_name = lookup(each.value.custom_parameters, "vnet_key") == null ? null : module.networking[each.value.custom_parameters.vnet_key].subnets[each.value.custom_parameters.public_subnet_key].name | ||
private_subnet_name = lookup(each.value.custom_parameters, "vnet_key") == null ? null : module.networking[each.value.custom_parameters.vnet_key].subnets[each.value.custom_parameters.private_subnet_key].name | ||
|
||
storage_account_id = module.storage_accounts[each.value.data_lake_filesystem.storage_account_key].data_lake_filesystems[each.value.data_lake_filesystem.container_key].id | ||
keyvault_id = try(each.value.sql_administrator_login_password, null) == null ? module.keyvaults[each.value.keyvault_key].id : null | ||
application_insights_id = lookup(each.value.custom_parameters, "app_insights") == null ? null : module.terraform-azurerm-caf-appinsights[each.value.custom_parameters.vnet_key].subnets[each.value.custom_parameters.private_subnet_key].name | ||
} | ||
|
||
output databricks_workspaces { | ||
value = module.databricks_workspaces | ||
sensitive = true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -134,4 +134,4 @@ role_mapping = { | |
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
locals { | ||
module_tag = { | ||
"module" = basename(abspath(path.module)) | ||
} | ||
# tags = merge(try(each.value.tags, {}), local.module_tag) | ||
} | ||
|
||
terraform { | ||
required_providers { | ||
azurecaf = { | ||
source = "aztfmod/azurecaf" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
output id { | ||
value = azurerm_machine_learning_workspace.ws.id | ||
sensitive = true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
variable settings {} | ||
variable global_settings {} | ||
variable location {} | ||
variable resource_group_name {} | ||
variable keyvault_id {} | ||
variable storage_account_id {} | ||
variable application_insights_id {} | ||
|
||
/* variable virtual_network_id {} | ||
variable private_subnet_name {} | ||
variable public_subnet_name {} */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
# naming convention | ||
resource "azurecaf_name" "wp" { | ||
name = var.settings.application_insight_name | ||
prefix = [var.global_settings.prefix] | ||
resource_type = "azurerm_machine_learning_workspace" | ||
random_length = var.global_settings.random_length | ||
clean_input = true | ||
passthrough = var.global_settings.passthrough | ||
} | ||
|
||
# ML Workspace | ||
resource "azurerm_machine_learning_workspace" "ws" { | ||
name = azurecaf_name.wp.result | ||
location = var.location | ||
resource_group_name = var.resource_group_name | ||
application_insights_id = var.application_insights_id | ||
key_vault_id = var.keyvault_id | ||
storage_account_id = var.storage_account_id | ||
tags = try(var.settings.tags, null) | ||
sku = try(var.settings.sku, "basic") | ||
|
||
identity { | ||
type = "SystemAssigned" | ||
} | ||
} | ||
|
||
|
||
#------------------------ | ||
|
||
/* resource "azurecaf_name" "apin" { | ||
name = var.settings.application_insight_name | ||
prefix = [var.global_settings.prefix] | ||
resource_type = "azurerm_application_insight" | ||
random_length = var.global_settings.random_length | ||
clean_input = true | ||
convention = var.global_settings.passthrough | ||
} */ | ||
|
||
/* resource "azurerm_resource_group" "rg_dap_aml" { | ||
name = azurecaf_naming_convention.nc_aml_rg.result | ||
location = var.location | ||
} */ | ||
|
||
/* | ||
module "aml_storage" { | ||
source = "../module_azure_storage" | ||
prefix = var.prefix | ||
convention = var.convention | ||
resource_group_name = azurerm_resource_group.rg_dap_aml.name | ||
location = var.location | ||
storage_account_config = var.aml_config.storage_account | ||
subnet_ids = var.subnet_ids | ||
} | ||
# Insight ID for ML Workspace | ||
resource "azurerm_application_insights" "ml_workspace_insight" { | ||
name = azurecaf_naming_convention.nc_aml_appinsight.result | ||
location = azurerm_resource_group.rg_dap_aml.location | ||
resource_group_name = azurerm_resource_group.rg_dap_aml.name | ||
application_type = "web" | ||
depends_on = [azurerm_resource_group.rg_dap_aml] | ||
} | ||
*/ | ||
|
||
/* # Keyvault for ML Workspace | ||
module "caf-keyvault" { | ||
source = "github.com/aztfmod/terraform-azurerm-caf-keyvault?ref=vnext" | ||
# source = "aztfmod/caf-keyvault/azurerm" | ||
# version = "2.0.2" | ||
prefix = var.prefix | ||
location = var.location | ||
resource_group_name = azurerm_resource_group.rg_dap_aml.name | ||
akv_config = var.akv_config | ||
tags = var.tags | ||
diagnostics_settings = var.akv_config.diagnostics | ||
diagnostics_map = var.diagnostics_map | ||
log_analytics_workspace = var.log_analytics_workspace | ||
convention = "passthrough" | ||
} */ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters