We recommend using Azure Native.
published on Wednesday, Apr 1, 2026 by Pulumi
We recommend using Azure Native.
published on Wednesday, Apr 1, 2026 by Pulumi
Manages a shared dashboard in the Azure Portal.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const config = new pulumi.Config();
// Content for the MD tile
const mdContent = config.get("mdContent") || "# Hello all :)";
// Link to a video
const videoLink = config.get("videoLink") || "https://www.youtube.com/watch?v=......";
const current = azure.core.getSubscription({});
const example = new azure.core.ResourceGroup("example", {
name: "mygroup",
location: "West Europe",
});
const my_board = new azure.portal.PortalDashboard("my-board", {
name: "my-cool-dashboard",
resourceGroupName: example.name,
location: example.location,
tags: {
source: "terraform",
},
dashboardProperties: current.then(current => `{
\"lenses\": {
\"0\": {
\"order\": 0,
\"parts\": {
\"0\": {
\"position\": {
\"x\": 0,
\"y\": 0,
\"rowSpan\": 2,
\"colSpan\": 3
},
\"metadata\": {
\"inputs\": [],
\"type\": \"Extension/HubsExtension/PartType/MarkdownPart\",
\"settings\": {
\"content\": {
\"settings\": {
\"content\": \"${mdContent}\",
\"subtitle\": \"\",
\"title\": \"\"
}
}
}
}
},
\"1\": {
\"position\": {
\"x\": 5,
\"y\": 0,
\"rowSpan\": 4,
\"colSpan\": 6
},
\"metadata\": {
\"inputs\": [],
\"type\": \"Extension/HubsExtension/PartType/VideoPart\",
\"settings\": {
\"content\": {
\"settings\": {
\"title\": \"Important Information\",
\"subtitle\": \"\",
\"src\": \"${videoLink}\",
\"autoplay\": true
}
}
}
}
},
\"2\": {
\"position\": {
\"x\": 0,
\"y\": 4,
\"rowSpan\": 4,
\"colSpan\": 6
},
\"metadata\": {
\"inputs\": [
{
\"name\": \"ComponentId\",
\"value\": \"/subscriptions/${current.subscriptionId}/resourceGroups/myRG/providers/microsoft.insights/components/myWebApp\"
}
],
\"type\": \"Extension/AppInsightsExtension/PartType/AppMapGalPt\",
\"settings\": {},
\"asset\": {
\"idInputName\": \"ComponentId\",
\"type\": \"ApplicationInsights\"
}
}
}
}
}
},
\"metadata\": {
\"model\": {
\"timeRange\": {
\"value\": {
\"relative\": {
\"duration\": 24,
\"timeUnit\": 1
}
},
\"type\": \"MsPortalFx.Composition.Configuration.ValueTypes.TimeRange\"
},
\"filterLocale\": {
\"value\": \"en-us\"
},
\"filters\": {
\"value\": {
\"MsPortalFx_TimeRange\": {
\"model\": {
\"format\": \"utc\",
\"granularity\": \"auto\",
\"relative\": \"24h\"
},
\"displayCache\": {
\"name\": \"UTC Time\",
\"value\": \"Past 24 hours\"
},
\"filteredPartIds\": [
\"StartboardPart-UnboundPart-ae44fef5-76b8-46b0-86f0-2b3f47bad1c7\"
]
}
}
}
}
}
}
`),
});
import pulumi
import pulumi_azure as azure
config = pulumi.Config()
# Content for the MD tile
md_content = config.get("mdContent")
if md_content is None:
md_content = "# Hello all :)"
# Link to a video
video_link = config.get("videoLink")
if video_link is None:
video_link = "https://www.youtube.com/watch?v=......"
current = azure.core.get_subscription()
example = azure.core.ResourceGroup("example",
name="mygroup",
location="West Europe")
my_board = azure.portal.PortalDashboard("my-board",
name="my-cool-dashboard",
resource_group_name=example.name,
location=example.location,
tags={
"source": "terraform",
},
dashboard_properties=f"""{{
\"lenses\": {{
\"0\": {{
\"order\": 0,
\"parts\": {{
\"0\": {{
\"position\": {{
\"x\": 0,
\"y\": 0,
\"rowSpan\": 2,
\"colSpan\": 3
}},
\"metadata\": {{
\"inputs\": [],
\"type\": \"Extension/HubsExtension/PartType/MarkdownPart\",
\"settings\": {{
\"content\": {{
\"settings\": {{
\"content\": \"{md_content}\",
\"subtitle\": \"\",
\"title\": \"\"
}}
}}
}}
}}
}},
\"1\": {{
\"position\": {{
\"x\": 5,
\"y\": 0,
\"rowSpan\": 4,
\"colSpan\": 6
}},
\"metadata\": {{
\"inputs\": [],
\"type\": \"Extension/HubsExtension/PartType/VideoPart\",
\"settings\": {{
\"content\": {{
\"settings\": {{
\"title\": \"Important Information\",
\"subtitle\": \"\",
\"src\": \"{video_link}\",
\"autoplay\": true
}}
}}
}}
}}
}},
\"2\": {{
\"position\": {{
\"x\": 0,
\"y\": 4,
\"rowSpan\": 4,
\"colSpan\": 6
}},
\"metadata\": {{
\"inputs\": [
{{
\"name\": \"ComponentId\",
\"value\": \"/subscriptions/{current.subscription_id}/resourceGroups/myRG/providers/microsoft.insights/components/myWebApp\"
}}
],
\"type\": \"Extension/AppInsightsExtension/PartType/AppMapGalPt\",
\"settings\": {{}},
\"asset\": {{
\"idInputName\": \"ComponentId\",
\"type\": \"ApplicationInsights\"
}}
}}
}}
}}
}}
}},
\"metadata\": {{
\"model\": {{
\"timeRange\": {{
\"value\": {{
\"relative\": {{
\"duration\": 24,
\"timeUnit\": 1
}}
}},
\"type\": \"MsPortalFx.Composition.Configuration.ValueTypes.TimeRange\"
}},
\"filterLocale\": {{
\"value\": \"en-us\"
}},
\"filters\": {{
\"value\": {{
\"MsPortalFx_TimeRange\": {{
\"model\": {{
\"format\": \"utc\",
\"granularity\": \"auto\",
\"relative\": \"24h\"
}},
\"displayCache\": {{
\"name\": \"UTC Time\",
\"value\": \"Past 24 hours\"
}},
\"filteredPartIds\": [
\"StartboardPart-UnboundPart-ae44fef5-76b8-46b0-86f0-2b3f47bad1c7\"
]
}}
}}
}}
}}
}}
}}
""")
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/portal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
// Content for the MD tile
mdContent := "# Hello all :)"
if param := cfg.Get("mdContent"); param != "" {
mdContent = param
}
// Link to a video
videoLink := "https://www.youtube.com/watch?v=......"
if param := cfg.Get("videoLink"); param != "" {
videoLink = param
}
current, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil)
if err != nil {
return err
}
example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("mygroup"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
_, err = portal.NewPortalDashboard(ctx, "my-board", &portal.PortalDashboardArgs{
Name: pulumi.String("my-cool-dashboard"),
ResourceGroupName: example.Name,
Location: example.Location,
Tags: pulumi.StringMap{
"source": pulumi.String("terraform"),
},
DashboardProperties: pulumi.Sprintf(`{
\"lenses\": {
\"0\": {
\"order\": 0,
\"parts\": {
\"0\": {
\"position\": {
\"x\": 0,
\"y\": 0,
\"rowSpan\": 2,
\"colSpan\": 3
},
\"metadata\": {
\"inputs\": [],
\"type\": \"Extension/HubsExtension/PartType/MarkdownPart\",
\"settings\": {
\"content\": {
\"settings\": {
\"content\": \"%v\",
\"subtitle\": \"\",
\"title\": \"\"
}
}
}
}
},
\"1\": {
\"position\": {
\"x\": 5,
\"y\": 0,
\"rowSpan\": 4,
\"colSpan\": 6
},
\"metadata\": {
\"inputs\": [],
\"type\": \"Extension/HubsExtension/PartType/VideoPart\",
\"settings\": {
\"content\": {
\"settings\": {
\"title\": \"Important Information\",
\"subtitle\": \"\",
\"src\": \"%v\",
\"autoplay\": true
}
}
}
}
},
\"2\": {
\"position\": {
\"x\": 0,
\"y\": 4,
\"rowSpan\": 4,
\"colSpan\": 6
},
\"metadata\": {
\"inputs\": [
{
\"name\": \"ComponentId\",
\"value\": \"/subscriptions/%v/resourceGroups/myRG/providers/microsoft.insights/components/myWebApp\"
}
],
\"type\": \"Extension/AppInsightsExtension/PartType/AppMapGalPt\",
\"settings\": {},
\"asset\": {
\"idInputName\": \"ComponentId\",
\"type\": \"ApplicationInsights\"
}
}
}
}
}
},
\"metadata\": {
\"model\": {
\"timeRange\": {
\"value\": {
\"relative\": {
\"duration\": 24,
\"timeUnit\": 1
}
},
\"type\": \"MsPortalFx.Composition.Configuration.ValueTypes.TimeRange\"
},
\"filterLocale\": {
\"value\": \"en-us\"
},
\"filters\": {
\"value\": {
\"MsPortalFx_TimeRange\": {
\"model\": {
\"format\": \"utc\",
\"granularity\": \"auto\",
\"relative\": \"24h\"
},
\"displayCache\": {
\"name\": \"UTC Time\",
\"value\": \"Past 24 hours\"
},
\"filteredPartIds\": [
\"StartboardPart-UnboundPart-ae44fef5-76b8-46b0-86f0-2b3f47bad1c7\"
]
}
}
}
}
}
}
`, mdContent, videoLink, current.SubscriptionId),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var config = new Config();
// Content for the MD tile
var mdContent = config.Get("mdContent") ?? "# Hello all :)";
// Link to a video
var videoLink = config.Get("videoLink") ?? "https://www.youtube.com/watch?v=......";
var current = Azure.Core.GetSubscription.Invoke();
var example = new Azure.Core.ResourceGroup("example", new()
{
Name = "mygroup",
Location = "West Europe",
});
var my_board = new Azure.Portal.PortalDashboard("my-board", new()
{
Name = "my-cool-dashboard",
ResourceGroupName = example.Name,
Location = example.Location,
Tags =
{
{ "source", "terraform" },
},
DashboardProperties = @$"{{
\""lenses\"": {{
\""0\"": {{
\""order\"": 0,
\""parts\"": {{
\""0\"": {{
\""position\"": {{
\""x\"": 0,
\""y\"": 0,
\""rowSpan\"": 2,
\""colSpan\"": 3
}},
\""metadata\"": {{
\""inputs\"": [],
\""type\"": \""Extension/HubsExtension/PartType/MarkdownPart\"",
\""settings\"": {{
\""content\"": {{
\""settings\"": {{
\""content\"": \""{mdContent}\"",
\""subtitle\"": \""\"",
\""title\"": \""\""
}}
}}
}}
}}
}},
\""1\"": {{
\""position\"": {{
\""x\"": 5,
\""y\"": 0,
\""rowSpan\"": 4,
\""colSpan\"": 6
}},
\""metadata\"": {{
\""inputs\"": [],
\""type\"": \""Extension/HubsExtension/PartType/VideoPart\"",
\""settings\"": {{
\""content\"": {{
\""settings\"": {{
\""title\"": \""Important Information\"",
\""subtitle\"": \""\"",
\""src\"": \""{videoLink}\"",
\""autoplay\"": true
}}
}}
}}
}}
}},
\""2\"": {{
\""position\"": {{
\""x\"": 0,
\""y\"": 4,
\""rowSpan\"": 4,
\""colSpan\"": 6
}},
\""metadata\"": {{
\""inputs\"": [
{{
\""name\"": \""ComponentId\"",
\""value\"": \""/subscriptions/{current.Apply(getSubscriptionResult => getSubscriptionResult.SubscriptionId)}/resourceGroups/myRG/providers/microsoft.insights/components/myWebApp\""
}}
],
\""type\"": \""Extension/AppInsightsExtension/PartType/AppMapGalPt\"",
\""settings\"": {{}},
\""asset\"": {{
\""idInputName\"": \""ComponentId\"",
\""type\"": \""ApplicationInsights\""
}}
}}
}}
}}
}}
}},
\""metadata\"": {{
\""model\"": {{
\""timeRange\"": {{
\""value\"": {{
\""relative\"": {{
\""duration\"": 24,
\""timeUnit\"": 1
}}
}},
\""type\"": \""MsPortalFx.Composition.Configuration.ValueTypes.TimeRange\""
}},
\""filterLocale\"": {{
\""value\"": \""en-us\""
}},
\""filters\"": {{
\""value\"": {{
\""MsPortalFx_TimeRange\"": {{
\""model\"": {{
\""format\"": \""utc\"",
\""granularity\"": \""auto\"",
\""relative\"": \""24h\""
}},
\""displayCache\"": {{
\""name\"": \""UTC Time\"",
\""value\"": \""Past 24 hours\""
}},
\""filteredPartIds\"": [
\""StartboardPart-UnboundPart-ae44fef5-76b8-46b0-86f0-2b3f47bad1c7\""
]
}}
}}
}}
}}
}}
}}
",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.CoreFunctions;
import com.pulumi.azure.core.inputs.GetSubscriptionArgs;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.portal.PortalDashboard;
import com.pulumi.azure.portal.PortalDashboardArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var mdContent = config.get("mdContent").orElse("# Hello all :)");
final var videoLink = config.get("videoLink").orElse("https://www.youtube.com/watch?v=......");
final var current = CoreFunctions.getSubscription(GetSubscriptionArgs.builder()
.build());
var example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("mygroup")
.location("West Europe")
.build());
var my_board = new PortalDashboard("my-board", PortalDashboardArgs.builder()
.name("my-cool-dashboard")
.resourceGroupName(example.name())
.location(example.location())
.tags(Map.of("source", "terraform"))
.dashboardProperties("""
{
\"lenses\": {
\"0\": {
\"order\": 0,
\"parts\": {
\"0\": {
\"position\": {
\"x\": 0,
\"y\": 0,
\"rowSpan\": 2,
\"colSpan\": 3
},
\"metadata\": {
\"inputs\": [],
\"type\": \"Extension/HubsExtension/PartType/MarkdownPart\",
\"settings\": {
\"content\": {
\"settings\": {
\"content\": \"%s\",
\"subtitle\": \"\",
\"title\": \"\"
}
}
}
}
},
\"1\": {
\"position\": {
\"x\": 5,
\"y\": 0,
\"rowSpan\": 4,
\"colSpan\": 6
},
\"metadata\": {
\"inputs\": [],
\"type\": \"Extension/HubsExtension/PartType/VideoPart\",
\"settings\": {
\"content\": {
\"settings\": {
\"title\": \"Important Information\",
\"subtitle\": \"\",
\"src\": \"%s\",
\"autoplay\": true
}
}
}
}
},
\"2\": {
\"position\": {
\"x\": 0,
\"y\": 4,
\"rowSpan\": 4,
\"colSpan\": 6
},
\"metadata\": {
\"inputs\": [
{
\"name\": \"ComponentId\",
\"value\": \"/subscriptions/%s/resourceGroups/myRG/providers/microsoft.insights/components/myWebApp\"
}
],
\"type\": \"Extension/AppInsightsExtension/PartType/AppMapGalPt\",
\"settings\": {},
\"asset\": {
\"idInputName\": \"ComponentId\",
\"type\": \"ApplicationInsights\"
}
}
}
}
}
},
\"metadata\": {
\"model\": {
\"timeRange\": {
\"value\": {
\"relative\": {
\"duration\": 24,
\"timeUnit\": 1
}
},
\"type\": \"MsPortalFx.Composition.Configuration.ValueTypes.TimeRange\"
},
\"filterLocale\": {
\"value\": \"en-us\"
},
\"filters\": {
\"value\": {
\"MsPortalFx_TimeRange\": {
\"model\": {
\"format\": \"utc\",
\"granularity\": \"auto\",
\"relative\": \"24h\"
},
\"displayCache\": {
\"name\": \"UTC Time\",
\"value\": \"Past 24 hours\"
},
\"filteredPartIds\": [
\"StartboardPart-UnboundPart-ae44fef5-76b8-46b0-86f0-2b3f47bad1c7\"
]
}
}
}
}
}
}
", mdContent,videoLink,current.subscriptionId()))
.build());
}
}
configuration:
mdContent:
type: string
default: '# Hello all :)'
videoLink:
type: string
default: https://www.youtube.com/watch?v=......
resources:
example:
type: azure:core:ResourceGroup
properties:
name: mygroup
location: West Europe
my-board:
type: azure:portal:PortalDashboard
properties:
name: my-cool-dashboard
resourceGroupName: ${example.name}
location: ${example.location}
tags:
source: terraform
dashboardProperties: "{\n \\\"lenses\\\": {\n \\\"0\\\": {\n \\\"order\\\": 0,\n \\\"parts\\\": {\n \\\"0\\\": {\n \\\"position\\\": {\n \\\"x\\\": 0,\n \\\"y\\\": 0,\n \\\"rowSpan\\\": 2,\n \\\"colSpan\\\": 3\n },\n \\\"metadata\\\": {\n \\\"inputs\\\": [],\n \\\"type\\\": \\\"Extension/HubsExtension/PartType/MarkdownPart\\\",\n \\\"settings\\\": {\n \\\"content\\\": {\n \\\"settings\\\": {\n \\\"content\\\": \\\"${mdContent}\\\",\n \\\"subtitle\\\": \\\"\\\",\n \\\"title\\\": \\\"\\\"\n }\n }\n }\n }\n }, \n \\\"1\\\": {\n \\\"position\\\": {\n \\\"x\\\": 5,\n \\\"y\\\": 0,\n \\\"rowSpan\\\": 4,\n \\\"colSpan\\\": 6\n },\n \\\"metadata\\\": {\n \\\"inputs\\\": [],\n \\\"type\\\": \\\"Extension/HubsExtension/PartType/VideoPart\\\",\n \\\"settings\\\": {\n \\\"content\\\": {\n \\\"settings\\\": {\n \\\"title\\\": \\\"Important Information\\\",\n \\\"subtitle\\\": \\\"\\\",\n \\\"src\\\": \\\"${videoLink}\\\",\n \\\"autoplay\\\": true\n }\n }\n }\n }\n },\n \\\"2\\\": {\n \\\"position\\\": {\n \\\"x\\\": 0,\n \\\"y\\\": 4,\n \\\"rowSpan\\\": 4,\n \\\"colSpan\\\": 6\n },\n \\\"metadata\\\": {\n \\\"inputs\\\": [\n {\n \\\"name\\\": \\\"ComponentId\\\",\n \\\"value\\\": \\\"/subscriptions/${current.subscriptionId}/resourceGroups/myRG/providers/microsoft.insights/components/myWebApp\\\"\n }\n ],\n \\\"type\\\": \\\"Extension/AppInsightsExtension/PartType/AppMapGalPt\\\",\n \\\"settings\\\": {},\n \\\"asset\\\": {\n \\\"idInputName\\\": \\\"ComponentId\\\",\n \\\"type\\\": \\\"ApplicationInsights\\\"\n }\n }\n } \n }\n }\n },\n \\\"metadata\\\": {\n \\\"model\\\": {\n \\\"timeRange\\\": {\n \\\"value\\\": {\n \\\"relative\\\": {\n \\\"duration\\\": 24,\n \\\"timeUnit\\\": 1\n }\n },\n \\\"type\\\": \\\"MsPortalFx.Composition.Configuration.ValueTypes.TimeRange\\\"\n },\n \\\"filterLocale\\\": {\n \\\"value\\\": \\\"en-us\\\"\n },\n \\\"filters\\\": {\n \\\"value\\\": {\n \\\"MsPortalFx_TimeRange\\\": {\n \\\"model\\\": {\n \\\"format\\\": \\\"utc\\\",\n \\\"granularity\\\": \\\"auto\\\",\n \\\"relative\\\": \\\"24h\\\"\n },\n \\\"displayCache\\\": {\n \\\"name\\\": \\\"UTC Time\\\",\n \\\"value\\\": \\\"Past 24 hours\\\"\n },\n \\\"filteredPartIds\\\": [\n \\\"StartboardPart-UnboundPart-ae44fef5-76b8-46b0-86f0-2b3f47bad1c7\\\"\n ]\n }\n }\n }\n }\n }\n}\n"
variables:
current:
fn::invoke:
function: azure:core:getSubscription
arguments: {}
It is recommended to follow the steps outlined
here to create a Dashboard in the Portal and extract the relevant JSON to use in this resource. From the extracted JSON, the contents of the properties: {} object can used. Variables can be injected as needed - see above example.
Using a templateFile data source or the templatefile function
Since the contents of the dashboard JSON can be quite lengthy, use a template file to improve readability:
dash.tpl:
{
"lenses": {
"0": {
"order": 0,
"parts": {
"0": {
"position": {
"x": 0,
"y": 0,
"rowSpan": 2,
"colSpan": 3
},
"metadata": {
"inputs": [],
"type": "Extension/HubsExtension/PartType/MarkdownPart",
"settings": {
"content": {
"settings": {
"content": "${md_content}", // <-- note the 'var.' is dropped
"subtitle": "",
"title": ""
}
}
}
}
},
...
...
This is then referenced in the .tf file by using a templateFile data source (terraform 0.11 or earlier), or the templatefile function (terraform 0.12+).
main.tf (terraform 0.11 or earlier):
import * as pulumi from "@pulumi/pulumi";
import * as azurerm from "@pulumi/azurerm";
function notImplemented(message: string) {
throw new Error(message);
}
const dash_template = notImplemented("The template_file data resource is not yet supported.");
//...
const my_board = new azurerm.index.Dashboard("my-board", {
name: "my-cool-dashboard",
resourceGroupName: example.name,
location: example.location,
tags: {
source: "terraform",
},
dashboardProperties: dash_template.rendered,
});
import pulumi
import pulumi_azurerm as azurerm
def not_implemented(msg):
raise NotImplementedError(msg)
dash_template = not_implemented("The template_file data resource is not yet supported.")
#...
my_board = azurerm.index.Dashboard("my-board",
name=my-cool-dashboard,
resource_group_name=example.name,
location=example.location,
tags={
source: terraform,
},
dashboard_properties=dash_template.rendered)
package main
import (
"github.com/pulumi/pulumi-azurerm/sdk/go/azurerm"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func notImplemented(message string) pulumi.AnyOutput {
panic(message)
}
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
dash_template := notImplemented("The template_file data resource is not yet supported.")
// ...
_, err := azurerm.NewDashboard(ctx, "my-board", &azurerm.DashboardArgs{
Name: "my-cool-dashboard",
ResourceGroupName: example.Name,
Location: example.Location,
Tags: map[string]interface{}{
"source": "terraform",
},
DashboardProperties: dash_template.Rendered,
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azurerm = Pulumi.Azurerm;
object NotImplemented(string errorMessage)
{
throw new System.NotImplementedException(errorMessage);
}
return await Deployment.RunAsync(() =>
{
var dash_template = NotImplemented("The template_file data resource is not yet supported.");
//...
var my_board = new Azurerm.Index.Dashboard("my-board", new()
{
Name = "my-cool-dashboard",
ResourceGroupName = example.Name,
Location = example.Location,
Tags =
{
{ "source", "terraform" },
},
DashboardProperties = dash_template.Rendered,
});
});
Example coming soon!
Example coming soon!
main.tf (terraform 0.12+)
Create PortalDashboard Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PortalDashboard(name: string, args: PortalDashboardArgs, opts?: CustomResourceOptions);@overload
def PortalDashboard(resource_name: str,
args: PortalDashboardArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PortalDashboard(resource_name: str,
opts: Optional[ResourceOptions] = None,
dashboard_properties: Optional[str] = None,
resource_group_name: Optional[str] = None,
location: Optional[str] = None,
name: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None)func NewPortalDashboard(ctx *Context, name string, args PortalDashboardArgs, opts ...ResourceOption) (*PortalDashboard, error)public PortalDashboard(string name, PortalDashboardArgs args, CustomResourceOptions? opts = null)
public PortalDashboard(String name, PortalDashboardArgs args)
public PortalDashboard(String name, PortalDashboardArgs args, CustomResourceOptions options)
type: azure:portal:PortalDashboard
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args PortalDashboardArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args PortalDashboardArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args PortalDashboardArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PortalDashboardArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PortalDashboardArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var portalDashboardResource = new Azure.Portal.PortalDashboard("portalDashboardResource", new()
{
DashboardProperties = "string",
ResourceGroupName = "string",
Location = "string",
Name = "string",
Tags =
{
{ "string", "string" },
},
});
example, err := portal.NewPortalDashboard(ctx, "portalDashboardResource", &portal.PortalDashboardArgs{
DashboardProperties: pulumi.String("string"),
ResourceGroupName: pulumi.String("string"),
Location: pulumi.String("string"),
Name: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var portalDashboardResource = new PortalDashboard("portalDashboardResource", PortalDashboardArgs.builder()
.dashboardProperties("string")
.resourceGroupName("string")
.location("string")
.name("string")
.tags(Map.of("string", "string"))
.build());
portal_dashboard_resource = azure.portal.PortalDashboard("portalDashboardResource",
dashboard_properties="string",
resource_group_name="string",
location="string",
name="string",
tags={
"string": "string",
})
const portalDashboardResource = new azure.portal.PortalDashboard("portalDashboardResource", {
dashboardProperties: "string",
resourceGroupName: "string",
location: "string",
name: "string",
tags: {
string: "string",
},
});
type: azure:portal:PortalDashboard
properties:
dashboardProperties: string
location: string
name: string
resourceGroupName: string
tags:
string: string
PortalDashboard Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The PortalDashboard resource accepts the following input properties:
- Dashboard
Properties string - JSON data representing dashboard body. See above for details on how to obtain this from the Portal.
- Resource
Group stringName - The name of the resource group in which to create the dashboard. Changing this forces a new resource to be created.
- Location string
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Name string
Specifies the name of the Shared Dashboard. Changing this forces a new resource to be created.
Note: You can specify a tag with the key
hidden-titleto set a more user-friendly title for this Dashboard.- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Dashboard
Properties string - JSON data representing dashboard body. See above for details on how to obtain this from the Portal.
- Resource
Group stringName - The name of the resource group in which to create the dashboard. Changing this forces a new resource to be created.
- Location string
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Name string
Specifies the name of the Shared Dashboard. Changing this forces a new resource to be created.
Note: You can specify a tag with the key
hidden-titleto set a more user-friendly title for this Dashboard.- map[string]string
- A mapping of tags to assign to the resource.
- dashboard
Properties String - JSON data representing dashboard body. See above for details on how to obtain this from the Portal.
- resource
Group StringName - The name of the resource group in which to create the dashboard. Changing this forces a new resource to be created.
- location String
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name String
Specifies the name of the Shared Dashboard. Changing this forces a new resource to be created.
Note: You can specify a tag with the key
hidden-titleto set a more user-friendly title for this Dashboard.- Map<String,String>
- A mapping of tags to assign to the resource.
- dashboard
Properties string - JSON data representing dashboard body. See above for details on how to obtain this from the Portal.
- resource
Group stringName - The name of the resource group in which to create the dashboard. Changing this forces a new resource to be created.
- location string
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name string
Specifies the name of the Shared Dashboard. Changing this forces a new resource to be created.
Note: You can specify a tag with the key
hidden-titleto set a more user-friendly title for this Dashboard.- {[key: string]: string}
- A mapping of tags to assign to the resource.
- dashboard_
properties str - JSON data representing dashboard body. See above for details on how to obtain this from the Portal.
- resource_
group_ strname - The name of the resource group in which to create the dashboard. Changing this forces a new resource to be created.
- location str
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name str
Specifies the name of the Shared Dashboard. Changing this forces a new resource to be created.
Note: You can specify a tag with the key
hidden-titleto set a more user-friendly title for this Dashboard.- Mapping[str, str]
- A mapping of tags to assign to the resource.
- dashboard
Properties String - JSON data representing dashboard body. See above for details on how to obtain this from the Portal.
- resource
Group StringName - The name of the resource group in which to create the dashboard. Changing this forces a new resource to be created.
- location String
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name String
Specifies the name of the Shared Dashboard. Changing this forces a new resource to be created.
Note: You can specify a tag with the key
hidden-titleto set a more user-friendly title for this Dashboard.- Map<String>
- A mapping of tags to assign to the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the PortalDashboard resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing PortalDashboard Resource
Get an existing PortalDashboard resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: PortalDashboardState, opts?: CustomResourceOptions): PortalDashboard@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
dashboard_properties: Optional[str] = None,
location: Optional[str] = None,
name: Optional[str] = None,
resource_group_name: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None) -> PortalDashboardfunc GetPortalDashboard(ctx *Context, name string, id IDInput, state *PortalDashboardState, opts ...ResourceOption) (*PortalDashboard, error)public static PortalDashboard Get(string name, Input<string> id, PortalDashboardState? state, CustomResourceOptions? opts = null)public static PortalDashboard get(String name, Output<String> id, PortalDashboardState state, CustomResourceOptions options)resources: _: type: azure:portal:PortalDashboard get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Dashboard
Properties string - JSON data representing dashboard body. See above for details on how to obtain this from the Portal.
- Location string
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Name string
Specifies the name of the Shared Dashboard. Changing this forces a new resource to be created.
Note: You can specify a tag with the key
hidden-titleto set a more user-friendly title for this Dashboard.- Resource
Group stringName - The name of the resource group in which to create the dashboard. Changing this forces a new resource to be created.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Dashboard
Properties string - JSON data representing dashboard body. See above for details on how to obtain this from the Portal.
- Location string
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Name string
Specifies the name of the Shared Dashboard. Changing this forces a new resource to be created.
Note: You can specify a tag with the key
hidden-titleto set a more user-friendly title for this Dashboard.- Resource
Group stringName - The name of the resource group in which to create the dashboard. Changing this forces a new resource to be created.
- map[string]string
- A mapping of tags to assign to the resource.
- dashboard
Properties String - JSON data representing dashboard body. See above for details on how to obtain this from the Portal.
- location String
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name String
Specifies the name of the Shared Dashboard. Changing this forces a new resource to be created.
Note: You can specify a tag with the key
hidden-titleto set a more user-friendly title for this Dashboard.- resource
Group StringName - The name of the resource group in which to create the dashboard. Changing this forces a new resource to be created.
- Map<String,String>
- A mapping of tags to assign to the resource.
- dashboard
Properties string - JSON data representing dashboard body. See above for details on how to obtain this from the Portal.
- location string
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name string
Specifies the name of the Shared Dashboard. Changing this forces a new resource to be created.
Note: You can specify a tag with the key
hidden-titleto set a more user-friendly title for this Dashboard.- resource
Group stringName - The name of the resource group in which to create the dashboard. Changing this forces a new resource to be created.
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- dashboard_
properties str - JSON data representing dashboard body. See above for details on how to obtain this from the Portal.
- location str
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name str
Specifies the name of the Shared Dashboard. Changing this forces a new resource to be created.
Note: You can specify a tag with the key
hidden-titleto set a more user-friendly title for this Dashboard.- resource_
group_ strname - The name of the resource group in which to create the dashboard. Changing this forces a new resource to be created.
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- dashboard
Properties String - JSON data representing dashboard body. See above for details on how to obtain this from the Portal.
- location String
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name String
Specifies the name of the Shared Dashboard. Changing this forces a new resource to be created.
Note: You can specify a tag with the key
hidden-titleto set a more user-friendly title for this Dashboard.- resource
Group StringName - The name of the resource group in which to create the dashboard. Changing this forces a new resource to be created.
- Map<String>
- A mapping of tags to assign to the resource.
Import
Dashboards can be imported using the resource id, e.g.
$ pulumi import azure:portal/portalDashboard:PortalDashboard my-board /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Portal/dashboards/00000000-0000-0000-0000-000000000000
Note the URI in the above sample can be found using the Resource Explorer tool in the Azure Portal.
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.
We recommend using Azure Native.
published on Wednesday, Apr 1, 2026 by Pulumi
