Azure Portal Dashboard
This page shows how to write Terraform and Azure Resource Manager for Portal Dashboard and write them securely.
azurerm_dashboard (Terraform)
The Dashboard in Portal can be configured in Terraform with the resource name azurerm_dashboard
. The following sections describe 9 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "azurerm_dashboard" "my-board" {
name = var.dashboard_name
resource_group_name = var.resource_group_name
location = var.resource_group_location
tags = var.tags
dashboard_properties = templatefile(var.template_file)
resource "azurerm_dashboard" "dashboard" {
name = var.dashboard_name
resource_group_name = azurerm_resource_group.dashboard.name
location = var.dashboard_location
dashboard_properties = templatefile("dashboard.tpl", {})
}
resource "azurerm_dashboard" "azfinsim" {
name = format("%s-dashboard",var.prefix)
resource_group_name = azurerm_resource_group.azfinsim.name
location = azurerm_resource_group.azfinsim.location
tags = {
source = "terraform"
resource "azurerm_dashboard" "dashboard" {
name = local.dashboard_name
resource_group_name = var.resource_group_name
location = var.location
dashboard_properties = templatefile(var.dashboard_json_path,
{
resource "azurerm_dashboard" "chatbot-board" {
name = local.prefix
resource_group_name = local.resource_groups_L2.Dashboard.name
location = local.resource_groups_L2.Dashboard.location
tags = {
source = "terraform"
resource "azurerm_dashboard" "chatbot-board" {
name = local.prefix
resource_group_name = local.resource_groups_L2.Dashboard.name
location = local.resource_groups_L2.Dashboard.location
tags = {
source = "terraform"
resource "azurerm_dashboard" "my-board" {
name = "my-cool-dashboard"
resource_group_name = local.azure_asset_names.azurerm_resource_group
location = "eastus"
tags = {
source = "terraform"
resource "azurerm_dashboard" "my_dashboard" {
name = var.res_dashboard_name
resource_group_name = var.res_rg_name
location = var.res_location
tags = {
source = "terraform"
resource "azurerm_dashboard" "this" {
dashboard_properties = var.dashboard_properties
location = var.location
name = var.name
resource_group_name = var.resource_group_name
tags = var.tags
Parameters
-
dashboard_properties
optional computed - string -
id
optional computed - string -
location
required - string -
name
required - string -
resource_group_name
required - string -
tags
optional - map from string to string -
timeouts
single block
Explanation in Terraform Registry
Manages a shared dashboard in the Azure Portal.
Microsoft.Portal/dashboards (Azure Resource Manager)
The dashboards in Microsoft.Portal can be configured in Azure Resource Manager with the resource name Microsoft.Portal/dashboards
. The following sections describe how to use the resource and its parameters.
Example Usage from GitHub
"type": "Microsoft.Portal/dashboards",
"location": "eastus",
"tags": {
"aKey": "aValue",
"anotherKey": "anotherValue"
}
"type": "Microsoft.Portal/dashboards",
"location": "eastus",
"tags": {
"aKey": "aValue",
"anotherKey": "anotherValue"
}
"type": "Microsoft.Portal/dashboards",
"location": "eastus",
"tags": {
"aKey": "aValue",
"anotherKey": "anotherValue"
}
"type": "Microsoft.Portal/dashboards",
"location": "eastus",
"tags": {
"aKey": "aValue",
"anotherKey": "anotherValue"
}
"type": "Microsoft.Portal/dashboards",
"location": "eastus",
"tags": {
"aKey": "aValue",
"anotherKey": "anotherValue"
}
"type": "Microsoft.Portal/dashboards",
"location": "eastus",
"tags": {
"aKey": "aValue",
"anotherKey": "anotherValue"
}
"type": "Microsoft.Portal/dashboards",
"location": "eastus",
"tags": {
"aKey": "aValue",
"anotherKey": "anotherValue"
}
"type": "Microsoft.Portal/dashboards",
"location": "eastus",
"tags": {
"aKey": "aValue",
"anotherKey": "anotherValue"
}
"type": "Microsoft.Portal/dashboards",
"location": "eastus",
"tags": {
"aKey": "aValue",
"anotherKey": "anotherValue"
}
"type": "Microsoft.Portal/dashboards",
"location": "eastus",
"tags": {
"aKey": "aValue",
"anotherKey": "anotherValue"
}
Frequently asked questions
What is Azure Portal Dashboard?
Azure Portal Dashboard is a resource for Portal of Microsoft Azure. Settings can be wrote in Terraform.
Where can I find the example code for the Azure Portal Dashboard?
For Terraform, the prashant101386/devops, jwendl/authorization-service-example and mkiernan/azfinsim source code examples are useful. See the Terraform Example section for further details.
For Azure Resource Manager, the otubukhay/kayrepotest, otubukhay/kayrepotest and otubukhay/kayrepotest source code examples are useful. See the Azure Resource Manager Example section for further details.