# Azure Blob Storage to OTel Terraform module

Copy as Markdown[Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fdocs-docusaurus.kinsta.page%2Fintegrations%2Fazure%2Fazure-blob-to-otel-terraform-module.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)[Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fdocs-docusaurus.kinsta.page%2Fintegrations%2Fazure%2Fazure-blob-to-otel-terraform-module.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)

Using our Terraform modules, you can easily install and manage Coralogix integrations with Azure services as modules in your infrastructure code. This tutorial demonstrates how to install the Coralogix [function app](https://github.com/coralogix/coralogix-azure-serverless/tree/master/BlobToOtel), allowing you to connect your Blob Storage container and send logs to OTel Endpoint.

This function serves as a solution for the limitation of [azureblobreceiver in OpenTelemetry Collector](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/azureblobreceiver), as it can't process non-JSON logs (see [this issue](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/34997)).

Our modules are open-source and available on [Github](https://github.com/coralogix/terraform-coralogix-azure) and in the [Terraform registry](https://registry.terraform.io/modules/coralogix/azure/coralogix/latest).

## Prerequisites[​](#prerequisites "Direct link to Prerequisites")

* Azure account with an active subscription.

* Storage account where logs are stored with event notifications configured with EventHub as a destination.

* An OTel collector endpoint (available for the function app to reach).

* \[Optional] vNet network with a subnet for the function app if you are using a Premium App Service Plan.

## Installation[​](#installation "Direct link to Installation")

Install our [function app](https://github.com/coralogix/coralogix-azure-serverless/tree/master/BlobToOtel) that connects to your Blob Storage container and sends logs to OTel Endpoint.

Add this declaration to your Terraform project:

```
terraform {

  required_providers {

    azurerm = {

      source = "hashicorp/azurerm"

      version = "~> 3.93"

    }

  }

}



provider "azurerm" {

  features {}

}



# Standard version without vNet integration

module "blobtootel-standard" {

  source = "coralogix/azure/coralogix//modules/blobtootel"



  OtelEndpoint                   = "my-otel-endpoint.com:4318"

  FunctionResourceGroupName      = "my-function-resource-group"

  FunctionAppServicePlanType     = "Consumption"

  EventHubNamespace              = "my-eventhub-namespace"

  EventHubName                   = "my-eventhub-name"

  EventHubResourceGroup          = "my-eventhub-resource-group"

  BlobContainerStorageAccount    = "my-blob-container-storage-account"

  BlobContainerResourceGroupName = "my-blob-container-resource-group"

}



# Premium version with vNet integration (in case if there is a private connection to OTel endpoint)

module "blobtootel-vnet" {

  source = "coralogix/azure/coralogix//modules/blobtootel"



  OtelEndpoint                   = "my-otel-endpoint.com:4318"

  FunctionResourceGroupName      = "my-function-resource-group"

  FunctionAppServicePlanType     = "Premium"

  EventHubNamespace              = "my-eventhub-namespace"

  EventHubName                   = "my-eventhub-name"

  EventHubResourceGroup          = "my-eventhub-resource-group"

  BlobContainerStorageAccount    = "my-blob-container-storage-account"

  BlobContainerResourceGroupName = "my-blob-container-resource-group"

  VirtualNetworkName             = "my-virtual-network"

  SubnetName                     = "my-subnet"

  VirtualNetworkResourceGroup    = "my-virtual-network-resource-group"

}
```

* Descriptions for variables can be found [here](https://github.com/coralogix/terraform-coralogix-azure/blob/master/modules/blobtootel/README.md).

## Additional Resources[​](#additional-resources "Direct link to Additional Resources")

|                        |                                                                                                                                                                    |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Documentation          | [Coralogix Terraform Provider](https://docs-docusaurus.kinsta.page/developer-portal/infrastructure-as-code/terraform-provider/coralogix-terraform-provider/.md)    |
| External Documentation | [Github](https://github.com/coralogix/terraform-coralogix-azure)<br />[Terraform Registry](https://registry.terraform.io/modules/coralogix/azure/coralogix/latest) |
