Skip to content

Commit

Permalink
Merge pull request #1085 from equinor/logicapps-folders
Browse files Browse the repository at this point in the history
Change folder structure when creating files on StorageAccounts in LA
  • Loading branch information
sveinpj authored Nov 10, 2023
2 parents de38a35 + ef9bb9f commit 90eb94d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion terraform/infrastructure/s940/prod/logicapps/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ resource "azurerm_logic_app_action_custom" "create_blob" {
method = "post",
path = "/v2/datasets/@{encodeURIComponent(encodeURIComponent('${each.value["storageaccount"]}'))}/files",
queries = {
folderPath = "/archive-log-analytics-${each.value["folder"]}/@{formatDateTime(utcNow(), 'yyyy-MM-dd')}",
folderPath = "/archive-log-analytics-${each.value["folder"]}/@{formatDateTime(utcNow(), 'yyyy')}/@{formatDateTime(utcNow(), 'MM')}/@{formatDateTime(utcNow(), 'dd')}",
name = "@{subtractFromTime(formatDateTime(utcNow(),'yyyy-MM-ddTHH:00:00'), 1,'Hour')}",
queryParametersSingleEncoded = true
}
Expand Down
5 changes: 3 additions & 2 deletions terraform/infrastructure/s941/dev/logicapps/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ data "azurerm_user_assigned_identity" "managed_identity" {
resource_group_name = each.value["rg_name"]
}


resource "azurerm_logic_app_workflow" "logic_app_workflow" {
for_each = var.logic_app_workflow
name = each.value["name"]
Expand Down Expand Up @@ -73,6 +74,7 @@ resource "azurerm_logic_app_workflow" "logic_app_workflow" {
}
}


resource "azurerm_logic_app_trigger_recurrence" "recurrence" {
for_each = var.logic_app_workflow
name = "Recurrence"
Expand Down Expand Up @@ -181,7 +183,7 @@ resource "azurerm_logic_app_action_custom" "create_blob" {
method = "post",
path = "/v2/datasets/@{encodeURIComponent(encodeURIComponent('${each.value["storageaccount"]}'))}/files",
queries = {
folderPath = "/archive-log-analytics-${each.value["folder"]}/@{formatDateTime(utcNow(), 'yyyy-MM-dd')}",
folderPath = "/archive-log-analytics-${each.value["folder"]}/@{formatDateTime(utcNow(), 'yyyy')}/@{formatDateTime(utcNow(), 'MM')}/@{formatDateTime(utcNow(), 'dd')}",
name = "@{subtractFromTime(formatDateTime(utcNow(),'yyyy-MM-ddTHH:00:00'), 1,'Hour')}",
queryParametersSingleEncoded = true
}
Expand All @@ -200,4 +202,3 @@ resource "azurerm_logic_app_action_custom" "create_blob" {
}
)
}

2 changes: 0 additions & 2 deletions terraform/radix-zone/radix_zone_dev.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ sql_server = {
name = "sql-radix-cost-allocation-dev"
rg_name = "cost-allocation"
db_admin = "radix-cost-allocation-db-admin"
minimum_tls_version = "Disabled"
vault = "radix-vault-dev"
tags = {
"displayName" = "SqlServer"
Expand All @@ -249,7 +248,6 @@ sql_server = {
name = "sql-radix-cost-allocation-playground"
rg_name = "cost-allocation"
db_admin = "radix-cost-allocation-db-admin-playground"
minimum_tls_version = "Disabled"
vault = "radix-vault-dev"
tags = {
"displayName" = "SqlServer"
Expand Down

0 comments on commit 90eb94d

Please sign in to comment.