Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix uninstall error with mlflow #3082

Merged
merged 3 commits into from
Jan 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ BUG FIXES:
* Fix get shared service by template name to filter by active service only ([#2947](https://github.com/microsoft/AzureTRE/pull/2947))
* Fix untagged cost reporting reader role assignment ([#2951](https://github.com/microsoft/AzureTRE/pull/2951))
* Remove Guacamole's firewall rule on uninstall ([#2958](https://github.com/microsoft/AzureTRE/pull/2958))
* Fix KeyVault purge error on MLFlow uninstall ([#3082](https://github.com/microsoft/AzureTRE/pull/3082))

COMPONENTS:

Expand Down
2 changes: 1 addition & 1 deletion templates/workspace_services/mlflow/porter.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
schemaVersion: 1.0.0
name: tre-service-mlflow
version: 0.6.0
version: 0.6.1
description: "An Azure TRE service for MLflow machine learning lifecycle"
dockerfile: Dockerfile.tmpl
registry: azuretre
Expand Down
35 changes: 19 additions & 16 deletions templates/workspace_services/mlflow/terraform/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 16 additions & 3 deletions templates/workspace_services/mlflow/terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "=2.97.0"
version = "=3.39.1"
}
random = {
source = "hashicorp/random"
Expand All @@ -23,7 +23,20 @@ terraform {
}

provider "azurerm" {
features {}
features {
key_vault {
# Don't purge on destroy (this would fail due to purge protection being enabled on keyvault)
purge_soft_delete_on_destroy = false
purge_soft_deleted_secrets_on_destroy = false
purge_soft_deleted_certificates_on_destroy = false
purge_soft_deleted_keys_on_destroy = false
# When recreating an environment, recover any previously soft deleted secrets - set to true by default
recover_soft_deleted_key_vaults = true
recover_soft_deleted_secrets = true
recover_soft_deleted_certificates = true
recover_soft_deleted_keys = true
}
}
}

data "azurerm_resource_group" "ws" {
Expand Down Expand Up @@ -52,7 +65,7 @@ data "azurerm_key_vault" "ws" {
resource_group_name = data.azurerm_resource_group.ws.name
}

data "azurerm_app_service_plan" "workspace" {
data "azurerm_service_plan" "workspace" {
name = "plan-${var.workspace_id}"
resource_group_name = data.azurerm_resource_group.ws.name
}
Expand Down
4 changes: 2 additions & 2 deletions templates/workspace_services/mlflow/terraform/web_app.tf
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ resource "azurerm_app_service" "mlflow" {
name = local.webapp_name
location = data.azurerm_resource_group.ws.location
resource_group_name = data.azurerm_resource_group.ws.name
app_service_plan_id = data.azurerm_app_service_plan.workspace.id
app_service_plan_id = data.azurerm_service_plan.workspace.id
https_only = true
tags = local.tre_workspace_service_tags

Expand Down Expand Up @@ -107,7 +107,7 @@ resource "azurerm_monitor_diagnostic_setting" "mlflow" {
log_analytics_workspace_id = data.azurerm_log_analytics_workspace.tre.id

dynamic "log" {
for_each = data.azurerm_monitor_diagnostic_categories.mlflow.logs
for_each = data.azurerm_monitor_diagnostic_categories.mlflow.log_category_types
content {
category = log.value
enabled = contains(local.web_app_diagnostic_categories_enabled, log.value) ? true : false
Expand Down