This repository contains the Terraform Module Telemetry Collection Service. This project is divided into four parts, all written in Terraform.
resource_group
: Creates an Azure resource group.acr
: Creates an Azure Container Registry along with virtual network and subnets and corresponding private endpoints. This ACR registry is only accessible via the VNet.docker_image
: Contains a sub-folder namedtelemetry
which contains amain.go
file. This Go application uses Iris as a web server to collect tags sent from a Terraform provider namedmodtm
, enabling us to collect usage telemetry data from our Terraform module users. This part will compile the HTTP server application into a Docker image and push it into the ACR created previously.container_apps
: Uses the Azure Container Apps Module to create an Azure Container Apps instance to host the web application pushed into the ACR.
Due to an issue with the Docker provider (#483), we can't use the ACR resource's login_url
and password
outputs directly in the Terraform Docker provider's config. Therefore, when we provision this stack from scratch, we need use -target
to provision the base modules first:
$ terraform apply -target="module.resource_group" -target="module.acr"
- Azure credentials configured as per the AzureRM Provider documentation.
To provision the whole solution, execute the following command in the repository's root folder:
terragrunt run-all apply --terragrunt-non-interactive
This command will use your Azure credentials to provision the resources defined in the Terraform modules.
Contributions to this repository are limited to Microsoft FTE only. Please ensure that you update the README when adding or modifying behaviour.