Share via


Microsoft.Dashboard grafana

Bicep resource definition

The grafana resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.Dashboard/grafana resource, add the following Bicep to your template.

resource symbolicname 'Microsoft.Dashboard/grafana@2024-10-01' = {
  identity: {
    type: 'string'
    userAssignedIdentities: {
      {customized property}: {}
    }
  }
  location: 'string'
  name: 'string'
  properties: {
    apiKey: 'string'
    autoGeneratedDomainNameLabelScope: 'string'
    deterministicOutboundIP: 'string'
    enterpriseConfigurations: {
      marketplaceAutoRenew: 'string'
      marketplacePlanId: 'string'
    }
    grafanaConfigurations: {
      security: {
        csrfAlwaysCheck: bool
      }
      smtp: {
        enabled: bool
        fromAddress: 'string'
        fromName: 'string'
        host: 'string'
        password: 'string'
        skipVerify: bool
        startTLSPolicy: 'string'
        user: 'string'
      }
      snapshots: {
        externalEnabled: bool
      }
      users: {
        viewersCanEdit: bool
      }
    }
    grafanaIntegrations: {
      azureMonitorWorkspaceIntegrations: [
        {
          azureMonitorWorkspaceResourceId: 'string'
        }
      ]
    }
    grafanaMajorVersion: 'string'
    grafanaPlugins: {
      {customized property}: {}
    }
    publicNetworkAccess: 'string'
    zoneRedundancy: 'string'
  }
  sku: {
    name: 'string'
  }
  tags: {
    {customized property}: 'string'
  }
}

Property Values

AzureMonitorWorkspaceIntegration

Name Description Value
azureMonitorWorkspaceResourceId The resource Id of the connected Azure Monitor Workspace. string

EnterpriseConfigurations

Name Description Value
marketplaceAutoRenew The AutoRenew setting of the Enterprise subscription 'Disabled'
'Enabled'
marketplacePlanId The Plan Id of the Azure Marketplace subscription for the Enterprise plugins string

GrafanaConfigurations

Name Description Value
security Grafana security settings Security
smtp Email server settings.
https://grafana.com/docs/grafana/v9.0/setup-grafana/configure-grafana/#smtp
Smtp
snapshots Grafana Snapshots settings Snapshots
users Grafana users settings Users

GrafanaIntegrations

Name Description Value
azureMonitorWorkspaceIntegrations AzureMonitorWorkspaceIntegration[]

GrafanaPlugin

Name Description Value

ManagedGrafanaProperties

Name Description Value
apiKey The api key setting of the Grafana instance. 'Disabled'
'Enabled'
autoGeneratedDomainNameLabelScope Scope for dns deterministic name hash calculation. 'TenantReuse'
deterministicOutboundIP Whether a Grafana instance uses deterministic outbound IPs. 'Disabled'
'Enabled'
enterpriseConfigurations Enterprise settings of a Grafana instance EnterpriseConfigurations
grafanaConfigurations Server configurations of a Grafana instance GrafanaConfigurations
grafanaIntegrations GrafanaIntegrations is a bundled observability experience (e.g. pre-configured data source, tailored Grafana dashboards, alerting defaults) for common monitoring scenarios. GrafanaIntegrations
grafanaMajorVersion The major Grafana software version to target. string
grafanaPlugins Installed plugin list of the Grafana instance. Key is plugin id, value is plugin definition. ManagedGrafanaPropertiesGrafanaPlugins
publicNetworkAccess Indicate the state for enable or disable traffic over the public interface. 'Disabled'
'Enabled'
zoneRedundancy The zone redundancy setting of the Grafana instance. 'Disabled'
'Enabled'

ManagedGrafanaPropertiesGrafanaPlugins

Name Description Value

ManagedGrafanaTags

Name Description Value

ManagedServiceIdentity

Name Description Value
type Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). 'None'
'SystemAssigned'
'SystemAssigned,UserAssigned'
'UserAssigned' (required)
userAssignedIdentities The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. UserAssignedIdentities

Microsoft.Dashboard/grafana

Name Description Value
identity The managed identity of the grafana resource. ManagedServiceIdentity
location The geo-location where the grafana resource lives string
name The resource name string

Constraints:
Pattern = ^[a-zA-Z][a-z0-9A-Z-]{0,28}[a-z0-9A-Z]$ (required)
properties Properties specific to the grafana resource. ManagedGrafanaProperties
sku The Sku of the grafana resource. ResourceSku
tags Resource tags Dictionary of tag names and values. See Tags in templates

ResourceSku

Name Description Value
name string (required)

Security

Name Description Value
csrfAlwaysCheck Set to true to execute the CSRF check even if the login cookie is not in a request (default false). bool

Smtp

Name Description Value
enabled Enable this to allow Grafana to send email. Default is false bool
fromAddress Address used when sending out emails
https://pkg.go.dev/net/mail#Address
string
fromName Name to be used when sending out emails. Default is "Azure Managed Grafana Notification"
https://pkg.go.dev/net/mail#Address
string
host SMTP server hostname with port, e.g. test.email.net:587 string
password Password of SMTP auth. If the password contains # or ;, then you have to wrap it with triple quotes string

Constraints:
Sensitive value. Pass in as a secure parameter.
skipVerify Verify SSL for SMTP server. Default is false
https://pkg.go.dev/crypto/tls#Config
bool
startTLSPolicy The StartTLSPolicy setting of the SMTP configuration
https://pkg.go.dev/github.com/go-mail/mail#StartTLSPolicy
'MandatoryStartTLS'
'NoStartTLS'
'OpportunisticStartTLS'
user User of SMTP auth string

Snapshots

Name Description Value
externalEnabled Set to false to disable external snapshot publish endpoint bool

UserAssignedIdentities

Name Description Value

UserAssignedIdentity

Name Description Value

Users

Name Description Value
viewersCanEdit Set to true so viewers can access and use explore and perform temporary edits on panels in dashboards they have access to. They cannot save their changes. bool

Usage Examples

Azure Quickstart Samples

The following Azure Quickstart templates contain Bicep samples for deploying this resource type.

Bicep File Description
Create AKS with Prometheus and Grafana with privae link This will create an Azure grafana, AKS and install Prometheus, an open-source monitoring and alerting toolkit, on an Azure Kubernetes Service (AKS) cluster. Then you use Azure Managed Grafana's managed private endpoint to connect to this Prometheus server and display the Prometheus data in a Grafana dashboard

ARM template resource definition

The grafana resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.Dashboard/grafana resource, add the following JSON to your template.

{
  "type": "Microsoft.Dashboard/grafana",
  "apiVersion": "2024-10-01",
  "name": "string",
  "identity": {
    "type": "string",
    "userAssignedIdentities": {
      "{customized property}": {
      }
    }
  },
  "location": "string",
  "properties": {
    "apiKey": "string",
    "autoGeneratedDomainNameLabelScope": "string",
    "deterministicOutboundIP": "string",
    "enterpriseConfigurations": {
      "marketplaceAutoRenew": "string",
      "marketplacePlanId": "string"
    },
    "grafanaConfigurations": {
      "security": {
        "csrfAlwaysCheck": "bool"
      },
      "smtp": {
        "enabled": "bool",
        "fromAddress": "string",
        "fromName": "string",
        "host": "string",
        "password": "string",
        "skipVerify": "bool",
        "startTLSPolicy": "string",
        "user": "string"
      },
      "snapshots": {
        "externalEnabled": "bool"
      },
      "users": {
        "viewersCanEdit": "bool"
      }
    },
    "grafanaIntegrations": {
      "azureMonitorWorkspaceIntegrations": [
        {
          "azureMonitorWorkspaceResourceId": "string"
        }
      ]
    },
    "grafanaMajorVersion": "string",
    "grafanaPlugins": {
      "{customized property}": {
      }
    },
    "publicNetworkAccess": "string",
    "zoneRedundancy": "string"
  },
  "sku": {
    "name": "string"
  },
  "tags": {
    "{customized property}": "string"
  }
}

Property Values

AzureMonitorWorkspaceIntegration

Name Description Value
azureMonitorWorkspaceResourceId The resource Id of the connected Azure Monitor Workspace. string

EnterpriseConfigurations

Name Description Value
marketplaceAutoRenew The AutoRenew setting of the Enterprise subscription 'Disabled'
'Enabled'
marketplacePlanId The Plan Id of the Azure Marketplace subscription for the Enterprise plugins string

GrafanaConfigurations

Name Description Value
security Grafana security settings Security
smtp Email server settings.
https://grafana.com/docs/grafana/v9.0/setup-grafana/configure-grafana/#smtp
Smtp
snapshots Grafana Snapshots settings Snapshots
users Grafana users settings Users

GrafanaIntegrations

Name Description Value
azureMonitorWorkspaceIntegrations AzureMonitorWorkspaceIntegration[]

GrafanaPlugin

Name Description Value

ManagedGrafanaProperties

Name Description Value
apiKey The api key setting of the Grafana instance. 'Disabled'
'Enabled'
autoGeneratedDomainNameLabelScope Scope for dns deterministic name hash calculation. 'TenantReuse'
deterministicOutboundIP Whether a Grafana instance uses deterministic outbound IPs. 'Disabled'
'Enabled'
enterpriseConfigurations Enterprise settings of a Grafana instance EnterpriseConfigurations
grafanaConfigurations Server configurations of a Grafana instance GrafanaConfigurations
grafanaIntegrations GrafanaIntegrations is a bundled observability experience (e.g. pre-configured data source, tailored Grafana dashboards, alerting defaults) for common monitoring scenarios. GrafanaIntegrations
grafanaMajorVersion The major Grafana software version to target. string
grafanaPlugins Installed plugin list of the Grafana instance. Key is plugin id, value is plugin definition. ManagedGrafanaPropertiesGrafanaPlugins
publicNetworkAccess Indicate the state for enable or disable traffic over the public interface. 'Disabled'
'Enabled'
zoneRedundancy The zone redundancy setting of the Grafana instance. 'Disabled'
'Enabled'

ManagedGrafanaPropertiesGrafanaPlugins

Name Description Value

ManagedGrafanaTags

Name Description Value

ManagedServiceIdentity

Name Description Value
type Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). 'None'
'SystemAssigned'
'SystemAssigned,UserAssigned'
'UserAssigned' (required)
userAssignedIdentities The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. UserAssignedIdentities

Microsoft.Dashboard/grafana

Name Description Value
apiVersion The api version '2024-10-01'
identity The managed identity of the grafana resource. ManagedServiceIdentity
location The geo-location where the grafana resource lives string
name The resource name string

Constraints:
Pattern = ^[a-zA-Z][a-z0-9A-Z-]{0,28}[a-z0-9A-Z]$ (required)
properties Properties specific to the grafana resource. ManagedGrafanaProperties
sku The Sku of the grafana resource. ResourceSku
tags Resource tags Dictionary of tag names and values. See Tags in templates
type The resource type 'Microsoft.Dashboard/grafana'

ResourceSku

Name Description Value
name string (required)

Security

Name Description Value
csrfAlwaysCheck Set to true to execute the CSRF check even if the login cookie is not in a request (default false). bool

Smtp

Name Description Value
enabled Enable this to allow Grafana to send email. Default is false bool
fromAddress Address used when sending out emails
https://pkg.go.dev/net/mail#Address
string
fromName Name to be used when sending out emails. Default is "Azure Managed Grafana Notification"
https://pkg.go.dev/net/mail#Address
string
host SMTP server hostname with port, e.g. test.email.net:587 string
password Password of SMTP auth. If the password contains # or ;, then you have to wrap it with triple quotes string

Constraints:
Sensitive value. Pass in as a secure parameter.
skipVerify Verify SSL for SMTP server. Default is false
https://pkg.go.dev/crypto/tls#Config
bool
startTLSPolicy The StartTLSPolicy setting of the SMTP configuration
https://pkg.go.dev/github.com/go-mail/mail#StartTLSPolicy
'MandatoryStartTLS'
'NoStartTLS'
'OpportunisticStartTLS'
user User of SMTP auth string

Snapshots

Name Description Value
externalEnabled Set to false to disable external snapshot publish endpoint bool

UserAssignedIdentities

Name Description Value

UserAssignedIdentity

Name Description Value

Users

Name Description Value
viewersCanEdit Set to true so viewers can access and use explore and perform temporary edits on panels in dashboards they have access to. They cannot save their changes. bool

Usage Examples

Azure Quickstart Templates

The following Azure Quickstart templates deploy this resource type.

Template Description
Create AKS with Prometheus and Grafana with privae link

Deploy to Azure
This will create an Azure grafana, AKS and install Prometheus, an open-source monitoring and alerting toolkit, on an Azure Kubernetes Service (AKS) cluster. Then you use Azure Managed Grafana's managed private endpoint to connect to this Prometheus server and display the Prometheus data in a Grafana dashboard

Terraform (AzAPI provider) resource definition

The grafana resource type can be deployed with operations that target:

  • Resource groups

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.Dashboard/grafana resource, add the following Terraform to your template.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Dashboard/grafana@2024-10-01"
  name = "string"
  identity = {
    type = "string"
    userAssignedIdentities = {
      {customized property} = {
      }
    }
  }
  location = "string"
  tags = {
    {customized property} = "string"
  }
  body = {
    properties = {
      apiKey = "string"
      autoGeneratedDomainNameLabelScope = "string"
      deterministicOutboundIP = "string"
      enterpriseConfigurations = {
        marketplaceAutoRenew = "string"
        marketplacePlanId = "string"
      }
      grafanaConfigurations = {
        security = {
          csrfAlwaysCheck = bool
        }
        smtp = {
          enabled = bool
          fromAddress = "string"
          fromName = "string"
          host = "string"
          password = "string"
          skipVerify = bool
          startTLSPolicy = "string"
          user = "string"
        }
        snapshots = {
          externalEnabled = bool
        }
        users = {
          viewersCanEdit = bool
        }
      }
      grafanaIntegrations = {
        azureMonitorWorkspaceIntegrations = [
          {
            azureMonitorWorkspaceResourceId = "string"
          }
        ]
      }
      grafanaMajorVersion = "string"
      grafanaPlugins = {
        {customized property} = {
        }
      }
      publicNetworkAccess = "string"
      zoneRedundancy = "string"
    }
    sku = {
      name = "string"
    }
  }
}

Property Values

AzureMonitorWorkspaceIntegration

Name Description Value
azureMonitorWorkspaceResourceId The resource Id of the connected Azure Monitor Workspace. string

EnterpriseConfigurations

Name Description Value
marketplaceAutoRenew The AutoRenew setting of the Enterprise subscription 'Disabled'
'Enabled'
marketplacePlanId The Plan Id of the Azure Marketplace subscription for the Enterprise plugins string

GrafanaConfigurations

Name Description Value
security Grafana security settings Security
smtp Email server settings.
https://grafana.com/docs/grafana/v9.0/setup-grafana/configure-grafana/#smtp
Smtp
snapshots Grafana Snapshots settings Snapshots
users Grafana users settings Users

GrafanaIntegrations

Name Description Value
azureMonitorWorkspaceIntegrations AzureMonitorWorkspaceIntegration[]

GrafanaPlugin

Name Description Value

ManagedGrafanaProperties

Name Description Value
apiKey The api key setting of the Grafana instance. 'Disabled'
'Enabled'
autoGeneratedDomainNameLabelScope Scope for dns deterministic name hash calculation. 'TenantReuse'
deterministicOutboundIP Whether a Grafana instance uses deterministic outbound IPs. 'Disabled'
'Enabled'
enterpriseConfigurations Enterprise settings of a Grafana instance EnterpriseConfigurations
grafanaConfigurations Server configurations of a Grafana instance GrafanaConfigurations
grafanaIntegrations GrafanaIntegrations is a bundled observability experience (e.g. pre-configured data source, tailored Grafana dashboards, alerting defaults) for common monitoring scenarios. GrafanaIntegrations
grafanaMajorVersion The major Grafana software version to target. string
grafanaPlugins Installed plugin list of the Grafana instance. Key is plugin id, value is plugin definition. ManagedGrafanaPropertiesGrafanaPlugins
publicNetworkAccess Indicate the state for enable or disable traffic over the public interface. 'Disabled'
'Enabled'
zoneRedundancy The zone redundancy setting of the Grafana instance. 'Disabled'
'Enabled'

ManagedGrafanaPropertiesGrafanaPlugins

Name Description Value

ManagedGrafanaTags

Name Description Value

ManagedServiceIdentity

Name Description Value
type Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). 'None'
'SystemAssigned'
'SystemAssigned,UserAssigned'
'UserAssigned' (required)
userAssignedIdentities The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. UserAssignedIdentities

Microsoft.Dashboard/grafana

Name Description Value
identity The managed identity of the grafana resource. ManagedServiceIdentity
location The geo-location where the grafana resource lives string
name The resource name string

Constraints:
Pattern = ^[a-zA-Z][a-z0-9A-Z-]{0,28}[a-z0-9A-Z]$ (required)
properties Properties specific to the grafana resource. ManagedGrafanaProperties
sku The Sku of the grafana resource. ResourceSku
tags Resource tags Dictionary of tag names and values.
type The resource type "Microsoft.Dashboard/grafana@2024-10-01"

ResourceSku

Name Description Value
name string (required)

Security

Name Description Value
csrfAlwaysCheck Set to true to execute the CSRF check even if the login cookie is not in a request (default false). bool

Smtp

Name Description Value
enabled Enable this to allow Grafana to send email. Default is false bool
fromAddress Address used when sending out emails
https://pkg.go.dev/net/mail#Address
string
fromName Name to be used when sending out emails. Default is "Azure Managed Grafana Notification"
https://pkg.go.dev/net/mail#Address
string
host SMTP server hostname with port, e.g. test.email.net:587 string
password Password of SMTP auth. If the password contains # or ;, then you have to wrap it with triple quotes string

Constraints:
Sensitive value. Pass in as a secure parameter.
skipVerify Verify SSL for SMTP server. Default is false
https://pkg.go.dev/crypto/tls#Config
bool
startTLSPolicy The StartTLSPolicy setting of the SMTP configuration
https://pkg.go.dev/github.com/go-mail/mail#StartTLSPolicy
'MandatoryStartTLS'
'NoStartTLS'
'OpportunisticStartTLS'
user User of SMTP auth string

Snapshots

Name Description Value
externalEnabled Set to false to disable external snapshot publish endpoint bool

UserAssignedIdentities

Name Description Value

UserAssignedIdentity

Name Description Value

Users

Name Description Value
viewersCanEdit Set to true so viewers can access and use explore and perform temporary edits on panels in dashboards they have access to. They cannot save their changes. bool