diff --git a/src/matcha_ml/config/matcha_config.py b/src/matcha_ml/config/matcha_config.py index e2340b18..1a522917 100644 --- a/src/matcha_ml/config/matcha_config.py +++ b/src/matcha_ml/config/matcha_config.py @@ -178,7 +178,7 @@ def read_matcha_config() -> MatchaConfig: @staticmethod def config_file_exists() -> bool: - """A convencience function which checks for the existence of the matcha.config.json file. + """A convenience function which checks for the existence of the matcha.config.json file. Returns: True if the matcha.config.json file exists, False otherwise. diff --git a/src/matcha_ml/infrastructure/default/.terraform.lock.hcl b/src/matcha_ml/infrastructure/default/.terraform.lock.hcl index ecf35119..ad7fa748 100644 --- a/src/matcha_ml/infrastructure/default/.terraform.lock.hcl +++ b/src/matcha_ml/infrastructure/default/.terraform.lock.hcl @@ -5,6 +5,7 @@ provider "registry.terraform.io/gavinbunney/kubectl" { version = "1.14.0" constraints = "1.14.0" hashes = [ + "h1:ItrWfCZMzM2JmvDncihBMalNLutsAk7kyyxVRaipftY=", "h1:gLFn+RvP37sVzp9qnFCwngRjjFV649r6apjxvJ1E/SE=", "h1:mX2AOFIMIxJmW5kM8DT51gloIOKCr9iT6W8yodnUyfs=", "zh:0350f3122ff711984bbc36f6093c1fe19043173fad5a904bce27f86afe3cc858", @@ -20,63 +21,61 @@ provider "registry.terraform.io/gavinbunney/kubectl" { } provider "registry.terraform.io/hashicorp/azurerm" { - version = "3.48.0" - constraints = ">= 3.16.0, 3.48.0" + version = "4.38.0" + constraints = "4.38.0" hashes = [ - "h1:5sGcXKelc4o4MnPZfKKs9pd8w969TtlCV+0IZvW58Cs=", - "h1:RSUCtxgd6hD9J11YZGOA4yffeu5P8YmQnP5SRNl6+d8=", - "zh:01bd328009f2803ebc18ac27535e7d1548c735bb5bd02460e471acc835e5dd19", - "zh:070b0bdd5ff27232eec7ef9128fc9bd17e6bdae503ddcc450c944449f3a8d216", - "zh:0a0a0e81f7ab8757aa83876fffbc57328843664900923d8b3c577e7596884726", - "zh:30994e6988c92d90a71b88bff0bbc4fa8f3b48034d18eb068bd5281888304579", - "zh:54dfdbae2bf79f8104ae73e5c6cd94a69d1e6de4345322f6c8eb6affb04a66c5", - "zh:55ba99b32346237435d7212b3f2521952ee67934dd5ee942a51642357b0ad4fc", - "zh:881bc29857511f7eedc3d359a0f2dcca6b526a48f6d54887cafdb25647abd1fd", - "zh:892bfa34b95b6b4b2ced24dc2989edf512b193bd9e5cf121ae47bb9d9e6d0b94", - "zh:c7d2c778b0f251990874ee859b9093fbb4beb9b3968858137da6c5167c797ea9", - "zh:db558aa70b163af44a73fcb1306d0e4dcafcafe585bedb90ef69f063fa9766a3", - "zh:e0ae252b7bea560e05fde09fe632f012430fb91ff9063fce560d997ecdb1cf75", + "h1:3qU09xZbQCBFgJup7QHtocQJM0vQ/g1A5LMixfPVCLI=", + "zh:302ff9a5979f4752c5aa0efe2ff146c46e14507dfe89c1ebed4ae8473c31cf3a", + "zh:61e25c2540a6a9bd23a48b672434d846fa78c5bcfaaa2fe2d79f952312d3fc0e", + "zh:65b37fe8fe2ce61f644442bb6db86de3c2b480e2aa30717993c0903b75a1e628", + "zh:89d73e2068c817b9a0d1229c527a5f47669fcbbb5d0fe960c3af2067b3c8b1ec", + "zh:8c3b8acb29cbbba21bde996ddccd5fb446e3c02d11295c2bdec392e3a7fc14df", + "zh:962dae94f6e5627acaadf5bff44e84566b57f2fc3f487c1c48513b6b7c671a37", + "zh:acdf79635ff290965be04ddcd33e9a3c726414d4ca688a6277f353bb476c2017", + "zh:b17bd777dff575ca686a04f2912bdf8fedaa0ba034506bd55b8afe25980468bd", + "zh:d2384123e7a297dc4e3ae44e6a91fd485ffc296569cc38089e71dde33fb706ef", + "zh:e0d37ba5895976b496aa6b4428b0351f1e990b7379ccaaa1497ab9752d18db12", "zh:f569b65999264a9416862bca5cd2a6177d94ccb0424f3a4ef424428912b9cb3c", + "zh:f851bf26d95293515dbf475d38e7c8082e17a77765cbc6103a99426204912153", ] } provider "registry.terraform.io/hashicorp/external" { - version = "2.3.1" + version = "2.3.5" hashes = [ - "h1:9rJggijNdRdFk//ViQPGZdK0xu9XU/9qBDijNsZJMg0=", - "h1:bROCw6g5D/3fFnWeJ01L4IrdnJl1ILU8DGDgXCtYzaY=", - "zh:001e2886dc81fc98cf17cf34c0d53cb2dae1e869464792576e11b0f34ee92f54", - "zh:2eeac58dd75b1abdf91945ac4284c9ccb2bfb17fa9bdb5f5d408148ff553b3ee", - "zh:2fc39079ba61411a737df2908942e6970cb67ed2f4fb19090cd44ce2082903dd", - "zh:472a71c624952cff7aa98a7b967f6c7bb53153dbd2b8f356ceb286e6743bb4e2", - "zh:4cff06d31272aac8bc35e9b7faec42cf4554cbcbae1092eaab6ab7f643c215d9", + "h1:FnUk98MI5nOh3VJ16cHf8mchQLewLfN1qZG/MqNgPrI=", + "zh:6e89509d056091266532fa64de8c06950010498adf9070bf6ff85bc485a82562", "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", - "zh:7ed16ccd2049fa089616b98c0bd57219f407958f318f3c697843e2397ddf70df", - "zh:842696362c92bf2645eb85c739410fd51376be6c488733efae44f4ce688da50e", - "zh:8985129f2eccfd7f1841ce06f3bf2bbede6352ec9e9f926fbaa6b1a05313b326", - "zh:a5f0602d8ec991a5411ef42f872aa90f6347e93886ce67905c53cfea37278e05", - "zh:bf4ab82cbe5256dcef16949973bf6aa1a98c2c73a98d6a44ee7bc40809d002b8", - "zh:e70770be62aa70198fa899526d671643ff99eecf265bf1a50e798fc3480bd417", + "zh:86868aec05b58dc0aa1904646a2c26b9367d69b890c9ad70c33c0d3aa7b1485a", + "zh:a2ce38fda83a62fa5fb5a70e6ca8453b168575feb3459fa39803f6f40bd42154", + "zh:a6c72798f4a9a36d1d1433c0372006cc9b904e8cfd60a2ae03ac5b7d2abd2398", + "zh:a8a3141d2fc71c86bf7f3c13b0b3be8a1b0f0144a47572a15af4dfafc051e28a", + "zh:aa20a1242eb97445ad26ebcfb9babf2cd675bdb81cac5f989268ebefa4ef278c", + "zh:b58a22445fb8804e933dcf835ab06c29a0f33148dce61316814783ee7f4e4332", + "zh:cb5626a661ee761e0576defb2a2d75230a3244799d380864f3089c66e99d0dcc", + "zh:d1acb00d20445f682c4e705c965e5220530209c95609194c2dc39324f3d4fcce", + "zh:d91a254ba77b69a29d8eae8ed0e9367cbf0ea6ac1a85b58e190f8cb096a40871", + "zh:f6592327673c9f85cdb6f20336faef240abae7621b834f189c4a62276ea5db41", ] } provider "registry.terraform.io/hashicorp/helm" { - version = "2.0.3" - constraints = "~> 2.0.1" + version = "3.0.2" + constraints = "3.0.2" hashes = [ - "h1:FRSVqY+1/AUO/j/lVxHHsLudfSA9gDc7Dsu+YxcJSEY=", - "h1:eUr4dHyxlcLmLja0wBgJC7t5bfHzbtACyuumKPuDrGs=", - "zh:154e0aa489e474e2eeb3de94be7666133faf6fd950712a640425b2bf3a81ee95", - "zh:16a2be6c4b61d0c5205c63816148c7ab0c8f56a75c05e8d897fa4d5cac0c029a", - "zh:189e47bc723f8c29bcfe2c1638d43b8148f614ea86e642f4b50b2acb4b760224", - "zh:3763901d3630213002cb8c70bb24c628cd29738ff6591585250ea8636264abd6", - "zh:4822f85e4700ea049384523d98de0ef7d83549844b13e94bbd544cec05557a9a", - "zh:62c5b87b09e0051bab0b712e3ad465fd53e66f9619dbe76ee23519d1087d8a05", - "zh:a0a6a842b11190dd1841e98bbb74961074e7ffb95984be5cc392df9f532d803e", - "zh:beac4e6806e77447e1018f3404a5fbf782d20d82a0d9b4a31e9bfc7d2bbecab6", - "zh:e1bbaa09bf4f4a91ec7606f84d2e0200a02e7b24d045e8b5daebd87d7a75b7ce", - "zh:ed1e05c50212d4f57435ccdd68cfb98d8395927c316df76d1dd6509566d3aeaa", - "zh:fdc687e16a964bb652ddb670f6832fdead25235eca551796cfed70ec07d94931", + "h1:tOye2RnjFNXH236AsqGaIWtz4j6PZrpPuJhOSBt0KxU=", + "zh:2778de76c7dfb2e85c75fe6de3c11172a25551ed499bfb9e9f940a5be81167b0", + "zh:3b4c436a41e4fbae5f152852a9bd5c97db4460af384e26977477a40adf036690", + "zh:617a372f5bb2288f3faf5fd4c878a68bf08541cf418a3dbb8a19bc41ad4a0bf2", + "zh:84de431479548c96cb61c495278e320f361e80ab4f8835a5425ece24a9b6d310", + "zh:8b4cf5f81d10214e5e1857d96cff60a382a22b9caded7f5d7a92e5537fc166c1", + "zh:baeb26a00ffbcf3d507cdd940b2a2887eee723af5d3319a53eec69048d5e341e", + "zh:ca05a8814e9bf5fbffcd642df3a8d9fae9549776c7057ceae6d6f56471bae80f", + "zh:ca4bf3f94dedb5c5b1a73568f2dad7daf0ef3f85e688bc8bc2d0e915ec148366", + "zh:d331f2129fd3165c4bda875c84a65555b22eb007801522b9e017d065ac69b67e", + "zh:e583b2b478dde67da28e605ab4ef6521c2e390299b471d7d8ef05a0b608dcdad", + "zh:f238b86611647c108c073d265f8891a2738d3158c247468ae0ff5b1a3ac4122a", + "zh:f569b65999264a9416862bca5cd2a6177d94ccb0424f3a4ef424428912b9cb3c", ] } @@ -85,6 +84,7 @@ provider "registry.terraform.io/hashicorp/kubernetes" { constraints = "~> 2.11.0" hashes = [ "h1:T65SZhN/tQgsAsHe/G5PCgpjofi+aTKPZ+nZg6WOJpc=", + "h1:lSh/Q5vX73hHL80TtGn2Vrv1UYLzlIRjC+xaCijY4ew=", "h1:pJiAJwZKUaoAJ4x+3ONJkwEVkjrwGROCGFgj7noPO58=", "zh:143a19dd0ea3b07fc5e3d9231f3c2d01f92894385c98a67327de74c76c715843", "zh:1fc757d209e09c3cf7848e4274daa32408c07743698fbed10ee52a4a479b62b6", @@ -107,6 +107,7 @@ provider "registry.terraform.io/hashicorp/local" { hashes = [ "h1:EYZdckuGU3n6APs97nS2LxZm3dDtGqyM4qaIvsmac8o=", "h1:KfieWtVyGWwplSoLIB5usKAUnrIkDQBkWaR5TI+4WYg=", + "h1:PaQTpxHMbZB9XV+c1od1eaUvndQle3ZZHx79hrI6C3k=", "zh:0f1ec65101fa35050978d483d6e8916664b7556800348456ff3d09454ac1eae2", "zh:36e42ac19f5d68467aacf07e6adcf83c7486f2e5b5f4339e9671f68525fc87ab", "zh:6db9db2a1819e77b1642ec3b5e95042b202aee8151a0256d289f2e141bf3ceb3", @@ -127,6 +128,7 @@ provider "registry.terraform.io/hashicorp/null" { hashes = [ "h1:FbGfc+muBsC17Ohy5g806iuI1hQc4SIexpYCrQHQd8w=", "h1:tSj1mL6OQ8ILGqR2mDu7OYYYWf+hoir0pf9KAQ8IzO8=", + "h1:ydA0/SNRVB1o95btfshvYsmxA+jZFRZcvKzZSB+4S1M=", "zh:58ed64389620cc7b82f01332e27723856422820cfd302e304b5f6c3436fb9840", "zh:62a5cc82c3b2ddef7ef3a6f2fedb7b9b3deff4ab7b414938b08e51d6e8be87cb", "zh:63cff4de03af983175a7e37e52d4bd89d990be256b16b5c7f919aff5ad485aa5", @@ -146,6 +148,7 @@ provider "registry.terraform.io/hashicorp/random" { version = "3.1.0" constraints = "3.1.0" hashes = [ + "h1:9cCiLO/Cqr6IUvMDSApCkQItooiYNatZpEXmcu0nnng=", "h1:BZMEPucF+pbu9gsPk0G0BHx7YP04+tKdq2MrRDF1EDM=", "h1:rKYu5ZUbXwrLG1w81k7H3nce/Ys6yAxXhWcbtk36HjY=", "zh:2bbb3339f0643b5daa07480ef4397bd23a79963cc364cdfbb4e86354cb7725bc", @@ -168,6 +171,7 @@ provider "registry.terraform.io/loafoe/htpasswd" { hashes = [ "h1:/OCwJ2uB9PfESHNn4bDwdHnMOp8x5D/aNvvUl8XNFA4=", "h1:v/EZlkxlFBRlLIK2rmgbksuhbxOwenP3TQvreUhCAtE=", + "h1:x/DYIv7KMXJLgO5zIYMeue7JhcludBK8PxTZ7Wb8XWs=", "zh:1f17ffcb8ab2f19de1242a6980f78334fc81efeaddfa85545435048f54045e4a", "zh:6265fd9bbb718d55655120044b4969c80aa938ecfb17a0fd7541ff7de8c54e1e", "zh:79b7a6e3260b084530f6bdaba13536843fa55fc28569965a69cbdcb5d5c208a5", diff --git a/src/matcha_ml/infrastructure/default/aks/main.tf b/src/matcha_ml/infrastructure/default/aks/main.tf index 262c24c6..302ad47c 100644 --- a/src/matcha_ml/infrastructure/default/aks/main.tf +++ b/src/matcha_ml/infrastructure/default/aks/main.tf @@ -8,9 +8,9 @@ resource "azurerm_kubernetes_cluster" "main" { name = "default" vm_size = "Standard_DS3_v2" - enable_auto_scaling = true - max_count = 3 - min_count = 1 + max_count = 3 + min_count = 1 + auto_scaling_enabled = true } identity { diff --git a/src/matcha_ml/infrastructure/default/aks/output.tf b/src/matcha_ml/infrastructure/default/aks/output.tf index de131e60..e5169282 100644 --- a/src/matcha_ml/infrastructure/default/aks/output.tf +++ b/src/matcha_ml/infrastructure/default/aks/output.tf @@ -1,46 +1,46 @@ output "kube_config" { description = "Raw Kubernetes configuration for the created cluster" - value = azurerm_kubernetes_cluster.main.kube_config_raw - sensitive = true + value = azurerm_kubernetes_cluster.main.kube_config_raw + sensitive = true } output "client_key" { description = "Client key for accessing the Kubernetes cluster" - value = azurerm_kubernetes_cluster.main.kube_config.0.client_key + value = azurerm_kubernetes_cluster.main.kube_config.0.client_key } output "client_certificate" { description = "Client certificate for accessing the Kubernetes cluster" - value = azurerm_kubernetes_cluster.main.kube_config.0.client_certificate - sensitive = true + value = azurerm_kubernetes_cluster.main.kube_config.0.client_certificate + sensitive = true } output "cluster_ca_certificate" { description = "Cluster CA certificate for the Kubernetes cluster" - value = azurerm_kubernetes_cluster.main.kube_config.0.cluster_ca_certificate + value = azurerm_kubernetes_cluster.main.kube_config.0.cluster_ca_certificate } output "host" { description = "Host address for the Kubernetes cluster" - value = azurerm_kubernetes_cluster.main.kube_config.0.host + value = azurerm_kubernetes_cluster.main.kube_config.0.host } output "aks_cluster_id" { description = "ID of the created Kubernetes cluster" - value = azurerm_kubernetes_cluster.main.id + value = azurerm_kubernetes_cluster.main.id } output "aks_cluster_name" { description = "Name of the created Kubernetes cluster" - value = azurerm_kubernetes_cluster.main.name + value = azurerm_kubernetes_cluster.main.name } output "aks_principal_id" { description = "Principal ID for the Kubernetes cluster" - value = azurerm_kubernetes_cluster.main.identity[0].principal_id + value = azurerm_kubernetes_cluster.main.identity[0].principal_id } output "aks_object_id" { description = "Object ID for the Kubernetes cluster" - value = azurerm_kubernetes_cluster.main.kubelet_identity[0].object_id + value = azurerm_kubernetes_cluster.main.kubelet_identity[0].object_id } diff --git a/src/matcha_ml/infrastructure/default/azure_container_registry/output.tf b/src/matcha_ml/infrastructure/default/azure_container_registry/output.tf index a2069133..32fbdc06 100644 --- a/src/matcha_ml/infrastructure/default/azure_container_registry/output.tf +++ b/src/matcha_ml/infrastructure/default/azure_container_registry/output.tf @@ -1,10 +1,10 @@ # output for container registry output "container_registry_url" { description = "The URL used to log into the container registry" - value = azurerm_container_registry.main.login_server + value = azurerm_container_registry.main.login_server } output "container_registry_name" { description = "The name of the container registry" - value = azurerm_container_registry.main.name + value = azurerm_container_registry.main.name } diff --git a/src/matcha_ml/infrastructure/default/data_version_control_storage/main.tf b/src/matcha_ml/infrastructure/default/data_version_control_storage/main.tf index 72b26b18..85812048 100644 --- a/src/matcha_ml/infrastructure/default/data_version_control_storage/main.tf +++ b/src/matcha_ml/infrastructure/default/data_version_control_storage/main.tf @@ -9,7 +9,6 @@ resource "azurerm_storage_account" "storageaccount" { account_tier = "Standard" account_kind = "StorageV2" account_replication_type = "LRS" - enable_https_traffic_only = true access_tier = "Hot" allow_nested_items_to_be_public = true } @@ -17,6 +16,6 @@ resource "azurerm_storage_account" "storageaccount" { # create a storage container inside created storage account resource "azurerm_storage_container" "storagecontainer" { name = "${var.prefix}dvcstore" - storage_account_name = azurerm_storage_account.storageaccount.name + storage_account_id = azurerm_storage_account.storageaccount.id container_access_type = "container" } diff --git a/src/matcha_ml/infrastructure/default/data_version_control_storage/output.tf b/src/matcha_ml/infrastructure/default/data_version_control_storage/output.tf index 45a5f5ce..427ec741 100644 --- a/src/matcha_ml/infrastructure/default/data_version_control_storage/output.tf +++ b/src/matcha_ml/infrastructure/default/data_version_control_storage/output.tf @@ -1,6 +1,6 @@ output "storage_container_name" { description = "The name of the Azure Storage Container." - value = azurerm_storage_container.storagecontainer.name + value = azurerm_storage_container.storagecontainer.name } output "storage_account_name" { diff --git a/src/matcha_ml/infrastructure/default/data_version_control_storage/providers.tf b/src/matcha_ml/infrastructure/default/data_version_control_storage/providers.tf index e2d7507d..d8f6dc6b 100644 --- a/src/matcha_ml/infrastructure/default/data_version_control_storage/providers.tf +++ b/src/matcha_ml/infrastructure/default/data_version_control_storage/providers.tf @@ -2,7 +2,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "3.48.0" + version = "4.38.0" } } } diff --git a/src/matcha_ml/infrastructure/default/helm.tf b/src/matcha_ml/infrastructure/default/helm.tf index dac70cd9..d449f706 100644 --- a/src/matcha_ml/infrastructure/default/helm.tf +++ b/src/matcha_ml/infrastructure/default/helm.tf @@ -1,5 +1,5 @@ provider "helm" { - kubernetes { + kubernetes = { host = module.aks.host client_certificate = base64decode(module.aks.client_certificate) diff --git a/src/matcha_ml/infrastructure/default/main.tf b/src/matcha_ml/infrastructure/default/main.tf index 55d761e7..d91cef9e 100644 --- a/src/matcha_ml/infrastructure/default/main.tf +++ b/src/matcha_ml/infrastructure/default/main.tf @@ -9,7 +9,7 @@ provider "azurerm" { module "resource_group" { source = "./resource_group" - prefix = var.prefix + prefix = var.prefix } module "storage" { diff --git a/src/matcha_ml/infrastructure/default/mlflow_module/main.tf b/src/matcha_ml/infrastructure/default/mlflow_module/main.tf index eb97dfaa..644c6430 100644 --- a/src/matcha_ml/infrastructure/default/mlflow_module/main.tf +++ b/src/matcha_ml/infrastructure/default/mlflow_module/main.tf @@ -5,40 +5,42 @@ resource "helm_release" "mlflow_tracking" { name = "mlflow-tracking" repository = "https://community-charts.github.io/helm-charts" chart = "mlflow" + version = "1.3.2" # Change type from "ClusterIP" to "LoadBalancer" - set { - name = "service.type" - value = "LoadBalancer" - } - # set proxied access to artifact storage - set { - name = "artifactRoot.proxiedArtifactStorage" - value = var.artifact_proxied_access - type = "auto" - } - - # Derived from ZenML's stack recipes; source: https://github.com/zenml-io/mlops-stacks/blob/8eb06596bf836d3a3dd2634fbc7f2b5687421811/aws-minimal/mlflow-module/mlflow.tf#L39 - # set values for Azure Blob Storage - set { - name = "artifactRoot.azureBlob.enabled" - value = var.artifact_azure - type = "auto" - } - set { - name = "artifactRoot.azureBlob.storageAccount" - value = var.storage_account_name - type = "string" - } - set { - name = "artifactRoot.azureBlob.container" - value = var.storage_container_name - type = "string" - } - set_sensitive { - name = "artifactRoot.azureBlob.accessKey" - value = var.artifact_azure_access_key - type = "string" - } + set = [ + { + name = "service.type" + value = "LoadBalancer" + }, + # set proxied access to artifact storage + { + name = "artifactRoot.proxiedArtifactStorage" + value = var.artifact_proxied_access + type = "auto" + }, + # Derived from ZenML's stack recipes; source: https://github.com/zenml-io/mlops-stacks/blob/8eb06596bf836d3a3dd2634fbc7f2b5687421811/aws-minimal/mlflow-module/mlflow.tf#L39 + # set values for Azure Blob Storage + { + name = "artifactRoot.azureBlob.enabled" + value = var.artifact_azure + type = "auto" + }, + { + name = "artifactRoot.azureBlob.storageAccount" + value = var.storage_account_name + type = "string" + }, + { + name = "artifactRoot.azureBlob.container" + value = var.storage_container_name + type = "string" + }, + { + name = "artifactRoot.azureBlob.accessKey" + value = var.artifact_azure_access_key + type = "string" + }, + ] } diff --git a/src/matcha_ml/infrastructure/default/mlflow_module/output.tf b/src/matcha_ml/infrastructure/default/mlflow_module/output.tf index d73628a7..cf22f385 100644 --- a/src/matcha_ml/infrastructure/default/mlflow_module/output.tf +++ b/src/matcha_ml/infrastructure/default/mlflow_module/output.tf @@ -1,4 +1,4 @@ output "mlflow_tracking_url" { description = "The tracking URL for MLFlow dashboard" - value = "http://${data.kubernetes_service.mlflow_tracking.status.0.load_balancer.0.ingress.0.ip}:${data.kubernetes_service.mlflow_tracking.spec.0.port.0.port}" + value = "http://${data.kubernetes_service.mlflow_tracking.status.0.load_balancer.0.ingress.0.ip}:${data.kubernetes_service.mlflow_tracking.spec.0.port.0.port}" } diff --git a/src/matcha_ml/infrastructure/default/output.tf b/src/matcha_ml/infrastructure/default/output.tf index f62fd806..88e93175 100644 --- a/src/matcha_ml/infrastructure/default/output.tf +++ b/src/matcha_ml/infrastructure/default/output.tf @@ -64,31 +64,31 @@ output "model_deployer_seldon_base_url" { output "cloud_azure_resource_group_name" { description = "Name of the Azure resource group" - value = module.resource_group.name + value = module.resource_group.name } -output "cloud_azure_prefix"{ +output "cloud_azure_prefix" { description = "The Azure resource group name prefix" - value = var.prefix + value = var.prefix } -output "cloud_azure_location"{ - description = "The Azure location in which the resources are provisioned" - value = var.location +output "cloud_azure_location" { + description = "The Azure location in which the resources are provisioned" + value = var.location } -output "data_version_control_primary_connection_string"{ +output "data_version_control_primary_connection_string" { description = "The primary connection string for the ZenML Azure Storage Account" - value = module.data_version_control_storage.primary_connection_string - sensitive = true + value = module.data_version_control_storage.primary_connection_string + sensitive = true } -output "data_version_control_storage_container_name"{ +output "data_version_control_storage_container_name" { description = "The name of the container used for data version control" - value = module.data_version_control_storage.storage_container_name + value = module.data_version_control_storage.storage_container_name } -output "data_version_control_storage_account_name"{ +output "data_version_control_storage_account_name" { description = "The name of the storage account for data version control" - value = module.data_version_control_storage.storage_account_name + value = module.data_version_control_storage.storage_account_name } diff --git a/src/matcha_ml/infrastructure/default/providers.tf b/src/matcha_ml/infrastructure/default/providers.tf index b3876b23..9723ed9d 100644 --- a/src/matcha_ml/infrastructure/default/providers.tf +++ b/src/matcha_ml/infrastructure/default/providers.tf @@ -3,7 +3,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = ">=3.16.0" + version = "4.38.0" } random = { @@ -13,7 +13,7 @@ terraform { helm = { source = "hashicorp/helm" - version = "~> 2.0.1" + version = "3.0.2" } local = { diff --git a/src/matcha_ml/infrastructure/default/resource_group/main.tf b/src/matcha_ml/infrastructure/default/resource_group/main.tf index 6afb0a9e..be0a0818 100644 --- a/src/matcha_ml/infrastructure/default/resource_group/main.tf +++ b/src/matcha_ml/infrastructure/default/resource_group/main.tf @@ -1,3 +1,3 @@ data "azurerm_resource_group" "main" { - name = "${var.prefix}-resources" + name = "${var.prefix}-resources" } diff --git a/src/matcha_ml/infrastructure/default/resource_group/output.tf b/src/matcha_ml/infrastructure/default/resource_group/output.tf index 55f05726..f1b918d5 100644 --- a/src/matcha_ml/infrastructure/default/resource_group/output.tf +++ b/src/matcha_ml/infrastructure/default/resource_group/output.tf @@ -1,4 +1,4 @@ output "name" { description = "Name of the resource group" - value = data.azurerm_resource_group.main.name + value = data.azurerm_resource_group.main.name } diff --git a/src/matcha_ml/infrastructure/default/seldon/istio.tf b/src/matcha_ml/infrastructure/default/seldon/istio.tf index 7c4d9a9a..5f336e84 100644 --- a/src/matcha_ml/infrastructure/default/seldon/istio.tf +++ b/src/matcha_ml/infrastructure/default/seldon/istio.tf @@ -15,6 +15,7 @@ resource "helm_release" "istio_base" { name = "istio-base-seldon" repository = "https://istio-release.storage.googleapis.com/charts" chart = "base" + version = "1.26.3" # adding a dependency on the istio-namespace namespace = kubernetes_namespace.istio_ns.metadata[0].name @@ -25,6 +26,7 @@ resource "helm_release" "istiod" { name = "istiod-seldon" repository = helm_release.istio_base.repository # dependency on istio-base chart = "istiod" + version = "1.26.3" namespace = kubernetes_namespace.istio_ns.metadata[0].name } @@ -59,6 +61,7 @@ resource "helm_release" "istio_ingress" { name = "istio-ingressgateway" repository = helm_release.istiod.repository chart = "gateway" + version = "1.26.3" # dependency on istio-ingress-ns namespace = kubernetes_namespace.istio_ns.metadata[0].name diff --git a/src/matcha_ml/infrastructure/default/seldon/main.tf b/src/matcha_ml/infrastructure/default/seldon/main.tf index 5faee277..37cec5cb 100644 --- a/src/matcha_ml/infrastructure/default/seldon/main.tf +++ b/src/matcha_ml/infrastructure/default/seldon/main.tf @@ -13,18 +13,20 @@ resource "helm_release" "seldon" { name = var.seldon_name repository = "https://storage.googleapis.com/seldon-charts" chart = "seldon-core-operator" + version = "1.17.1" # dependency on seldon-ns namespace = kubernetes_namespace.seldon_ns.metadata[0].name - set { - name = "usageMetrics.enabled" - value = "true" - } - - set { - name = "istio.enabled" - value = "true" - } + set = [ + { + name = "usageMetrics.enabled" + value = "true" + }, + { + name = "istio.enabled" + value = "true" + }, + ] } resource "kubernetes_namespace" "seldon_workloads" { diff --git a/src/matcha_ml/infrastructure/default/seldon/outputs.tf b/src/matcha_ml/infrastructure/default/seldon/outputs.tf index 6e434bd1..ccc97a53 100644 --- a/src/matcha_ml/infrastructure/default/seldon/outputs.tf +++ b/src/matcha_ml/infrastructure/default/seldon/outputs.tf @@ -2,15 +2,15 @@ output "ingress_gateway_spec" { description = "The YAML specification for the Istio ingress gateway" - value = kubectl_manifest.gateway.live_manifest_incluster + value = kubectl_manifest.gateway.live_manifest_incluster } output "workloads_namespace" { description = "The namespace for Seldon workloads" - value = kubernetes_namespace.seldon_workloads.metadata[0].name + value = kubernetes_namespace.seldon_workloads.metadata[0].name } output "base_url" { description = "The base URL of the Seldon deployment" - value = data.kubernetes_service.seldon_ingress.status.0.load_balancer.0.ingress.0.ip + value = data.kubernetes_service.seldon_ingress.status.0.load_balancer.0.ingress.0.ip } diff --git a/src/matcha_ml/infrastructure/default/seldon/variables.tf b/src/matcha_ml/infrastructure/default/seldon/variables.tf index 2190b608..9ad2499e 100644 --- a/src/matcha_ml/infrastructure/default/seldon/variables.tf +++ b/src/matcha_ml/infrastructure/default/seldon/variables.tf @@ -6,10 +6,10 @@ # seldon variables variable "seldon_name" { description = "Seldon Helm deployment name" - type = string + type = string } variable "seldon_namespace" { description = "Seldon system namespace" - type = string + type = string } diff --git a/src/matcha_ml/infrastructure/default/storage/main.tf b/src/matcha_ml/infrastructure/default/storage/main.tf index b448a625..f96c1981 100644 --- a/src/matcha_ml/infrastructure/default/storage/main.tf +++ b/src/matcha_ml/infrastructure/default/storage/main.tf @@ -9,7 +9,6 @@ resource "azurerm_storage_account" "storageaccount" { account_tier = "Standard" account_kind = "StorageV2" account_replication_type = "LRS" - enable_https_traffic_only = true access_tier = "Hot" allow_nested_items_to_be_public = true } @@ -17,6 +16,6 @@ resource "azurerm_storage_account" "storageaccount" { # create a storage container inside created storage account resource "azurerm_storage_container" "storagecontainer" { name = "${var.prefix}store" - storage_account_name = azurerm_storage_account.storageaccount.name + storage_account_id = azurerm_storage_account.storageaccount.id container_access_type = "container" } diff --git a/src/matcha_ml/infrastructure/default/storage/output.tf b/src/matcha_ml/infrastructure/default/storage/output.tf index ef9a9916..9d044e0c 100644 --- a/src/matcha_ml/infrastructure/default/storage/output.tf +++ b/src/matcha_ml/infrastructure/default/storage/output.tf @@ -1,6 +1,6 @@ output "storage_container_name" { description = "The name of the Azure Storage Container." - value = azurerm_storage_container.storagecontainer.name + value = azurerm_storage_container.storagecontainer.name } output "blobstorage_container_path" { @@ -10,7 +10,7 @@ output "blobstorage_container_path" { output "storage_account_name" { description = "The name of the Azure Storage Account." - value = azurerm_storage_account.storageaccount.name + value = azurerm_storage_account.storageaccount.name } output "primary_access_key" { diff --git a/src/matcha_ml/infrastructure/default/storage/providers.tf b/src/matcha_ml/infrastructure/default/storage/providers.tf index e2d7507d..d8f6dc6b 100644 --- a/src/matcha_ml/infrastructure/default/storage/providers.tf +++ b/src/matcha_ml/infrastructure/default/storage/providers.tf @@ -2,7 +2,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "3.48.0" + version = "4.38.0" } } } diff --git a/src/matcha_ml/infrastructure/default/zen_server/main.tf b/src/matcha_ml/infrastructure/default/zen_server/main.tf index d4026cac..88cf9d16 100644 --- a/src/matcha_ml/infrastructure/default/zen_server/main.tf +++ b/src/matcha_ml/infrastructure/default/zen_server/main.tf @@ -13,83 +13,54 @@ resource "helm_release" "zen_server" { chart = "${path.module}/zenml_helm" namespace = kubernetes_namespace.zen_server.metadata[0].name - set { - name = "zenml.image.repository" - value = var.zenmlserver_image_repo - } - - set { - name = "zenml.defaultUsername" - value = var.username - } - set { - name = "zenml.defaultPassword" - value = var.password - } - set { - name = "zenml.deploymentType" - value = "azure" - } - set { - name = "zenml.analyticsOptIn" - value = var.analytics_opt_in - } - - # # Ingress set up - # set { - # name = "zenml.rootUrlPath" - # value = var.ingress_path != "" ? "/${var.ingress_path}" : "" - # } - # set { - # name = "zenml.ingress.path" - # value = var.ingress_path != "" ? "/${var.ingress_path}/?(.*)" : "/" - # } - # set { - # name = "zenml.ingress.annotations.nginx\\.ingress\\.kubernetes\\.io/rewrite-target" - # value = var.ingress_path != "" ? "/$1" : "" - # } - # set { - # name = "zenml.ingress.host" - # value = var.create_ingress_controller ? "${data.kubernetes_service.ingress-controller[0].status.0.load_balancer.0.ingress.0.ip}.nip.io" : "${var.ingress_controller_hostname}.nip.io" - # } - # set { - # name = "zenml.ingress.tls.enabled" - # value = var.ingress_tls - # } - # set { - # name = "zenml.ingress.tls.generateCerts" - # value = var.ingress_tls_generate_certs - # } - # set { - # name = "zenml.ingress.tls.secretName" - # value = "${var.prefix}-${var.ingress_tls_secret_name}" - # } + set = [ + { + name = "zenml.image.repository" + value = var.zenmlserver_image_repo + }, + { + name = "zenml.defaultUsername" + value = var.username + }, + { + name = "zenml.defaultPassword" + value = var.password + }, + { + name = "zenml.deploymentType" + value = "azure" + }, + { + name = "zenml.analyticsOptIn" + value = var.analytics_opt_in + }, - # set parameters for the mysql database - set { - name = "zenml.database.url" - value = var.deploy_db ? "mysql://${var.database_username}:${azurerm_mysql_flexible_server.mysql[0].administrator_password}@${azurerm_mysql_flexible_server.mysql[0].name}.mysql.database.azure.com:3306/${var.db_name}" : var.database_url - } - set { - name = "zenml.database.sslCa" - value = var.deploy_db ? "" : var.database_ssl_ca - } - set { - name = "zenml.database.sslCert" - value = var.deploy_db ? "" : var.database_ssl_cert - } - set { - name = "zenml.database.sslKey" - value = var.deploy_db ? "" : var.database_ssl_key - } - set { - name = "zenml.database.sslVerifyServerCert" - value = var.deploy_db ? false : var.database_ssl_verify_server_cert - } - set { - name = "zenml.image.tag" - value = var.zenmlserver_version - } + # set parameters for the mysql database + { + name = "zenml.database.url" + value = var.deploy_db ? "mysql://${var.database_username}:${azurerm_mysql_flexible_server.mysql[0].administrator_password}@${azurerm_mysql_flexible_server.mysql[0].name}.mysql.database.azure.com:3306/${var.db_name}" : var.database_url + }, + { + name = "zenml.database.sslCa" + value = var.deploy_db ? "" : var.database_ssl_ca + }, + { + name = "zenml.database.sslCert" + value = var.deploy_db ? "" : var.database_ssl_cert + }, + { + name = "zenml.database.sslKey" + value = var.deploy_db ? "" : var.database_ssl_key + }, + { + name = "zenml.database.sslVerifyServerCert" + value = var.deploy_db ? false : var.database_ssl_verify_server_cert + }, + { + name = "zenml.image.tag" + value = var.zenmlserver_version + }, + ] depends_on = [ resource.kubernetes_namespace.zen_server ] diff --git a/src/matcha_ml/infrastructure/default/zen_server/outputs.tf b/src/matcha_ml/infrastructure/default/zen_server/outputs.tf index 8d986559..647fd2be 100644 --- a/src/matcha_ml/infrastructure/default/zen_server/outputs.tf +++ b/src/matcha_ml/infrastructure/default/zen_server/outputs.tf @@ -1,17 +1,17 @@ output "zenserver_url" { description = "The URL for the ZenML server" - value = "http://${data.kubernetes_service.zen_server.status.0.load_balancer.0.ingress.0.ip}" + value = "http://${data.kubernetes_service.zen_server.status.0.load_balancer.0.ingress.0.ip}" } output "zenserver_username" { description = "The username used to access the ZenML server" - value = var.username + value = var.username } output "zenserver_password" { description = "The password used to access the ZenML server" - value = var.password - sensitive = true + value = var.password + sensitive = true } # output "zenserver_url" { diff --git a/src/matcha_ml/infrastructure/default/zen_server/variables.tf b/src/matcha_ml/infrastructure/default/zen_server/variables.tf index ae4a8d66..a2d12b04 100644 --- a/src/matcha_ml/infrastructure/default/zen_server/variables.tf +++ b/src/matcha_ml/infrastructure/default/zen_server/variables.tf @@ -81,7 +81,7 @@ variable "db_version" { } variable "db_sku_name" { description = "The sku_name for the database resource" - default = "B_Standard_B1s" + default = "B_Standard_B2s" type = string } variable "db_disk_size" { diff --git a/src/matcha_ml/infrastructure/default/zenml_storage/main.tf b/src/matcha_ml/infrastructure/default/zenml_storage/main.tf index 8a37cb74..894837cd 100644 --- a/src/matcha_ml/infrastructure/default/zenml_storage/main.tf +++ b/src/matcha_ml/infrastructure/default/zenml_storage/main.tf @@ -14,7 +14,7 @@ resource "azurerm_storage_account" "zenmlaccount" { # create a storage container inside created storage account resource "azurerm_storage_container" "zenmlstoragecontainer" { name = "${var.prefix}artifactstore" - storage_account_name = azurerm_storage_account.zenmlaccount.name + storage_account_id = azurerm_storage_account.zenmlaccount.id container_access_type = "private" } diff --git a/src/matcha_ml/infrastructure/default/zenml_storage/output.tf b/src/matcha_ml/infrastructure/default/zenml_storage/output.tf index 84226fbf..717f5973 100644 --- a/src/matcha_ml/infrastructure/default/zenml_storage/output.tf +++ b/src/matcha_ml/infrastructure/default/zenml_storage/output.tf @@ -1,6 +1,6 @@ output "zenml_storage_container_name" { description = "The name of the Azure Storage container used to store ZenML artifacts." - value = azurerm_storage_container.zenmlstoragecontainer.name + value = azurerm_storage_container.zenmlstoragecontainer.name } output "zenml_blobstorage_container_path" { @@ -10,7 +10,7 @@ output "zenml_blobstorage_container_path" { output "zenml_storage_account_name" { description = "The name of the Azure Storage Account used to store ZenML artifacts." - value = azurerm_storage_account.zenmlaccount.name + value = azurerm_storage_account.zenmlaccount.name } output "zenml_primary_access_key" { diff --git a/src/matcha_ml/infrastructure/llm/aks/main.tf b/src/matcha_ml/infrastructure/llm/aks/main.tf index 262c24c6..51b62ac5 100644 --- a/src/matcha_ml/infrastructure/llm/aks/main.tf +++ b/src/matcha_ml/infrastructure/llm/aks/main.tf @@ -8,12 +8,15 @@ resource "azurerm_kubernetes_cluster" "main" { name = "default" vm_size = "Standard_DS3_v2" - enable_auto_scaling = true - max_count = 3 - min_count = 1 + max_count = 3 + min_count = 1 + auto_scaling_enabled = true } identity { type = "SystemAssigned" } + + # Explicitly specify a stable API version to avoid preview version issues + kubernetes_version = "1.34.0" } diff --git a/src/matcha_ml/infrastructure/llm/data_version_control_storage/main.tf b/src/matcha_ml/infrastructure/llm/data_version_control_storage/main.tf index 72b26b18..d33a324d 100644 --- a/src/matcha_ml/infrastructure/llm/data_version_control_storage/main.tf +++ b/src/matcha_ml/infrastructure/llm/data_version_control_storage/main.tf @@ -9,7 +9,6 @@ resource "azurerm_storage_account" "storageaccount" { account_tier = "Standard" account_kind = "StorageV2" account_replication_type = "LRS" - enable_https_traffic_only = true access_tier = "Hot" allow_nested_items_to_be_public = true } diff --git a/src/matcha_ml/infrastructure/llm/data_version_control_storage/providers.tf b/src/matcha_ml/infrastructure/llm/data_version_control_storage/providers.tf index e2d7507d..d8f6dc6b 100644 --- a/src/matcha_ml/infrastructure/llm/data_version_control_storage/providers.tf +++ b/src/matcha_ml/infrastructure/llm/data_version_control_storage/providers.tf @@ -2,7 +2,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "3.48.0" + version = "4.38.0" } } } diff --git a/src/matcha_ml/infrastructure/llm/main.tf b/src/matcha_ml/infrastructure/llm/main.tf index 2636d089..9b884bbc 100644 --- a/src/matcha_ml/infrastructure/llm/main.tf +++ b/src/matcha_ml/infrastructure/llm/main.tf @@ -9,7 +9,7 @@ provider "azurerm" { module "resource_group" { source = "./resource_group" - prefix = var.prefix + prefix = var.prefix } module "storage" { diff --git a/src/matcha_ml/infrastructure/llm/mlflow_module/main.tf b/src/matcha_ml/infrastructure/llm/mlflow_module/main.tf index eb97dfaa..f24e3d17 100644 --- a/src/matcha_ml/infrastructure/llm/mlflow_module/main.tf +++ b/src/matcha_ml/infrastructure/llm/mlflow_module/main.tf @@ -5,6 +5,7 @@ resource "helm_release" "mlflow_tracking" { name = "mlflow-tracking" repository = "https://community-charts.github.io/helm-charts" chart = "mlflow" + version = "1.3.2" # Change type from "ClusterIP" to "LoadBalancer" set { diff --git a/src/matcha_ml/infrastructure/llm/output.tf b/src/matcha_ml/infrastructure/llm/output.tf index f62fd806..88e93175 100644 --- a/src/matcha_ml/infrastructure/llm/output.tf +++ b/src/matcha_ml/infrastructure/llm/output.tf @@ -64,31 +64,31 @@ output "model_deployer_seldon_base_url" { output "cloud_azure_resource_group_name" { description = "Name of the Azure resource group" - value = module.resource_group.name + value = module.resource_group.name } -output "cloud_azure_prefix"{ +output "cloud_azure_prefix" { description = "The Azure resource group name prefix" - value = var.prefix + value = var.prefix } -output "cloud_azure_location"{ - description = "The Azure location in which the resources are provisioned" - value = var.location +output "cloud_azure_location" { + description = "The Azure location in which the resources are provisioned" + value = var.location } -output "data_version_control_primary_connection_string"{ +output "data_version_control_primary_connection_string" { description = "The primary connection string for the ZenML Azure Storage Account" - value = module.data_version_control_storage.primary_connection_string - sensitive = true + value = module.data_version_control_storage.primary_connection_string + sensitive = true } -output "data_version_control_storage_container_name"{ +output "data_version_control_storage_container_name" { description = "The name of the container used for data version control" - value = module.data_version_control_storage.storage_container_name + value = module.data_version_control_storage.storage_container_name } -output "data_version_control_storage_account_name"{ +output "data_version_control_storage_account_name" { description = "The name of the storage account for data version control" - value = module.data_version_control_storage.storage_account_name + value = module.data_version_control_storage.storage_account_name } diff --git a/src/matcha_ml/infrastructure/llm/providers.tf b/src/matcha_ml/infrastructure/llm/providers.tf index b3876b23..b5303077 100644 --- a/src/matcha_ml/infrastructure/llm/providers.tf +++ b/src/matcha_ml/infrastructure/llm/providers.tf @@ -3,7 +3,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = ">=3.16.0" + version = "4.38.0" } random = { diff --git a/src/matcha_ml/infrastructure/llm/seldon/istio.tf b/src/matcha_ml/infrastructure/llm/seldon/istio.tf index 7c4d9a9a..5f336e84 100644 --- a/src/matcha_ml/infrastructure/llm/seldon/istio.tf +++ b/src/matcha_ml/infrastructure/llm/seldon/istio.tf @@ -15,6 +15,7 @@ resource "helm_release" "istio_base" { name = "istio-base-seldon" repository = "https://istio-release.storage.googleapis.com/charts" chart = "base" + version = "1.26.3" # adding a dependency on the istio-namespace namespace = kubernetes_namespace.istio_ns.metadata[0].name @@ -25,6 +26,7 @@ resource "helm_release" "istiod" { name = "istiod-seldon" repository = helm_release.istio_base.repository # dependency on istio-base chart = "istiod" + version = "1.26.3" namespace = kubernetes_namespace.istio_ns.metadata[0].name } @@ -59,6 +61,7 @@ resource "helm_release" "istio_ingress" { name = "istio-ingressgateway" repository = helm_release.istiod.repository chart = "gateway" + version = "1.26.3" # dependency on istio-ingress-ns namespace = kubernetes_namespace.istio_ns.metadata[0].name diff --git a/src/matcha_ml/infrastructure/llm/seldon/main.tf b/src/matcha_ml/infrastructure/llm/seldon/main.tf index 5faee277..084176a2 100644 --- a/src/matcha_ml/infrastructure/llm/seldon/main.tf +++ b/src/matcha_ml/infrastructure/llm/seldon/main.tf @@ -13,9 +13,12 @@ resource "helm_release" "seldon" { name = var.seldon_name repository = "https://storage.googleapis.com/seldon-charts" chart = "seldon-core-operator" + version = "1.17.1" # dependency on seldon-ns namespace = kubernetes_namespace.seldon_ns.metadata[0].name + verify = false + set { name = "usageMetrics.enabled" value = "true" diff --git a/src/matcha_ml/infrastructure/llm/storage/main.tf b/src/matcha_ml/infrastructure/llm/storage/main.tf index b448a625..f96c1981 100644 --- a/src/matcha_ml/infrastructure/llm/storage/main.tf +++ b/src/matcha_ml/infrastructure/llm/storage/main.tf @@ -9,7 +9,6 @@ resource "azurerm_storage_account" "storageaccount" { account_tier = "Standard" account_kind = "StorageV2" account_replication_type = "LRS" - enable_https_traffic_only = true access_tier = "Hot" allow_nested_items_to_be_public = true } @@ -17,6 +16,6 @@ resource "azurerm_storage_account" "storageaccount" { # create a storage container inside created storage account resource "azurerm_storage_container" "storagecontainer" { name = "${var.prefix}store" - storage_account_name = azurerm_storage_account.storageaccount.name + storage_account_id = azurerm_storage_account.storageaccount.id container_access_type = "container" } diff --git a/src/matcha_ml/infrastructure/llm/storage/providers.tf b/src/matcha_ml/infrastructure/llm/storage/providers.tf index e2d7507d..d8f6dc6b 100644 --- a/src/matcha_ml/infrastructure/llm/storage/providers.tf +++ b/src/matcha_ml/infrastructure/llm/storage/providers.tf @@ -2,7 +2,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "3.48.0" + version = "4.38.0" } } } diff --git a/src/matcha_ml/infrastructure/llm/zen_server/variables.tf b/src/matcha_ml/infrastructure/llm/zen_server/variables.tf index ae4a8d66..a2d12b04 100644 --- a/src/matcha_ml/infrastructure/llm/zen_server/variables.tf +++ b/src/matcha_ml/infrastructure/llm/zen_server/variables.tf @@ -81,7 +81,7 @@ variable "db_version" { } variable "db_sku_name" { description = "The sku_name for the database resource" - default = "B_Standard_B1s" + default = "B_Standard_B2s" type = string } variable "db_disk_size" { diff --git a/src/matcha_ml/infrastructure/remote_state_storage/.terraform.lock.hcl b/src/matcha_ml/infrastructure/remote_state_storage/.terraform.lock.hcl index 6d1fb852..f6aeb3fd 100644 --- a/src/matcha_ml/infrastructure/remote_state_storage/.terraform.lock.hcl +++ b/src/matcha_ml/infrastructure/remote_state_storage/.terraform.lock.hcl @@ -2,20 +2,21 @@ # Manual edits may be lost in future updates. provider "registry.terraform.io/hashicorp/azurerm" { - version = "3.56.0" + version = "4.38.0" + constraints = "4.38.0" hashes = [ - "h1:j262GXstvnzNNRgVQ5ednS700xOjcMaUIvvUaMVD4Qk=", - "zh:0c35cf5c57edc337cc8a63399b605f1ec3316841869098f6b5b1f40f76f03d04", - "zh:230b82b9ef64983505920a66e655f8ca807fccf6e0e2ccbdb5ede301871270b2", - "zh:3d1ef558437be0853dc183c9926e6da6d85089dc653ac53bc1c54262b00287e5", - "zh:5f240a33ba87b1a30790cebae50a1234ed864953c8324d3e7a03aca3cfbec9e7", - "zh:67954796a1f22b28172817f613f071981f46b4cf162d549794e96ac3dbf16303", - "zh:6e8422b39f4dba9d9e294bd8c6772e6b89707b814a022898b83b7d5d4eaba914", - "zh:8b595ad75123b88b67b2b32a9c3e942da34c13e051a7858b5f4549429aa81142", - "zh:bffb8df9cf7f6336510f2d7a497c89d9e2c35c113a09915b6422a7fd332dca33", - "zh:d172642393754112c8d2c15e500b37b62b29917b376e93c0a519046d30603201", - "zh:eac016f21218fae0ff4f3121b944316dc367fc180e875a402edbaae298c8108a", - "zh:eee76e35fe8786045f565e0ca20bb8c8b0cf46c14b7f7d84f0a1d45cde3257e5", + "h1:3qU09xZbQCBFgJup7QHtocQJM0vQ/g1A5LMixfPVCLI=", + "zh:302ff9a5979f4752c5aa0efe2ff146c46e14507dfe89c1ebed4ae8473c31cf3a", + "zh:61e25c2540a6a9bd23a48b672434d846fa78c5bcfaaa2fe2d79f952312d3fc0e", + "zh:65b37fe8fe2ce61f644442bb6db86de3c2b480e2aa30717993c0903b75a1e628", + "zh:89d73e2068c817b9a0d1229c527a5f47669fcbbb5d0fe960c3af2067b3c8b1ec", + "zh:8c3b8acb29cbbba21bde996ddccd5fb446e3c02d11295c2bdec392e3a7fc14df", + "zh:962dae94f6e5627acaadf5bff44e84566b57f2fc3f487c1c48513b6b7c671a37", + "zh:acdf79635ff290965be04ddcd33e9a3c726414d4ca688a6277f353bb476c2017", + "zh:b17bd777dff575ca686a04f2912bdf8fedaa0ba034506bd55b8afe25980468bd", + "zh:d2384123e7a297dc4e3ae44e6a91fd485ffc296569cc38089e71dde33fb706ef", + "zh:e0d37ba5895976b496aa6b4428b0351f1e990b7379ccaaa1497ab9752d18db12", "zh:f569b65999264a9416862bca5cd2a6177d94ccb0424f3a4ef424428912b9cb3c", + "zh:f851bf26d95293515dbf475d38e7c8082e17a77765cbc6103a99426204912153", ] } diff --git a/src/matcha_ml/infrastructure/remote_state_storage/output.tf b/src/matcha_ml/infrastructure/remote_state_storage/output.tf index d5516cba..41847a46 100644 --- a/src/matcha_ml/infrastructure/remote_state_storage/output.tf +++ b/src/matcha_ml/infrastructure/remote_state_storage/output.tf @@ -10,20 +10,20 @@ output "remote_state_storage_container_name" { output "remote_state_storage_resource_group_name" { description = "Name of the Azure resource group" - value = module.resource_group.name + value = module.resource_group.name } -output "cloud_azure_prefix"{ +output "cloud_azure_prefix" { description = "The Azure resource group name prefix" - value = var.prefix + value = var.prefix } -output "cloud_azure_location"{ - description = "The Azure location in which the resources are provisioned" - value = var.location +output "cloud_azure_location" { + description = "The Azure location in which the resources are provisioned" + value = var.location } output "cloud_azure_resource_group_name" { description = "Name of the Azure resource group" - value = module.resource_group.name + value = module.resource_group.name } diff --git a/src/matcha_ml/infrastructure/remote_state_storage/providers.tf b/src/matcha_ml/infrastructure/remote_state_storage/providers.tf new file mode 100644 index 00000000..d8f6dc6b --- /dev/null +++ b/src/matcha_ml/infrastructure/remote_state_storage/providers.tf @@ -0,0 +1,8 @@ +terraform { + required_providers { + azurerm = { + source = "hashicorp/azurerm" + version = "4.38.0" + } + } +} diff --git a/src/matcha_ml/infrastructure/remote_state_storage/state_storage/main.tf b/src/matcha_ml/infrastructure/remote_state_storage/state_storage/main.tf index 53fa0492..0e2934e0 100644 --- a/src/matcha_ml/infrastructure/remote_state_storage/state_storage/main.tf +++ b/src/matcha_ml/infrastructure/remote_state_storage/state_storage/main.tf @@ -7,7 +7,6 @@ resource "azurerm_storage_account" "statestorageaccount" { account_tier = "Standard" account_kind = "StorageV2" account_replication_type = "LRS" - enable_https_traffic_only = true access_tier = "Hot" allow_nested_items_to_be_public = true } @@ -15,6 +14,6 @@ resource "azurerm_storage_account" "statestorageaccount" { # create a storage container inside created storage account resource "azurerm_storage_container" "statestoragecontainer" { name = "${var.prefix}statestore" - storage_account_name = azurerm_storage_account.statestorageaccount.name + storage_account_id = azurerm_storage_account.statestorageaccount.id container_access_type = "container" }