Skip to content

Commit

Permalink
Location of connection must be dynamic (#432)
Browse files Browse the repository at this point in the history
* make location dynamic

* Update main.tf

* Update variables.tf

* Update main.tf
  • Loading branch information
ArtiomMatiom authored Oct 9, 2024
1 parent ab68b0f commit 0ca69c6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions modules/azure/logic_app_standard_connection/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,6 @@ resource "azurerm_resource_group_template_deployment" "connection_v2" {
connection_name = { value = var.connection_name }
api_id = { value = var.managed_api_id }
parameters = { value = var.parameter_values }
location = { value = var.location }
})
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
"parameters": {
"type": "Object",
"defaultValue": {}
},
"location": {
"type": "string",
"defaultValue": ""
}
},
"variables": {},
Expand All @@ -21,7 +25,7 @@
"type": "Microsoft.Web/connections",
"apiVersion": "2016-06-01",
"name": "[parameters('connection_name')]",
"location": "northeurope",
"location": "[parameters('location')]",
"kind": "V2",
"properties": {
"displayName": "[parameters('connection_name')]",
Expand Down
6 changes: 6 additions & 0 deletions modules/azure/logic_app_standard_connection/variables.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
variable "location" {
type = string
description = "A datacenter location in Azure."
default = "northeurope" //Was hardcoded in ARM, for backward compatibility kept as northeurope
}

variable "resource_group_name" {
type = string
description = "Name of the resource group."
Expand Down

0 comments on commit 0ca69c6

Please sign in to comment.