Error creating Azure Synapse Pool with Terraform

I am simply attempting to create an Azure Synapse Analytics Pool with Terraform. I can create just about every other resource I need, but the creation of the FileSystem in the storage account is causing issues (I need a filesystem because synapse pool needs a workspace which needs a filesystem). I am getting the error as below: enter image description here

Below is my script, has anyone done this successfully?:

# Configure the Microsoft Azure Provider. terraform { required_providers { azurerm = { source = "hashicorp/azurerm" version = ">= 2.26" } } } provider "azurerm" { features {} } # Create a resource group resource "azurerm_resource_group" "rg" { name = "kjTEST" location = "eastus" } #** Storage account ** will most likely replace with references to existing storage accounts resource "azurerm_storage_account" "storage" { name = "kjastoragetest" resource_group_name = azurerm_resource_group.rg.name location = azurerm_resource_group.rg.location account_tier = "Standard" is_hns_enabled = "true" account_replication_type = "LRS" account_kind = "StorageV2" } resource "azurerm_storage_container" "container" { name = "testcontainer" storage_account_name = azurerm_storage_account.storage.name container_access_type = "blob" } # File system resource "azurerm_storage_data_lake_gen2_filesystem" "filesystem" { name = "filesystem" storage_account_id = azurerm_storage_account.storage.id } # Synapse resource "azurerm_synapse_workspace" "workspace" { name = "example" resource_group_name = azurerm_resource_group.rg.name location = azurerm_resource_group.rg.location storage_data_lake_gen2_filesystem_id = azurerm_storage_data_lake_gen2_filesystem.filesystem.id sql_administrator_login = "usnername89" sql_administrator_login_password = "########" } # resource "azurerm_synapse_sql_pool" "synapsepool" { name = "kjatestsqlpool" synapse_workspace_id = azurerm_synapse_workspace.workspace.id sku_name = "DW100c" create_mode = "Default" } 
2

1 Answer

To successfully launch Spark pools in Azure Synapse workspace, the Azure Synapse managed identity needs the Storage Blob Data Contributor role on this storage account.

Reference: Grant the managed identity permissions to ADLS Gen2 storage account

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like