From 4c5bed7989a9109c881e00890ff491a6a2608059 Mon Sep 17 00:00:00 2001 From: Assaf Giladi Date: Mon, 26 Aug 2024 15:06:03 +0300 Subject: [PATCH 1/2] chore: allow empty weka_version when install_weka_url is provided --- functions.tf | 5 +++++ variables.tf | 1 + 2 files changed, 6 insertions(+) diff --git a/functions.tf b/functions.tf index 8a89bda7..c54499fa 100644 --- a/functions.tf +++ b/functions.tf @@ -328,6 +328,11 @@ resource "azurerm_linux_function_app" "function_app" { condition = local.read_remote_function_zip || var.deployment_function_app_code_blob != "" error_message = "You should provide value for 'deployment_function_app_code_blob' or 'read_function_zip_from_storage_account' should be false" } + + precondition { + condition = var.install_weka_url != "" || var.weka_version != "" + error_message = "Please provide either 'install_weka_url' or 'weka_version' variables." + } } depends_on = [module.network, module.iam, azurerm_storage_account.deployment_sa, azurerm_private_endpoint.file_endpoint, azurerm_private_endpoint.blob_endpoint] diff --git a/variables.tf b/variables.tf index cae0601b..77a04971 100644 --- a/variables.tf +++ b/variables.tf @@ -129,6 +129,7 @@ variable "logic_app_identity_name" { variable "weka_version" { type = string description = "The Weka version to deploy." + default = "" } variable "get_weka_io_token" { From b3002a2ed06a6be6ec7394a56e5f207f762a50aa Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 26 Aug 2024 12:07:49 +0000 Subject: [PATCH 2/2] terraform-docs: automated action --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 45755164..5055315c 100644 --- a/README.md +++ b/README.md @@ -541,7 +541,7 @@ proxy_url = VALUE | [vnets\_to\_peer\_to\_deployment\_vnet](#input\_vnets\_to\_peer\_to\_deployment\_vnet) | List of vent-name:resource-group-name to peer |
list(object({
vnet = string
rg = string
}))
| `[]` | no | | [weka\_home\_url](#input\_weka\_home\_url) | Weka Home url | `string` | `""` | no | | [weka\_tar\_storage\_account\_id](#input\_weka\_tar\_storage\_account\_id) | ### private blob | `string` | `""` | no | -| [weka\_version](#input\_weka\_version) | The Weka version to deploy. | `string` | n/a | yes | +| [weka\_version](#input\_weka\_version) | The Weka version to deploy. | `string` | `""` | no | | [zone](#input\_zone) | The zone in which the resources should be created. | `string` | `null` | no | ## Outputs