newrelic.Workflow
Explore with Pulumi AI
Use this resource to create and manage New Relic workflows.
Example Usage
Workflow
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.Workflow("foo", {
    name: "workflow-example",
    mutingRulesHandling: "NOTIFY_ALL_ISSUES",
    issuesFilter: {
        name: "filter-name",
        type: "FILTER",
        predicates: [{
            attribute: "accumulations.tag.team",
            operator: "EXACTLY_MATCHES",
            values: ["growth"],
        }],
    },
    destinations: [{
        channelId: someChannel.id,
    }],
});
import pulumi
import pulumi_newrelic as newrelic
foo = newrelic.Workflow("foo",
    name="workflow-example",
    muting_rules_handling="NOTIFY_ALL_ISSUES",
    issues_filter={
        "name": "filter-name",
        "type": "FILTER",
        "predicates": [{
            "attribute": "accumulations.tag.team",
            "operator": "EXACTLY_MATCHES",
            "values": ["growth"],
        }],
    },
    destinations=[{
        "channel_id": some_channel["id"],
    }])
package main
import (
	"github.com/pulumi/pulumi-newrelic/sdk/v5/go/newrelic"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := newrelic.NewWorkflow(ctx, "foo", &newrelic.WorkflowArgs{
			Name:                pulumi.String("workflow-example"),
			MutingRulesHandling: pulumi.String("NOTIFY_ALL_ISSUES"),
			IssuesFilter: &newrelic.WorkflowIssuesFilterArgs{
				Name: pulumi.String("filter-name"),
				Type: pulumi.String("FILTER"),
				Predicates: newrelic.WorkflowIssuesFilterPredicateArray{
					&newrelic.WorkflowIssuesFilterPredicateArgs{
						Attribute: pulumi.String("accumulations.tag.team"),
						Operator:  pulumi.String("EXACTLY_MATCHES"),
						Values: pulumi.StringArray{
							pulumi.String("growth"),
						},
					},
				},
			},
			Destinations: newrelic.WorkflowDestinationArray{
				&newrelic.WorkflowDestinationArgs{
					ChannelId: pulumi.Any(someChannel.Id),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() => 
{
    var foo = new NewRelic.Workflow("foo", new()
    {
        Name = "workflow-example",
        MutingRulesHandling = "NOTIFY_ALL_ISSUES",
        IssuesFilter = new NewRelic.Inputs.WorkflowIssuesFilterArgs
        {
            Name = "filter-name",
            Type = "FILTER",
            Predicates = new[]
            {
                new NewRelic.Inputs.WorkflowIssuesFilterPredicateArgs
                {
                    Attribute = "accumulations.tag.team",
                    Operator = "EXACTLY_MATCHES",
                    Values = new[]
                    {
                        "growth",
                    },
                },
            },
        },
        Destinations = new[]
        {
            new NewRelic.Inputs.WorkflowDestinationArgs
            {
                ChannelId = someChannel.Id,
            },
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.Workflow;
import com.pulumi.newrelic.WorkflowArgs;
import com.pulumi.newrelic.inputs.WorkflowIssuesFilterArgs;
import com.pulumi.newrelic.inputs.WorkflowDestinationArgs;
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 foo = new Workflow("foo", WorkflowArgs.builder()
            .name("workflow-example")
            .mutingRulesHandling("NOTIFY_ALL_ISSUES")
            .issuesFilter(WorkflowIssuesFilterArgs.builder()
                .name("filter-name")
                .type("FILTER")
                .predicates(WorkflowIssuesFilterPredicateArgs.builder()
                    .attribute("accumulations.tag.team")
                    .operator("EXACTLY_MATCHES")
                    .values("growth")
                    .build())
                .build())
            .destinations(WorkflowDestinationArgs.builder()
                .channelId(someChannel.id())
                .build())
            .build());
    }
}
resources:
  foo:
    type: newrelic:Workflow
    properties:
      name: workflow-example
      mutingRulesHandling: NOTIFY_ALL_ISSUES
      issuesFilter:
        name: filter-name
        type: FILTER
        predicates:
          - attribute: accumulations.tag.team
            operator: EXACTLY_MATCHES
            values:
              - growth
      destinations:
        - channelId: ${someChannel.id}
Policy-Based Workflow Example
This scenario describes one of most common ways of using workflows by defining a set of policies the workflow handles
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
// Create a policy to track
const my_policy = new newrelic.AlertPolicy("my-policy", {name: "my_policy"});
// Create a reusable notification destination
const webhook_destination = new newrelic.NotificationDestination("webhook-destination", {
    name: "destination-webhook",
    type: "WEBHOOK",
    properties: [{
        key: "url",
        value: "https://example.com",
    }],
    authBasic: {
        user: "username",
        password: "password",
    },
});
// Create a notification channel to use in the workflow
const webhook_channel = new newrelic.NotificationChannel("webhook-channel", {
    name: "channel-webhook",
    type: "WEBHOOK",
    destinationId: webhook_destination.id,
    product: "IINT",
    properties: [{
        key: "payload",
        value: "{}",
        label: "Payload Template",
    }],
});
// A workflow that matches issues that include incidents triggered by the policy
const workflow_example = new newrelic.Workflow("workflow-example", {
    name: "workflow-example",
    mutingRulesHandling: "NOTIFY_ALL_ISSUES",
    issuesFilter: {
        name: "Filter-name",
        type: "FILTER",
        predicates: [{
            attribute: "labels.policyIds",
            operator: "EXACTLY_MATCHES",
            values: [my_policy.id],
        }],
    },
    destinations: [{
        channelId: webhook_channel.id,
    }],
});
import pulumi
import pulumi_newrelic as newrelic
# Create a policy to track
my_policy = newrelic.AlertPolicy("my-policy", name="my_policy")
# Create a reusable notification destination
webhook_destination = newrelic.NotificationDestination("webhook-destination",
    name="destination-webhook",
    type="WEBHOOK",
    properties=[{
        "key": "url",
        "value": "https://example.com",
    }],
    auth_basic={
        "user": "username",
        "password": "password",
    })
# Create a notification channel to use in the workflow
webhook_channel = newrelic.NotificationChannel("webhook-channel",
    name="channel-webhook",
    type="WEBHOOK",
    destination_id=webhook_destination.id,
    product="IINT",
    properties=[{
        "key": "payload",
        "value": "{}",
        "label": "Payload Template",
    }])
# A workflow that matches issues that include incidents triggered by the policy
workflow_example = newrelic.Workflow("workflow-example",
    name="workflow-example",
    muting_rules_handling="NOTIFY_ALL_ISSUES",
    issues_filter={
        "name": "Filter-name",
        "type": "FILTER",
        "predicates": [{
            "attribute": "labels.policyIds",
            "operator": "EXACTLY_MATCHES",
            "values": [my_policy.id],
        }],
    },
    destinations=[{
        "channel_id": webhook_channel.id,
    }])
package main
import (
	"github.com/pulumi/pulumi-newrelic/sdk/v5/go/newrelic"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// Create a policy to track
		my_policy, err := newrelic.NewAlertPolicy(ctx, "my-policy", &newrelic.AlertPolicyArgs{
			Name: pulumi.String("my_policy"),
		})
		if err != nil {
			return err
		}
		// Create a reusable notification destination
		webhook_destination, err := newrelic.NewNotificationDestination(ctx, "webhook-destination", &newrelic.NotificationDestinationArgs{
			Name: pulumi.String("destination-webhook"),
			Type: pulumi.String("WEBHOOK"),
			Properties: newrelic.NotificationDestinationPropertyArray{
				&newrelic.NotificationDestinationPropertyArgs{
					Key:   pulumi.String("url"),
					Value: pulumi.String("https://example.com"),
				},
			},
			AuthBasic: &newrelic.NotificationDestinationAuthBasicArgs{
				User:     pulumi.String("username"),
				Password: pulumi.String("password"),
			},
		})
		if err != nil {
			return err
		}
		// Create a notification channel to use in the workflow
		webhook_channel, err := newrelic.NewNotificationChannel(ctx, "webhook-channel", &newrelic.NotificationChannelArgs{
			Name:          pulumi.String("channel-webhook"),
			Type:          pulumi.String("WEBHOOK"),
			DestinationId: webhook_destination.ID(),
			Product:       pulumi.String("IINT"),
			Properties: newrelic.NotificationChannelPropertyArray{
				&newrelic.NotificationChannelPropertyArgs{
					Key:   pulumi.String("payload"),
					Value: pulumi.String("{}"),
					Label: pulumi.String("Payload Template"),
				},
			},
		})
		if err != nil {
			return err
		}
		// A workflow that matches issues that include incidents triggered by the policy
		_, err = newrelic.NewWorkflow(ctx, "workflow-example", &newrelic.WorkflowArgs{
			Name:                pulumi.String("workflow-example"),
			MutingRulesHandling: pulumi.String("NOTIFY_ALL_ISSUES"),
			IssuesFilter: &newrelic.WorkflowIssuesFilterArgs{
				Name: pulumi.String("Filter-name"),
				Type: pulumi.String("FILTER"),
				Predicates: newrelic.WorkflowIssuesFilterPredicateArray{
					&newrelic.WorkflowIssuesFilterPredicateArgs{
						Attribute: pulumi.String("labels.policyIds"),
						Operator:  pulumi.String("EXACTLY_MATCHES"),
						Values: pulumi.StringArray{
							my_policy.ID(),
						},
					},
				},
			},
			Destinations: newrelic.WorkflowDestinationArray{
				&newrelic.WorkflowDestinationArgs{
					ChannelId: webhook_channel.ID(),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() => 
{
    // Create a policy to track
    var my_policy = new NewRelic.AlertPolicy("my-policy", new()
    {
        Name = "my_policy",
    });
    // Create a reusable notification destination
    var webhook_destination = new NewRelic.NotificationDestination("webhook-destination", new()
    {
        Name = "destination-webhook",
        Type = "WEBHOOK",
        Properties = new[]
        {
            new NewRelic.Inputs.NotificationDestinationPropertyArgs
            {
                Key = "url",
                Value = "https://example.com",
            },
        },
        AuthBasic = new NewRelic.Inputs.NotificationDestinationAuthBasicArgs
        {
            User = "username",
            Password = "password",
        },
    });
    // Create a notification channel to use in the workflow
    var webhook_channel = new NewRelic.NotificationChannel("webhook-channel", new()
    {
        Name = "channel-webhook",
        Type = "WEBHOOK",
        DestinationId = webhook_destination.Id,
        Product = "IINT",
        Properties = new[]
        {
            new NewRelic.Inputs.NotificationChannelPropertyArgs
            {
                Key = "payload",
                Value = "{}",
                Label = "Payload Template",
            },
        },
    });
    // A workflow that matches issues that include incidents triggered by the policy
    var workflow_example = new NewRelic.Workflow("workflow-example", new()
    {
        Name = "workflow-example",
        MutingRulesHandling = "NOTIFY_ALL_ISSUES",
        IssuesFilter = new NewRelic.Inputs.WorkflowIssuesFilterArgs
        {
            Name = "Filter-name",
            Type = "FILTER",
            Predicates = new[]
            {
                new NewRelic.Inputs.WorkflowIssuesFilterPredicateArgs
                {
                    Attribute = "labels.policyIds",
                    Operator = "EXACTLY_MATCHES",
                    Values = new[]
                    {
                        my_policy.Id,
                    },
                },
            },
        },
        Destinations = new[]
        {
            new NewRelic.Inputs.WorkflowDestinationArgs
            {
                ChannelId = webhook_channel.Id,
            },
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.AlertPolicy;
import com.pulumi.newrelic.AlertPolicyArgs;
import com.pulumi.newrelic.NotificationDestination;
import com.pulumi.newrelic.NotificationDestinationArgs;
import com.pulumi.newrelic.inputs.NotificationDestinationPropertyArgs;
import com.pulumi.newrelic.inputs.NotificationDestinationAuthBasicArgs;
import com.pulumi.newrelic.NotificationChannel;
import com.pulumi.newrelic.NotificationChannelArgs;
import com.pulumi.newrelic.inputs.NotificationChannelPropertyArgs;
import com.pulumi.newrelic.Workflow;
import com.pulumi.newrelic.WorkflowArgs;
import com.pulumi.newrelic.inputs.WorkflowIssuesFilterArgs;
import com.pulumi.newrelic.inputs.WorkflowDestinationArgs;
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) {
        // Create a policy to track
        var my_policy = new AlertPolicy("my-policy", AlertPolicyArgs.builder()
            .name("my_policy")
            .build());
        // Create a reusable notification destination
        var webhook_destination = new NotificationDestination("webhook-destination", NotificationDestinationArgs.builder()
            .name("destination-webhook")
            .type("WEBHOOK")
            .properties(NotificationDestinationPropertyArgs.builder()
                .key("url")
                .value("https://example.com")
                .build())
            .authBasic(NotificationDestinationAuthBasicArgs.builder()
                .user("username")
                .password("password")
                .build())
            .build());
        // Create a notification channel to use in the workflow
        var webhook_channel = new NotificationChannel("webhook-channel", NotificationChannelArgs.builder()
            .name("channel-webhook")
            .type("WEBHOOK")
            .destinationId(webhook_destination.id())
            .product("IINT")
            .properties(NotificationChannelPropertyArgs.builder()
                .key("payload")
                .value("{}")
                .label("Payload Template")
                .build())
            .build());
        // A workflow that matches issues that include incidents triggered by the policy
        var workflow_example = new Workflow("workflow-example", WorkflowArgs.builder()
            .name("workflow-example")
            .mutingRulesHandling("NOTIFY_ALL_ISSUES")
            .issuesFilter(WorkflowIssuesFilterArgs.builder()
                .name("Filter-name")
                .type("FILTER")
                .predicates(WorkflowIssuesFilterPredicateArgs.builder()
                    .attribute("labels.policyIds")
                    .operator("EXACTLY_MATCHES")
                    .values(my_policy.id())
                    .build())
                .build())
            .destinations(WorkflowDestinationArgs.builder()
                .channelId(webhook_channel.id())
                .build())
            .build());
    }
}
resources:
  # Create a policy to track
  my-policy:
    type: newrelic:AlertPolicy
    properties:
      name: my_policy
  # Create a reusable notification destination
  webhook-destination:
    type: newrelic:NotificationDestination
    properties:
      name: destination-webhook
      type: WEBHOOK
      properties:
        - key: url
          value: https://example.com
      authBasic:
        user: username
        password: password
  # Create a notification channel to use in the workflow
  webhook-channel:
    type: newrelic:NotificationChannel
    properties:
      name: channel-webhook
      type: WEBHOOK
      destinationId: ${["webhook-destination"].id}
      product: IINT
      properties:
        - key: payload
          value: '{}'
          label: Payload Template
  # A workflow that matches issues that include incidents triggered by the policy
  workflow-example:
    type: newrelic:Workflow
    properties:
      name: workflow-example
      mutingRulesHandling: NOTIFY_ALL_ISSUES
      issuesFilter:
        name: Filter-name
        type: FILTER
        predicates:
          - attribute: labels.policyIds
            operator: EXACTLY_MATCHES
            values:
              - ${["my-policy"].id}
      destinations:
        - channelId: ${["webhook-channel"].id}
An example of a workflow with enrichments
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const workflow_example = new newrelic.Workflow("workflow-example", {
    name: "workflow-enrichment-example",
    mutingRulesHandling: "NOTIFY_ALL_ISSUES",
    issuesFilter: {
        name: "Filter-name",
        type: "FILTER",
        predicates: [{
            attribute: "accumulations.tag.team",
            operator: "EXACTLY_MATCHES",
            values: ["my_team"],
        }],
    },
    enrichments: {
        nrqls: [{
            name: "Log Count",
            configurations: [{
                query: "SELECT count(*) FROM Log WHERE message like '%error%' since 10 minutes ago",
            }],
        }],
    },
    destinations: [{
        channelId: webhook_channel.id,
    }],
});
import pulumi
import pulumi_newrelic as newrelic
workflow_example = newrelic.Workflow("workflow-example",
    name="workflow-enrichment-example",
    muting_rules_handling="NOTIFY_ALL_ISSUES",
    issues_filter={
        "name": "Filter-name",
        "type": "FILTER",
        "predicates": [{
            "attribute": "accumulations.tag.team",
            "operator": "EXACTLY_MATCHES",
            "values": ["my_team"],
        }],
    },
    enrichments={
        "nrqls": [{
            "name": "Log Count",
            "configurations": [{
                "query": "SELECT count(*) FROM Log WHERE message like '%error%' since 10 minutes ago",
            }],
        }],
    },
    destinations=[{
        "channel_id": webhook_channel["id"],
    }])
package main
import (
	"github.com/pulumi/pulumi-newrelic/sdk/v5/go/newrelic"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := newrelic.NewWorkflow(ctx, "workflow-example", &newrelic.WorkflowArgs{
			Name:                pulumi.String("workflow-enrichment-example"),
			MutingRulesHandling: pulumi.String("NOTIFY_ALL_ISSUES"),
			IssuesFilter: &newrelic.WorkflowIssuesFilterArgs{
				Name: pulumi.String("Filter-name"),
				Type: pulumi.String("FILTER"),
				Predicates: newrelic.WorkflowIssuesFilterPredicateArray{
					&newrelic.WorkflowIssuesFilterPredicateArgs{
						Attribute: pulumi.String("accumulations.tag.team"),
						Operator:  pulumi.String("EXACTLY_MATCHES"),
						Values: pulumi.StringArray{
							pulumi.String("my_team"),
						},
					},
				},
			},
			Enrichments: &newrelic.WorkflowEnrichmentsArgs{
				Nrqls: newrelic.WorkflowEnrichmentsNrqlArray{
					&newrelic.WorkflowEnrichmentsNrqlArgs{
						Name: pulumi.String("Log Count"),
						Configurations: newrelic.WorkflowEnrichmentsNrqlConfigurationArray{
							&newrelic.WorkflowEnrichmentsNrqlConfigurationArgs{
								Query: pulumi.String("SELECT count(*) FROM Log WHERE message like '%error%' since 10 minutes ago"),
							},
						},
					},
				},
			},
			Destinations: newrelic.WorkflowDestinationArray{
				&newrelic.WorkflowDestinationArgs{
					ChannelId: pulumi.Any(webhook_channel.Id),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() => 
{
    var workflow_example = new NewRelic.Workflow("workflow-example", new()
    {
        Name = "workflow-enrichment-example",
        MutingRulesHandling = "NOTIFY_ALL_ISSUES",
        IssuesFilter = new NewRelic.Inputs.WorkflowIssuesFilterArgs
        {
            Name = "Filter-name",
            Type = "FILTER",
            Predicates = new[]
            {
                new NewRelic.Inputs.WorkflowIssuesFilterPredicateArgs
                {
                    Attribute = "accumulations.tag.team",
                    Operator = "EXACTLY_MATCHES",
                    Values = new[]
                    {
                        "my_team",
                    },
                },
            },
        },
        Enrichments = new NewRelic.Inputs.WorkflowEnrichmentsArgs
        {
            Nrqls = new[]
            {
                new NewRelic.Inputs.WorkflowEnrichmentsNrqlArgs
                {
                    Name = "Log Count",
                    Configurations = new[]
                    {
                        new NewRelic.Inputs.WorkflowEnrichmentsNrqlConfigurationArgs
                        {
                            Query = "SELECT count(*) FROM Log WHERE message like '%error%' since 10 minutes ago",
                        },
                    },
                },
            },
        },
        Destinations = new[]
        {
            new NewRelic.Inputs.WorkflowDestinationArgs
            {
                ChannelId = webhook_channel.Id,
            },
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.Workflow;
import com.pulumi.newrelic.WorkflowArgs;
import com.pulumi.newrelic.inputs.WorkflowIssuesFilterArgs;
import com.pulumi.newrelic.inputs.WorkflowEnrichmentsArgs;
import com.pulumi.newrelic.inputs.WorkflowDestinationArgs;
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 workflow_example = new Workflow("workflow-example", WorkflowArgs.builder()
            .name("workflow-enrichment-example")
            .mutingRulesHandling("NOTIFY_ALL_ISSUES")
            .issuesFilter(WorkflowIssuesFilterArgs.builder()
                .name("Filter-name")
                .type("FILTER")
                .predicates(WorkflowIssuesFilterPredicateArgs.builder()
                    .attribute("accumulations.tag.team")
                    .operator("EXACTLY_MATCHES")
                    .values("my_team")
                    .build())
                .build())
            .enrichments(WorkflowEnrichmentsArgs.builder()
                .nrqls(WorkflowEnrichmentsNrqlArgs.builder()
                    .name("Log Count")
                    .configurations(WorkflowEnrichmentsNrqlConfigurationArgs.builder()
                        .query("SELECT count(*) FROM Log WHERE message like '%error%' since 10 minutes ago")
                        .build())
                    .build())
                .build())
            .destinations(WorkflowDestinationArgs.builder()
                .channelId(webhook_channel.id())
                .build())
            .build());
    }
}
resources:
  workflow-example:
    type: newrelic:Workflow
    properties:
      name: workflow-enrichment-example
      mutingRulesHandling: NOTIFY_ALL_ISSUES
      issuesFilter:
        name: Filter-name
        type: FILTER
        predicates:
          - attribute: accumulations.tag.team
            operator: EXACTLY_MATCHES
            values:
              - my_team
      enrichments:
        nrqls:
          - name: Log Count
            configurations:
              - query: SELECT count(*) FROM Log WHERE message like '%error%' since 10 minutes ago
      destinations:
        - channelId: ${["webhook-channel"].id}
An example of a workflow with notification triggers
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const workflow_example = new newrelic.Workflow("workflow-example", {
    name: "workflow-enrichment-example",
    mutingRulesHandling: "NOTIFY_ALL_ISSUES",
    issuesFilter: {
        name: "Filter-name",
        type: "FILTER",
        predicates: [{
            attribute: "accumulations.tag.team",
            operator: "EXACTLY_MATCHES",
            values: ["my_team"],
        }],
    },
    destinations: [{
        channelId: webhook_channel.id,
        notificationTriggers: ["ACTIVATED"],
    }],
});
import pulumi
import pulumi_newrelic as newrelic
workflow_example = newrelic.Workflow("workflow-example",
    name="workflow-enrichment-example",
    muting_rules_handling="NOTIFY_ALL_ISSUES",
    issues_filter={
        "name": "Filter-name",
        "type": "FILTER",
        "predicates": [{
            "attribute": "accumulations.tag.team",
            "operator": "EXACTLY_MATCHES",
            "values": ["my_team"],
        }],
    },
    destinations=[{
        "channel_id": webhook_channel["id"],
        "notification_triggers": ["ACTIVATED"],
    }])
package main
import (
	"github.com/pulumi/pulumi-newrelic/sdk/v5/go/newrelic"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := newrelic.NewWorkflow(ctx, "workflow-example", &newrelic.WorkflowArgs{
			Name:                pulumi.String("workflow-enrichment-example"),
			MutingRulesHandling: pulumi.String("NOTIFY_ALL_ISSUES"),
			IssuesFilter: &newrelic.WorkflowIssuesFilterArgs{
				Name: pulumi.String("Filter-name"),
				Type: pulumi.String("FILTER"),
				Predicates: newrelic.WorkflowIssuesFilterPredicateArray{
					&newrelic.WorkflowIssuesFilterPredicateArgs{
						Attribute: pulumi.String("accumulations.tag.team"),
						Operator:  pulumi.String("EXACTLY_MATCHES"),
						Values: pulumi.StringArray{
							pulumi.String("my_team"),
						},
					},
				},
			},
			Destinations: newrelic.WorkflowDestinationArray{
				&newrelic.WorkflowDestinationArgs{
					ChannelId: pulumi.Any(webhook_channel.Id),
					NotificationTriggers: pulumi.StringArray{
						pulumi.String("ACTIVATED"),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() => 
{
    var workflow_example = new NewRelic.Workflow("workflow-example", new()
    {
        Name = "workflow-enrichment-example",
        MutingRulesHandling = "NOTIFY_ALL_ISSUES",
        IssuesFilter = new NewRelic.Inputs.WorkflowIssuesFilterArgs
        {
            Name = "Filter-name",
            Type = "FILTER",
            Predicates = new[]
            {
                new NewRelic.Inputs.WorkflowIssuesFilterPredicateArgs
                {
                    Attribute = "accumulations.tag.team",
                    Operator = "EXACTLY_MATCHES",
                    Values = new[]
                    {
                        "my_team",
                    },
                },
            },
        },
        Destinations = new[]
        {
            new NewRelic.Inputs.WorkflowDestinationArgs
            {
                ChannelId = webhook_channel.Id,
                NotificationTriggers = new[]
                {
                    "ACTIVATED",
                },
            },
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.Workflow;
import com.pulumi.newrelic.WorkflowArgs;
import com.pulumi.newrelic.inputs.WorkflowIssuesFilterArgs;
import com.pulumi.newrelic.inputs.WorkflowDestinationArgs;
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 workflow_example = new Workflow("workflow-example", WorkflowArgs.builder()
            .name("workflow-enrichment-example")
            .mutingRulesHandling("NOTIFY_ALL_ISSUES")
            .issuesFilter(WorkflowIssuesFilterArgs.builder()
                .name("Filter-name")
                .type("FILTER")
                .predicates(WorkflowIssuesFilterPredicateArgs.builder()
                    .attribute("accumulations.tag.team")
                    .operator("EXACTLY_MATCHES")
                    .values("my_team")
                    .build())
                .build())
            .destinations(WorkflowDestinationArgs.builder()
                .channelId(webhook_channel.id())
                .notificationTriggers("ACTIVATED")
                .build())
            .build());
    }
}
resources:
  workflow-example:
    type: newrelic:Workflow
    properties:
      name: workflow-enrichment-example
      mutingRulesHandling: NOTIFY_ALL_ISSUES
      issuesFilter:
        name: Filter-name
        type: FILTER
        predicates:
          - attribute: accumulations.tag.team
            operator: EXACTLY_MATCHES
            values:
              - my_team
      destinations:
        - channelId: ${["webhook-channel"].id}
          notificationTriggers:
            - ACTIVATED
Additional Information
More details about the workflows can be found here.
Moving from Legacy Alert Policy Channels to Workflows
As described in the documentation of this resource, mapping alert channels (created using newrelic.NotificationDestination and newrelic.NotificationChannel) to policies can be performed using the newrelic.Workflow resource, which is an alternative to the legacy resource newrelic.AlertPolicyChannel (which consumes alert channels created using the legacy resource newrelic.AlertChannel).
Both of the legacy resources mentioned above, newrelic.AlertChannel and newrelic.AlertPolicyChannel are deprecated and will be removed in a future major release, as stated in the documentation of both of these resources.
If you’re currently using newrelic.AlertChannel and newrelic.AlertPolicyChannel to manage alert channels linked to policies, we strongly recommend migrating to these workflows and notifications-based resources at the earliest.
Please refer to the examples in this page, or this example for illustrations on setting up channels and workflows with these resources.
v3.3 changes
In version v3.3 we renamed the following arguments:
- workflow_enabledchanged to- enabled.
- destination_configurationchanged to- destination.
- predicateschanged to- predicate.
- Enrichment’s configurationschanged toconfiguration.
Create Workflow Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Workflow(name: string, args: WorkflowArgs, opts?: CustomResourceOptions);@overload
def Workflow(resource_name: str,
             args: WorkflowArgs,
             opts: Optional[ResourceOptions] = None)
@overload
def Workflow(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             destinations: Optional[Sequence[WorkflowDestinationArgs]] = None,
             issues_filter: Optional[WorkflowIssuesFilterArgs] = None,
             muting_rules_handling: Optional[str] = None,
             account_id: Optional[str] = None,
             destinations_enabled: Optional[bool] = None,
             enabled: Optional[bool] = None,
             enrichments: Optional[WorkflowEnrichmentsArgs] = None,
             enrichments_enabled: Optional[bool] = None,
             name: Optional[str] = None)func NewWorkflow(ctx *Context, name string, args WorkflowArgs, opts ...ResourceOption) (*Workflow, error)public Workflow(string name, WorkflowArgs args, CustomResourceOptions? opts = null)
public Workflow(String name, WorkflowArgs args)
public Workflow(String name, WorkflowArgs args, CustomResourceOptions options)
type: newrelic:Workflow
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 WorkflowArgs
- 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 WorkflowArgs
- 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 WorkflowArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WorkflowArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WorkflowArgs
- 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 workflowResource = new NewRelic.Workflow("workflowResource", new()
{
    Destinations = new[]
    {
        new NewRelic.Inputs.WorkflowDestinationArgs
        {
            ChannelId = "string",
            Name = "string",
            NotificationTriggers = new[]
            {
                "string",
            },
            Type = "string",
            UpdateOriginalMessage = false,
        },
    },
    IssuesFilter = new NewRelic.Inputs.WorkflowIssuesFilterArgs
    {
        Name = "string",
        Type = "string",
        FilterId = "string",
        Predicates = new[]
        {
            new NewRelic.Inputs.WorkflowIssuesFilterPredicateArgs
            {
                Attribute = "string",
                Operator = "string",
                Values = new[]
                {
                    "string",
                },
            },
        },
    },
    MutingRulesHandling = "string",
    AccountId = "string",
    Enabled = false,
    Enrichments = new NewRelic.Inputs.WorkflowEnrichmentsArgs
    {
        Nrqls = new[]
        {
            new NewRelic.Inputs.WorkflowEnrichmentsNrqlArgs
            {
                Configurations = new[]
                {
                    new NewRelic.Inputs.WorkflowEnrichmentsNrqlConfigurationArgs
                    {
                        Query = "string",
                    },
                },
                Name = "string",
                AccountId = "string",
                EnrichmentId = "string",
                Type = "string",
            },
        },
    },
    EnrichmentsEnabled = false,
    Name = "string",
});
example, err := newrelic.NewWorkflow(ctx, "workflowResource", &newrelic.WorkflowArgs{
	Destinations: newrelic.WorkflowDestinationArray{
		&newrelic.WorkflowDestinationArgs{
			ChannelId: pulumi.String("string"),
			Name:      pulumi.String("string"),
			NotificationTriggers: pulumi.StringArray{
				pulumi.String("string"),
			},
			Type:                  pulumi.String("string"),
			UpdateOriginalMessage: pulumi.Bool(false),
		},
	},
	IssuesFilter: &newrelic.WorkflowIssuesFilterArgs{
		Name:     pulumi.String("string"),
		Type:     pulumi.String("string"),
		FilterId: pulumi.String("string"),
		Predicates: newrelic.WorkflowIssuesFilterPredicateArray{
			&newrelic.WorkflowIssuesFilterPredicateArgs{
				Attribute: pulumi.String("string"),
				Operator:  pulumi.String("string"),
				Values: pulumi.StringArray{
					pulumi.String("string"),
				},
			},
		},
	},
	MutingRulesHandling: pulumi.String("string"),
	AccountId:           pulumi.String("string"),
	Enabled:             pulumi.Bool(false),
	Enrichments: &newrelic.WorkflowEnrichmentsArgs{
		Nrqls: newrelic.WorkflowEnrichmentsNrqlArray{
			&newrelic.WorkflowEnrichmentsNrqlArgs{
				Configurations: newrelic.WorkflowEnrichmentsNrqlConfigurationArray{
					&newrelic.WorkflowEnrichmentsNrqlConfigurationArgs{
						Query: pulumi.String("string"),
					},
				},
				Name:         pulumi.String("string"),
				AccountId:    pulumi.String("string"),
				EnrichmentId: pulumi.String("string"),
				Type:         pulumi.String("string"),
			},
		},
	},
	EnrichmentsEnabled: pulumi.Bool(false),
	Name:               pulumi.String("string"),
})
var workflowResource = new Workflow("workflowResource", WorkflowArgs.builder()
    .destinations(WorkflowDestinationArgs.builder()
        .channelId("string")
        .name("string")
        .notificationTriggers("string")
        .type("string")
        .updateOriginalMessage(false)
        .build())
    .issuesFilter(WorkflowIssuesFilterArgs.builder()
        .name("string")
        .type("string")
        .filterId("string")
        .predicates(WorkflowIssuesFilterPredicateArgs.builder()
            .attribute("string")
            .operator("string")
            .values("string")
            .build())
        .build())
    .mutingRulesHandling("string")
    .accountId("string")
    .enabled(false)
    .enrichments(WorkflowEnrichmentsArgs.builder()
        .nrqls(WorkflowEnrichmentsNrqlArgs.builder()
            .configurations(WorkflowEnrichmentsNrqlConfigurationArgs.builder()
                .query("string")
                .build())
            .name("string")
            .accountId("string")
            .enrichmentId("string")
            .type("string")
            .build())
        .build())
    .enrichmentsEnabled(false)
    .name("string")
    .build());
workflow_resource = newrelic.Workflow("workflowResource",
    destinations=[{
        "channel_id": "string",
        "name": "string",
        "notification_triggers": ["string"],
        "type": "string",
        "update_original_message": False,
    }],
    issues_filter={
        "name": "string",
        "type": "string",
        "filter_id": "string",
        "predicates": [{
            "attribute": "string",
            "operator": "string",
            "values": ["string"],
        }],
    },
    muting_rules_handling="string",
    account_id="string",
    enabled=False,
    enrichments={
        "nrqls": [{
            "configurations": [{
                "query": "string",
            }],
            "name": "string",
            "account_id": "string",
            "enrichment_id": "string",
            "type": "string",
        }],
    },
    enrichments_enabled=False,
    name="string")
const workflowResource = new newrelic.Workflow("workflowResource", {
    destinations: [{
        channelId: "string",
        name: "string",
        notificationTriggers: ["string"],
        type: "string",
        updateOriginalMessage: false,
    }],
    issuesFilter: {
        name: "string",
        type: "string",
        filterId: "string",
        predicates: [{
            attribute: "string",
            operator: "string",
            values: ["string"],
        }],
    },
    mutingRulesHandling: "string",
    accountId: "string",
    enabled: false,
    enrichments: {
        nrqls: [{
            configurations: [{
                query: "string",
            }],
            name: "string",
            accountId: "string",
            enrichmentId: "string",
            type: "string",
        }],
    },
    enrichmentsEnabled: false,
    name: "string",
});
type: newrelic:Workflow
properties:
    accountId: string
    destinations:
        - channelId: string
          name: string
          notificationTriggers:
            - string
          type: string
          updateOriginalMessage: false
    enabled: false
    enrichments:
        nrqls:
            - accountId: string
              configurations:
                - query: string
              enrichmentId: string
              name: string
              type: string
    enrichmentsEnabled: false
    issuesFilter:
        filterId: string
        name: string
        predicates:
            - attribute: string
              operator: string
              values:
                - string
        type: string
    mutingRulesHandling: string
    name: string
Workflow 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 Workflow resource accepts the following input properties:
- Destinations
List<Pulumi.New Relic. Inputs. Workflow Destination> 
- Notification configuration. See Nested destination blocks below for details.
- IssuesFilter Pulumi.New Relic. Inputs. Workflow Issues Filter 
- A filter used to identify issues handled by this workflow. See Nested issues_filter blocks below for details.
- MutingRules stringHandling 
- How to handle muted issues. See Muting Rules below for details.
- AccountId string
- Determines the New Relic account in which the workflow is created. Defaults to the account defined in the provider section.
- DestinationsEnabled bool
- DEPRECATED Whether destinations are enabled. Please use enabledinstead: these two are different flags, but they are functionally identical. Defaults to true.
- Enabled bool
- Whether workflow is enabled. Defaults to true.
- Enrichments
Pulumi.New Relic. Inputs. Workflow Enrichments 
- Workflow's enrichments. See Nested enrichments blocks below for details.
- EnrichmentsEnabled bool
- Whether enrichments are enabled. Defaults to true.
- Name string
- The name of the workflow.
- Destinations
[]WorkflowDestination Args 
- Notification configuration. See Nested destination blocks below for details.
- IssuesFilter WorkflowIssues Filter Args 
- A filter used to identify issues handled by this workflow. See Nested issues_filter blocks below for details.
- MutingRules stringHandling 
- How to handle muted issues. See Muting Rules below for details.
- AccountId string
- Determines the New Relic account in which the workflow is created. Defaults to the account defined in the provider section.
- DestinationsEnabled bool
- DEPRECATED Whether destinations are enabled. Please use enabledinstead: these two are different flags, but they are functionally identical. Defaults to true.
- Enabled bool
- Whether workflow is enabled. Defaults to true.
- Enrichments
WorkflowEnrichments Args 
- Workflow's enrichments. See Nested enrichments blocks below for details.
- EnrichmentsEnabled bool
- Whether enrichments are enabled. Defaults to true.
- Name string
- The name of the workflow.
- destinations
List<WorkflowDestination> 
- Notification configuration. See Nested destination blocks below for details.
- issuesFilter WorkflowIssues Filter 
- A filter used to identify issues handled by this workflow. See Nested issues_filter blocks below for details.
- mutingRules StringHandling 
- How to handle muted issues. See Muting Rules below for details.
- accountId String
- Determines the New Relic account in which the workflow is created. Defaults to the account defined in the provider section.
- destinationsEnabled Boolean
- DEPRECATED Whether destinations are enabled. Please use enabledinstead: these two are different flags, but they are functionally identical. Defaults to true.
- enabled Boolean
- Whether workflow is enabled. Defaults to true.
- enrichments
WorkflowEnrichments 
- Workflow's enrichments. See Nested enrichments blocks below for details.
- enrichmentsEnabled Boolean
- Whether enrichments are enabled. Defaults to true.
- name String
- The name of the workflow.
- destinations
WorkflowDestination[] 
- Notification configuration. See Nested destination blocks below for details.
- issuesFilter WorkflowIssues Filter 
- A filter used to identify issues handled by this workflow. See Nested issues_filter blocks below for details.
- mutingRules stringHandling 
- How to handle muted issues. See Muting Rules below for details.
- accountId string
- Determines the New Relic account in which the workflow is created. Defaults to the account defined in the provider section.
- destinationsEnabled boolean
- DEPRECATED Whether destinations are enabled. Please use enabledinstead: these two are different flags, but they are functionally identical. Defaults to true.
- enabled boolean
- Whether workflow is enabled. Defaults to true.
- enrichments
WorkflowEnrichments 
- Workflow's enrichments. See Nested enrichments blocks below for details.
- enrichmentsEnabled boolean
- Whether enrichments are enabled. Defaults to true.
- name string
- The name of the workflow.
- destinations
Sequence[WorkflowDestination Args] 
- Notification configuration. See Nested destination blocks below for details.
- issues_filter WorkflowIssues Filter Args 
- A filter used to identify issues handled by this workflow. See Nested issues_filter blocks below for details.
- muting_rules_ strhandling 
- How to handle muted issues. See Muting Rules below for details.
- account_id str
- Determines the New Relic account in which the workflow is created. Defaults to the account defined in the provider section.
- destinations_enabled bool
- DEPRECATED Whether destinations are enabled. Please use enabledinstead: these two are different flags, but they are functionally identical. Defaults to true.
- enabled bool
- Whether workflow is enabled. Defaults to true.
- enrichments
WorkflowEnrichments Args 
- Workflow's enrichments. See Nested enrichments blocks below for details.
- enrichments_enabled bool
- Whether enrichments are enabled. Defaults to true.
- name str
- The name of the workflow.
- destinations List<Property Map>
- Notification configuration. See Nested destination blocks below for details.
- issuesFilter Property Map
- A filter used to identify issues handled by this workflow. See Nested issues_filter blocks below for details.
- mutingRules StringHandling 
- How to handle muted issues. See Muting Rules below for details.
- accountId String
- Determines the New Relic account in which the workflow is created. Defaults to the account defined in the provider section.
- destinationsEnabled Boolean
- DEPRECATED Whether destinations are enabled. Please use enabledinstead: these two are different flags, but they are functionally identical. Defaults to true.
- enabled Boolean
- Whether workflow is enabled. Defaults to true.
- enrichments Property Map
- Workflow's enrichments. See Nested enrichments blocks below for details.
- enrichmentsEnabled Boolean
- Whether enrichments are enabled. Defaults to true.
- name String
- The name of the workflow.
Outputs
All input properties are implicitly available as output properties. Additionally, the Workflow resource produces the following output properties:
- Guid string
- Workflow entity GUID
- Id string
- The provider-assigned unique ID for this managed resource.
- LastRun string
- The last time notification was sent for this workflow.
- WorkflowId string
- The id of the workflow.
- Guid string
- Workflow entity GUID
- Id string
- The provider-assigned unique ID for this managed resource.
- LastRun string
- The last time notification was sent for this workflow.
- WorkflowId string
- The id of the workflow.
- guid String
- Workflow entity GUID
- id String
- The provider-assigned unique ID for this managed resource.
- lastRun String
- The last time notification was sent for this workflow.
- workflowId String
- The id of the workflow.
- guid string
- Workflow entity GUID
- id string
- The provider-assigned unique ID for this managed resource.
- lastRun string
- The last time notification was sent for this workflow.
- workflowId string
- The id of the workflow.
- guid str
- Workflow entity GUID
- id str
- The provider-assigned unique ID for this managed resource.
- last_run str
- The last time notification was sent for this workflow.
- workflow_id str
- The id of the workflow.
- guid String
- Workflow entity GUID
- id String
- The provider-assigned unique ID for this managed resource.
- lastRun String
- The last time notification was sent for this workflow.
- workflowId String
- The id of the workflow.
Look up Existing Workflow Resource
Get an existing Workflow 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?: WorkflowState, opts?: CustomResourceOptions): Workflow@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        account_id: Optional[str] = None,
        destinations: Optional[Sequence[WorkflowDestinationArgs]] = None,
        destinations_enabled: Optional[bool] = None,
        enabled: Optional[bool] = None,
        enrichments: Optional[WorkflowEnrichmentsArgs] = None,
        enrichments_enabled: Optional[bool] = None,
        guid: Optional[str] = None,
        issues_filter: Optional[WorkflowIssuesFilterArgs] = None,
        last_run: Optional[str] = None,
        muting_rules_handling: Optional[str] = None,
        name: Optional[str] = None,
        workflow_id: Optional[str] = None) -> Workflowfunc GetWorkflow(ctx *Context, name string, id IDInput, state *WorkflowState, opts ...ResourceOption) (*Workflow, error)public static Workflow Get(string name, Input<string> id, WorkflowState? state, CustomResourceOptions? opts = null)public static Workflow get(String name, Output<String> id, WorkflowState state, CustomResourceOptions options)resources:  _:    type: newrelic:Workflow    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.
- AccountId string
- Determines the New Relic account in which the workflow is created. Defaults to the account defined in the provider section.
- Destinations
List<Pulumi.New Relic. Inputs. Workflow Destination> 
- Notification configuration. See Nested destination blocks below for details.
- DestinationsEnabled bool
- DEPRECATED Whether destinations are enabled. Please use enabledinstead: these two are different flags, but they are functionally identical. Defaults to true.
- Enabled bool
- Whether workflow is enabled. Defaults to true.
- Enrichments
Pulumi.New Relic. Inputs. Workflow Enrichments 
- Workflow's enrichments. See Nested enrichments blocks below for details.
- EnrichmentsEnabled bool
- Whether enrichments are enabled. Defaults to true.
- Guid string
- Workflow entity GUID
- IssuesFilter Pulumi.New Relic. Inputs. Workflow Issues Filter 
- A filter used to identify issues handled by this workflow. See Nested issues_filter blocks below for details.
- LastRun string
- The last time notification was sent for this workflow.
- MutingRules stringHandling 
- How to handle muted issues. See Muting Rules below for details.
- Name string
- The name of the workflow.
- WorkflowId string
- The id of the workflow.
- AccountId string
- Determines the New Relic account in which the workflow is created. Defaults to the account defined in the provider section.
- Destinations
[]WorkflowDestination Args 
- Notification configuration. See Nested destination blocks below for details.
- DestinationsEnabled bool
- DEPRECATED Whether destinations are enabled. Please use enabledinstead: these two are different flags, but they are functionally identical. Defaults to true.
- Enabled bool
- Whether workflow is enabled. Defaults to true.
- Enrichments
WorkflowEnrichments Args 
- Workflow's enrichments. See Nested enrichments blocks below for details.
- EnrichmentsEnabled bool
- Whether enrichments are enabled. Defaults to true.
- Guid string
- Workflow entity GUID
- IssuesFilter WorkflowIssues Filter Args 
- A filter used to identify issues handled by this workflow. See Nested issues_filter blocks below for details.
- LastRun string
- The last time notification was sent for this workflow.
- MutingRules stringHandling 
- How to handle muted issues. See Muting Rules below for details.
- Name string
- The name of the workflow.
- WorkflowId string
- The id of the workflow.
- accountId String
- Determines the New Relic account in which the workflow is created. Defaults to the account defined in the provider section.
- destinations
List<WorkflowDestination> 
- Notification configuration. See Nested destination blocks below for details.
- destinationsEnabled Boolean
- DEPRECATED Whether destinations are enabled. Please use enabledinstead: these two are different flags, but they are functionally identical. Defaults to true.
- enabled Boolean
- Whether workflow is enabled. Defaults to true.
- enrichments
WorkflowEnrichments 
- Workflow's enrichments. See Nested enrichments blocks below for details.
- enrichmentsEnabled Boolean
- Whether enrichments are enabled. Defaults to true.
- guid String
- Workflow entity GUID
- issuesFilter WorkflowIssues Filter 
- A filter used to identify issues handled by this workflow. See Nested issues_filter blocks below for details.
- lastRun String
- The last time notification was sent for this workflow.
- mutingRules StringHandling 
- How to handle muted issues. See Muting Rules below for details.
- name String
- The name of the workflow.
- workflowId String
- The id of the workflow.
- accountId string
- Determines the New Relic account in which the workflow is created. Defaults to the account defined in the provider section.
- destinations
WorkflowDestination[] 
- Notification configuration. See Nested destination blocks below for details.
- destinationsEnabled boolean
- DEPRECATED Whether destinations are enabled. Please use enabledinstead: these two are different flags, but they are functionally identical. Defaults to true.
- enabled boolean
- Whether workflow is enabled. Defaults to true.
- enrichments
WorkflowEnrichments 
- Workflow's enrichments. See Nested enrichments blocks below for details.
- enrichmentsEnabled boolean
- Whether enrichments are enabled. Defaults to true.
- guid string
- Workflow entity GUID
- issuesFilter WorkflowIssues Filter 
- A filter used to identify issues handled by this workflow. See Nested issues_filter blocks below for details.
- lastRun string
- The last time notification was sent for this workflow.
- mutingRules stringHandling 
- How to handle muted issues. See Muting Rules below for details.
- name string
- The name of the workflow.
- workflowId string
- The id of the workflow.
- account_id str
- Determines the New Relic account in which the workflow is created. Defaults to the account defined in the provider section.
- destinations
Sequence[WorkflowDestination Args] 
- Notification configuration. See Nested destination blocks below for details.
- destinations_enabled bool
- DEPRECATED Whether destinations are enabled. Please use enabledinstead: these two are different flags, but they are functionally identical. Defaults to true.
- enabled bool
- Whether workflow is enabled. Defaults to true.
- enrichments
WorkflowEnrichments Args 
- Workflow's enrichments. See Nested enrichments blocks below for details.
- enrichments_enabled bool
- Whether enrichments are enabled. Defaults to true.
- guid str
- Workflow entity GUID
- issues_filter WorkflowIssues Filter Args 
- A filter used to identify issues handled by this workflow. See Nested issues_filter blocks below for details.
- last_run str
- The last time notification was sent for this workflow.
- muting_rules_ strhandling 
- How to handle muted issues. See Muting Rules below for details.
- name str
- The name of the workflow.
- workflow_id str
- The id of the workflow.
- accountId String
- Determines the New Relic account in which the workflow is created. Defaults to the account defined in the provider section.
- destinations List<Property Map>
- Notification configuration. See Nested destination blocks below for details.
- destinationsEnabled Boolean
- DEPRECATED Whether destinations are enabled. Please use enabledinstead: these two are different flags, but they are functionally identical. Defaults to true.
- enabled Boolean
- Whether workflow is enabled. Defaults to true.
- enrichments Property Map
- Workflow's enrichments. See Nested enrichments blocks below for details.
- enrichmentsEnabled Boolean
- Whether enrichments are enabled. Defaults to true.
- guid String
- Workflow entity GUID
- issuesFilter Property Map
- A filter used to identify issues handled by this workflow. See Nested issues_filter blocks below for details.
- lastRun String
- The last time notification was sent for this workflow.
- mutingRules StringHandling 
- How to handle muted issues. See Muting Rules below for details.
- name String
- The name of the workflow.
- workflowId String
- The id of the workflow.
Supporting Types
WorkflowDestination, WorkflowDestinationArgs    
- ChannelId string
- (Required) Destination's channel id.
- Name string
- The name of the workflow.
- NotificationTriggers List<string>
- List of triggers to notify about in this destination configuration.
- Type string
- (Required) The type of the destination. One of: (EMAIL, EVENT_BRIDGE, PAGERDUTY_ACCOUNT_INTEGRATION, PAGERDUTY_SERVICE_INTEGRATION, SERVICE_NOW, SERVICE_NOW_APP, WEBHOOK, MOBILE_PUSH, SLACK, JIRA).
- UpdateOriginal boolMessage 
- Update original notification message (Slack channels only)
- ChannelId string
- (Required) Destination's channel id.
- Name string
- The name of the workflow.
- NotificationTriggers []string
- List of triggers to notify about in this destination configuration.
- Type string
- (Required) The type of the destination. One of: (EMAIL, EVENT_BRIDGE, PAGERDUTY_ACCOUNT_INTEGRATION, PAGERDUTY_SERVICE_INTEGRATION, SERVICE_NOW, SERVICE_NOW_APP, WEBHOOK, MOBILE_PUSH, SLACK, JIRA).
- UpdateOriginal boolMessage 
- Update original notification message (Slack channels only)
- channelId String
- (Required) Destination's channel id.
- name String
- The name of the workflow.
- notificationTriggers List<String>
- List of triggers to notify about in this destination configuration.
- type String
- (Required) The type of the destination. One of: (EMAIL, EVENT_BRIDGE, PAGERDUTY_ACCOUNT_INTEGRATION, PAGERDUTY_SERVICE_INTEGRATION, SERVICE_NOW, SERVICE_NOW_APP, WEBHOOK, MOBILE_PUSH, SLACK, JIRA).
- updateOriginal BooleanMessage 
- Update original notification message (Slack channels only)
- channelId string
- (Required) Destination's channel id.
- name string
- The name of the workflow.
- notificationTriggers string[]
- List of triggers to notify about in this destination configuration.
- type string
- (Required) The type of the destination. One of: (EMAIL, EVENT_BRIDGE, PAGERDUTY_ACCOUNT_INTEGRATION, PAGERDUTY_SERVICE_INTEGRATION, SERVICE_NOW, SERVICE_NOW_APP, WEBHOOK, MOBILE_PUSH, SLACK, JIRA).
- updateOriginal booleanMessage 
- Update original notification message (Slack channels only)
- channel_id str
- (Required) Destination's channel id.
- name str
- The name of the workflow.
- notification_triggers Sequence[str]
- List of triggers to notify about in this destination configuration.
- type str
- (Required) The type of the destination. One of: (EMAIL, EVENT_BRIDGE, PAGERDUTY_ACCOUNT_INTEGRATION, PAGERDUTY_SERVICE_INTEGRATION, SERVICE_NOW, SERVICE_NOW_APP, WEBHOOK, MOBILE_PUSH, SLACK, JIRA).
- update_original_ boolmessage 
- Update original notification message (Slack channels only)
- channelId String
- (Required) Destination's channel id.
- name String
- The name of the workflow.
- notificationTriggers List<String>
- List of triggers to notify about in this destination configuration.
- type String
- (Required) The type of the destination. One of: (EMAIL, EVENT_BRIDGE, PAGERDUTY_ACCOUNT_INTEGRATION, PAGERDUTY_SERVICE_INTEGRATION, SERVICE_NOW, SERVICE_NOW_APP, WEBHOOK, MOBILE_PUSH, SLACK, JIRA).
- updateOriginal BooleanMessage 
- Update original notification message (Slack channels only)
WorkflowEnrichments, WorkflowEnrichmentsArgs    
- Nrqls
List<Pulumi.New Relic. Inputs. Workflow Enrichments Nrql> 
- (Required) Nrql type Enrichments.
- Nrqls
[]WorkflowEnrichments Nrql 
- (Required) Nrql type Enrichments.
- nrqls
List<WorkflowEnrichments Nrql> 
- (Required) Nrql type Enrichments.
- nrqls
WorkflowEnrichments Nrql[] 
- (Required) Nrql type Enrichments.
- nrqls
Sequence[WorkflowEnrichments Nrql] 
- (Required) Nrql type Enrichments.
- nrqls List<Property Map>
- (Required) Nrql type Enrichments.
WorkflowEnrichmentsNrql, WorkflowEnrichmentsNrqlArgs      
- Configurations
List<Pulumi.New Relic. Inputs. Workflow Enrichments Nrql Configuration> 
- A set of key-value pairs to represent a enrichment configuration.
- Name string
- The name of the workflow.
- AccountId string
- Determines the New Relic account in which the workflow is created. Defaults to the account defined in the provider section.
- EnrichmentId string
- Enrichment's id.
- Type string
- The type of the enrichment. One of: (NRQL).
- Configurations
[]WorkflowEnrichments Nrql Configuration 
- A set of key-value pairs to represent a enrichment configuration.
- Name string
- The name of the workflow.
- AccountId string
- Determines the New Relic account in which the workflow is created. Defaults to the account defined in the provider section.
- EnrichmentId string
- Enrichment's id.
- Type string
- The type of the enrichment. One of: (NRQL).
- configurations
List<WorkflowEnrichments Nrql Configuration> 
- A set of key-value pairs to represent a enrichment configuration.
- name String
- The name of the workflow.
- accountId String
- Determines the New Relic account in which the workflow is created. Defaults to the account defined in the provider section.
- enrichmentId String
- Enrichment's id.
- type String
- The type of the enrichment. One of: (NRQL).
- configurations
WorkflowEnrichments Nrql Configuration[] 
- A set of key-value pairs to represent a enrichment configuration.
- name string
- The name of the workflow.
- accountId string
- Determines the New Relic account in which the workflow is created. Defaults to the account defined in the provider section.
- enrichmentId string
- Enrichment's id.
- type string
- The type of the enrichment. One of: (NRQL).
- configurations
Sequence[WorkflowEnrichments Nrql Configuration] 
- A set of key-value pairs to represent a enrichment configuration.
- name str
- The name of the workflow.
- account_id str
- Determines the New Relic account in which the workflow is created. Defaults to the account defined in the provider section.
- enrichment_id str
- Enrichment's id.
- type str
- The type of the enrichment. One of: (NRQL).
- configurations List<Property Map>
- A set of key-value pairs to represent a enrichment configuration.
- name String
- The name of the workflow.
- accountId String
- Determines the New Relic account in which the workflow is created. Defaults to the account defined in the provider section.
- enrichmentId String
- Enrichment's id.
- type String
- The type of the enrichment. One of: (NRQL).
WorkflowEnrichmentsNrqlConfiguration, WorkflowEnrichmentsNrqlConfigurationArgs        
- Query string
- enrichment's NRQL query
- Query string
- enrichment's NRQL query
- query String
- enrichment's NRQL query
- query string
- enrichment's NRQL query
- query str
- enrichment's NRQL query
- query String
- enrichment's NRQL query
WorkflowIssuesFilter, WorkflowIssuesFilterArgs      
- Name string
- (Required) Filter's name.
- Type string
- Type of the filter. Please just set this field to FILTER. The field is likely to be deprecated/removed in the near future.
- FilterId string
- filter id.
- Predicates
List<Pulumi.New Relic. Inputs. Workflow Issues Filter Predicate> 
- A condition an issue event should satisfy to be processed by the workflow
- Name string
- (Required) Filter's name.
- Type string
- Type of the filter. Please just set this field to FILTER. The field is likely to be deprecated/removed in the near future.
- FilterId string
- filter id.
- Predicates
[]WorkflowIssues Filter Predicate 
- A condition an issue event should satisfy to be processed by the workflow
- name String
- (Required) Filter's name.
- type String
- Type of the filter. Please just set this field to FILTER. The field is likely to be deprecated/removed in the near future.
- filterId String
- filter id.
- predicates
List<WorkflowIssues Filter Predicate> 
- A condition an issue event should satisfy to be processed by the workflow
- name string
- (Required) Filter's name.
- type string
- Type of the filter. Please just set this field to FILTER. The field is likely to be deprecated/removed in the near future.
- filterId string
- filter id.
- predicates
WorkflowIssues Filter Predicate[] 
- A condition an issue event should satisfy to be processed by the workflow
- name str
- (Required) Filter's name.
- type str
- Type of the filter. Please just set this field to FILTER. The field is likely to be deprecated/removed in the near future.
- filter_id str
- filter id.
- predicates
Sequence[WorkflowIssues Filter Predicate] 
- A condition an issue event should satisfy to be processed by the workflow
- name String
- (Required) Filter's name.
- type String
- Type of the filter. Please just set this field to FILTER. The field is likely to be deprecated/removed in the near future.
- filterId String
- filter id.
- predicates List<Property Map>
- A condition an issue event should satisfy to be processed by the workflow
WorkflowIssuesFilterPredicate, WorkflowIssuesFilterPredicateArgs        
Import
Workflows can be imported using the id, e.g.
bash
$ pulumi import newrelic:index/workflow:Workflow foo <id>
You can find the workflow ID from the workflow table by clicking on … at the end of the row and choosing Copy workflow id to clipboard.
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- New Relic pulumi/pulumi-newrelic
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the newrelicTerraform Provider.