From 3c9b45935a1f84ceab53cd604070b9990e2a849b Mon Sep 17 00:00:00 2001 From: Kristina Solovyova Date: Fri, 2 Feb 2024 17:46:33 +0200 Subject: [PATCH] feat: add backend_lb_private_ip output --- README.md | 2 +- function-app/code/functions/scale_up/scale_up.go | 3 ++- main.tf | 2 -- outputs.tf | 5 +++++ variables.tf | 2 +- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 68b9c011..d8f542c3 100644 --- a/README.md +++ b/README.md @@ -407,7 +407,7 @@ proxy_url = VALUE | [function\_app\_storage\_account\_prefix](#input\_function\_app\_storage\_account\_prefix) | Weka storage account name prefix | `string` | `"weka"` | no | | [function\_app\_subnet\_delegation\_cidr](#input\_function\_app\_subnet\_delegation\_cidr) | Subnet delegation enables you to designate a specific subnet for an Azure PaaS service. | `string` | `"10.0.1.0/25"` | no | | [function\_app\_subnet\_delegation\_id](#input\_function\_app\_subnet\_delegation\_id) | Required to specify if subnet\_name were used to specify pre-defined subnets for weka. Function subnet delegation requires an additional subnet, and in the case of pre-defined networking this one also should be pre-defined | `string` | `""` | no | -| [function\_app\_version](#input\_function\_app\_version) | Function app code version (hash) | `string` | `"abe83f3f0224c29630262452d616dffd"` | no | +| [function\_app\_version](#input\_function\_app\_version) | Function app code version (hash) | `string` | `"7d5d87d3c97088495799cf6f97192b9d"` | no | | [get\_weka\_io\_token](#input\_get\_weka\_io\_token) | The token to download the Weka release from get.weka.io. | `string` | `""` | no | | [hotspare](#input\_hotspare) | Number of hotspares to set on weka cluster. Refer to https://docs.weka.io/overview/ssd-capacity-management#hot-spare | `number` | `1` | no | | [install\_cluster\_dpdk](#input\_install\_cluster\_dpdk) | Install weka cluster with DPDK | `bool` | `true` | no | diff --git a/function-app/code/functions/scale_up/scale_up.go b/function-app/code/functions/scale_up/scale_up.go index 9ac9c05a..34313b73 100644 --- a/function-app/code/functions/scale_up/scale_up.go +++ b/function-app/code/functions/scale_up/scale_up.go @@ -102,7 +102,6 @@ func Handler(w http.ResponseWriter, r *http.Request) { common.WriteErrorResponse(w, err) return } - currentConfig := common.GetVmssConfig(ctx, resourceGroupName, latestVmss) // after vmss creation we need to wait until vmss is clusterized if !state.Clusterized { @@ -112,6 +111,8 @@ func Handler(w http.ResponseWriter, r *http.Request) { return } + currentConfig := common.GetVmssConfig(ctx, resourceGroupName, latestVmss) + // 2. Update flow: compare current vmss config with expected vmss config and update if needed if !targetConfigIsLatestConfig(latestVmss, vmssConfig.ConfigHash) { diff := common.VmssConfigsDiff(*currentConfig, vmssConfig) diff --git a/main.tf b/main.tf index 9d0171a6..d9b7ff06 100644 --- a/main.tf +++ b/main.tf @@ -19,8 +19,6 @@ locals { report_url = "https://${azurerm_linux_function_app.function_app.name}.azurewebsites.net/api/report" function_app_default_key = data.azurerm_function_app_host_keys.function_keys.default_function_key disk_size = local.disk_size - vmss_name = "${var.prefix}-${var.cluster_name}-vmss" - rg_name = var.rg_name }) placement_group_id = var.placement_group_id != "" ? var.placement_group_id : azurerm_proximity_placement_group.ppg[0].id } diff --git a/outputs.tf b/outputs.tf index 89ac1be5..45b40980 100644 --- a/outputs.tf +++ b/outputs.tf @@ -22,6 +22,11 @@ locals { } } +output "backend_lb_private_ip" { + value = azurerm_lb.backend_lb.private_ip_address + description = "Backend load balancer ip address" +} + output "functions_url" { value = local.functions_url description = "Functions url and body for api request" diff --git a/variables.tf b/variables.tf index 5c1d8a56..58eba016 100644 --- a/variables.tf +++ b/variables.tf @@ -321,7 +321,7 @@ variable "function_app_storage_account_container_prefix" { variable "function_app_version" { type = string description = "Function app code version (hash)" - default = "abe83f3f0224c29630262452d616dffd" + default = "7d5d87d3c97088495799cf6f97192b9d" } variable "function_app_dist" {