-
Notifications
You must be signed in to change notification settings - Fork 0
/
r-workflow.tf
40 lines (36 loc) · 1.12 KB
/
r-workflow.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
resource "azurerm_logic_app_workflow" "main" {
for_each = var.schedules
name = local.workflow_name[each.key]
location = var.location
resource_group_name = var.resource_group_name
identity {
type = "SystemAssigned"
}
parameters = {
"$connections" = jsonencode(
{
azureautomation = {
connectionId = "/subscriptions/${data.azurerm_subscription.main.subscription_id}/resourceGroups/${var.resource_group_name}/providers/Microsoft.Web/connections/${local.api_connection_name}"
connectionName = local.api_connection_name
connectionProperties = {
authentication = {
type = "ManagedServiceIdentity"
}
}
id = "/subscriptions/${data.azurerm_subscription.main.subscription_id}/providers/Microsoft.Web/locations/${var.location_cli}/managedApis/azureautomation"
}
}
)
}
workflow_parameters = {
"$connections" = jsonencode(
{
defaultValue = {}
type = "Object"
}
)
}
depends_on = [
azapi_resource.automation_connection,
]
}