From dc3d0dd5ed9227e97cefbd83dbba4643ad70e98e Mon Sep 17 00:00:00 2001 From: Arnaud Lheureux Date: Mon, 21 Sep 2020 11:43:01 +0800 Subject: [PATCH] Revert "Fixed issue executing AIRS launchpad" (#18) --- azure_aml.tf | 21 ----- .../scenario/100/configuration.tfvars | 2 +- modules/analytics/azure_aml/main.tf | 14 ---- modules/analytics/azure_aml/output.tf | 4 - modules/analytics/azure_aml/variables.tf | 12 --- modules/analytics/azure_aml/workspace.tf | 84 ------------------- modules/analytics/synapse/workspace.tf | 6 +- 7 files changed, 4 insertions(+), 139 deletions(-) delete mode 100644 azure_aml.tf delete mode 100644 modules/analytics/azure_aml/main.tf delete mode 100644 modules/analytics/azure_aml/output.tf delete mode 100644 modules/analytics/azure_aml/variables.tf delete mode 100644 modules/analytics/azure_aml/workspace.tf diff --git a/azure_aml.tf b/azure_aml.tf deleted file mode 100644 index f91e1c705d..0000000000 --- a/azure_aml.tf +++ /dev/null @@ -1,21 +0,0 @@ -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 -} diff --git a/landingzones/caf_launchpad/scenario/100/configuration.tfvars b/landingzones/caf_launchpad/scenario/100/configuration.tfvars index f2dabd3ded..ff23618f32 100755 --- a/landingzones/caf_launchpad/scenario/100/configuration.tfvars +++ b/landingzones/caf_launchpad/scenario/100/configuration.tfvars @@ -134,4 +134,4 @@ role_mapping = { } } } -} +} \ No newline at end of file diff --git a/modules/analytics/azure_aml/main.tf b/modules/analytics/azure_aml/main.tf deleted file mode 100644 index 90bb2ba1fa..0000000000 --- a/modules/analytics/azure_aml/main.tf +++ /dev/null @@ -1,14 +0,0 @@ -locals { - module_tag = { - "module" = basename(abspath(path.module)) - } - # tags = merge(try(each.value.tags, {}), local.module_tag) -} - -terraform { - required_providers { - azurecaf = { - source = "aztfmod/azurecaf" - } - } -} diff --git a/modules/analytics/azure_aml/output.tf b/modules/analytics/azure_aml/output.tf deleted file mode 100644 index 64ca57a529..0000000000 --- a/modules/analytics/azure_aml/output.tf +++ /dev/null @@ -1,4 +0,0 @@ -output id { - value = azurerm_machine_learning_workspace.ws.id - sensitive = true -} diff --git a/modules/analytics/azure_aml/variables.tf b/modules/analytics/azure_aml/variables.tf deleted file mode 100644 index 936b78bd96..0000000000 --- a/modules/analytics/azure_aml/variables.tf +++ /dev/null @@ -1,12 +0,0 @@ -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 {} */ - diff --git a/modules/analytics/azure_aml/workspace.tf b/modules/analytics/azure_aml/workspace.tf deleted file mode 100644 index 7f32e95fff..0000000000 --- a/modules/analytics/azure_aml/workspace.tf +++ /dev/null @@ -1,84 +0,0 @@ -# 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" -} */ - - diff --git a/modules/analytics/synapse/workspace.tf b/modules/analytics/synapse/workspace.tf index 17a9a7a901..4a32688898 100644 --- a/modules/analytics/synapse/workspace.tf +++ b/modules/analytics/synapse/workspace.tf @@ -1,7 +1,7 @@ # naming convention resource "azurecaf_name" "wp" { name = var.settings.name - resource_type = "azurerm_synapse_workspace" + resource_type = "azurerm_machine_learning_workspace" prefixes = [var.global_settings.prefix] random_length = var.global_settings.random_length clean_input = true @@ -9,7 +9,7 @@ resource "azurecaf_name" "wp" { } # synapse workspace -resource "azurerm_synapse_workspace" "ws" { +resource "azurerm_synapse_workspace" "wp" { name = azurecaf_name.wp.result resource_group_name = var.resource_group_name location = var.location @@ -67,4 +67,4 @@ resource "azurerm_key_vault_secret" "synapse_rg_name" { name = format("%s-synapse-resource-group-name", azurerm_synapse_workspace.wp.name) value = var.resource_group_name key_vault_id = var.keyvault_id -} +} \ No newline at end of file