published on Friday, Jun 5, 2026 by Chronosphere
published on Friday, Jun 5, 2026 by Chronosphere
A Grafana-compatible dashboard rendered by Chronosphere. The dashboard’s name and slug are derived from the title and uid fields inside dashboard_json. For native Chronosphere dashboards, use chronosphere.Dashboard instead.
Example Usage
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Pulumi = Chronosphere.Pulumi;
return await Deployment.RunAsync(() =>
{
var collection = new Pulumi.Collection("collection", new()
{
Name = "Platform",
});
var platform = new Pulumi.ClassicDashboard("platform", new()
{
CollectionId = collection.Id,
DashboardJson = JsonSerializer.Serialize(new Dictionary<string, object?>
{
["title"] = "Dashboard",
["panels"] = new[]
{
new Dictionary<string, object?>
{
["gridPos"] = new Dictionary<string, object?>
{
["h"] = 12,
["w"] = 24,
["x"] = 0,
["y"] = 0,
},
["id"] = 2,
["targets"] = new[]
{
new Dictionary<string, object?>
{
["expr"] = "up",
},
},
["title"] = "Up by instance",
["type"] = "graph",
},
},
}),
});
});
package main
import (
"encoding/json"
"github.com/chronosphereio/pulumi-chronosphere/sdk/go/chronosphere"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
collection, err := chronosphere.NewCollection(ctx, "collection", &chronosphere.CollectionArgs{
Name: pulumi.String("Platform"),
})
if err != nil {
return err
}
tmpJSON0, err := json.Marshal(map[string]interface{}{
"title": "Dashboard",
"panels": []map[string]interface{}{
map[string]interface{}{
"gridPos": map[string]interface{}{
"h": 12,
"w": 24,
"x": 0,
"y": 0,
},
"id": 2,
"targets": []map[string]interface{}{
map[string]interface{}{
"expr": "up",
},
},
"title": "Up by instance",
"type": "graph",
},
},
})
if err != nil {
return err
}
json0 := string(tmpJSON0)
_, err = chronosphere.NewClassicDashboard(ctx, "platform", &chronosphere.ClassicDashboardArgs{
CollectionId: collection.ID(),
DashboardJson: pulumi.String(json0),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.chronosphere.Collection;
import com.pulumi.chronosphere.CollectionArgs;
import com.pulumi.chronosphere.ClassicDashboard;
import com.pulumi.chronosphere.ClassicDashboardArgs;
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 collection = new Collection("collection", CollectionArgs.builder()
.name("Platform")
.build());
var platform = new ClassicDashboard("platform", ClassicDashboardArgs.builder()
.collectionId(collection.id())
.dashboardJson(serializeJson(
jsonObject(
jsonProperty("title", "Dashboard"),
jsonProperty("panels", jsonArray(jsonObject(
jsonProperty("gridPos", jsonObject(
jsonProperty("h", 12),
jsonProperty("w", 24),
jsonProperty("x", 0),
jsonProperty("y", 0)
)),
jsonProperty("id", 2),
jsonProperty("targets", jsonArray(jsonObject(
jsonProperty("expr", "up")
))),
jsonProperty("title", "Up by instance"),
jsonProperty("type", "graph")
)))
)))
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as chronosphere from "@pulumi-chronosphere/pulumi-chronosphere";
const collection = new chronosphere.Collection("collection", {name: "Platform"});
const platform = new chronosphere.ClassicDashboard("platform", {
collectionId: collection.id,
dashboardJson: JSON.stringify({
title: "Dashboard",
panels: [{
gridPos: {
h: 12,
w: 24,
x: 0,
y: 0,
},
id: 2,
targets: [{
expr: "up",
}],
title: "Up by instance",
type: "graph",
}],
}),
});
import pulumi
import json
import pulumi_chronosphere as chronosphere
collection = chronosphere.Collection("collection", name="Platform")
platform = chronosphere.ClassicDashboard("platform",
collection_id=collection.id,
dashboard_json=json.dumps({
"title": "Dashboard",
"panels": [{
"gridPos": {
"h": 12,
"w": 24,
"x": 0,
"y": 0,
},
"id": 2,
"targets": [{
"expr": "up",
}],
"title": "Up by instance",
"type": "graph",
}],
}))
resources:
collection:
type: chronosphere:Collection
properties:
name: Platform
platform:
type: chronosphere:ClassicDashboard
properties:
collectionId: ${collection.id}
dashboardJson:
fn::toJSON:
title: Dashboard
panels:
- gridPos:
h: 12
w: 24
x: 0
y: 0
id: 2
targets:
- expr: up
title: Up by instance
type: graph
Create ClassicDashboard Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ClassicDashboard(name: string, args: ClassicDashboardArgs, opts?: CustomResourceOptions);@overload
def ClassicDashboard(resource_name: str,
args: ClassicDashboardArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ClassicDashboard(resource_name: str,
opts: Optional[ResourceOptions] = None,
dashboard_json: Optional[str] = None,
bucket_id: Optional[str] = None,
collection_id: Optional[str] = None)func NewClassicDashboard(ctx *Context, name string, args ClassicDashboardArgs, opts ...ResourceOption) (*ClassicDashboard, error)public ClassicDashboard(string name, ClassicDashboardArgs args, CustomResourceOptions? opts = null)
public ClassicDashboard(String name, ClassicDashboardArgs args)
public ClassicDashboard(String name, ClassicDashboardArgs args, CustomResourceOptions options)
type: chronosphere:ClassicDashboard
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "chronosphere_classicdashboard" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args ClassicDashboardArgs
- 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 ClassicDashboardArgs
- 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 ClassicDashboardArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ClassicDashboardArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ClassicDashboardArgs
- 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 classicDashboardResource = new Pulumi.ClassicDashboard("classicDashboardResource", new()
{
DashboardJson = "string",
BucketId = "string",
CollectionId = "string",
});
example, err := chronosphere.NewClassicDashboard(ctx, "classicDashboardResource", &chronosphere.ClassicDashboardArgs{
DashboardJson: pulumi.String("string"),
BucketId: pulumi.String("string"),
CollectionId: pulumi.String("string"),
})
resource "chronosphere_classicdashboard" "classicDashboardResource" {
dashboard_json = "string"
bucket_id = "string"
collection_id = "string"
}
var classicDashboardResource = new ClassicDashboard("classicDashboardResource", ClassicDashboardArgs.builder()
.dashboardJson("string")
.bucketId("string")
.collectionId("string")
.build());
classic_dashboard_resource = chronosphere.ClassicDashboard("classicDashboardResource",
dashboard_json="string",
bucket_id="string",
collection_id="string")
const classicDashboardResource = new chronosphere.ClassicDashboard("classicDashboardResource", {
dashboardJson: "string",
bucketId: "string",
collectionId: "string",
});
type: chronosphere:ClassicDashboard
properties:
bucketId: string
collectionId: string
dashboardJson: string
ClassicDashboard 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 ClassicDashboard resource accepts the following input properties:
- Dashboard
Json string - Grafana-compatible dashboard definition serialized as JSON. The
idandversionfields are stripped before diffing. - Bucket
Id string - ID of the bucket the dashboard belongs to. Exactly one of
bucket_idorcollection_idmust be set. - Collection
Id string - ID of the collection the dashboard belongs to. Exactly one of
bucket_idorcollection_idmust be set.
- Dashboard
Json string - Grafana-compatible dashboard definition serialized as JSON. The
idandversionfields are stripped before diffing. - Bucket
Id string - ID of the bucket the dashboard belongs to. Exactly one of
bucket_idorcollection_idmust be set. - Collection
Id string - ID of the collection the dashboard belongs to. Exactly one of
bucket_idorcollection_idmust be set.
- dashboard_
json string - Grafana-compatible dashboard definition serialized as JSON. The
idandversionfields are stripped before diffing. - bucket_
id string - ID of the bucket the dashboard belongs to. Exactly one of
bucket_idorcollection_idmust be set. - collection_
id string - ID of the collection the dashboard belongs to. Exactly one of
bucket_idorcollection_idmust be set.
- dashboard
Json String - Grafana-compatible dashboard definition serialized as JSON. The
idandversionfields are stripped before diffing. - bucket
Id String - ID of the bucket the dashboard belongs to. Exactly one of
bucket_idorcollection_idmust be set. - collection
Id String - ID of the collection the dashboard belongs to. Exactly one of
bucket_idorcollection_idmust be set.
- dashboard
Json string - Grafana-compatible dashboard definition serialized as JSON. The
idandversionfields are stripped before diffing. - bucket
Id string - ID of the bucket the dashboard belongs to. Exactly one of
bucket_idorcollection_idmust be set. - collection
Id string - ID of the collection the dashboard belongs to. Exactly one of
bucket_idorcollection_idmust be set.
- dashboard_
json str - Grafana-compatible dashboard definition serialized as JSON. The
idandversionfields are stripped before diffing. - bucket_
id str - ID of the bucket the dashboard belongs to. Exactly one of
bucket_idorcollection_idmust be set. - collection_
id str - ID of the collection the dashboard belongs to. Exactly one of
bucket_idorcollection_idmust be set.
- dashboard
Json String - Grafana-compatible dashboard definition serialized as JSON. The
idandversionfields are stripped before diffing. - bucket
Id String - ID of the bucket the dashboard belongs to. Exactly one of
bucket_idorcollection_idmust be set. - collection
Id String - ID of the collection the dashboard belongs to. Exactly one of
bucket_idorcollection_idmust be set.
Outputs
All input properties are implicitly available as output properties. Additionally, the ClassicDashboard 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 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 ClassicDashboard Resource
Get an existing ClassicDashboard 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?: ClassicDashboardState, opts?: CustomResourceOptions): ClassicDashboard@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
bucket_id: Optional[str] = None,
collection_id: Optional[str] = None,
dashboard_json: Optional[str] = None) -> ClassicDashboardfunc GetClassicDashboard(ctx *Context, name string, id IDInput, state *ClassicDashboardState, opts ...ResourceOption) (*ClassicDashboard, error)public static ClassicDashboard Get(string name, Input<string> id, ClassicDashboardState? state, CustomResourceOptions? opts = null)public static ClassicDashboard get(String name, Output<String> id, ClassicDashboardState state, CustomResourceOptions options)resources: _: type: chronosphere:ClassicDashboard get: id: ${id}import {
to = chronosphere_classicdashboard.example
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.
- Bucket
Id string - ID of the bucket the dashboard belongs to. Exactly one of
bucket_idorcollection_idmust be set. - Collection
Id string - ID of the collection the dashboard belongs to. Exactly one of
bucket_idorcollection_idmust be set. - Dashboard
Json string - Grafana-compatible dashboard definition serialized as JSON. The
idandversionfields are stripped before diffing.
- Bucket
Id string - ID of the bucket the dashboard belongs to. Exactly one of
bucket_idorcollection_idmust be set. - Collection
Id string - ID of the collection the dashboard belongs to. Exactly one of
bucket_idorcollection_idmust be set. - Dashboard
Json string - Grafana-compatible dashboard definition serialized as JSON. The
idandversionfields are stripped before diffing.
- bucket_
id string - ID of the bucket the dashboard belongs to. Exactly one of
bucket_idorcollection_idmust be set. - collection_
id string - ID of the collection the dashboard belongs to. Exactly one of
bucket_idorcollection_idmust be set. - dashboard_
json string - Grafana-compatible dashboard definition serialized as JSON. The
idandversionfields are stripped before diffing.
- bucket
Id String - ID of the bucket the dashboard belongs to. Exactly one of
bucket_idorcollection_idmust be set. - collection
Id String - ID of the collection the dashboard belongs to. Exactly one of
bucket_idorcollection_idmust be set. - dashboard
Json String - Grafana-compatible dashboard definition serialized as JSON. The
idandversionfields are stripped before diffing.
- bucket
Id string - ID of the bucket the dashboard belongs to. Exactly one of
bucket_idorcollection_idmust be set. - collection
Id string - ID of the collection the dashboard belongs to. Exactly one of
bucket_idorcollection_idmust be set. - dashboard
Json string - Grafana-compatible dashboard definition serialized as JSON. The
idandversionfields are stripped before diffing.
- bucket_
id str - ID of the bucket the dashboard belongs to. Exactly one of
bucket_idorcollection_idmust be set. - collection_
id str - ID of the collection the dashboard belongs to. Exactly one of
bucket_idorcollection_idmust be set. - dashboard_
json str - Grafana-compatible dashboard definition serialized as JSON. The
idandversionfields are stripped before diffing.
- bucket
Id String - ID of the bucket the dashboard belongs to. Exactly one of
bucket_idorcollection_idmust be set. - collection
Id String - ID of the collection the dashboard belongs to. Exactly one of
bucket_idorcollection_idmust be set. - dashboard
Json String - Grafana-compatible dashboard definition serialized as JSON. The
idandversionfields are stripped before diffing.
Package Details
- Repository
- chronosphere chronosphereio/pulumi-chronosphere
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
chronosphereTerraform Provider.
published on Friday, Jun 5, 2026 by Chronosphere