Configuration Reference

Complete Terraform variable reference for all Power BI integration modules — OneLake, Storage Account, and Function App.

This page documents all Terraform variables across the three deployment modules. Use this as a quick reference when configuring terraform.tfvars files.

OneLake Module (infra/onelake)

Required Variables

VariableTypeDescription
subscription_idstringAzure subscription ID (auto-detected if not set)

Optional Variables

VariableTypeDefaultDescription
prefixstringShort prefix for resource names (3–10 chars). Derived from resource_group_name if not set
resource_group_namestring{prefix}-rgResource group name
create_resource_groupboolfalseCreate a new resource group
locationstringwesteuropeAzure region
fabric_tenant_idstringautoAzure AD tenant ID
create_fabric_capacitybooltrueCreate new Fabric capacity
fabric_capacity_skustringF2Capacity SKU: F2, F4, F8, F16, F32, F64
fabric_capacity_admin_emailslist(string)[]Admin emails (defaults to current user)
existing_fabric_capacity_idstringUse existing capacity instead of creating
fabric_workspace_fqnstring{prefix}-workspaceWorkspace display name
fabric_lakehouse_namestring{prefix}lakehouseLakehouse name
one_lake_subpathstring""Subpath under /Files/ in lakehouse
create_custom_onelake_appbooltrueCreate Azure AD app for OneLake auth
assign_directory_rolesbooltrueAssign directory roles (requires Global Admin)
assign_graph_permissionsbooltrueAssign Graph API permissions (requires Global Admin)
create_custom_rolesbooltrueCreate custom Azure roles
create_workspace_role_assignmentbooltrueGrant workspace access to service principal
upload_typestringonelakeUpload destination: onelake or storageaccount

Outputs

OutputSensitiveDescription
resource_group_nameNoResource group name
locationNoAzure region
subscription_idNoAzure subscription ID
fabric_tenant_idNoAzure AD tenant ID
prefixNoResource naming prefix
onelake_dfs_pathNoOneLake DFS path for the lakehouse
onelake_app_client_idNoCustom OneLake app client ID
onelake_app_client_secretYesCustom OneLake app client secret
fabric_capacity_idNoFabric capacity resource ID
fabric_workspace_idNoFabric workspace GUID
fabric_lakehouse_idNoFabric lakehouse GUID
fabric_workspace_nameNoWorkspace display name
fabric_lakehouse_nameNoLakehouse display name
function_app_template_tfvarsNoPre-filled tfvars for Function App module

Storage Account Module (infra/storageaccount)

Optional Variables

All variables have defaults or are optional.

VariableTypeDefaultDescription
prefixstringShort prefix for resource names (3–10 chars)
resource_group_namestring{prefix}-rgResource group name
create_resource_groupboolfalseCreate a new resource group
locationstringwesteuropeAzure region
subscription_idstringautoAzure subscription ID
fabric_tenant_idstringautoAzure AD tenant ID
storage_use_existingboolfalseUse existing storage account
existing_storage_account_namestringName of existing storage account
existing_storage_account_rgstringResource group of existing storage account
upload_storage_account_namestringautoName for new storage account
upload_storage_container_namestringincomingContainer name
upload_subpathstring""Subpath within container
upload_typestringstorageaccountUpload destination
blob_readers_idlist(string)[]Principal IDs to grant Blob Reader access
blob_readers_emaillist(string)[]Emails to grant Blob Reader access (looked up)

Outputs

OutputSensitiveDescription
resource_group_nameNoResource group name
locationNoAzure region
subscription_idNoAzure subscription ID
prefixNoResource naming prefix
storage_connection_stringYesStorage account connection string
storage_account_urlNoStorage account blob endpoint
storage_container_nameNoUpload container name
storage_account_nameNoStorage account name
function_app_template_tfvarsNoPre-filled tfvars for Function App module

Function App Module (azure-function/terraform)

Required Variables

VariableTypeDescription
s3_access_key_idstringAWS access key ID (sensitive)
s3_secret_access_keystringAWS secret access key (sensitive)
s3_bucketstringS3 bucket name
copy_parquet_schedulestringCRON schedule with seconds, e.g. 0 */15 * * * *

Optional Variables

VariableTypeDefaultDescription
prefixstringShort prefix for resource names
resource_group_namestring{prefix}-rgResource group name
create_resource_groupboolfalseCreate a new resource group
locationstringwesteuropeAzure region
subscription_idstringautoAzure subscription ID
s3_regionstringus-east-1AWS region of the S3 bucket
s3_prefixstring""S3 path prefix for filtering
measurements_time_range_daysstring14Days to look back for measurements (1–365)
upload_typestringonelakeonelake or storageaccount
upload_subpathstring""Subpath within upload target
log_levelstringINFODEBUG, INFO, WARNING, ERROR, CRITICAL

OneLake Variables (required when upload_type = "onelake"):

VariableTypeDefaultDescription
fabric_tenant_idstringautoAzure AD tenant ID
fabric_client_idstringOneLake app client ID
fabric_client_secretstringOneLake app client secret (sensitive)
fabric_workspace_fqnstringWorkspace display name
fabric_workspace_idstringWorkspace GUID
fabric_lakehouse_namestringLakehouse name
fabric_lakehouse_idstringLakehouse GUID
one_lake_subpathstring""Subpath under /Files/

Storage Account Variables (required when upload_type = "storageaccount"):

VariableTypeDefaultDescription
storage_connection_stringstringStorage account connection string (sensitive)
storage_account_urlstringStorage account blob endpoint
upload_storage_containerstringContainer name for uploads

Outputs

OutputSensitiveDescription
function_app_nameNoFunction App name
function_app_default_hostnameNoFunction App hostname
function_app_idNoFunction App resource ID
function_app_identity_principal_idNoManaged identity principal ID
application_insights_app_idNoApplication Insights app ID
application_insights_instrumentation_keyYesInstrumentation key
application_insights_connection_stringYesAI connection string
log_analytics_workspace_idNoLog Analytics workspace ID
resource_group_nameNoResource group name

Provider Requirements

All modules require:

terraform {
  required_version = ">= 1.5.0"
  required_providers {
    azurerm = {
      source  = "hashicorp/azurerm"
      version = ">= 3.100.0"
    }
  }
}

The OneLake module additionally requires azuread (≥ 2.47.0) and fabric (≥ 0.1.0) providers.

Example: Complete OneLake Deployment

# infra/onelake/terraform.tfvars
subscription_id         = "00000000-0000-0000-0000-000000000000"
resource_group_name     = "rg-haltian-onelake"
create_resource_group   = true
location                = "westeurope"
prefix                  = "haltian"
create_fabric_capacity  = false
existing_fabric_capacity_id = "/subscriptions/.../Microsoft.Fabric/capacities/..."
one_lake_subpath        = "upload/"
# azure-function/terraform/terraform.tfvars
# (generated by: terraform output function_app_template_tfvars)
subscription_id        = "00000000-0000-0000-0000-000000000000"
resource_group_name    = "rg-haltian-onelake"
create_resource_group  = false
location               = "westeurope"
prefix                 = "haltian"
upload_type            = "onelake"
fabric_tenant_id       = "11111111-1111-1111-1111-111111111111"
fabric_client_id       = "22222222-2222-2222-2222-222222222222"
fabric_client_secret   = "generated-secret-value"
fabric_workspace_fqn   = "haltian-workspace"
fabric_workspace_id    = "33333333-3333-3333-3333-333333333333"
fabric_lakehouse_name  = "haltianlakehouse"
fabric_lakehouse_id    = "44444444-4444-4444-4444-444444444444"

# S3 credentials (from Haltian)
s3_access_key_id       = "AKIAIOSFODNN7EXAMPLE"
s3_secret_access_key   = "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
s3_bucket              = "haltian-data-export"
s3_region              = "eu-west-1"
copy_parquet_schedule  = "0 */15 * * * *"
measurements_time_range_days = "14"

Example: Complete Storage Account Deployment

# infra/storageaccount/terraform.tfvars
subscription_id               = "00000000-0000-0000-0000-000000000000"
resource_group_name           = "rg-haltian-storage"
create_resource_group         = true
location                      = "westeurope"
prefix                        = "haltian"
upload_storage_container_name = "incoming"
blob_readers_email            = ["analyst@yourcompany.com"]
# azure-function/terraform/terraform.tfvars
# (generated by: terraform output function_app_template_tfvars)
subscription_id           = "00000000-0000-0000-0000-000000000000"
resource_group_name       = "rg-haltian-storage"
create_resource_group     = false
location                  = "westeurope"
prefix                    = "haltian"
upload_type               = "storageaccount"
storage_connection_string = "DefaultEndpointsProtocol=https;AccountName=..."
storage_account_url       = "https://haltianuploadstora.blob.core.windows.net/"
upload_storage_container  = "incoming"

# S3 credentials (from Haltian)
s3_access_key_id       = "AKIAIOSFODNN7EXAMPLE"
s3_secret_access_key   = "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
s3_bucket              = "haltian-data-export"
s3_region              = "eu-west-1"
copy_parquet_schedule  = "0 */15 * * * *"
measurements_time_range_days = "14"