published on Thursday, Sep 24, 2026 by Pydantic
published on Thursday, Sep 24, 2026 by Pydantic
Manages a Logfire alert.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as logfire from "@pydantic/pulumi-logfire";
const exampleProject = new logfire.Project("exampleProject", {});
const exampleChannel = new logfire.Channel("exampleChannel", {config: [{
type: "webhook",
format: "auto",
url: "https://example.com/logfire-webhook",
}]});
const office = new logfire.Channel("office", {config: [{
type: "webhook",
format: "auto",
url: "https://example.com/logfire-office-webhook",
}]});
const officeHours = new logfire.Schedule("officeHours", {
label: "Office hours",
timezone: "Europe/London",
windows: [{
days: [
1,
2,
3,
4,
5,
],
start_time: "09:00",
end_time: "18:00",
}],
});
const exampleAlert = new logfire.Alert("exampleAlert", {
projectId: exampleProject.id,
description: "Alert on exception spans",
query: `select
service_name,
trace_id,
otel_status_message as exception_message
from records
where level = 'error'
order by start_timestamp desc
`,
timeWindow: "1h",
frequency: "15m",
environments: ["production"],
channelAssignments: [
{
channel_id: exampleChannel.id,
},
{
channel_id: office.id,
schedule_id: officeHours.id,
},
],
notifyWhen: "has_matches",
active: true,
});
import pulumi
import pulumi_logfire as logfire
example_project = logfire.Project("exampleProject")
example_channel = logfire.Channel("exampleChannel", config=[{
"type": "webhook",
"format": "auto",
"url": "https://example.com/logfire-webhook",
}])
office = logfire.Channel("office", config=[{
"type": "webhook",
"format": "auto",
"url": "https://example.com/logfire-office-webhook",
}])
office_hours = logfire.Schedule("officeHours",
label="Office hours",
timezone="Europe/London",
windows=[{
"days": [
1,
2,
3,
4,
5,
],
"start_time": "09:00",
"end_time": "18:00",
}])
example_alert = logfire.Alert("exampleAlert",
project_id=example_project.id,
description="Alert on exception spans",
query="""select
service_name,
trace_id,
otel_status_message as exception_message
from records
where level = 'error'
order by start_timestamp desc
""",
time_window="1h",
frequency="15m",
environments=["production"],
channel_assignments=[
{
"channel_id": example_channel.id,
},
{
"channel_id": office.id,
"schedule_id": office_hours.id,
},
],
notify_when="has_matches",
active=True)
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pydantic/pulumi-logfire/sdk/go/logfire"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleProject, err := logfire.NewProject(ctx, "exampleProject", nil)
if err != nil {
return err
}
exampleChannel, err := logfire.NewChannel(ctx, "exampleChannel", &logfire.ChannelArgs{
Config: logfire.ChannelConfigArgs{
map[string]interface{}{
"type": "webhook",
"format": "auto",
"url": "https://example.com/logfire-webhook",
},
},
})
if err != nil {
return err
}
office, err := logfire.NewChannel(ctx, "office", &logfire.ChannelArgs{
Config: logfire.ChannelConfigArgs{
map[string]interface{}{
"type": "webhook",
"format": "auto",
"url": "https://example.com/logfire-office-webhook",
},
},
})
if err != nil {
return err
}
officeHours, err := logfire.NewSchedule(ctx, "officeHours", &logfire.ScheduleArgs{
Label: pulumi.String("Office hours"),
Timezone: pulumi.String("Europe/London"),
Windows: logfire.ScheduleWindowArray{
&logfire.ScheduleWindowArgs{
Days: pulumi.IntArray{
pulumi.Int(1),
pulumi.Int(2),
pulumi.Int(3),
pulumi.Int(4),
pulumi.Int(5),
},
Start_time: "09:00",
End_time: "18:00",
},
},
})
if err != nil {
return err
}
_, err = logfire.NewAlert(ctx, "exampleAlert", &logfire.AlertArgs{
ProjectId: exampleProject.ID(),
Description: pulumi.String("Alert on exception spans"),
Query: pulumi.String(`select
service_name,
trace_id,
otel_status_message as exception_message
from records
where level = 'error'
order by start_timestamp desc
`),
TimeWindow: pulumi.String("1h"),
Frequency: pulumi.String("15m"),
Environments: pulumi.StringArray{
pulumi.String("production"),
},
ChannelAssignments: logfire.AlertChannelAssignmentArray{
&logfire.AlertChannelAssignmentArgs{
Channel_id: exampleChannel.ID(),
},
&logfire.AlertChannelAssignmentArgs{
Channel_id: office.ID(),
Schedule_id: officeHours.ID(),
},
},
NotifyWhen: pulumi.String("has_matches"),
Active: pulumi.Bool(true),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Logfire = Pulumi.Logfire;
return await Deployment.RunAsync(() =>
{
var exampleProject = new Logfire.Project("exampleProject");
var exampleChannel = new Logfire.Channel("exampleChannel", new()
{
Config = new[]
{
{
{ "type", "webhook" },
{ "format", "auto" },
{ "url", "https://example.com/logfire-webhook" },
},
},
});
var office = new Logfire.Channel("office", new()
{
Config = new[]
{
{
{ "type", "webhook" },
{ "format", "auto" },
{ "url", "https://example.com/logfire-office-webhook" },
},
},
});
var officeHours = new Logfire.Schedule("officeHours", new()
{
Label = "Office hours",
Timezone = "Europe/London",
Windows = new[]
{
new Logfire.Inputs.ScheduleWindowArgs
{
Days = new[]
{
1,
2,
3,
4,
5,
},
Start_time = "09:00",
End_time = "18:00",
},
},
});
var exampleAlert = new Logfire.Alert("exampleAlert", new()
{
ProjectId = exampleProject.Id,
Description = "Alert on exception spans",
Query = @"select
service_name,
trace_id,
otel_status_message as exception_message
from records
where level = 'error'
order by start_timestamp desc
",
TimeWindow = "1h",
Frequency = "15m",
Environments = new[]
{
"production",
},
ChannelAssignments = new[]
{
new Logfire.Inputs.AlertChannelAssignmentArgs
{
Channel_id = exampleChannel.Id,
},
new Logfire.Inputs.AlertChannelAssignmentArgs
{
Channel_id = office.Id,
Schedule_id = officeHours.Id,
},
},
NotifyWhen = "has_matches",
Active = true,
});
});
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.Channel;
import com.pulumi.logfire.ChannelArgs;
import com.pulumi.logfire.Schedule;
import com.pulumi.logfire.ScheduleArgs;
import com.pulumi.logfire.inputs.ScheduleWindowArgs;
import com.pulumi.logfire.Alert;
import com.pulumi.logfire.AlertArgs;
import com.pulumi.logfire.inputs.AlertChannelAssignmentArgs;
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 exampleChannel = new Channel("exampleChannel", ChannelArgs.builder()
.config(ChannelConfigArgs.builder()
.type("webhook")
.format("auto")
.url("https://example.com/logfire-webhook")
.build())
.build());
var office = new Channel("office", ChannelArgs.builder()
.config(ChannelConfigArgs.builder()
.type("webhook")
.format("auto")
.url("https://example.com/logfire-office-webhook")
.build())
.build());
var officeHours = new Schedule("officeHours", ScheduleArgs.builder()
.label("Office hours")
.timezone("Europe/London")
.windows(ScheduleWindowArgs.builder()
.days(
1,
2,
3,
4,
5)
.start_time("09:00")
.end_time("18:00")
.build())
.build());
var exampleAlert = new Alert("exampleAlert", AlertArgs.builder()
.projectId(exampleProject.id())
.description("Alert on exception spans")
.query("""
select
service_name,
trace_id,
otel_status_message as exception_message
from records
where level = 'error'
order by start_timestamp desc
""")
.timeWindow("1h")
.frequency("15m")
.environments("production")
.channelAssignments(
AlertChannelAssignmentArgs.builder()
.channel_id(exampleChannel.id())
.build(),
AlertChannelAssignmentArgs.builder()
.channel_id(office.id())
.schedule_id(officeHours.id())
.build())
.notifyWhen("has_matches")
.active(true)
.build());
}
}
resources:
exampleProject:
type: logfire:Project
exampleChannel:
type: logfire:Channel
properties:
config:
- type: webhook
format: auto
url: https://example.com/logfire-webhook
office:
type: logfire:Channel
properties:
config:
- type: webhook
format: auto
url: https://example.com/logfire-office-webhook
officeHours:
type: logfire:Schedule
properties:
label: Office hours
timezone: Europe/London
windows:
- days:
- 1
- 2
- 3
- 4
- 5
start_time: 09:00
end_time: 18:00
exampleAlert:
type: logfire:Alert
properties:
projectId: ${exampleProject.id}
description: Alert on exception spans
query: |
select
service_name,
trace_id,
otel_status_message as exception_message
from records
where level = 'error'
order by start_timestamp desc
timeWindow: 1h
frequency: 15m
environments:
- production
channelAssignments:
- channel_id: ${exampleChannel.id}
- channel_id: ${office.id}
schedule_id: ${officeHours.id}
notifyWhen: has_matches
active: true
Example coming soon!
Create Alert Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Alert(name: string, args: AlertArgs, opts?: CustomResourceOptions);@overload
def Alert(resource_name: str,
args: AlertArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Alert(resource_name: str,
opts: Optional[ResourceOptions] = None,
channel_assignments: Optional[Sequence[AlertChannelAssignmentArgs]] = None,
frequency: Optional[str] = None,
notify_when: Optional[str] = None,
project_id: Optional[str] = None,
query: Optional[str] = None,
time_window: Optional[str] = None,
active: Optional[bool] = None,
description: Optional[str] = None,
environments: Optional[Sequence[str]] = None,
name: Optional[str] = None)func NewAlert(ctx *Context, name string, args AlertArgs, opts ...ResourceOption) (*Alert, error)public Alert(string name, AlertArgs args, CustomResourceOptions? opts = null)type: logfire:Alert
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "logfire_alert" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args AlertArgs
- 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 AlertArgs
- 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 AlertArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AlertArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AlertArgs
- 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 alertResource = new Logfire.Alert("alertResource", new()
{
ChannelAssignments = new[]
{
new Logfire.Inputs.AlertChannelAssignmentArgs
{
ChannelId = "string",
ScheduleId = "string",
},
},
Frequency = "string",
NotifyWhen = "string",
ProjectId = "string",
Query = "string",
TimeWindow = "string",
Active = false,
Description = "string",
Environments = new[]
{
"string",
},
Name = "string",
});
example, err := logfire.NewAlert(ctx, "alertResource", &logfire.AlertArgs{
ChannelAssignments: logfire.AlertChannelAssignmentArray{
&logfire.AlertChannelAssignmentArgs{
ChannelId: pulumi.String("string"),
ScheduleId: pulumi.String("string"),
},
},
Frequency: pulumi.String("string"),
NotifyWhen: pulumi.String("string"),
ProjectId: pulumi.String("string"),
Query: pulumi.String("string"),
TimeWindow: pulumi.String("string"),
Active: pulumi.Bool(false),
Description: pulumi.String("string"),
Environments: pulumi.StringArray{
pulumi.String("string"),
},
Name: pulumi.String("string"),
})
resource "logfire_alert" "alertResource" {
lifecycle {
create_before_destroy = true
}
channel_assignments {
channel_id = "string"
schedule_id = "string"
}
frequency = "string"
notify_when = "string"
project_id = "string"
query = "string"
time_window = "string"
active = false
description = "string"
environments = ["string"]
name = "string"
}
var alertResource = new Alert("alertResource", AlertArgs.builder()
.channelAssignments(AlertChannelAssignmentArgs.builder()
.channelId("string")
.scheduleId("string")
.build())
.frequency("string")
.notifyWhen("string")
.projectId("string")
.query("string")
.timeWindow("string")
.active(false)
.description("string")
.environments("string")
.name("string")
.build());
alert_resource = logfire.Alert("alertResource",
channel_assignments=[{
"channel_id": "string",
"schedule_id": "string",
}],
frequency="string",
notify_when="string",
project_id="string",
query="string",
time_window="string",
active=False,
description="string",
environments=["string"],
name="string")
const alertResource = new logfire.Alert("alertResource", {
channelAssignments: [{
channelId: "string",
scheduleId: "string",
}],
frequency: "string",
notifyWhen: "string",
projectId: "string",
query: "string",
timeWindow: "string",
active: false,
description: "string",
environments: ["string"],
name: "string",
});
type: logfire:Alert
properties:
active: false
channelAssignments:
- channelId: string
scheduleId: string
description: string
environments:
- string
frequency: string
name: string
notifyWhen: string
projectId: string
query: string
timeWindow: string
Alert 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 Alert resource accepts the following input properties:
- Channel
Assignments List<AlertChannel Assignment> - Channels to notify, each with an optional delivery schedule. Set it to
[]to notify no channel. This is the same type asalerts.<tier>.channel_assignmentsonlogfire.Slo, so one value (for example alocalsentry) can configure both. - Frequency string
- Evaluation frequency, as a duration from
1mto24h(for example5m,20m,1h). Equivalent spellings are accepted and kept as written. - Notify
When string - Notification rule. Must match API enum.
- Project
Id string - Project ID (UUID) used for alert API paths.
- Query string
- SQL / query string used by the alert.
- Time
Window string - Lookback window, as a duration from
1mto30d(for example20m,1h30m,7d). The API caps this relative tofrequency- a longer window requires a less frequent evaluation - and reports that itself. Equivalent spellings are accepted and kept as written. - Active bool
- Whether the alert is active (defaults to true on creation).
- Description string
- Alert description.
- Environments List<string>
- Deployment environments to scope the query to. Empty = all environments (no filter).
- Name string
- Alert name (unique per project).
- Channel
Assignments []AlertChannel Assignment Args - Channels to notify, each with an optional delivery schedule. Set it to
[]to notify no channel. This is the same type asalerts.<tier>.channel_assignmentsonlogfire.Slo, so one value (for example alocalsentry) can configure both. - Frequency string
- Evaluation frequency, as a duration from
1mto24h(for example5m,20m,1h). Equivalent spellings are accepted and kept as written. - Notify
When string - Notification rule. Must match API enum.
- Project
Id string - Project ID (UUID) used for alert API paths.
- Query string
- SQL / query string used by the alert.
- Time
Window string - Lookback window, as a duration from
1mto30d(for example20m,1h30m,7d). The API caps this relative tofrequency- a longer window requires a less frequent evaluation - and reports that itself. Equivalent spellings are accepted and kept as written. - Active bool
- Whether the alert is active (defaults to true on creation).
- Description string
- Alert description.
- Environments []string
- Deployment environments to scope the query to. Empty = all environments (no filter).
- Name string
- Alert name (unique per project).
- channel_
assignments list(object) - Channels to notify, each with an optional delivery schedule. Set it to
[]to notify no channel. This is the same type asalerts.<tier>.channel_assignmentsonlogfire.Slo, so one value (for example alocalsentry) can configure both. - frequency string
- Evaluation frequency, as a duration from
1mto24h(for example5m,20m,1h). Equivalent spellings are accepted and kept as written. - notify_
when string - Notification rule. Must match API enum.
- project_
id string - Project ID (UUID) used for alert API paths.
- query string
- SQL / query string used by the alert.
- time_
window string - Lookback window, as a duration from
1mto30d(for example20m,1h30m,7d). The API caps this relative tofrequency- a longer window requires a less frequent evaluation - and reports that itself. Equivalent spellings are accepted and kept as written. - active bool
- Whether the alert is active (defaults to true on creation).
- description string
- Alert description.
- environments list(string)
- Deployment environments to scope the query to. Empty = all environments (no filter).
- name string
- Alert name (unique per project).
- channel
Assignments List<AlertChannel Assignment> - Channels to notify, each with an optional delivery schedule. Set it to
[]to notify no channel. This is the same type asalerts.<tier>.channel_assignmentsonlogfire.Slo, so one value (for example alocalsentry) can configure both. - frequency String
- Evaluation frequency, as a duration from
1mto24h(for example5m,20m,1h). Equivalent spellings are accepted and kept as written. - notify
When String - Notification rule. Must match API enum.
- project
Id String - Project ID (UUID) used for alert API paths.
- query String
- SQL / query string used by the alert.
- time
Window String - Lookback window, as a duration from
1mto30d(for example20m,1h30m,7d). The API caps this relative tofrequency- a longer window requires a less frequent evaluation - and reports that itself. Equivalent spellings are accepted and kept as written. - active Boolean
- Whether the alert is active (defaults to true on creation).
- description String
- Alert description.
- environments List<String>
- Deployment environments to scope the query to. Empty = all environments (no filter).
- name String
- Alert name (unique per project).
- channel
Assignments AlertChannel Assignment[] - Channels to notify, each with an optional delivery schedule. Set it to
[]to notify no channel. This is the same type asalerts.<tier>.channel_assignmentsonlogfire.Slo, so one value (for example alocalsentry) can configure both. - frequency string
- Evaluation frequency, as a duration from
1mto24h(for example5m,20m,1h). Equivalent spellings are accepted and kept as written. - notify
When string - Notification rule. Must match API enum.
- project
Id string - Project ID (UUID) used for alert API paths.
- query string
- SQL / query string used by the alert.
- time
Window string - Lookback window, as a duration from
1mto30d(for example20m,1h30m,7d). The API caps this relative tofrequency- a longer window requires a less frequent evaluation - and reports that itself. Equivalent spellings are accepted and kept as written. - active boolean
- Whether the alert is active (defaults to true on creation).
- description string
- Alert description.
- environments string[]
- Deployment environments to scope the query to. Empty = all environments (no filter).
- name string
- Alert name (unique per project).
- channel_
assignments Sequence[AlertChannel Assignment Args] - Channels to notify, each with an optional delivery schedule. Set it to
[]to notify no channel. This is the same type asalerts.<tier>.channel_assignmentsonlogfire.Slo, so one value (for example alocalsentry) can configure both. - frequency str
- Evaluation frequency, as a duration from
1mto24h(for example5m,20m,1h). Equivalent spellings are accepted and kept as written. - notify_
when str - Notification rule. Must match API enum.
- project_
id str - Project ID (UUID) used for alert API paths.
- query str
- SQL / query string used by the alert.
- time_
window str - Lookback window, as a duration from
1mto30d(for example20m,1h30m,7d). The API caps this relative tofrequency- a longer window requires a less frequent evaluation - and reports that itself. Equivalent spellings are accepted and kept as written. - active bool
- Whether the alert is active (defaults to true on creation).
- description str
- Alert description.
- environments Sequence[str]
- Deployment environments to scope the query to. Empty = all environments (no filter).
- name str
- Alert name (unique per project).
- channel
Assignments List<Property Map> - Channels to notify, each with an optional delivery schedule. Set it to
[]to notify no channel. This is the same type asalerts.<tier>.channel_assignmentsonlogfire.Slo, so one value (for example alocalsentry) can configure both. - frequency String
- Evaluation frequency, as a duration from
1mto24h(for example5m,20m,1h). Equivalent spellings are accepted and kept as written. - notify
When String - Notification rule. Must match API enum.
- project
Id String - Project ID (UUID) used for alert API paths.
- query String
- SQL / query string used by the alert.
- time
Window String - Lookback window, as a duration from
1mto30d(for example20m,1h30m,7d). The API caps this relative tofrequency- a longer window requires a less frequent evaluation - and reports that itself. Equivalent spellings are accepted and kept as written. - active Boolean
- Whether the alert is active (defaults to true on creation).
- description String
- Alert description.
- environments List<String>
- Deployment environments to scope the query to. Empty = all environments (no filter).
- name String
- Alert name (unique per project).
Outputs
All input properties are implicitly available as output properties. Additionally, the Alert resource produces the following output properties:
Look up Existing Alert Resource
Get an existing Alert 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?: AlertState, opts?: CustomResourceOptions): Alert@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
active: Optional[bool] = None,
channel_assignments: Optional[Sequence[AlertChannelAssignmentArgs]] = None,
description: Optional[str] = None,
environments: Optional[Sequence[str]] = None,
frequency: Optional[str] = None,
name: Optional[str] = None,
notify_when: Optional[str] = None,
project_id: Optional[str] = None,
query: Optional[str] = None,
time_window: Optional[str] = None,
watermark: Optional[str] = None) -> Alertfunc GetAlert(ctx *Context, name string, id IDInput, state *AlertState, opts ...ResourceOption) (*Alert, error)public static Alert Get(string name, Input<string> id, AlertState? state, CustomResourceOptions? opts = null)public static Alert get(String name, Output<String> id, AlertState state, CustomResourceOptions options)resources: _: type: logfire:Alert get: id: ${id}import {
to = logfire_alert.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.
- Active bool
- Whether the alert is active (defaults to true on creation).
- Channel
Assignments List<AlertChannel Assignment> - Channels to notify, each with an optional delivery schedule. Set it to
[]to notify no channel. This is the same type asalerts.<tier>.channel_assignmentsonlogfire.Slo, so one value (for example alocalsentry) can configure both. - Description string
- Alert description.
- Environments List<string>
- Deployment environments to scope the query to. Empty = all environments (no filter).
- Frequency string
- Evaluation frequency, as a duration from
1mto24h(for example5m,20m,1h). Equivalent spellings are accepted and kept as written. - Name string
- Alert name (unique per project).
- Notify
When string - Notification rule. Must match API enum.
- Project
Id string - Project ID (UUID) used for alert API paths.
- Query string
- SQL / query string used by the alert.
- Time
Window string - Lookback window, as a duration from
1mto30d(for example20m,1h30m,7d). The API caps this relative tofrequency- a longer window requires a less frequent evaluation - and reports that itself. Equivalent spellings are accepted and kept as written. - Watermark string
- Provider-managed watermark (lateness tolerance) sent to the API.
- Active bool
- Whether the alert is active (defaults to true on creation).
- Channel
Assignments []AlertChannel Assignment Args - Channels to notify, each with an optional delivery schedule. Set it to
[]to notify no channel. This is the same type asalerts.<tier>.channel_assignmentsonlogfire.Slo, so one value (for example alocalsentry) can configure both. - Description string
- Alert description.
- Environments []string
- Deployment environments to scope the query to. Empty = all environments (no filter).
- Frequency string
- Evaluation frequency, as a duration from
1mto24h(for example5m,20m,1h). Equivalent spellings are accepted and kept as written. - Name string
- Alert name (unique per project).
- Notify
When string - Notification rule. Must match API enum.
- Project
Id string - Project ID (UUID) used for alert API paths.
- Query string
- SQL / query string used by the alert.
- Time
Window string - Lookback window, as a duration from
1mto30d(for example20m,1h30m,7d). The API caps this relative tofrequency- a longer window requires a less frequent evaluation - and reports that itself. Equivalent spellings are accepted and kept as written. - Watermark string
- Provider-managed watermark (lateness tolerance) sent to the API.
- active bool
- Whether the alert is active (defaults to true on creation).
- channel_
assignments list(object) - Channels to notify, each with an optional delivery schedule. Set it to
[]to notify no channel. This is the same type asalerts.<tier>.channel_assignmentsonlogfire.Slo, so one value (for example alocalsentry) can configure both. - description string
- Alert description.
- environments list(string)
- Deployment environments to scope the query to. Empty = all environments (no filter).
- frequency string
- Evaluation frequency, as a duration from
1mto24h(for example5m,20m,1h). Equivalent spellings are accepted and kept as written. - name string
- Alert name (unique per project).
- notify_
when string - Notification rule. Must match API enum.
- project_
id string - Project ID (UUID) used for alert API paths.
- query string
- SQL / query string used by the alert.
- time_
window string - Lookback window, as a duration from
1mto30d(for example20m,1h30m,7d). The API caps this relative tofrequency- a longer window requires a less frequent evaluation - and reports that itself. Equivalent spellings are accepted and kept as written. - watermark string
- Provider-managed watermark (lateness tolerance) sent to the API.
- active Boolean
- Whether the alert is active (defaults to true on creation).
- channel
Assignments List<AlertChannel Assignment> - Channels to notify, each with an optional delivery schedule. Set it to
[]to notify no channel. This is the same type asalerts.<tier>.channel_assignmentsonlogfire.Slo, so one value (for example alocalsentry) can configure both. - description String
- Alert description.
- environments List<String>
- Deployment environments to scope the query to. Empty = all environments (no filter).
- frequency String
- Evaluation frequency, as a duration from
1mto24h(for example5m,20m,1h). Equivalent spellings are accepted and kept as written. - name String
- Alert name (unique per project).
- notify
When String - Notification rule. Must match API enum.
- project
Id String - Project ID (UUID) used for alert API paths.
- query String
- SQL / query string used by the alert.
- time
Window String - Lookback window, as a duration from
1mto30d(for example20m,1h30m,7d). The API caps this relative tofrequency- a longer window requires a less frequent evaluation - and reports that itself. Equivalent spellings are accepted and kept as written. - watermark String
- Provider-managed watermark (lateness tolerance) sent to the API.
- active boolean
- Whether the alert is active (defaults to true on creation).
- channel
Assignments AlertChannel Assignment[] - Channels to notify, each with an optional delivery schedule. Set it to
[]to notify no channel. This is the same type asalerts.<tier>.channel_assignmentsonlogfire.Slo, so one value (for example alocalsentry) can configure both. - description string
- Alert description.
- environments string[]
- Deployment environments to scope the query to. Empty = all environments (no filter).
- frequency string
- Evaluation frequency, as a duration from
1mto24h(for example5m,20m,1h). Equivalent spellings are accepted and kept as written. - name string
- Alert name (unique per project).
- notify
When string - Notification rule. Must match API enum.
- project
Id string - Project ID (UUID) used for alert API paths.
- query string
- SQL / query string used by the alert.
- time
Window string - Lookback window, as a duration from
1mto30d(for example20m,1h30m,7d). The API caps this relative tofrequency- a longer window requires a less frequent evaluation - and reports that itself. Equivalent spellings are accepted and kept as written. - watermark string
- Provider-managed watermark (lateness tolerance) sent to the API.
- active bool
- Whether the alert is active (defaults to true on creation).
- channel_
assignments Sequence[AlertChannel Assignment Args] - Channels to notify, each with an optional delivery schedule. Set it to
[]to notify no channel. This is the same type asalerts.<tier>.channel_assignmentsonlogfire.Slo, so one value (for example alocalsentry) can configure both. - description str
- Alert description.
- environments Sequence[str]
- Deployment environments to scope the query to. Empty = all environments (no filter).
- frequency str
- Evaluation frequency, as a duration from
1mto24h(for example5m,20m,1h). Equivalent spellings are accepted and kept as written. - name str
- Alert name (unique per project).
- notify_
when str - Notification rule. Must match API enum.
- project_
id str - Project ID (UUID) used for alert API paths.
- query str
- SQL / query string used by the alert.
- time_
window str - Lookback window, as a duration from
1mto30d(for example20m,1h30m,7d). The API caps this relative tofrequency- a longer window requires a less frequent evaluation - and reports that itself. Equivalent spellings are accepted and kept as written. - watermark str
- Provider-managed watermark (lateness tolerance) sent to the API.
- active Boolean
- Whether the alert is active (defaults to true on creation).
- channel
Assignments List<Property Map> - Channels to notify, each with an optional delivery schedule. Set it to
[]to notify no channel. This is the same type asalerts.<tier>.channel_assignmentsonlogfire.Slo, so one value (for example alocalsentry) can configure both. - description String
- Alert description.
- environments List<String>
- Deployment environments to scope the query to. Empty = all environments (no filter).
- frequency String
- Evaluation frequency, as a duration from
1mto24h(for example5m,20m,1h). Equivalent spellings are accepted and kept as written. - name String
- Alert name (unique per project).
- notify
When String - Notification rule. Must match API enum.
- project
Id String - Project ID (UUID) used for alert API paths.
- query String
- SQL / query string used by the alert.
- time
Window String - Lookback window, as a duration from
1mto30d(for example20m,1h30m,7d). The API caps this relative tofrequency- a longer window requires a less frequent evaluation - and reports that itself. Equivalent spellings are accepted and kept as written. - watermark String
- Provider-managed watermark (lateness tolerance) sent to the API.
Supporting Types
AlertChannelAssignment, AlertChannelAssignmentArgs
- Channel
Id string - ID of the
logfire.Channelto notify. - Schedule
Id string - ID of a
logfire.Schedule. The channel is notified only inside the schedule's windows. Omit it to notify the channel at all times.
- Channel
Id string - ID of the
logfire.Channelto notify. - Schedule
Id string - ID of a
logfire.Schedule. The channel is notified only inside the schedule's windows. Omit it to notify the channel at all times.
- channel_
id string - ID of the
logfire.Channelto notify. - schedule_
id string - ID of a
logfire.Schedule. The channel is notified only inside the schedule's windows. Omit it to notify the channel at all times.
- channel
Id String - ID of the
logfire.Channelto notify. - schedule
Id String - ID of a
logfire.Schedule. The channel is notified only inside the schedule's windows. Omit it to notify the channel at all times.
- channel
Id string - ID of the
logfire.Channelto notify. - schedule
Id string - ID of a
logfire.Schedule. The channel is notified only inside the schedule's windows. Omit it to notify the channel at all times.
- channel_
id str - ID of the
logfire.Channelto notify. - schedule_
id str - ID of a
logfire.Schedule. The channel is notified only inside the schedule's windows. Omit it to notify the channel at all times.
- channel
Id String - ID of the
logfire.Channelto notify. - schedule
Id String - ID of a
logfire.Schedule. The channel is notified only inside the schedule's windows. Omit it to notify the channel at all times.
Import
Import by project name and alert name:
$ pulumi import logfire:index/alert:Alert example "example-project/error-alert"
Project UUID/alert UUID imports are also supported.
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- logfire pydantic/pulumi-logfire
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
logfireTerraform Provider.
published on Thursday, Sep 24, 2026 by Pydantic