From fc62d934eeafd9aff86c5b84b02e8c111b5dfbae Mon Sep 17 00:00:00 2001 From: Ruwin Ratnayake Date: Thu, 22 Aug 2024 09:09:20 +0530 Subject: [PATCH 1/7] Add logic app workflow, http request trigger and http action modules --- .../logic_app_action_http.tf | 29 ++++++++++ .../azurerm/Logic-App-Action-HTTP/output.tf | 24 ++++++++ .../Logic-App-Action-HTTP/variables.tf | 55 +++++++++++++++++++ .../azurerm/Logic-App-Action-HTTP/versions.tf | 29 ++++++++++ .../logic_app_trigger_http_request.tf | 25 +++++++++ .../Logic-App-Trigger-HTTP-Request/output.tf | 29 ++++++++++ .../variables.tf | 35 ++++++++++++ .../versions.tf | 29 ++++++++++ .../Logic-App-Workflow/logic_app_workflow.tf | 25 +++++++++ modules/azurerm/Logic-App-Workflow/output.tf | 29 ++++++++++ .../azurerm/Logic-App-Workflow/variables.tf | 34 ++++++++++++ .../azurerm/Logic-App-Workflow/versions.tf | 29 ++++++++++ 12 files changed, 372 insertions(+) create mode 100644 modules/azurerm/Logic-App-Action-HTTP/logic_app_action_http.tf create mode 100644 modules/azurerm/Logic-App-Action-HTTP/output.tf create mode 100644 modules/azurerm/Logic-App-Action-HTTP/variables.tf create mode 100644 modules/azurerm/Logic-App-Action-HTTP/versions.tf create mode 100644 modules/azurerm/Logic-App-Trigger-HTTP-Request/logic_app_trigger_http_request.tf create mode 100644 modules/azurerm/Logic-App-Trigger-HTTP-Request/output.tf create mode 100644 modules/azurerm/Logic-App-Trigger-HTTP-Request/variables.tf create mode 100644 modules/azurerm/Logic-App-Trigger-HTTP-Request/versions.tf create mode 100644 modules/azurerm/Logic-App-Workflow/logic_app_workflow.tf create mode 100644 modules/azurerm/Logic-App-Workflow/output.tf create mode 100644 modules/azurerm/Logic-App-Workflow/variables.tf create mode 100644 modules/azurerm/Logic-App-Workflow/versions.tf diff --git a/modules/azurerm/Logic-App-Action-HTTP/logic_app_action_http.tf b/modules/azurerm/Logic-App-Action-HTTP/logic_app_action_http.tf new file mode 100644 index 00000000..1a1f4917 --- /dev/null +++ b/modules/azurerm/Logic-App-Action-HTTP/logic_app_action_http.tf @@ -0,0 +1,29 @@ +# ------------------------------------------------------------------------------------- +# +# Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com) All Rights Reserved. +# +# WSO2 LLC. licenses this file to you under the Apache License, +# Version 2.0 (the "License"); you may not use this file except +# in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# -------------------------------------------------------------------------------------- + +resource "azurerm_logic_app_action_http" "logic_app_action_http" { + name = join("-", ["lgapp", "acthttp", var.logic_app_action_http_name]) + logic_app_id = var.logic_app_id + method = var.logic_app_action_http_method + uri = var.logic_app_action_http_uri + body = var.logic_app_action_http_body + headers = var.logic_app_action_http_headers + queries = var.logic_app_action_http_queries +} diff --git a/modules/azurerm/Logic-App-Action-HTTP/output.tf b/modules/azurerm/Logic-App-Action-HTTP/output.tf new file mode 100644 index 00000000..4681c968 --- /dev/null +++ b/modules/azurerm/Logic-App-Action-HTTP/output.tf @@ -0,0 +1,24 @@ +# ------------------------------------------------------------------------------------- +# +# Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com) All Rights Reserved. +# +# WSO2 LLC. licenses this file to you under the Apache License, +# Version 2.0 (the "License"); you may not use this file except +# in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# -------------------------------------------------------------------------------------- + +output "logic_app_action_http_name" { + depends_on = [azurerm_logic_app_action_http.logic_app_action_http] + value = azurerm_logic_app_action_http.logic_app_action_http.name +} diff --git a/modules/azurerm/Logic-App-Action-HTTP/variables.tf b/modules/azurerm/Logic-App-Action-HTTP/variables.tf new file mode 100644 index 00000000..d6d4d735 --- /dev/null +++ b/modules/azurerm/Logic-App-Action-HTTP/variables.tf @@ -0,0 +1,55 @@ +# ------------------------------------------------------------------------------------- +# +# Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com) All Rights Reserved. +# +# WSO2 LLC. licenses this file to you under the Apache License, +# Version 2.0 (the "License"); you may not use this file except +# in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# -------------------------------------------------------------------------------------- + +variable "logic_app_action_http_name" { + description = "Name of the HTTP Action to be created within the Logic App Workflow" + type = string +} + +variable "logic_app_id" { + description = "The ID of the Logic App Workflow" + type = string +} + +variable "logic_app_action_http_method" { + description = "The HTTP Method which should be used for the HTTP Action" + type = string +} + +variable "logic_app_action_http_uri" { + description = "The URI which will be called when the HTTP Action is triggered" + type = string +} + +variable "logic_app_action_http_body" { + description = "The HTTP Body that should be sent to the uri when this HTTP Action is triggered" + type = string +} + +variable "logic_app_action_http_headers" { + description = "A map of Key-Value Pairs that should be sent to the uri when this HTTP Action is triggered" + type = map(string) +} + +variable "logic_app_action_http_queries" { + description = "Map of Key-Value Pairs that should be sent to the uri when this HTTP Action is triggered" + type = map(string) + default = null +} diff --git a/modules/azurerm/Logic-App-Action-HTTP/versions.tf b/modules/azurerm/Logic-App-Action-HTTP/versions.tf new file mode 100644 index 00000000..699b2491 --- /dev/null +++ b/modules/azurerm/Logic-App-Action-HTTP/versions.tf @@ -0,0 +1,29 @@ +# ------------------------------------------------------------------------------------- +# +# Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com) All Rights Reserved. +# +# WSO2 LLC. licenses this file to you under the Apache License, +# Version 2.0 (the "License"); you may not use this file except +# in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# -------------------------------------------------------------------------------------- + +terraform { + required_version = ">= 0.13" + required_providers { + azurerm = { + source = "hashicorp/azurerm" + version = ">= 3.52.0" + } + } +} diff --git a/modules/azurerm/Logic-App-Trigger-HTTP-Request/logic_app_trigger_http_request.tf b/modules/azurerm/Logic-App-Trigger-HTTP-Request/logic_app_trigger_http_request.tf new file mode 100644 index 00000000..ee18f519 --- /dev/null +++ b/modules/azurerm/Logic-App-Trigger-HTTP-Request/logic_app_trigger_http_request.tf @@ -0,0 +1,25 @@ +# ------------------------------------------------------------------------------------- +# +# Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com) All Rights Reserved. +# +# WSO2 LLC. licenses this file to you under the Apache License, +# Version 2.0 (the "License"); you may not use this file except +# in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# -------------------------------------------------------------------------------------- + +resource "azurerm_logic_app_trigger_http_request" "logic_app_trigger_http_request" { + name = join("-", ["lgapphttpreq", var.logic_app_trigger_http_request_name]) + logic_app_id = var.logic_app_workflow_id + schema = var.logic_app_trigger_http_request_schema +} diff --git a/modules/azurerm/Logic-App-Trigger-HTTP-Request/output.tf b/modules/azurerm/Logic-App-Trigger-HTTP-Request/output.tf new file mode 100644 index 00000000..13db376f --- /dev/null +++ b/modules/azurerm/Logic-App-Trigger-HTTP-Request/output.tf @@ -0,0 +1,29 @@ +# ------------------------------------------------------------------------------------- +# +# Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com) All Rights Reserved. +# +# WSO2 LLC. licenses this file to you under the Apache License, +# Version 2.0 (the "License"); you may not use this file except +# in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# -------------------------------------------------------------------------------------- + +output "logic_app_trigger_http_request_name" { + depends_on = [azurerm_logic_app_trigger_http_request.logic_app_trigger_http_request] + value = azurerm_logic_app_trigger_http_request.logic_app_trigger_http_request.name +} + +output "logic_app_action_http_callback_url" { + depends_on = [azurerm_logic_app_trigger_http_request.logic_app_trigger_http_request] + value = azurerm_logic_app_trigger_http_request.logic_app_trigger_http_request.callback_url +} diff --git a/modules/azurerm/Logic-App-Trigger-HTTP-Request/variables.tf b/modules/azurerm/Logic-App-Trigger-HTTP-Request/variables.tf new file mode 100644 index 00000000..5a789c20 --- /dev/null +++ b/modules/azurerm/Logic-App-Trigger-HTTP-Request/variables.tf @@ -0,0 +1,35 @@ +# ------------------------------------------------------------------------------------- +# +# Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com) All Rights Reserved. +# +# WSO2 LLC. licenses this file to you under the Apache License, +# Version 2.0 (the "License"); you may not use this file except +# in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# -------------------------------------------------------------------------------------- + +variable "logic_app_trigger_http_request_name" { + description = "Name of the Azure Logic App HTTP Requset Trigger" + type = string +} + +variable "logic_app_workflow_id" { + description = "The Logic App Workflow ID" + type = string +} + +variable "logic_app_trigger_http_request_schema" { + description = "JSON blob defining the Schema of the incoming request" + type = string + default = "{}" +} diff --git a/modules/azurerm/Logic-App-Trigger-HTTP-Request/versions.tf b/modules/azurerm/Logic-App-Trigger-HTTP-Request/versions.tf new file mode 100644 index 00000000..699b2491 --- /dev/null +++ b/modules/azurerm/Logic-App-Trigger-HTTP-Request/versions.tf @@ -0,0 +1,29 @@ +# ------------------------------------------------------------------------------------- +# +# Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com) All Rights Reserved. +# +# WSO2 LLC. licenses this file to you under the Apache License, +# Version 2.0 (the "License"); you may not use this file except +# in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# -------------------------------------------------------------------------------------- + +terraform { + required_version = ">= 0.13" + required_providers { + azurerm = { + source = "hashicorp/azurerm" + version = ">= 3.52.0" + } + } +} diff --git a/modules/azurerm/Logic-App-Workflow/logic_app_workflow.tf b/modules/azurerm/Logic-App-Workflow/logic_app_workflow.tf new file mode 100644 index 00000000..1abaee59 --- /dev/null +++ b/modules/azurerm/Logic-App-Workflow/logic_app_workflow.tf @@ -0,0 +1,25 @@ +# ------------------------------------------------------------------------------------- +# +# Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com) All Rights Reserved. +# +# WSO2 LLC. licenses this file to you under the Apache License, +# Version 2.0 (the "License"); you may not use this file except +# in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# -------------------------------------------------------------------------------------- + +resource "azurerm_logic_app_workflow" "logic_app_workflow" { + name = join("-", ["lgapp", var.logic_app_workflow_name]) + location = var.location + resource_group_name = var.resource_group_name +} diff --git a/modules/azurerm/Logic-App-Workflow/output.tf b/modules/azurerm/Logic-App-Workflow/output.tf new file mode 100644 index 00000000..640b26f3 --- /dev/null +++ b/modules/azurerm/Logic-App-Workflow/output.tf @@ -0,0 +1,29 @@ +# ------------------------------------------------------------------------------------- +# +# Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com) All Rights Reserved. +# +# WSO2 LLC. licenses this file to you under the Apache License, +# Version 2.0 (the "License"); you may not use this file except +# in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# -------------------------------------------------------------------------------------- + +output "logic_app_workflow_name" { + depends_on = [azurerm_logic_app_workflow.logic_app_workflow] + value = azurerm_logic_app_workflow.logic_app_workflow.name +} + +output "logic_app_workflow_id" { + depends_on = [azurerm_logic_app_workflow.logic_app_workflow] + value = azurerm_logic_app_workflow.logic_app_workflow.id +} diff --git a/modules/azurerm/Logic-App-Workflow/variables.tf b/modules/azurerm/Logic-App-Workflow/variables.tf new file mode 100644 index 00000000..b83d25f4 --- /dev/null +++ b/modules/azurerm/Logic-App-Workflow/variables.tf @@ -0,0 +1,34 @@ +# ------------------------------------------------------------------------------------- +# +# Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com) All Rights Reserved. +# +# WSO2 LLC. licenses this file to you under the Apache License, +# Version 2.0 (the "License"); you may not use this file except +# in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# -------------------------------------------------------------------------------------- + +variable "logic_app_workflow_name" { + description = "Name of the Azure Logic App Workflow" + type = string +} + +variable "location" { + description = "The location of the resource need to be created" + type = string +} + +variable "resource_group_name" { + description = "Name of the resource group in which the Azure Logic App Workflow will be created" + type = string +} diff --git a/modules/azurerm/Logic-App-Workflow/versions.tf b/modules/azurerm/Logic-App-Workflow/versions.tf new file mode 100644 index 00000000..699b2491 --- /dev/null +++ b/modules/azurerm/Logic-App-Workflow/versions.tf @@ -0,0 +1,29 @@ +# ------------------------------------------------------------------------------------- +# +# Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com) All Rights Reserved. +# +# WSO2 LLC. licenses this file to you under the Apache License, +# Version 2.0 (the "License"); you may not use this file except +# in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# -------------------------------------------------------------------------------------- + +terraform { + required_version = ">= 0.13" + required_providers { + azurerm = { + source = "hashicorp/azurerm" + version = ">= 3.52.0" + } + } +} From 96c12c9438ef737e6ea2e89162716c80d8cf5d1f Mon Sep 17 00:00:00 2001 From: Ruwin Ratnayake Date: Wed, 4 Sep 2024 14:52:43 +0530 Subject: [PATCH 2/7] Update logic app related module variable names --- .../logic_app_action_http.tf | 12 ++++++------ .../azurerm/Logic-App-Action-HTTP/output.tf | 2 +- .../azurerm/Logic-App-Action-HTTP/variables.tf | 18 ++++++++++++------ .../azurerm/Logic-App-Action-HTTP/versions.tf | 2 +- .../logic_app_trigger_http_request.tf | 6 +++--- .../Logic-App-Trigger-HTTP-Request/output.tf | 4 ++-- .../variables.tf | 12 +++++++++--- .../Logic-App-Trigger-HTTP-Request/versions.tf | 2 +- .../Logic-App-Workflow/logic_app_workflow.tf | 2 +- modules/azurerm/Logic-App-Workflow/output.tf | 4 ++-- .../azurerm/Logic-App-Workflow/variables.tf | 8 +++++++- modules/azurerm/Logic-App-Workflow/versions.tf | 2 +- 12 files changed, 46 insertions(+), 28 deletions(-) diff --git a/modules/azurerm/Logic-App-Action-HTTP/logic_app_action_http.tf b/modules/azurerm/Logic-App-Action-HTTP/logic_app_action_http.tf index 1a1f4917..bf9cb027 100644 --- a/modules/azurerm/Logic-App-Action-HTTP/logic_app_action_http.tf +++ b/modules/azurerm/Logic-App-Action-HTTP/logic_app_action_http.tf @@ -19,11 +19,11 @@ # -------------------------------------------------------------------------------------- resource "azurerm_logic_app_action_http" "logic_app_action_http" { - name = join("-", ["lgapp", "acthttp", var.logic_app_action_http_name]) + name = join("-", [var.abbreviation, var.name]) logic_app_id = var.logic_app_id - method = var.logic_app_action_http_method - uri = var.logic_app_action_http_uri - body = var.logic_app_action_http_body - headers = var.logic_app_action_http_headers - queries = var.logic_app_action_http_queries + method = var.method + uri = var.uri + body = var.body + headers = var.headers + queries = var.queries } diff --git a/modules/azurerm/Logic-App-Action-HTTP/output.tf b/modules/azurerm/Logic-App-Action-HTTP/output.tf index 4681c968..29aa03dd 100644 --- a/modules/azurerm/Logic-App-Action-HTTP/output.tf +++ b/modules/azurerm/Logic-App-Action-HTTP/output.tf @@ -18,7 +18,7 @@ # # -------------------------------------------------------------------------------------- -output "logic_app_action_http_name" { +output "name" { depends_on = [azurerm_logic_app_action_http.logic_app_action_http] value = azurerm_logic_app_action_http.logic_app_action_http.name } diff --git a/modules/azurerm/Logic-App-Action-HTTP/variables.tf b/modules/azurerm/Logic-App-Action-HTTP/variables.tf index d6d4d735..e2503f74 100644 --- a/modules/azurerm/Logic-App-Action-HTTP/variables.tf +++ b/modules/azurerm/Logic-App-Action-HTTP/variables.tf @@ -18,7 +18,13 @@ # # -------------------------------------------------------------------------------------- -variable "logic_app_action_http_name" { +variable "abbreviation" { + description = "Logic app action http abbreviation to be used in the resource name" + type = string + default = "lgapp-achttp" +} + +variable "name" { description = "Name of the HTTP Action to be created within the Logic App Workflow" type = string } @@ -28,27 +34,27 @@ variable "logic_app_id" { type = string } -variable "logic_app_action_http_method" { +variable "method" { description = "The HTTP Method which should be used for the HTTP Action" type = string } -variable "logic_app_action_http_uri" { +variable "uri" { description = "The URI which will be called when the HTTP Action is triggered" type = string } -variable "logic_app_action_http_body" { +variable "body" { description = "The HTTP Body that should be sent to the uri when this HTTP Action is triggered" type = string } -variable "logic_app_action_http_headers" { +variable "headers" { description = "A map of Key-Value Pairs that should be sent to the uri when this HTTP Action is triggered" type = map(string) } -variable "logic_app_action_http_queries" { +variable "queries" { description = "Map of Key-Value Pairs that should be sent to the uri when this HTTP Action is triggered" type = map(string) default = null diff --git a/modules/azurerm/Logic-App-Action-HTTP/versions.tf b/modules/azurerm/Logic-App-Action-HTTP/versions.tf index 699b2491..b3a7cd06 100644 --- a/modules/azurerm/Logic-App-Action-HTTP/versions.tf +++ b/modules/azurerm/Logic-App-Action-HTTP/versions.tf @@ -19,7 +19,7 @@ # -------------------------------------------------------------------------------------- terraform { - required_version = ">= 0.13" + required_version = ">= 0.14.10" required_providers { azurerm = { source = "hashicorp/azurerm" diff --git a/modules/azurerm/Logic-App-Trigger-HTTP-Request/logic_app_trigger_http_request.tf b/modules/azurerm/Logic-App-Trigger-HTTP-Request/logic_app_trigger_http_request.tf index ee18f519..6f8adb6e 100644 --- a/modules/azurerm/Logic-App-Trigger-HTTP-Request/logic_app_trigger_http_request.tf +++ b/modules/azurerm/Logic-App-Trigger-HTTP-Request/logic_app_trigger_http_request.tf @@ -19,7 +19,7 @@ # -------------------------------------------------------------------------------------- resource "azurerm_logic_app_trigger_http_request" "logic_app_trigger_http_request" { - name = join("-", ["lgapphttpreq", var.logic_app_trigger_http_request_name]) - logic_app_id = var.logic_app_workflow_id - schema = var.logic_app_trigger_http_request_schema + name = join("-", [var.abbreviation, var.name]) + logic_app_id = var.logic_app_id + schema = var.schema } diff --git a/modules/azurerm/Logic-App-Trigger-HTTP-Request/output.tf b/modules/azurerm/Logic-App-Trigger-HTTP-Request/output.tf index 13db376f..a819cde2 100644 --- a/modules/azurerm/Logic-App-Trigger-HTTP-Request/output.tf +++ b/modules/azurerm/Logic-App-Trigger-HTTP-Request/output.tf @@ -18,12 +18,12 @@ # # -------------------------------------------------------------------------------------- -output "logic_app_trigger_http_request_name" { +output "name" { depends_on = [azurerm_logic_app_trigger_http_request.logic_app_trigger_http_request] value = azurerm_logic_app_trigger_http_request.logic_app_trigger_http_request.name } -output "logic_app_action_http_callback_url" { +output "callback_url" { depends_on = [azurerm_logic_app_trigger_http_request.logic_app_trigger_http_request] value = azurerm_logic_app_trigger_http_request.logic_app_trigger_http_request.callback_url } diff --git a/modules/azurerm/Logic-App-Trigger-HTTP-Request/variables.tf b/modules/azurerm/Logic-App-Trigger-HTTP-Request/variables.tf index 5a789c20..b41c0d95 100644 --- a/modules/azurerm/Logic-App-Trigger-HTTP-Request/variables.tf +++ b/modules/azurerm/Logic-App-Trigger-HTTP-Request/variables.tf @@ -18,17 +18,23 @@ # # -------------------------------------------------------------------------------------- -variable "logic_app_trigger_http_request_name" { +variable "abbreviation" { + description = "Logic app trigger http request abbreviation to be used in the resource name" + type = string + default = "lgapp-trhttpreq" +} + +variable "name" { description = "Name of the Azure Logic App HTTP Requset Trigger" type = string } -variable "logic_app_workflow_id" { +variable "logic_app_id" { description = "The Logic App Workflow ID" type = string } -variable "logic_app_trigger_http_request_schema" { +variable "schema" { description = "JSON blob defining the Schema of the incoming request" type = string default = "{}" diff --git a/modules/azurerm/Logic-App-Trigger-HTTP-Request/versions.tf b/modules/azurerm/Logic-App-Trigger-HTTP-Request/versions.tf index 699b2491..b3a7cd06 100644 --- a/modules/azurerm/Logic-App-Trigger-HTTP-Request/versions.tf +++ b/modules/azurerm/Logic-App-Trigger-HTTP-Request/versions.tf @@ -19,7 +19,7 @@ # -------------------------------------------------------------------------------------- terraform { - required_version = ">= 0.13" + required_version = ">= 0.14.10" required_providers { azurerm = { source = "hashicorp/azurerm" diff --git a/modules/azurerm/Logic-App-Workflow/logic_app_workflow.tf b/modules/azurerm/Logic-App-Workflow/logic_app_workflow.tf index 1abaee59..9313ed74 100644 --- a/modules/azurerm/Logic-App-Workflow/logic_app_workflow.tf +++ b/modules/azurerm/Logic-App-Workflow/logic_app_workflow.tf @@ -19,7 +19,7 @@ # -------------------------------------------------------------------------------------- resource "azurerm_logic_app_workflow" "logic_app_workflow" { - name = join("-", ["lgapp", var.logic_app_workflow_name]) + name = join("-", [var.abbreviation, var.name]) location = var.location resource_group_name = var.resource_group_name } diff --git a/modules/azurerm/Logic-App-Workflow/output.tf b/modules/azurerm/Logic-App-Workflow/output.tf index 640b26f3..6ad617eb 100644 --- a/modules/azurerm/Logic-App-Workflow/output.tf +++ b/modules/azurerm/Logic-App-Workflow/output.tf @@ -18,12 +18,12 @@ # # -------------------------------------------------------------------------------------- -output "logic_app_workflow_name" { +output "name" { depends_on = [azurerm_logic_app_workflow.logic_app_workflow] value = azurerm_logic_app_workflow.logic_app_workflow.name } -output "logic_app_workflow_id" { +output "id" { depends_on = [azurerm_logic_app_workflow.logic_app_workflow] value = azurerm_logic_app_workflow.logic_app_workflow.id } diff --git a/modules/azurerm/Logic-App-Workflow/variables.tf b/modules/azurerm/Logic-App-Workflow/variables.tf index b83d25f4..05ae0a9b 100644 --- a/modules/azurerm/Logic-App-Workflow/variables.tf +++ b/modules/azurerm/Logic-App-Workflow/variables.tf @@ -18,7 +18,13 @@ # # -------------------------------------------------------------------------------------- -variable "logic_app_workflow_name" { + +variable "abbreviation" { + description = "Logic app workflow abbreviation to be used in the resource name" + type = string + default = "lgapp" +} +variable "name" { description = "Name of the Azure Logic App Workflow" type = string } diff --git a/modules/azurerm/Logic-App-Workflow/versions.tf b/modules/azurerm/Logic-App-Workflow/versions.tf index 699b2491..b3a7cd06 100644 --- a/modules/azurerm/Logic-App-Workflow/versions.tf +++ b/modules/azurerm/Logic-App-Workflow/versions.tf @@ -19,7 +19,7 @@ # -------------------------------------------------------------------------------------- terraform { - required_version = ">= 0.13" + required_version = ">= 0.14.10" required_providers { azurerm = { source = "hashicorp/azurerm" From a8baf0b48f3c0739f8c6ca0f9082904cbd6a1f04 Mon Sep 17 00:00:00 2001 From: Ruwin Ratnayake Date: Wed, 4 Sep 2024 15:09:57 +0530 Subject: [PATCH 3/7] Update logic app modules name variable --- .../Logic-App-Action-HTTP/logic_app_action_http.tf | 14 +++++++------- modules/azurerm/Logic-App-Action-HTTP/output.tf | 2 +- modules/azurerm/Logic-App-Action-HTTP/variables.tf | 2 +- .../logic_app_trigger_http_request.tf | 6 +++--- .../Logic-App-Trigger-HTTP-Request/output.tf | 2 +- .../Logic-App-Trigger-HTTP-Request/variables.tf | 2 +- .../Logic-App-Workflow/logic_app_workflow.tf | 6 +++--- modules/azurerm/Logic-App-Workflow/output.tf | 2 +- modules/azurerm/Logic-App-Workflow/variables.tf | 2 +- 9 files changed, 19 insertions(+), 19 deletions(-) diff --git a/modules/azurerm/Logic-App-Action-HTTP/logic_app_action_http.tf b/modules/azurerm/Logic-App-Action-HTTP/logic_app_action_http.tf index bf9cb027..18466b5a 100644 --- a/modules/azurerm/Logic-App-Action-HTTP/logic_app_action_http.tf +++ b/modules/azurerm/Logic-App-Action-HTTP/logic_app_action_http.tf @@ -19,11 +19,11 @@ # -------------------------------------------------------------------------------------- resource "azurerm_logic_app_action_http" "logic_app_action_http" { - name = join("-", [var.abbreviation, var.name]) - logic_app_id = var.logic_app_id - method = var.method - uri = var.uri - body = var.body - headers = var.headers - queries = var.queries + logic_app_action_http_name = join("-", [var.abbreviation, var.name]) + logic_app_id = var.logic_app_id + method = var.method + uri = var.uri + body = var.body + headers = var.headers + queries = var.queries } diff --git a/modules/azurerm/Logic-App-Action-HTTP/output.tf b/modules/azurerm/Logic-App-Action-HTTP/output.tf index 29aa03dd..4681c968 100644 --- a/modules/azurerm/Logic-App-Action-HTTP/output.tf +++ b/modules/azurerm/Logic-App-Action-HTTP/output.tf @@ -18,7 +18,7 @@ # # -------------------------------------------------------------------------------------- -output "name" { +output "logic_app_action_http_name" { depends_on = [azurerm_logic_app_action_http.logic_app_action_http] value = azurerm_logic_app_action_http.logic_app_action_http.name } diff --git a/modules/azurerm/Logic-App-Action-HTTP/variables.tf b/modules/azurerm/Logic-App-Action-HTTP/variables.tf index e2503f74..b288fea6 100644 --- a/modules/azurerm/Logic-App-Action-HTTP/variables.tf +++ b/modules/azurerm/Logic-App-Action-HTTP/variables.tf @@ -24,7 +24,7 @@ variable "abbreviation" { default = "lgapp-achttp" } -variable "name" { +variable "logic_app_workflow_name" { description = "Name of the HTTP Action to be created within the Logic App Workflow" type = string } diff --git a/modules/azurerm/Logic-App-Trigger-HTTP-Request/logic_app_trigger_http_request.tf b/modules/azurerm/Logic-App-Trigger-HTTP-Request/logic_app_trigger_http_request.tf index 6f8adb6e..6d1c12f2 100644 --- a/modules/azurerm/Logic-App-Trigger-HTTP-Request/logic_app_trigger_http_request.tf +++ b/modules/azurerm/Logic-App-Trigger-HTTP-Request/logic_app_trigger_http_request.tf @@ -19,7 +19,7 @@ # -------------------------------------------------------------------------------------- resource "azurerm_logic_app_trigger_http_request" "logic_app_trigger_http_request" { - name = join("-", [var.abbreviation, var.name]) - logic_app_id = var.logic_app_id - schema = var.schema + logic_app_trigger_http_request_name = join("-", [var.abbreviation, var.name]) + logic_app_id = var.logic_app_id + schema = var.schema } diff --git a/modules/azurerm/Logic-App-Trigger-HTTP-Request/output.tf b/modules/azurerm/Logic-App-Trigger-HTTP-Request/output.tf index a819cde2..5beb8315 100644 --- a/modules/azurerm/Logic-App-Trigger-HTTP-Request/output.tf +++ b/modules/azurerm/Logic-App-Trigger-HTTP-Request/output.tf @@ -18,7 +18,7 @@ # # -------------------------------------------------------------------------------------- -output "name" { +output "logic_app_trigger_http_request_name" { depends_on = [azurerm_logic_app_trigger_http_request.logic_app_trigger_http_request] value = azurerm_logic_app_trigger_http_request.logic_app_trigger_http_request.name } diff --git a/modules/azurerm/Logic-App-Trigger-HTTP-Request/variables.tf b/modules/azurerm/Logic-App-Trigger-HTTP-Request/variables.tf index b41c0d95..4c374b3f 100644 --- a/modules/azurerm/Logic-App-Trigger-HTTP-Request/variables.tf +++ b/modules/azurerm/Logic-App-Trigger-HTTP-Request/variables.tf @@ -24,7 +24,7 @@ variable "abbreviation" { default = "lgapp-trhttpreq" } -variable "name" { +variable "logic_app_trigger_http_request_name" { description = "Name of the Azure Logic App HTTP Requset Trigger" type = string } diff --git a/modules/azurerm/Logic-App-Workflow/logic_app_workflow.tf b/modules/azurerm/Logic-App-Workflow/logic_app_workflow.tf index 9313ed74..590a46be 100644 --- a/modules/azurerm/Logic-App-Workflow/logic_app_workflow.tf +++ b/modules/azurerm/Logic-App-Workflow/logic_app_workflow.tf @@ -19,7 +19,7 @@ # -------------------------------------------------------------------------------------- resource "azurerm_logic_app_workflow" "logic_app_workflow" { - name = join("-", [var.abbreviation, var.name]) - location = var.location - resource_group_name = var.resource_group_name + logic_app_workflow_name = join("-", [var.abbreviation, var.name]) + location = var.location + resource_group_name = var.resource_group_name } diff --git a/modules/azurerm/Logic-App-Workflow/output.tf b/modules/azurerm/Logic-App-Workflow/output.tf index 6ad617eb..f97b1af1 100644 --- a/modules/azurerm/Logic-App-Workflow/output.tf +++ b/modules/azurerm/Logic-App-Workflow/output.tf @@ -18,7 +18,7 @@ # # -------------------------------------------------------------------------------------- -output "name" { +output "logic_app_workflow_name" { depends_on = [azurerm_logic_app_workflow.logic_app_workflow] value = azurerm_logic_app_workflow.logic_app_workflow.name } diff --git a/modules/azurerm/Logic-App-Workflow/variables.tf b/modules/azurerm/Logic-App-Workflow/variables.tf index 05ae0a9b..9c705636 100644 --- a/modules/azurerm/Logic-App-Workflow/variables.tf +++ b/modules/azurerm/Logic-App-Workflow/variables.tf @@ -24,7 +24,7 @@ variable "abbreviation" { type = string default = "lgapp" } -variable "name" { +variable "logic_app_action_http_name" { description = "Name of the Azure Logic App Workflow" type = string } From b79ae72f3e19556285017a4593e90f5fe0fd716c Mon Sep 17 00:00:00 2001 From: Ruwin Ratnayake Date: Wed, 4 Sep 2024 15:51:13 +0530 Subject: [PATCH 4/7] Update logic app module variable names --- modules/azurerm/Logic-App-Action-HTTP/variables.tf | 2 +- modules/azurerm/Logic-App-Workflow/variables.tf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/azurerm/Logic-App-Action-HTTP/variables.tf b/modules/azurerm/Logic-App-Action-HTTP/variables.tf index b288fea6..9b06f8e7 100644 --- a/modules/azurerm/Logic-App-Action-HTTP/variables.tf +++ b/modules/azurerm/Logic-App-Action-HTTP/variables.tf @@ -24,7 +24,7 @@ variable "abbreviation" { default = "lgapp-achttp" } -variable "logic_app_workflow_name" { +variable "logic_app_action_http_name" { description = "Name of the HTTP Action to be created within the Logic App Workflow" type = string } diff --git a/modules/azurerm/Logic-App-Workflow/variables.tf b/modules/azurerm/Logic-App-Workflow/variables.tf index 9c705636..b61ea221 100644 --- a/modules/azurerm/Logic-App-Workflow/variables.tf +++ b/modules/azurerm/Logic-App-Workflow/variables.tf @@ -24,7 +24,7 @@ variable "abbreviation" { type = string default = "lgapp" } -variable "logic_app_action_http_name" { +variable "logic_app_workflow_name" { description = "Name of the Azure Logic App Workflow" type = string } From fa622e21cc8efb937eb10b2d61c2ac916816b23b Mon Sep 17 00:00:00 2001 From: Ruwin Ratnayake Date: Wed, 4 Sep 2024 15:57:25 +0530 Subject: [PATCH 5/7] Update logic app module variable names --- .../Logic-App-Action-HTTP/logic_app_action_http.tf | 14 +++++++------- .../logic_app_trigger_http_request.tf | 6 +++--- .../Logic-App-Workflow/logic_app_workflow.tf | 6 +++--- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/modules/azurerm/Logic-App-Action-HTTP/logic_app_action_http.tf b/modules/azurerm/Logic-App-Action-HTTP/logic_app_action_http.tf index 18466b5a..62b0eac1 100644 --- a/modules/azurerm/Logic-App-Action-HTTP/logic_app_action_http.tf +++ b/modules/azurerm/Logic-App-Action-HTTP/logic_app_action_http.tf @@ -19,11 +19,11 @@ # -------------------------------------------------------------------------------------- resource "azurerm_logic_app_action_http" "logic_app_action_http" { - logic_app_action_http_name = join("-", [var.abbreviation, var.name]) - logic_app_id = var.logic_app_id - method = var.method - uri = var.uri - body = var.body - headers = var.headers - queries = var.queries + name = join("-", [var.abbreviation, var.logic_app_action_http_name]) + logic_app_id = var.logic_app_id + method = var.method + uri = var.uri + body = var.body + headers = var.headers + queries = var.queries } diff --git a/modules/azurerm/Logic-App-Trigger-HTTP-Request/logic_app_trigger_http_request.tf b/modules/azurerm/Logic-App-Trigger-HTTP-Request/logic_app_trigger_http_request.tf index 6d1c12f2..d10745f3 100644 --- a/modules/azurerm/Logic-App-Trigger-HTTP-Request/logic_app_trigger_http_request.tf +++ b/modules/azurerm/Logic-App-Trigger-HTTP-Request/logic_app_trigger_http_request.tf @@ -19,7 +19,7 @@ # -------------------------------------------------------------------------------------- resource "azurerm_logic_app_trigger_http_request" "logic_app_trigger_http_request" { - logic_app_trigger_http_request_name = join("-", [var.abbreviation, var.name]) - logic_app_id = var.logic_app_id - schema = var.schema + name = join("-", [var.abbreviation, var.logic_app_trigger_http_request_name]) + logic_app_id = var.logic_app_id + schema = var.schema } diff --git a/modules/azurerm/Logic-App-Workflow/logic_app_workflow.tf b/modules/azurerm/Logic-App-Workflow/logic_app_workflow.tf index 590a46be..3a3747d8 100644 --- a/modules/azurerm/Logic-App-Workflow/logic_app_workflow.tf +++ b/modules/azurerm/Logic-App-Workflow/logic_app_workflow.tf @@ -19,7 +19,7 @@ # -------------------------------------------------------------------------------------- resource "azurerm_logic_app_workflow" "logic_app_workflow" { - logic_app_workflow_name = join("-", [var.abbreviation, var.name]) - location = var.location - resource_group_name = var.resource_group_name + name = join("-", [var.abbreviation, var.logic_app_workflow_name]) + location = var.location + resource_group_name = var.resource_group_name } From f850bd881db03a2a4e95e2db9dda2a9eda32cd75 Mon Sep 17 00:00:00 2001 From: Ruwin Ratnayake Date: Wed, 4 Sep 2024 16:30:29 +0530 Subject: [PATCH 6/7] Update logic app default variables --- modules/azurerm/Logic-App-Action-HTTP/variables.tf | 2 +- modules/azurerm/Logic-App-Trigger-HTTP-Request/variables.tf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/azurerm/Logic-App-Action-HTTP/variables.tf b/modules/azurerm/Logic-App-Action-HTTP/variables.tf index 9b06f8e7..f9710222 100644 --- a/modules/azurerm/Logic-App-Action-HTTP/variables.tf +++ b/modules/azurerm/Logic-App-Action-HTTP/variables.tf @@ -21,7 +21,7 @@ variable "abbreviation" { description = "Logic app action http abbreviation to be used in the resource name" type = string - default = "lgapp-achttp" + default = "lgapp-acthttp" } variable "logic_app_action_http_name" { diff --git a/modules/azurerm/Logic-App-Trigger-HTTP-Request/variables.tf b/modules/azurerm/Logic-App-Trigger-HTTP-Request/variables.tf index 4c374b3f..03bcdbe1 100644 --- a/modules/azurerm/Logic-App-Trigger-HTTP-Request/variables.tf +++ b/modules/azurerm/Logic-App-Trigger-HTTP-Request/variables.tf @@ -21,7 +21,7 @@ variable "abbreviation" { description = "Logic app trigger http request abbreviation to be used in the resource name" type = string - default = "lgapp-trhttpreq" + default = "lgapp-httpreq" } variable "logic_app_trigger_http_request_name" { From 3083a8f2f4bc0ddbc1801094000b6e96ea7620ec Mon Sep 17 00:00:00 2001 From: Ruwin Ratnayake Date: Fri, 6 Sep 2024 14:51:40 +0530 Subject: [PATCH 7/7] Update logic app workflow related module variable names --- .../azurerm/Logic-App-Action-HTTP/logic_app_action_http.tf | 2 +- modules/azurerm/Logic-App-Action-HTTP/output.tf | 2 +- modules/azurerm/Logic-App-Action-HTTP/variables.tf | 4 ++-- .../logic_app_trigger_http_request.tf | 2 +- modules/azurerm/Logic-App-Trigger-HTTP-Request/output.tf | 2 +- modules/azurerm/Logic-App-Trigger-HTTP-Request/variables.tf | 4 ++-- modules/azurerm/Logic-App-Workflow/logic_app_workflow.tf | 2 +- modules/azurerm/Logic-App-Workflow/output.tf | 2 +- modules/azurerm/Logic-App-Workflow/variables.tf | 4 ++-- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/azurerm/Logic-App-Action-HTTP/logic_app_action_http.tf b/modules/azurerm/Logic-App-Action-HTTP/logic_app_action_http.tf index 62b0eac1..bf9cb027 100644 --- a/modules/azurerm/Logic-App-Action-HTTP/logic_app_action_http.tf +++ b/modules/azurerm/Logic-App-Action-HTTP/logic_app_action_http.tf @@ -19,7 +19,7 @@ # -------------------------------------------------------------------------------------- resource "azurerm_logic_app_action_http" "logic_app_action_http" { - name = join("-", [var.abbreviation, var.logic_app_action_http_name]) + name = join("-", [var.abbreviation, var.name]) logic_app_id = var.logic_app_id method = var.method uri = var.uri diff --git a/modules/azurerm/Logic-App-Action-HTTP/output.tf b/modules/azurerm/Logic-App-Action-HTTP/output.tf index 4681c968..29aa03dd 100644 --- a/modules/azurerm/Logic-App-Action-HTTP/output.tf +++ b/modules/azurerm/Logic-App-Action-HTTP/output.tf @@ -18,7 +18,7 @@ # # -------------------------------------------------------------------------------------- -output "logic_app_action_http_name" { +output "name" { depends_on = [azurerm_logic_app_action_http.logic_app_action_http] value = azurerm_logic_app_action_http.logic_app_action_http.name } diff --git a/modules/azurerm/Logic-App-Action-HTTP/variables.tf b/modules/azurerm/Logic-App-Action-HTTP/variables.tf index f9710222..36cb0a3e 100644 --- a/modules/azurerm/Logic-App-Action-HTTP/variables.tf +++ b/modules/azurerm/Logic-App-Action-HTTP/variables.tf @@ -21,10 +21,10 @@ variable "abbreviation" { description = "Logic app action http abbreviation to be used in the resource name" type = string - default = "lgapp-acthttp" + default = "lgaw-ac-http" } -variable "logic_app_action_http_name" { +variable "name" { description = "Name of the HTTP Action to be created within the Logic App Workflow" type = string } diff --git a/modules/azurerm/Logic-App-Trigger-HTTP-Request/logic_app_trigger_http_request.tf b/modules/azurerm/Logic-App-Trigger-HTTP-Request/logic_app_trigger_http_request.tf index d10745f3..6f8adb6e 100644 --- a/modules/azurerm/Logic-App-Trigger-HTTP-Request/logic_app_trigger_http_request.tf +++ b/modules/azurerm/Logic-App-Trigger-HTTP-Request/logic_app_trigger_http_request.tf @@ -19,7 +19,7 @@ # -------------------------------------------------------------------------------------- resource "azurerm_logic_app_trigger_http_request" "logic_app_trigger_http_request" { - name = join("-", [var.abbreviation, var.logic_app_trigger_http_request_name]) + name = join("-", [var.abbreviation, var.name]) logic_app_id = var.logic_app_id schema = var.schema } diff --git a/modules/azurerm/Logic-App-Trigger-HTTP-Request/output.tf b/modules/azurerm/Logic-App-Trigger-HTTP-Request/output.tf index 5beb8315..a819cde2 100644 --- a/modules/azurerm/Logic-App-Trigger-HTTP-Request/output.tf +++ b/modules/azurerm/Logic-App-Trigger-HTTP-Request/output.tf @@ -18,7 +18,7 @@ # # -------------------------------------------------------------------------------------- -output "logic_app_trigger_http_request_name" { +output "name" { depends_on = [azurerm_logic_app_trigger_http_request.logic_app_trigger_http_request] value = azurerm_logic_app_trigger_http_request.logic_app_trigger_http_request.name } diff --git a/modules/azurerm/Logic-App-Trigger-HTTP-Request/variables.tf b/modules/azurerm/Logic-App-Trigger-HTTP-Request/variables.tf index 03bcdbe1..3cedef2c 100644 --- a/modules/azurerm/Logic-App-Trigger-HTTP-Request/variables.tf +++ b/modules/azurerm/Logic-App-Trigger-HTTP-Request/variables.tf @@ -21,10 +21,10 @@ variable "abbreviation" { description = "Logic app trigger http request abbreviation to be used in the resource name" type = string - default = "lgapp-httpreq" + default = "lgaw-trig-http" } -variable "logic_app_trigger_http_request_name" { +variable "name" { description = "Name of the Azure Logic App HTTP Requset Trigger" type = string } diff --git a/modules/azurerm/Logic-App-Workflow/logic_app_workflow.tf b/modules/azurerm/Logic-App-Workflow/logic_app_workflow.tf index 3a3747d8..9313ed74 100644 --- a/modules/azurerm/Logic-App-Workflow/logic_app_workflow.tf +++ b/modules/azurerm/Logic-App-Workflow/logic_app_workflow.tf @@ -19,7 +19,7 @@ # -------------------------------------------------------------------------------------- resource "azurerm_logic_app_workflow" "logic_app_workflow" { - name = join("-", [var.abbreviation, var.logic_app_workflow_name]) + name = join("-", [var.abbreviation, var.name]) location = var.location resource_group_name = var.resource_group_name } diff --git a/modules/azurerm/Logic-App-Workflow/output.tf b/modules/azurerm/Logic-App-Workflow/output.tf index f97b1af1..6ad617eb 100644 --- a/modules/azurerm/Logic-App-Workflow/output.tf +++ b/modules/azurerm/Logic-App-Workflow/output.tf @@ -18,7 +18,7 @@ # # -------------------------------------------------------------------------------------- -output "logic_app_workflow_name" { +output "name" { depends_on = [azurerm_logic_app_workflow.logic_app_workflow] value = azurerm_logic_app_workflow.logic_app_workflow.name } diff --git a/modules/azurerm/Logic-App-Workflow/variables.tf b/modules/azurerm/Logic-App-Workflow/variables.tf index b61ea221..0fbbd3be 100644 --- a/modules/azurerm/Logic-App-Workflow/variables.tf +++ b/modules/azurerm/Logic-App-Workflow/variables.tf @@ -22,9 +22,9 @@ variable "abbreviation" { description = "Logic app workflow abbreviation to be used in the resource name" type = string - default = "lgapp" + default = "lgaw" } -variable "logic_app_workflow_name" { +variable "name" { description = "Name of the Azure Logic App Workflow" type = string }