Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/blackbird-cloud/terraform-azurerm-dashboard-grafana

Terraform module to create an Azure Grafana dashboard
https://github.com/blackbird-cloud/terraform-azurerm-dashboard-grafana

azure grafana terraform

Last synced: about 2 months ago
JSON representation

Terraform module to create an Azure Grafana dashboard

Awesome Lists containing this project

README

        

# Terraform Azurerm Dashboard Grafana Module
Terraform module to create an Azure Grafana dashboard

[![blackbird-logo](https://raw.githubusercontent.com/blackbird-cloud/terraform-module-template/main/.config/logo_simple.png)](https://blackbird.cloud)

## Example
```hcl
locals {
global = {
location = "westeurope"
subscription_id = "00000000-0000-0000-0000-000000000000"
admin_group_id = "00000000-0000-0000-0000-000000000000"
}
secrets = {
grafana_auth_token = "00000000-0000-0000-0000-000000000000"
}
}

module "azurerm_dashboard_grafana" {
source = "blackbird-cloud/dashboard-grafana/azurerm"
version = "~> 1"

instance_name = "grafana-dashboard"
resource_group_name = "shared-tools"
location = local.global.location
grafana_admin_object_id = local.global.admin_group_id
monitor_workspace = {
name = "monitor-workspace"
id = "00000000-0000-0000-0000-000000000000"
query_endpoint = "https://monitor-workspace-api.azuremonitor.com"
default_data_collection_endpoint_id = "00000000-0000-0000-0000-000000000000"
default_data_collection_rule_id = "00000000-0000-0000-0000-000000000000"
}
subscription_id = local.global.subscription_id
api_key_enabled = true
grafana_auth_token = local.secrets.grafana_auth_token
}
```

## Requirements

| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 1.2 |
| [azurerm](#requirement\_azurerm) | ~> 3 |
| [grafana](#requirement\_grafana) | ~> 2.12 |

## Providers

| Name | Version |
|------|---------|
| [azurerm](#provider\_azurerm) | ~> 3 |
| [grafana](#provider\_grafana) | ~> 2.12 |

## Resources

| Name | Type |
|------|------|
| [azurerm_dashboard_grafana.default](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/dashboard_grafana) | resource |
| [azurerm_resource_provider_registration.default](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/resource_provider_registration) | resource |
| [azurerm_role_assignment.grafana](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/role_assignment) | resource |
| [azurerm_role_assignment.grafana_admin](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/role_assignment) | resource |
| [grafana_data_source.prometheus](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/data_source) | resource |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [api\_key\_enabled](#input\_api\_key\_enabled) | Whether or not API key authentication is enabled for the Grafana instance. | `bool` | `false` | no |
| [grafana\_admin\_object\_id](#input\_grafana\_admin\_object\_id) | The object ID of the user to assign the Grafana Admin role to. | `string` | n/a | yes |
| [grafana\_auth\_token](#input\_grafana\_auth\_token) | The authentication token for the Grafana instance. | `string` | `""` | no |
| [grafana\_major\_version](#input\_grafana\_major\_version) | The major version of Grafana to use. | `string` | `"9"` | no |
| [instance\_name](#input\_instance\_name) | The name of this managed Grafana instance. | `string` | n/a | yes |
| [location](#input\_location) | The location to create the resources in. | `string` | n/a | yes |
| [monitor\_workspace](#input\_monitor\_workspace) | The Azure Monitor Workspace to integrate with Grafana. |

object({
name = string
id = string
query_endpoint = string
default_data_collection_endpoint_id = string
default_data_collection_rule_id = string
})
| n/a | yes |
| [public\_network\_access\_enabled](#input\_public\_network\_access\_enabled) | Whether or not public network access is enabled for the Grafana instance. | `bool` | `true` | no |
| [resource\_group\_name](#input\_resource\_group\_name) | The name of the resource group to create the resources in. | `string` | n/a | yes |
| [subscription\_id](#input\_subscription\_id) | The ID of the subscription to create the resources in. | `string` | n/a | yes |
| [tags](#input\_tags) | A map of tags to assign to the resources. | `map(string)` | `{}` | no |

## Outputs

| Name | Description |
|------|-------------|
| [endpoint](#output\_endpoint) | The endpoint of this Managed Grafana instance. |
| [grafana\_version](#output\_grafana\_version) | The version of Grafana running on this Managed Grafana instance. |
| [identity\_principal\_id](#output\_identity\_principal\_id) | The principal ID of the system-assigned identity of this Managed Grafana instance. |
| [identity\_tenant\_id](#output\_identity\_tenant\_id) | The tenant ID of the system-assigned identity of this Managed Grafana instance. |
| [instance\_id](#output\_instance\_id) | The ID of this Managed Grafana instance. |
| [instance\_name](#output\_instance\_name) | The name of this Managed Grafana instance. |

## About

We are [Blackbird Cloud](https://blackbird.cloud), Amsterdam based cloud consultancy, and cloud management service provider. We help companies build secure, cost efficient, and scale-able solutions.

Checkout our other :point\_right: [terraform modules](https://registry.terraform.io/namespaces/blackbird-cloud)

## Copyright

Copyright © 2017-2024 [Blackbird Cloud](https://blackbird.cloud)