diff --git a/modules/azure/api_connectors/logic_app_custom_connector/main.tf b/modules/azure/api_connectors/logic_app_custom_connector/main.tf index 5f0745bc..b6ee93f0 100644 --- a/modules/azure/api_connectors/logic_app_custom_connector/main.tf +++ b/modules/azure/api_connectors/logic_app_custom_connector/main.tf @@ -28,7 +28,7 @@ resource "azurerm_resource_group_template_deployment" "log_analytics" { value = var.function_url }, "swagger" = { - value = jsondecode(file(var.swagger)) + value = var.swagger_path != "" ? jsondecode(file(var.swagger_path)) : jsondecode(var.swagger) } }) deployment_mode = "Incremental" diff --git a/modules/azure/api_connectors/logic_app_custom_connector/variables.tf b/modules/azure/api_connectors/logic_app_custom_connector/variables.tf index 9b0c36ee..6e129655 100644 --- a/modules/azure/api_connectors/logic_app_custom_connector/variables.tf +++ b/modules/azure/api_connectors/logic_app_custom_connector/variables.tf @@ -17,3 +17,9 @@ variable "swagger" { type = string description = "Swagger definition" } + +variable "swagger_path" { + description = "Path to the Swagger JSON file" + type = string + default = "" +}