published on Wednesday, Apr 8, 2026 by Pydantic
published on Wednesday, Apr 8, 2026 by Pydantic
Manages a Logfire dashboard.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as fs from "fs";
import * as logfire from "@pydantic/pulumi-logfire";
const exampleProject = new logfire.Project("exampleProject", {});
const exampleDashboard = new logfire.Dashboard("exampleDashboard", {
projectId: exampleProject.id,
slug: "example-dashboard",
definition: fs.readFileSync("dashboard.json", "utf8"),
});
import pulumi
import pulumi_logfire as logfire
example_project = logfire.Project("exampleProject")
example_dashboard = logfire.Dashboard("exampleDashboard",
project_id=example_project.id,
slug="example-dashboard",
definition=(lambda path: open(path).read())("dashboard.json"))
package main
import (
"os"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pydantic/pulumi-logfire/sdk/go/logfire"
)
func readFileOrPanic(path string) pulumi.StringPtrInput {
data, err := os.ReadFile(path)
if err != nil {
panic(err.Error())
}
return pulumi.String(string(data))
}
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleProject, err := logfire.NewProject(ctx, "exampleProject", nil)
if err != nil {
return err
}
_, err = logfire.NewDashboard(ctx, "exampleDashboard", &logfire.DashboardArgs{
ProjectId: exampleProject.ID(),
Slug: pulumi.String("example-dashboard"),
Definition: pulumi.String(readFileOrPanic("dashboard.json")),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Pulumi;
using Logfire = Pulumi.Logfire;
return await Deployment.RunAsync(() =>
{
var exampleProject = new Logfire.Project("exampleProject");
var exampleDashboard = new Logfire.Dashboard("exampleDashboard", new()
{
ProjectId = exampleProject.Id,
Slug = "example-dashboard",
Definition = File.ReadAllText("dashboard.json"),
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.logfire.Project;
import com.pulumi.logfire.Dashboard;
import com.pulumi.logfire.DashboardArgs;
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 exampleProject = new Project("exampleProject");
var exampleDashboard = new Dashboard("exampleDashboard", DashboardArgs.builder()
.projectId(exampleProject.id())
.slug("example-dashboard")
.definition(Files.readString(Paths.get("dashboard.json")))
.build());
}
}
resources:
exampleProject:
type: logfire:Project
exampleDashboard:
type: logfire:Dashboard
properties:
projectId: ${exampleProject.id}
slug: example-dashboard
definition:
fn::readFile: dashboard.json
Create Dashboard Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Dashboard(name: string, args: DashboardArgs, opts?: CustomResourceOptions);@overload
def Dashboard(resource_name: str,
args: DashboardArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Dashboard(resource_name: str,
opts: Optional[ResourceOptions] = None,
definition: Optional[str] = None,
project_id: Optional[str] = None,
slug: Optional[str] = None,
name: Optional[str] = None)func NewDashboard(ctx *Context, name string, args DashboardArgs, opts ...ResourceOption) (*Dashboard, error)public Dashboard(string name, DashboardArgs args, CustomResourceOptions? opts = null)
public Dashboard(String name, DashboardArgs args)
public Dashboard(String name, DashboardArgs args, CustomResourceOptions options)
type: logfire:Dashboard
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 DashboardArgs
- 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 DashboardArgs
- 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 DashboardArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DashboardArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DashboardArgs
- 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 dashboardResource = new Logfire.Index.Dashboard("dashboardResource", new()
{
Definition = "string",
ProjectId = "string",
Slug = "string",
Name = "string",
});
example, err := logfire.NewDashboard(ctx, "dashboardResource", &logfire.DashboardArgs{
Definition: pulumi.String("string"),
ProjectId: pulumi.String("string"),
Slug: pulumi.String("string"),
Name: pulumi.String("string"),
})
var dashboardResource = new Dashboard("dashboardResource", DashboardArgs.builder()
.definition("string")
.projectId("string")
.slug("string")
.name("string")
.build());
dashboard_resource = logfire.Dashboard("dashboardResource",
definition="string",
project_id="string",
slug="string",
name="string")
const dashboardResource = new logfire.Dashboard("dashboardResource", {
definition: "string",
projectId: "string",
slug: "string",
name: "string",
});
type: logfire:Dashboard
properties:
definition: string
name: string
projectId: string
slug: string
Dashboard 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 Dashboard resource accepts the following input properties:
- Definition string
- Dashboard definition JSON payload.
- Project
Id string - Project UUID used for API paths.
- Slug string
- Dashboard slug used in URLs.
- Name string
- Dashboard display name.
- Definition string
- Dashboard definition JSON payload.
- Project
Id string - Project UUID used for API paths.
- Slug string
- Dashboard slug used in URLs.
- Name string
- Dashboard display name.
- definition String
- Dashboard definition JSON payload.
- project
Id String - Project UUID used for API paths.
- slug String
- Dashboard slug used in URLs.
- name String
- Dashboard display name.
- definition string
- Dashboard definition JSON payload.
- project
Id string - Project UUID used for API paths.
- slug string
- Dashboard slug used in URLs.
- name string
- Dashboard display name.
- definition str
- Dashboard definition JSON payload.
- project_
id str - Project UUID used for API paths.
- slug str
- Dashboard slug used in URLs.
- name str
- Dashboard display name.
- definition String
- Dashboard definition JSON payload.
- project
Id String - Project UUID used for API paths.
- slug String
- Dashboard slug used in URLs.
- name String
- Dashboard display name.
Outputs
All input properties are implicitly available as output properties. Additionally, the Dashboard 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 Dashboard Resource
Get an existing Dashboard 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?: DashboardState, opts?: CustomResourceOptions): Dashboard@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
definition: Optional[str] = None,
name: Optional[str] = None,
project_id: Optional[str] = None,
slug: Optional[str] = None) -> Dashboardfunc GetDashboard(ctx *Context, name string, id IDInput, state *DashboardState, opts ...ResourceOption) (*Dashboard, error)public static Dashboard Get(string name, Input<string> id, DashboardState? state, CustomResourceOptions? opts = null)public static Dashboard get(String name, Output<String> id, DashboardState state, CustomResourceOptions options)resources: _: type: logfire:Dashboard 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.
- Definition string
- Dashboard definition JSON payload.
- Name string
- Dashboard display name.
- Project
Id string - Project UUID used for API paths.
- Slug string
- Dashboard slug used in URLs.
- Definition string
- Dashboard definition JSON payload.
- Name string
- Dashboard display name.
- Project
Id string - Project UUID used for API paths.
- Slug string
- Dashboard slug used in URLs.
- definition String
- Dashboard definition JSON payload.
- name String
- Dashboard display name.
- project
Id String - Project UUID used for API paths.
- slug String
- Dashboard slug used in URLs.
- definition string
- Dashboard definition JSON payload.
- name string
- Dashboard display name.
- project
Id string - Project UUID used for API paths.
- slug string
- Dashboard slug used in URLs.
- definition str
- Dashboard definition JSON payload.
- name str
- Dashboard display name.
- project_
id str - Project UUID used for API paths.
- slug str
- Dashboard slug used in URLs.
- definition String
- Dashboard definition JSON payload.
- name String
- Dashboard display name.
- project
Id String - Project UUID used for API paths.
- slug String
- Dashboard slug used in URLs.
Package Details
- Repository
- logfire pydantic/pulumi-logfire
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
logfireTerraform Provider.
published on Wednesday, Apr 8, 2026 by Pydantic
