1. Packages
  2. New Relic
  3. API Docs
  4. Workflow
New Relic v5.22.1 published on Friday, Mar 29, 2024 by Pulumi

newrelic.Workflow

Explore with Pulumi AI

newrelic logo
New Relic v5.22.1 published on Friday, Mar 29, 2024 by Pulumi

    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", {
        mutingRulesHandling: "NOTIFY_ALL_ISSUES",
        issuesFilter: {
            name: "filter-name",
            type: "FILTER",
            predicates: [{
                attribute: "accumulations.tag.team",
                operator: "EXACTLY_MATCHES",
                values: ["growth"],
            }],
        },
        destinations: [{
            channelId: newrelic_notification_channel.some_channel.id,
        }],
    });
    
    import pulumi
    import pulumi_newrelic as newrelic
    
    foo = newrelic.Workflow("foo",
        muting_rules_handling="NOTIFY_ALL_ISSUES",
        issues_filter=newrelic.WorkflowIssuesFilterArgs(
            name="filter-name",
            type="FILTER",
            predicates=[newrelic.WorkflowIssuesFilterPredicateArgs(
                attribute="accumulations.tag.team",
                operator="EXACTLY_MATCHES",
                values=["growth"],
            )],
        ),
        destinations=[newrelic.WorkflowDestinationArgs(
            channel_id=newrelic_notification_channel["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{
    			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(newrelic_notification_channel.Some_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 foo = new NewRelic.Workflow("foo", new()
        {
            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 = newrelic_notification_channel.Some_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.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()        
                .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(newrelic_notification_channel.some_channel().id())
                    .build())
                .build());
    
        }
    }
    
    resources:
      foo:
        type: newrelic:Workflow
        properties:
          mutingRulesHandling: NOTIFY_ALL_ISSUES
          issuesFilter:
            name: filter-name
            type: FILTER
            predicates:
              - attribute: accumulations.tag.team
                operator: EXACTLY_MATCHES
                values:
                  - growth
          destinations:
            - channelId: ${newrelic_notification_channel.some_channel.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", {});
    // Create a reusable notification destination
    const webhook_destination = new newrelic.NotificationDestination("webhook-destination", {
        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", {
        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", {
        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")
    # Create a reusable notification destination
    webhook_destination = newrelic.NotificationDestination("webhook-destination",
        type="WEBHOOK",
        properties=[newrelic.NotificationDestinationPropertyArgs(
            key="url",
            value="https://example.com",
        )],
        auth_basic=newrelic.NotificationDestinationAuthBasicArgs(
            user="username",
            password="password",
        ))
    # Create a notification channel to use in the workflow
    webhook_channel = newrelic.NotificationChannel("webhook-channel",
        type="WEBHOOK",
        destination_id=webhook_destination.id,
        product="IINT",
        properties=[newrelic.NotificationChannelPropertyArgs(
            key="payload",
            value="{}",
            label="Payload Template",
        )])
    # A workflow that matches issues that include incidents triggered by the policy
    workflow_example = newrelic.Workflow("workflow-example",
        muting_rules_handling="NOTIFY_ALL_ISSUES",
        issues_filter=newrelic.WorkflowIssuesFilterArgs(
            name="Filter-name",
            type="FILTER",
            predicates=[newrelic.WorkflowIssuesFilterPredicateArgs(
                attribute="labels.policyIds",
                operator="EXACTLY_MATCHES",
                values=[my_policy.id],
            )],
        ),
        destinations=[newrelic.WorkflowDestinationArgs(
            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
    		_, err := newrelic.NewAlertPolicy(ctx, "my-policy", nil)
    		if err != nil {
    			return err
    		}
    		// Create a reusable notification destination
    		_, err = newrelic.NewNotificationDestination(ctx, "webhook-destination", &newrelic.NotificationDestinationArgs{
    			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
    		_, err = newrelic.NewNotificationChannel(ctx, "webhook-channel", &newrelic.NotificationChannelArgs{
    			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{
    			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");
    
        // Create a reusable notification destination
        var webhook_destination = new NewRelic.NotificationDestination("webhook-destination", new()
        {
            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()
        {
            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()
        {
            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.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) {
            var my_policy = new AlertPolicy("my-policy");
    
            var webhook_destination = new NotificationDestination("webhook-destination", NotificationDestinationArgs.builder()        
                .type("WEBHOOK")
                .properties(NotificationDestinationPropertyArgs.builder()
                    .key("url")
                    .value("https://example.com")
                    .build())
                .authBasic(NotificationDestinationAuthBasicArgs.builder()
                    .user("username")
                    .password("password")
                    .build())
                .build());
    
            var webhook_channel = new NotificationChannel("webhook-channel", NotificationChannelArgs.builder()        
                .type("WEBHOOK")
                .destinationId(webhook_destination.id())
                .product("IINT")
                .properties(NotificationChannelPropertyArgs.builder()
                    .key("payload")
                    .value("{}")
                    .label("Payload Template")
                    .build())
                .build());
    
            var workflow_example = new Workflow("workflow-example", WorkflowArgs.builder()        
                .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
      # Create a reusable notification destination
      webhook-destination:
        type: newrelic:NotificationDestination
        properties:
          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:
          type: WEBHOOK
          destinationId: ${["webhook-destination"].id}
          product: IINT # Please note the product used!
          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:
          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", {
        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: newrelic_notification_channel["webhook-channel"].id,
        }],
    });
    
    import pulumi
    import pulumi_newrelic as newrelic
    
    workflow_example = newrelic.Workflow("workflow-example",
        muting_rules_handling="NOTIFY_ALL_ISSUES",
        issues_filter=newrelic.WorkflowIssuesFilterArgs(
            name="Filter-name",
            type="FILTER",
            predicates=[newrelic.WorkflowIssuesFilterPredicateArgs(
                attribute="accumulations.tag.team",
                operator="EXACTLY_MATCHES",
                values=["my_team"],
            )],
        ),
        enrichments=newrelic.WorkflowEnrichmentsArgs(
            nrqls=[newrelic.WorkflowEnrichmentsNrqlArgs(
                name="Log Count",
                configurations=[newrelic.WorkflowEnrichmentsNrqlConfigurationArgs(
                    query="SELECT count(*) FROM Log WHERE message like '%error%' since 10 minutes ago",
                )],
            )],
        ),
        destinations=[newrelic.WorkflowDestinationArgs(
            channel_id=newrelic_notification_channel["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{
    			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(newrelic_notification_channel.WebhookChannel.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()
        {
            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 = newrelic_notification_channel.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()        
                .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(newrelic_notification_channel.webhook-channel().id())
                    .build())
                .build());
    
        }
    }
    
    resources:
      workflow-example:
        type: newrelic:Workflow
        properties:
          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: ${newrelic_notification_channel"webhook-channel"[%!s(MISSING)].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", {
        mutingRulesHandling: "NOTIFY_ALL_ISSUES",
        issuesFilter: {
            name: "Filter-name",
            type: "FILTER",
            predicates: [{
                attribute: "accumulations.tag.team",
                operator: "EXACTLY_MATCHES",
                values: ["my_team"],
            }],
        },
        destinations: [{
            channelId: newrelic_notification_channel["webhook-channel"].id,
            notificationTriggers: ["ACTIVATED"],
        }],
    });
    
    import pulumi
    import pulumi_newrelic as newrelic
    
    workflow_example = newrelic.Workflow("workflow-example",
        muting_rules_handling="NOTIFY_ALL_ISSUES",
        issues_filter=newrelic.WorkflowIssuesFilterArgs(
            name="Filter-name",
            type="FILTER",
            predicates=[newrelic.WorkflowIssuesFilterPredicateArgs(
                attribute="accumulations.tag.team",
                operator="EXACTLY_MATCHES",
                values=["my_team"],
            )],
        ),
        destinations=[newrelic.WorkflowDestinationArgs(
            channel_id=newrelic_notification_channel["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{
    			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(newrelic_notification_channel.WebhookChannel.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()
        {
            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 = newrelic_notification_channel.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()        
                .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(newrelic_notification_channel.webhook-channel().id())
                    .notificationTriggers("ACTIVATED")
                    .build())
                .build());
    
        }
    }
    
    resources:
      workflow-example:
        type: newrelic:Workflow
        properties:
          mutingRulesHandling: NOTIFY_ALL_ISSUES
          issuesFilter:
            name: Filter-name
            type: FILTER
            predicates:
              - attribute: accumulations.tag.team
                operator: EXACTLY_MATCHES
                values:
                  - my_team
          destinations:
            - channelId: ${newrelic_notification_channel"webhook-channel"[%!s(MISSING)].id}
              notificationTriggers:
                - ACTIVATED
    

    Additional Information

    More details about the workflows can be found here.

    v3.3 changes

    In version v3.3 we renamed the following arguments:

    • workflow_enabled changed to enabled.
    • destination_configuration changed to destination.
    • predicates changed to predicate.
    • Enrichment’s configurations changed to configuration.

    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[int] = 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.

    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",
            },
        },
        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 = 0,
        Enabled = false,
        Enrichments = new NewRelic.Inputs.WorkflowEnrichmentsArgs
        {
            Nrqls = new[]
            {
                new NewRelic.Inputs.WorkflowEnrichmentsNrqlArgs
                {
                    Configurations = new[]
                    {
                        new NewRelic.Inputs.WorkflowEnrichmentsNrqlConfigurationArgs
                        {
                            Query = "string",
                        },
                    },
                    Name = "string",
                    AccountId = 0,
                    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"),
    		},
    	},
    	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.Int(0),
    	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.Int(0),
    				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")
            .build())
        .issuesFilter(WorkflowIssuesFilterArgs.builder()
            .name("string")
            .type("string")
            .filterId("string")
            .predicates(WorkflowIssuesFilterPredicateArgs.builder()
                .attribute("string")
                .operator("string")
                .values("string")
                .build())
            .build())
        .mutingRulesHandling("string")
        .accountId(0)
        .enabled(false)
        .enrichments(WorkflowEnrichmentsArgs.builder()
            .nrqls(WorkflowEnrichmentsNrqlArgs.builder()
                .configurations(WorkflowEnrichmentsNrqlConfigurationArgs.builder()
                    .query("string")
                    .build())
                .name("string")
                .accountId(0)
                .enrichmentId("string")
                .type("string")
                .build())
            .build())
        .enrichmentsEnabled(false)
        .name("string")
        .build());
    
    workflow_resource = newrelic.Workflow("workflowResource",
        destinations=[newrelic.WorkflowDestinationArgs(
            channel_id="string",
            name="string",
            notification_triggers=["string"],
            type="string",
        )],
        issues_filter=newrelic.WorkflowIssuesFilterArgs(
            name="string",
            type="string",
            filter_id="string",
            predicates=[newrelic.WorkflowIssuesFilterPredicateArgs(
                attribute="string",
                operator="string",
                values=["string"],
            )],
        ),
        muting_rules_handling="string",
        account_id=0,
        enabled=False,
        enrichments=newrelic.WorkflowEnrichmentsArgs(
            nrqls=[newrelic.WorkflowEnrichmentsNrqlArgs(
                configurations=[newrelic.WorkflowEnrichmentsNrqlConfigurationArgs(
                    query="string",
                )],
                name="string",
                account_id=0,
                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",
        }],
        issuesFilter: {
            name: "string",
            type: "string",
            filterId: "string",
            predicates: [{
                attribute: "string",
                operator: "string",
                values: ["string"],
            }],
        },
        mutingRulesHandling: "string",
        accountId: 0,
        enabled: false,
        enrichments: {
            nrqls: [{
                configurations: [{
                    query: "string",
                }],
                name: "string",
                accountId: 0,
                enrichmentId: "string",
                type: "string",
            }],
        },
        enrichmentsEnabled: false,
        name: "string",
    });
    
    type: newrelic:Workflow
    properties:
        accountId: 0
        destinations:
            - channelId: string
              name: string
              notificationTriggers:
                - string
              type: string
        enabled: false
        enrichments:
            nrqls:
                - accountId: 0
                  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

    The Workflow resource accepts the following input properties:

    Destinations List<Pulumi.NewRelic.Inputs.WorkflowDestination>
    Notification configuration. See Nested destination blocks below for details.
    IssuesFilter Pulumi.NewRelic.Inputs.WorkflowIssuesFilter
    A filter used to identify issues handled by this workflow. See Nested issues_filter blocks below for details.
    MutingRulesHandling string
    How to handle muted issues. See Muting Rules below for details.
    AccountId int
    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 enabled instead: these two are different flags, but they are functionally identical. Defaults to true.

    Deprecated: Please use 'enabled' instead

    Enabled bool
    Whether workflow is enabled. Defaults to true.
    Enrichments Pulumi.NewRelic.Inputs.WorkflowEnrichments
    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 []WorkflowDestinationArgs
    Notification configuration. See Nested destination blocks below for details.
    IssuesFilter WorkflowIssuesFilterArgs
    A filter used to identify issues handled by this workflow. See Nested issues_filter blocks below for details.
    MutingRulesHandling string
    How to handle muted issues. See Muting Rules below for details.
    AccountId int
    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 enabled instead: these two are different flags, but they are functionally identical. Defaults to true.

    Deprecated: Please use 'enabled' instead

    Enabled bool
    Whether workflow is enabled. Defaults to true.
    Enrichments WorkflowEnrichmentsArgs
    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 WorkflowIssuesFilter
    A filter used to identify issues handled by this workflow. See Nested issues_filter blocks below for details.
    mutingRulesHandling String
    How to handle muted issues. See Muting Rules below for details.
    accountId Integer
    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 enabled instead: these two are different flags, but they are functionally identical. Defaults to true.

    Deprecated: Please use 'enabled' instead

    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 WorkflowIssuesFilter
    A filter used to identify issues handled by this workflow. See Nested issues_filter blocks below for details.
    mutingRulesHandling string
    How to handle muted issues. See Muting Rules below for details.
    accountId number
    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 enabled instead: these two are different flags, but they are functionally identical. Defaults to true.

    Deprecated: Please use 'enabled' instead

    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[WorkflowDestinationArgs]
    Notification configuration. See Nested destination blocks below for details.
    issues_filter WorkflowIssuesFilterArgs
    A filter used to identify issues handled by this workflow. See Nested issues_filter blocks below for details.
    muting_rules_handling str
    How to handle muted issues. See Muting Rules below for details.
    account_id int
    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 enabled instead: these two are different flags, but they are functionally identical. Defaults to true.

    Deprecated: Please use 'enabled' instead

    enabled bool
    Whether workflow is enabled. Defaults to true.
    enrichments WorkflowEnrichmentsArgs
    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.
    mutingRulesHandling String
    How to handle muted issues. See Muting Rules below for details.
    accountId Number
    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 enabled instead: these two are different flags, but they are functionally identical. Defaults to true.

    Deprecated: Please use 'enabled' instead

    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[int] = 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) -> Workflow
    func 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)
    Resource lookup is not supported in YAML
    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.
    The following state arguments are supported:
    AccountId int
    Determines the New Relic account in which the workflow is created. Defaults to the account defined in the provider section.
    Destinations List<Pulumi.NewRelic.Inputs.WorkflowDestination>
    Notification configuration. See Nested destination blocks below for details.
    DestinationsEnabled bool
    DEPRECATED Whether destinations are enabled. Please use enabled instead: these two are different flags, but they are functionally identical. Defaults to true.

    Deprecated: Please use 'enabled' instead

    Enabled bool
    Whether workflow is enabled. Defaults to true.
    Enrichments Pulumi.NewRelic.Inputs.WorkflowEnrichments
    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.NewRelic.Inputs.WorkflowIssuesFilter
    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.
    MutingRulesHandling string
    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 int
    Determines the New Relic account in which the workflow is created. Defaults to the account defined in the provider section.
    Destinations []WorkflowDestinationArgs
    Notification configuration. See Nested destination blocks below for details.
    DestinationsEnabled bool
    DEPRECATED Whether destinations are enabled. Please use enabled instead: these two are different flags, but they are functionally identical. Defaults to true.

    Deprecated: Please use 'enabled' instead

    Enabled bool
    Whether workflow is enabled. Defaults to true.
    Enrichments WorkflowEnrichmentsArgs
    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 WorkflowIssuesFilterArgs
    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.
    MutingRulesHandling string
    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 Integer
    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 enabled instead: these two are different flags, but they are functionally identical. Defaults to true.

    Deprecated: Please use 'enabled' instead

    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 WorkflowIssuesFilter
    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.
    mutingRulesHandling String
    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 number
    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 enabled instead: these two are different flags, but they are functionally identical. Defaults to true.

    Deprecated: Please use 'enabled' instead

    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 WorkflowIssuesFilter
    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.
    mutingRulesHandling string
    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 int
    Determines the New Relic account in which the workflow is created. Defaults to the account defined in the provider section.
    destinations Sequence[WorkflowDestinationArgs]
    Notification configuration. See Nested destination blocks below for details.
    destinations_enabled bool
    DEPRECATED Whether destinations are enabled. Please use enabled instead: these two are different flags, but they are functionally identical. Defaults to true.

    Deprecated: Please use 'enabled' instead

    enabled bool
    Whether workflow is enabled. Defaults to true.
    enrichments WorkflowEnrichmentsArgs
    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 WorkflowIssuesFilterArgs
    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_handling str
    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 Number
    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 enabled instead: these two are different flags, but they are functionally identical. Defaults to true.

    Deprecated: Please use 'enabled' instead

    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.
    mutingRulesHandling String
    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
    Id of a notification_channel to use for notifications. Please note that you have to use a notification channel, not an alert_channel.
    Name string
    The name of the workflow.
    NotificationTriggers List<string>
    Issue events to notify on. The value is a list of possible issue events. See Notification Triggers below for details.
    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.
    ChannelId string
    Id of a notification_channel to use for notifications. Please note that you have to use a notification channel, not an alert_channel.
    Name string
    The name of the workflow.
    NotificationTriggers []string
    Issue events to notify on. The value is a list of possible issue events. See Notification Triggers below for details.
    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.
    channelId String
    Id of a notification_channel to use for notifications. Please note that you have to use a notification channel, not an alert_channel.
    name String
    The name of the workflow.
    notificationTriggers List<String>
    Issue events to notify on. The value is a list of possible issue events. See Notification Triggers below for details.
    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.
    channelId string
    Id of a notification_channel to use for notifications. Please note that you have to use a notification channel, not an alert_channel.
    name string
    The name of the workflow.
    notificationTriggers string[]
    Issue events to notify on. The value is a list of possible issue events. See Notification Triggers below for details.
    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.
    channel_id str
    Id of a notification_channel to use for notifications. Please note that you have to use a notification channel, not an alert_channel.
    name str
    The name of the workflow.
    notification_triggers Sequence[str]
    Issue events to notify on. The value is a list of possible issue events. See Notification Triggers below for details.
    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.
    channelId String
    Id of a notification_channel to use for notifications. Please note that you have to use a notification channel, not an alert_channel.
    name String
    The name of the workflow.
    notificationTriggers List<String>
    Issue events to notify on. The value is a list of possible issue events. See Notification Triggers below for details.
    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.

    WorkflowEnrichments, WorkflowEnrichmentsArgs

    nrqls List<Property Map>
    a wrapper block

    WorkflowEnrichmentsNrql, WorkflowEnrichmentsNrqlArgs

    Configurations List<Pulumi.NewRelic.Inputs.WorkflowEnrichmentsNrqlConfiguration>
    Another wrapper block
    Name string
    The name of the workflow.
    AccountId int
    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
    Type of the filter. Please just set this field to FILTER. The field is likely to be deprecated/removed in the near future.
    Configurations []WorkflowEnrichmentsNrqlConfiguration
    Another wrapper block
    Name string
    The name of the workflow.
    AccountId int
    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
    Type of the filter. Please just set this field to FILTER. The field is likely to be deprecated/removed in the near future.
    configurations List<WorkflowEnrichmentsNrqlConfiguration>
    Another wrapper block
    name String
    The name of the workflow.
    accountId Integer
    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
    Type of the filter. Please just set this field to FILTER. The field is likely to be deprecated/removed in the near future.
    configurations WorkflowEnrichmentsNrqlConfiguration[]
    Another wrapper block
    name string
    The name of the workflow.
    accountId number
    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
    Type of the filter. Please just set this field to FILTER. The field is likely to be deprecated/removed in the near future.
    configurations Sequence[WorkflowEnrichmentsNrqlConfiguration]
    Another wrapper block
    name str
    The name of the workflow.
    account_id int
    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
    Type of the filter. Please just set this field to FILTER. The field is likely to be deprecated/removed in the near future.
    configurations List<Property Map>
    Another wrapper block
    name String
    The name of the workflow.
    accountId Number
    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
    Type of the filter. Please just set this field to FILTER. The field is likely to be deprecated/removed in the near future.

    WorkflowEnrichmentsNrqlConfiguration, WorkflowEnrichmentsNrqlConfigurationArgs

    Query string
    An NRQL query to run
    Query string
    An NRQL query to run
    query String
    An NRQL query to run
    query string
    An NRQL query to run
    query str
    An NRQL query to run
    query String
    An NRQL query to run

    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.NewRelic.Inputs.WorkflowIssuesFilterPredicate>
    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 []WorkflowIssuesFilterPredicate
    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<WorkflowIssuesFilterPredicate>
    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 WorkflowIssuesFilterPredicate[]
    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[WorkflowIssuesFilterPredicate]
    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

    Attribute string
    Issue event attribute to check
    Operator string
    An operator to use to compare the attribute with the provided values, see supported operators below
    Values List<string>
    The attribute must match any of the values in this list
    Attribute string
    Issue event attribute to check
    Operator string
    An operator to use to compare the attribute with the provided values, see supported operators below
    Values []string
    The attribute must match any of the values in this list
    attribute String
    Issue event attribute to check
    operator String
    An operator to use to compare the attribute with the provided values, see supported operators below
    values List<String>
    The attribute must match any of the values in this list
    attribute string
    Issue event attribute to check
    operator string
    An operator to use to compare the attribute with the provided values, see supported operators below
    values string[]
    The attribute must match any of the values in this list
    attribute str
    Issue event attribute to check
    operator str
    An operator to use to compare the attribute with the provided values, see supported operators below
    values Sequence[str]
    The attribute must match any of the values in this list
    attribute String
    Issue event attribute to check
    operator String
    An operator to use to compare the attribute with the provided values, see supported operators below
    values List<String>
    The attribute must match any of the values in this list

    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 newrelic Terraform Provider.
    newrelic logo
    New Relic v5.22.1 published on Friday, Mar 29, 2024 by Pulumi