Skip to content

Commit

Permalink
feat: add backend_lb_private_ip output
Browse files Browse the repository at this point in the history
  • Loading branch information
kristina-solovyova committed Feb 13, 2024
1 parent 8b02249 commit 3c9b459
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ proxy_url = VALUE
| <a name="input_function_app_storage_account_prefix"></a> [function\_app\_storage\_account\_prefix](#input\_function\_app\_storage\_account\_prefix) | Weka storage account name prefix | `string` | `"weka"` | no |
| <a name="input_function_app_subnet_delegation_cidr"></a> [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 |
| <a name="input_function_app_subnet_delegation_id"></a> [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 |
| <a name="input_function_app_version"></a> [function\_app\_version](#input\_function\_app\_version) | Function app code version (hash) | `string` | `"abe83f3f0224c29630262452d616dffd"` | no |
| <a name="input_function_app_version"></a> [function\_app\_version](#input\_function\_app\_version) | Function app code version (hash) | `string` | `"7d5d87d3c97088495799cf6f97192b9d"` | no |
| <a name="input_get_weka_io_token"></a> [get\_weka\_io\_token](#input\_get\_weka\_io\_token) | The token to download the Weka release from get.weka.io. | `string` | `""` | no |
| <a name="input_hotspare"></a> [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 |
| <a name="input_install_cluster_dpdk"></a> [install\_cluster\_dpdk](#input\_install\_cluster\_dpdk) | Install weka cluster with DPDK | `bool` | `true` | no |
Expand Down
3 changes: 2 additions & 1 deletion function-app/code/functions/scale_up/scale_up.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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)
Expand Down
2 changes: 0 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
5 changes: 5 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down

0 comments on commit 3c9b459

Please sign in to comment.