getGrafana

Use this data source to access information about an existing Grafana Dashboard.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.dashboard.getGrafana({
name: "example-grafana-dashboard",
resourceGroupName: "example-rg",
});
export const name = example.then(example => example.name);
import pulumi
import pulumi_azure as azure
example = azure.dashboard.get_grafana(name="example-grafana-dashboard",
resource_group_name="example-rg")
pulumi.export("name", example.name)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = Azure.Dashboard.GetGrafana.Invoke(new()
{
Name = "example-grafana-dashboard",
ResourceGroupName = "example-rg",
});
return new Dictionary<string, object?>
{
["name"] = example.Apply(getGrafanaResult => getGrafanaResult.Name),
};
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/dashboard"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := dashboard.LookupGrafana(ctx, &dashboard.LookupGrafanaArgs{
Name: "example-grafana-dashboard",
ResourceGroupName: "example-rg",
}, nil)
if err != nil {
return err
}
ctx.Export("name", example.Name)
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.dashboard.DashboardFunctions;
import com.pulumi.azure.dashboard.inputs.GetGrafanaArgs;
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 example = DashboardFunctions.getGrafana(GetGrafanaArgs.builder()
.name("example-grafana-dashboard")
.resourceGroupName("example-rg")
.build());
ctx.export("name", example.applyValue(getGrafanaResult -> getGrafanaResult.name()));
}
}
variables:
example:
fn::invoke:
function: azure:dashboard:getGrafana
arguments:
name: example-grafana-dashboard
resourceGroupName: example-rg
outputs:
name: ${example.name}

Return

A collection of values returned by getGrafana.

Parameters

argument

A collection of arguments for invoking getGrafana.


suspend fun getGrafana(identity: GetGrafanaIdentity? = null, name: String, resourceGroupName: String): GetGrafanaResult

Return

A collection of values returned by getGrafana.

Parameters

identity

The managed identity of the grafana resource.

name

Name of the grafana dashboard.

resourceGroupName

Name of the resource group where resource belongs to.

See also


suspend fun getGrafana(argument: suspend GetGrafanaPlainArgsBuilder.() -> Unit): GetGrafanaResult

Return

A collection of values returned by getGrafana.

Parameters

argument

Builder for com.pulumi.azure.dashboard.kotlin.inputs.GetGrafanaPlainArgs.

See also