Skip to content

Commit

Permalink
Dev #43: assigned input data to a share
Browse files Browse the repository at this point in the history
  • Loading branch information
JimCircadian committed Sep 4, 2023
1 parent cb174fc commit 909f988
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions terraform/processing/functions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ resource "azurerm_resource_group" "this" {
tags = local.tags
}

resource "azurerm_storage_account" "processor" {
name = "st${var.project_name}appproc"
resource_group_name = azurerm_resource_group.this.name
location = azurerm_resource_group.this.location
account_tier = "Standard"
account_kind = "StorageV2"
account_replication_type = "LRS"
tags = local.tags
}

# For storing logs
resource "azurerm_application_insights" "this" {
name = "insights-${var.project_name}-processing"
Expand Down Expand Up @@ -33,8 +43,8 @@ resource "azurerm_linux_function_app" "this" {
resource_group_name = azurerm_resource_group.this.name

service_plan_id = azurerm_service_plan.this.id
storage_account_name = var.data_storage_account.name
storage_account_access_key = var.data_storage_account.primary_access_key
storage_account_name = azurerm_storage_account.processor.name
storage_account_access_key = azurerm_storage_account.processor.primary_access_key

site_config {
elastic_instance_minimum = 1
Expand Down Expand Up @@ -63,6 +73,14 @@ resource "azurerm_linux_function_app" "this" {
"SCM_DO_BUILD_DURING_DEPLOYMENT" = "1"
"XDG_CACHE_HOME" = "/tmp/.cache"
}
storage_account {
account_name = var.data_storage_account.name
access_key = var.data_storage_account.primary_access_key
name = "InputData"
share_name = "data"
type = "AzureBlob"
mount_path = "/data"
}

tags = local.tags

Expand Down

0 comments on commit 909f988

Please sign in to comment.