Viewing docs for incident 7.0.0
published on Friday, Sep 11, 2026 by incident-io
published on Friday, Sep 11, 2026 by incident-io
Viewing docs for incident 7.0.0
published on Friday, Sep 11, 2026 by incident-io
published on Friday, Sep 11, 2026 by incident-io
Build a rich text document from markdown, for fields that store a document rather than a string. Use it where formatting — bold, links, lists — can’t be expressed by writing the template inline. One-way: markdown in, document out.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as incident from "@pulumi/incident";
// Build a rich text document from markdown, for a field that stores a document rather
// than a "{{ }}" template. feature_set must match the field it's going into.
const alertDescription = incident.getRichText({
markdown: `**Alert**: {{payload.summary}}
Runbook: {{payload.annotations.runbook_url}}`,
featureSet: "rich",
});
const prometheus = new incident.AlertSource("prometheus", {
name: "Prometheus",
sourceType: "http",
title: {
literal: "{{payload.labels.alertname}}",
},
description: {
literal: alertDescription.then(alertDescription => alertDescription.json),
},
});
export const droppedContent = alertDescription.then(alertDescription => alertDescription.droppedContents);
import pulumi
import pulumi_incident as incident
# Build a rich text document from markdown, for a field that stores a document rather
# than a "{{ }}" template. feature_set must match the field it's going into.
alert_description = incident.get_rich_text(markdown="""**Alert**: {{payload.summary}}
Runbook: {{payload.annotations.runbook_url}}""",
feature_set="rich")
prometheus = incident.AlertSource("prometheus",
name="Prometheus",
source_type="http",
title={
"literal": "{{payload.labels.alertname}}",
},
description={
"literal": alert_description.json,
})
pulumi.export("droppedContent", alert_description.dropped_contents)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/incident/v7/incident"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Build a rich text document from markdown, for a field that stores a document rather
// than a "{{ }}" template. feature_set must match the field it's going into.
alertDescription, err := incident.GetRichText(ctx, &incident.GetRichTextArgs{
Markdown: "**Alert**: {{payload.summary}}\n\nRunbook: {{payload.annotations.runbook_url}}",
FeatureSet: "rich",
}, nil)
if err != nil {
return err
}
_, err = incident.NewAlertSource(ctx, "prometheus", &incident.AlertSourceArgs{
Name: pulumi.String("Prometheus"),
SourceType: pulumi.String("http"),
Title: &incident.AlertSourceTitleArgs{
Literal: pulumi.String("{{payload.labels.alertname}}"),
},
Description: &incident.AlertSourceDescriptionArgs{
Literal: pulumi.String(alertDescription.Json),
},
})
if err != nil {
return err
}
ctx.Export("droppedContent", alertDescription.DroppedContents)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Incident = Pulumi.Incident;
return await Deployment.RunAsync(() =>
{
// Build a rich text document from markdown, for a field that stores a document rather
// than a "{{ }}" template. feature_set must match the field it's going into.
var alertDescription = Incident.GetRichText.Invoke(new()
{
Markdown = @"**Alert**: {{payload.summary}}
Runbook: {{payload.annotations.runbook_url}}",
FeatureSet = "rich",
});
var prometheus = new Incident.AlertSource("prometheus", new()
{
Name = "Prometheus",
SourceType = "http",
Title = new Incident.Inputs.AlertSourceTitleArgs
{
Literal = "{{payload.labels.alertname}}",
},
Description = new Incident.Inputs.AlertSourceDescriptionArgs
{
Literal = alertDescription.Apply(getRichTextResult => getRichTextResult.Json),
},
});
return new Dictionary<string, object?>
{
["droppedContent"] = alertDescription.Apply(getRichTextResult => getRichTextResult.DroppedContents),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.incident.IncidentFunctions;
import com.pulumi.incident.inputs.GetRichTextArgs;
import com.pulumi.incident.AlertSource;
import com.pulumi.incident.AlertSourceArgs;
import com.pulumi.incident.inputs.AlertSourceTitleArgs;
import com.pulumi.incident.inputs.AlertSourceDescriptionArgs;
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) {
// Build a rich text document from markdown, for a field that stores a document rather
// than a "{{ }}" template. feature_set must match the field it's going into.
final var alertDescription = IncidentFunctions.getRichText(GetRichTextArgs.builder()
.markdown("""
**Alert**: {{payload.summary}}
Runbook: {{payload.annotations.runbook_url}} """)
.featureSet("rich")
.build());
var prometheus = new AlertSource("prometheus", AlertSourceArgs.builder()
.name("Prometheus")
.sourceType("http")
.title(AlertSourceTitleArgs.builder()
.literal("{{payload.labels.alertname}}")
.build())
.description(AlertSourceDescriptionArgs.builder()
.literal(alertDescription.json())
.build())
.build());
ctx.export("droppedContent", alertDescription.droppedContents());
}
}
resources:
prometheus:
type: incident:AlertSource
properties:
name: Prometheus
sourceType: http
title:
literal: '{{payload.labels.alertname}}'
description:
literal: ${alertDescription.json}
variables:
# Build a rich text document from markdown, for a field that stores a document rather
# than a "{{ }}" template. feature_set must match the field it's going into.
alertDescription:
fn::invoke:
function: incident:getRichText
arguments:
markdown: |-
**Alert**: {{payload.summary}}
Runbook: {{payload.annotations.runbook_url}}
featureSet: rich
outputs:
# A feature set that can't hold some of the markdown's formatting warns at plan time and
# drops the unsupported content, listing what was dropped.
droppedContent: ${alertDescription.droppedContents}
Example coming soon!
Using getRichText
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 getRichText(args: GetRichTextArgs, opts?: InvokeOptions): Promise<GetRichTextResult>
function getRichTextOutput(args: GetRichTextOutputArgs, opts?: InvokeOutputOptions): Output<GetRichTextResult>def get_rich_text(feature_set: Optional[str] = None,
markdown: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetRichTextResult
def get_rich_text_output(feature_set: pulumi.Input[Optional[str]] = None,
markdown: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOutputOptions] = None) -> Output[GetRichTextResult]func GetRichText(ctx *Context, args *GetRichTextArgs, opts ...InvokeOption) (*GetRichTextResult, error)
func GetRichTextOutput(ctx *Context, args *GetRichTextOutputArgs, opts ...InvokeOption) GetRichTextResultOutput> Note: This function is named GetRichText in the Go SDK.
public static class GetRichText
{
public static Task<GetRichTextResult> InvokeAsync(GetRichTextArgs args, InvokeOptions? opts = null)
public static Output<GetRichTextResult> Invoke(GetRichTextInvokeArgs args, InvokeOptions? opts = null)
public static Output<GetRichTextResult> Invoke(GetRichTextInvokeArgs args, InvokeOutputOptions opts)
}public static CompletableFuture<GetRichTextResult> getRichText(GetRichTextArgs args, InvokeOptions options)
public static Output<GetRichTextResult> getRichText(GetRichTextArgs args, InvokeOptions options)
public static Output<GetRichTextResult> getRichText(GetRichTextArgs args, InvokeOutputOptions options)
fn::invoke:
function: incident:index/getRichText:getRichText
arguments:
# arguments dictionarydata "incident_get_rich_text" "name" {
# arguments
}The following arguments are supported:
- Feature
Set string - The feature set of the field this document is destined for. Content the feature set doesn't permit is dropped, and reported in dropped_content. Possible values are:
plain_single_line,plain_single_line_with_secrets,plain_multi_line,mrkdwn,rich,rich_with_images,slack_rich_text,slack_rich_text_with_headings,basic,basic_no_links,jira. - Markdown string
- The markdown to parse. Template variables written as {{ name }} become variable placeholders, and support the omitifunset and truncate filters.
- Feature
Set string - The feature set of the field this document is destined for. Content the feature set doesn't permit is dropped, and reported in dropped_content. Possible values are:
plain_single_line,plain_single_line_with_secrets,plain_multi_line,mrkdwn,rich,rich_with_images,slack_rich_text,slack_rich_text_with_headings,basic,basic_no_links,jira. - Markdown string
- The markdown to parse. Template variables written as {{ name }} become variable placeholders, and support the omitifunset and truncate filters.
- feature_
set string - The feature set of the field this document is destined for. Content the feature set doesn't permit is dropped, and reported in dropped_content. Possible values are:
plain_single_line,plain_single_line_with_secrets,plain_multi_line,mrkdwn,rich,rich_with_images,slack_rich_text,slack_rich_text_with_headings,basic,basic_no_links,jira. - markdown string
- The markdown to parse. Template variables written as {{ name }} become variable placeholders, and support the omitifunset and truncate filters.
- feature
Set String - The feature set of the field this document is destined for. Content the feature set doesn't permit is dropped, and reported in dropped_content. Possible values are:
plain_single_line,plain_single_line_with_secrets,plain_multi_line,mrkdwn,rich,rich_with_images,slack_rich_text,slack_rich_text_with_headings,basic,basic_no_links,jira. - markdown String
- The markdown to parse. Template variables written as {{ name }} become variable placeholders, and support the omitifunset and truncate filters.
- feature
Set string - The feature set of the field this document is destined for. Content the feature set doesn't permit is dropped, and reported in dropped_content. Possible values are:
plain_single_line,plain_single_line_with_secrets,plain_multi_line,mrkdwn,rich,rich_with_images,slack_rich_text,slack_rich_text_with_headings,basic,basic_no_links,jira. - markdown string
- The markdown to parse. Template variables written as {{ name }} become variable placeholders, and support the omitifunset and truncate filters.
- feature_
set str - The feature set of the field this document is destined for. Content the feature set doesn't permit is dropped, and reported in dropped_content. Possible values are:
plain_single_line,plain_single_line_with_secrets,plain_multi_line,mrkdwn,rich,rich_with_images,slack_rich_text,slack_rich_text_with_headings,basic,basic_no_links,jira. - markdown str
- The markdown to parse. Template variables written as {{ name }} become variable placeholders, and support the omitifunset and truncate filters.
- feature
Set String - The feature set of the field this document is destined for. Content the feature set doesn't permit is dropped, and reported in dropped_content. Possible values are:
plain_single_line,plain_single_line_with_secrets,plain_multi_line,mrkdwn,rich,rich_with_images,slack_rich_text,slack_rich_text_with_headings,basic,basic_no_links,jira. - markdown String
- The markdown to parse. Template variables written as {{ name }} become variable placeholders, and support the omitifunset and truncate filters.
getRichText Result
The following output properties are available:
- Dropped
Contents List<string> - Node and mark types dropped because the feature set doesn't permit them. Empty when nothing was dropped.
- Feature
Set string - The feature set of the field this document is destined for. Content the feature set doesn't permit is dropped, and reported in dropped_content. Possible values are:
plain_single_line,plain_single_line_with_secrets,plain_multi_line,mrkdwn,rich,rich_with_images,slack_rich_text,slack_rich_text_with_headings,basic,basic_no_links,jira. - Id string
- The provider-assigned unique ID for this managed resource.
- Json string
- The document, encoded as JSON. Assign it to the rich text field you built it for, such as an alert source template's
titleordescriptionliteral. - Markdown string
- The markdown to parse. Template variables written as {{ name }} become variable placeholders, and support the omitifunset and truncate filters.
- Dropped
Contents []string - Node and mark types dropped because the feature set doesn't permit them. Empty when nothing was dropped.
- Feature
Set string - The feature set of the field this document is destined for. Content the feature set doesn't permit is dropped, and reported in dropped_content. Possible values are:
plain_single_line,plain_single_line_with_secrets,plain_multi_line,mrkdwn,rich,rich_with_images,slack_rich_text,slack_rich_text_with_headings,basic,basic_no_links,jira. - Id string
- The provider-assigned unique ID for this managed resource.
- Json string
- The document, encoded as JSON. Assign it to the rich text field you built it for, such as an alert source template's
titleordescriptionliteral. - Markdown string
- The markdown to parse. Template variables written as {{ name }} become variable placeholders, and support the omitifunset and truncate filters.
- dropped_
contents list(string) - Node and mark types dropped because the feature set doesn't permit them. Empty when nothing was dropped.
- feature_
set string - The feature set of the field this document is destined for. Content the feature set doesn't permit is dropped, and reported in dropped_content. Possible values are:
plain_single_line,plain_single_line_with_secrets,plain_multi_line,mrkdwn,rich,rich_with_images,slack_rich_text,slack_rich_text_with_headings,basic,basic_no_links,jira. - id string
- The provider-assigned unique ID for this managed resource.
- json string
- The document, encoded as JSON. Assign it to the rich text field you built it for, such as an alert source template's
titleordescriptionliteral. - markdown string
- The markdown to parse. Template variables written as {{ name }} become variable placeholders, and support the omitifunset and truncate filters.
- dropped
Contents List<String> - Node and mark types dropped because the feature set doesn't permit them. Empty when nothing was dropped.
- feature
Set String - The feature set of the field this document is destined for. Content the feature set doesn't permit is dropped, and reported in dropped_content. Possible values are:
plain_single_line,plain_single_line_with_secrets,plain_multi_line,mrkdwn,rich,rich_with_images,slack_rich_text,slack_rich_text_with_headings,basic,basic_no_links,jira. - id String
- The provider-assigned unique ID for this managed resource.
- json String
- The document, encoded as JSON. Assign it to the rich text field you built it for, such as an alert source template's
titleordescriptionliteral. - markdown String
- The markdown to parse. Template variables written as {{ name }} become variable placeholders, and support the omitifunset and truncate filters.
- dropped
Contents string[] - Node and mark types dropped because the feature set doesn't permit them. Empty when nothing was dropped.
- feature
Set string - The feature set of the field this document is destined for. Content the feature set doesn't permit is dropped, and reported in dropped_content. Possible values are:
plain_single_line,plain_single_line_with_secrets,plain_multi_line,mrkdwn,rich,rich_with_images,slack_rich_text,slack_rich_text_with_headings,basic,basic_no_links,jira. - id string
- The provider-assigned unique ID for this managed resource.
- json string
- The document, encoded as JSON. Assign it to the rich text field you built it for, such as an alert source template's
titleordescriptionliteral. - markdown string
- The markdown to parse. Template variables written as {{ name }} become variable placeholders, and support the omitifunset and truncate filters.
- dropped_
contents Sequence[str] - Node and mark types dropped because the feature set doesn't permit them. Empty when nothing was dropped.
- feature_
set str - The feature set of the field this document is destined for. Content the feature set doesn't permit is dropped, and reported in dropped_content. Possible values are:
plain_single_line,plain_single_line_with_secrets,plain_multi_line,mrkdwn,rich,rich_with_images,slack_rich_text,slack_rich_text_with_headings,basic,basic_no_links,jira. - id str
- The provider-assigned unique ID for this managed resource.
- json str
- The document, encoded as JSON. Assign it to the rich text field you built it for, such as an alert source template's
titleordescriptionliteral. - markdown str
- The markdown to parse. Template variables written as {{ name }} become variable placeholders, and support the omitifunset and truncate filters.
- dropped
Contents List<String> - Node and mark types dropped because the feature set doesn't permit them. Empty when nothing was dropped.
- feature
Set String - The feature set of the field this document is destined for. Content the feature set doesn't permit is dropped, and reported in dropped_content. Possible values are:
plain_single_line,plain_single_line_with_secrets,plain_multi_line,mrkdwn,rich,rich_with_images,slack_rich_text,slack_rich_text_with_headings,basic,basic_no_links,jira. - id String
- The provider-assigned unique ID for this managed resource.
- json String
- The document, encoded as JSON. Assign it to the rich text field you built it for, such as an alert source template's
titleordescriptionliteral. - markdown String
- The markdown to parse. Template variables written as {{ name }} become variable placeholders, and support the omitifunset and truncate filters.
Package Details
- Repository
- incident incident-io/terraform-provider-incident
- License
- Notes
- This Pulumi package is based on the
incidentTerraform Provider.
Viewing docs for incident 7.0.0
published on Friday, Sep 11, 2026 by incident-io
published on Friday, Sep 11, 2026 by incident-io