Viewing docs for Grafana v2.21.0
published on Tuesday, Mar 3, 2026 by pulumiverse
published on Tuesday, Mar 3, 2026 by pulumiverse
Viewing docs for Grafana v2.21.0
published on Tuesday, Mar 3, 2026 by pulumiverse
published on Tuesday, Mar 3, 2026 by pulumiverse
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as grafana from "@pulumiverse/grafana";
const test = new grafana.oss.Dashboard("test", {configJson: JSON.stringify({
id: 12345,
uid: "test-ds-dashboard-uid",
title: "Production Overview",
tags: ["templated"],
timezone: "browser",
schemaVersion: 16,
version: 0,
refresh: "25s",
})});
const fromUid = grafana.oss.getDashboard({
uid: "test-ds-dashboard-uid",
});
import pulumi
import json
import pulumi_grafana as grafana
import pulumiverse_grafana as grafana
test = grafana.oss.Dashboard("test", config_json=json.dumps({
"id": 12345,
"uid": "test-ds-dashboard-uid",
"title": "Production Overview",
"tags": ["templated"],
"timezone": "browser",
"schemaVersion": 16,
"version": 0,
"refresh": "25s",
}))
from_uid = grafana.oss.get_dashboard(uid="test-ds-dashboard-uid")
package main
import (
"encoding/json"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-grafana/sdk/v2/go/grafana/oss"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
tmpJSON0, err := json.Marshal(map[string]interface{}{
"id": 12345,
"uid": "test-ds-dashboard-uid",
"title": "Production Overview",
"tags": []string{
"templated",
},
"timezone": "browser",
"schemaVersion": 16,
"version": 0,
"refresh": "25s",
})
if err != nil {
return err
}
json0 := string(tmpJSON0)
_, err = oss.NewDashboard(ctx, "test", &oss.DashboardArgs{
ConfigJson: pulumi.String(json0),
})
if err != nil {
return err
}
_, err = oss.LookupDashboard(ctx, &oss.LookupDashboardArgs{
Uid: pulumi.StringRef("test-ds-dashboard-uid"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Grafana = Pulumi.Grafana;
using Grafana = Pulumiverse.Grafana;
return await Deployment.RunAsync(() =>
{
var test = new Grafana.Oss.Dashboard("test", new()
{
ConfigJson = JsonSerializer.Serialize(new Dictionary<string, object?>
{
["id"] = 12345,
["uid"] = "test-ds-dashboard-uid",
["title"] = "Production Overview",
["tags"] = new[]
{
"templated",
},
["timezone"] = "browser",
["schemaVersion"] = 16,
["version"] = 0,
["refresh"] = "25s",
}),
});
var fromUid = Grafana.Oss.GetDashboard.Invoke(new()
{
Uid = "test-ds-dashboard-uid",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.grafana.oss.Dashboard;
import com.pulumi.grafana.oss.DashboardArgs;
import com.pulumi.grafana.oss.OssFunctions;
import com.pulumi.grafana.oss.inputs.GetDashboardArgs;
import static com.pulumi.codegen.internal.Serialization.*;
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) {
var test = new Dashboard("test", DashboardArgs.builder()
.configJson(serializeJson(
jsonObject(
jsonProperty("id", 12345),
jsonProperty("uid", "test-ds-dashboard-uid"),
jsonProperty("title", "Production Overview"),
jsonProperty("tags", jsonArray("templated")),
jsonProperty("timezone", "browser"),
jsonProperty("schemaVersion", 16),
jsonProperty("version", 0),
jsonProperty("refresh", "25s")
)))
.build());
final var fromUid = OssFunctions.getDashboard(GetDashboardArgs.builder()
.uid("test-ds-dashboard-uid")
.build());
}
}
resources:
test:
type: grafana:oss:Dashboard
properties:
configJson:
fn::toJSON:
id: 12345
uid: test-ds-dashboard-uid
title: Production Overview
tags:
- templated
timezone: browser
schemaVersion: 16
version: 0
refresh: 25s
variables:
fromUid:
fn::invoke:
function: grafana:oss:getDashboard
arguments:
uid: test-ds-dashboard-uid
Using getDashboard
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getDashboard(args: GetDashboardArgs, opts?: InvokeOptions): Promise<GetDashboardResult>
function getDashboardOutput(args: GetDashboardOutputArgs, opts?: InvokeOptions): Output<GetDashboardResult>def get_dashboard(dashboard_id: Optional[int] = None,
org_id: Optional[str] = None,
uid: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetDashboardResult
def get_dashboard_output(dashboard_id: Optional[pulumi.Input[int]] = None,
org_id: Optional[pulumi.Input[str]] = None,
uid: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetDashboardResult]func LookupDashboard(ctx *Context, args *LookupDashboardArgs, opts ...InvokeOption) (*LookupDashboardResult, error)
func LookupDashboardOutput(ctx *Context, args *LookupDashboardOutputArgs, opts ...InvokeOption) LookupDashboardResultOutput> Note: This function is named LookupDashboard in the Go SDK.
public static class GetDashboard
{
public static Task<GetDashboardResult> InvokeAsync(GetDashboardArgs args, InvokeOptions? opts = null)
public static Output<GetDashboardResult> Invoke(GetDashboardInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetDashboardResult> getDashboard(GetDashboardArgs args, InvokeOptions options)
public static Output<GetDashboardResult> getDashboard(GetDashboardArgs args, InvokeOptions options)
fn::invoke:
function: grafana:oss/getDashboard:getDashboard
arguments:
# arguments dictionaryThe following arguments are supported:
- Dashboard
Id int - The numerical ID of the Grafana dashboard. Specify either this or
uid. Defaults to-1. - Org
Id string - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- Uid string
- The uid of the Grafana dashboard. Specify either this or
dashboard_id. Defaults to ``.
- Dashboard
Id int - The numerical ID of the Grafana dashboard. Specify either this or
uid. Defaults to-1. - Org
Id string - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- Uid string
- The uid of the Grafana dashboard. Specify either this or
dashboard_id. Defaults to ``.
- dashboard
Id Integer - The numerical ID of the Grafana dashboard. Specify either this or
uid. Defaults to-1. - org
Id String - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- uid String
- The uid of the Grafana dashboard. Specify either this or
dashboard_id. Defaults to ``.
- dashboard
Id number - The numerical ID of the Grafana dashboard. Specify either this or
uid. Defaults to-1. - org
Id string - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- uid string
- The uid of the Grafana dashboard. Specify either this or
dashboard_id. Defaults to ``.
- dashboard_
id int - The numerical ID of the Grafana dashboard. Specify either this or
uid. Defaults to-1. - org_
id str - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- uid str
- The uid of the Grafana dashboard. Specify either this or
dashboard_id. Defaults to ``.
- dashboard
Id Number - The numerical ID of the Grafana dashboard. Specify either this or
uid. Defaults to-1. - org
Id String - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- uid String
- The uid of the Grafana dashboard. Specify either this or
dashboard_id. Defaults to ``.
getDashboard Result
The following output properties are available:
- Config
Json string - The complete dashboard model JSON.
- Folder
Uid string - The UID of the folder where the Grafana dashboard is found.
- Id string
- The provider-assigned unique ID for this managed resource.
- Is
Starred bool - Whether or not the Grafana dashboard is starred. Starred Dashboards will show up on your own Home Dashboard by default, and are a convenient way to mark Dashboards that you’re interested in.
- Slug string
- URL slug of the dashboard (deprecated).
- Title string
- The title of the Grafana dashboard.
- Url string
- The full URL of the dashboard.
- Version int
- The numerical version of the Grafana dashboard.
- Dashboard
Id int - The numerical ID of the Grafana dashboard. Specify either this or
uid. Defaults to-1. - Org
Id string - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- Uid string
- The uid of the Grafana dashboard. Specify either this or
dashboard_id. Defaults to ``.
- Config
Json string - The complete dashboard model JSON.
- Folder
Uid string - The UID of the folder where the Grafana dashboard is found.
- Id string
- The provider-assigned unique ID for this managed resource.
- Is
Starred bool - Whether or not the Grafana dashboard is starred. Starred Dashboards will show up on your own Home Dashboard by default, and are a convenient way to mark Dashboards that you’re interested in.
- Slug string
- URL slug of the dashboard (deprecated).
- Title string
- The title of the Grafana dashboard.
- Url string
- The full URL of the dashboard.
- Version int
- The numerical version of the Grafana dashboard.
- Dashboard
Id int - The numerical ID of the Grafana dashboard. Specify either this or
uid. Defaults to-1. - Org
Id string - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- Uid string
- The uid of the Grafana dashboard. Specify either this or
dashboard_id. Defaults to ``.
- config
Json String - The complete dashboard model JSON.
- folder
Uid String - The UID of the folder where the Grafana dashboard is found.
- id String
- The provider-assigned unique ID for this managed resource.
- is
Starred Boolean - Whether or not the Grafana dashboard is starred. Starred Dashboards will show up on your own Home Dashboard by default, and are a convenient way to mark Dashboards that you’re interested in.
- slug String
- URL slug of the dashboard (deprecated).
- title String
- The title of the Grafana dashboard.
- url String
- The full URL of the dashboard.
- version Integer
- The numerical version of the Grafana dashboard.
- dashboard
Id Integer - The numerical ID of the Grafana dashboard. Specify either this or
uid. Defaults to-1. - org
Id String - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- uid String
- The uid of the Grafana dashboard. Specify either this or
dashboard_id. Defaults to ``.
- config
Json string - The complete dashboard model JSON.
- folder
Uid string - The UID of the folder where the Grafana dashboard is found.
- id string
- The provider-assigned unique ID for this managed resource.
- is
Starred boolean - Whether or not the Grafana dashboard is starred. Starred Dashboards will show up on your own Home Dashboard by default, and are a convenient way to mark Dashboards that you’re interested in.
- slug string
- URL slug of the dashboard (deprecated).
- title string
- The title of the Grafana dashboard.
- url string
- The full URL of the dashboard.
- version number
- The numerical version of the Grafana dashboard.
- dashboard
Id number - The numerical ID of the Grafana dashboard. Specify either this or
uid. Defaults to-1. - org
Id string - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- uid string
- The uid of the Grafana dashboard. Specify either this or
dashboard_id. Defaults to ``.
- config_
json str - The complete dashboard model JSON.
- folder_
uid str - The UID of the folder where the Grafana dashboard is found.
- id str
- The provider-assigned unique ID for this managed resource.
- is_
starred bool - Whether or not the Grafana dashboard is starred. Starred Dashboards will show up on your own Home Dashboard by default, and are a convenient way to mark Dashboards that you’re interested in.
- slug str
- URL slug of the dashboard (deprecated).
- title str
- The title of the Grafana dashboard.
- url str
- The full URL of the dashboard.
- version int
- The numerical version of the Grafana dashboard.
- dashboard_
id int - The numerical ID of the Grafana dashboard. Specify either this or
uid. Defaults to-1. - org_
id str - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- uid str
- The uid of the Grafana dashboard. Specify either this or
dashboard_id. Defaults to ``.
- config
Json String - The complete dashboard model JSON.
- folder
Uid String - The UID of the folder where the Grafana dashboard is found.
- id String
- The provider-assigned unique ID for this managed resource.
- is
Starred Boolean - Whether or not the Grafana dashboard is starred. Starred Dashboards will show up on your own Home Dashboard by default, and are a convenient way to mark Dashboards that you’re interested in.
- slug String
- URL slug of the dashboard (deprecated).
- title String
- The title of the Grafana dashboard.
- url String
- The full URL of the dashboard.
- version Number
- The numerical version of the Grafana dashboard.
- dashboard
Id Number - The numerical ID of the Grafana dashboard. Specify either this or
uid. Defaults to-1. - org
Id String - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- uid String
- The uid of the Grafana dashboard. Specify either this or
dashboard_id. Defaults to ``.
Package Details
- Repository
- grafana pulumiverse/pulumi-grafana
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
grafanaTerraform Provider.
Viewing docs for Grafana v2.21.0
published on Tuesday, Mar 3, 2026 by pulumiverse
published on Tuesday, Mar 3, 2026 by pulumiverse
