Use this resource to create and manage New Relic notification destinations. Details regarding supported products and permissions can be found here.
Example Usage
Webhook
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.NotificationDestination("foo", {
accountId: "12345678",
name: "foo",
type: "WEBHOOK",
secureUrl: {
prefix: "https://webhook.mywebhook.com/",
secureSuffix: "service_id/123456",
},
properties: [{
key: "source",
value: "terraform",
}],
authCustomHeaders: [{
key: "API_KEY",
value: "test-api-key",
}],
});
import pulumi
import pulumi_newrelic as newrelic
foo = newrelic.NotificationDestination("foo",
account_id="12345678",
name="foo",
type="WEBHOOK",
secure_url={
"prefix": "https://webhook.mywebhook.com/",
"secure_suffix": "service_id/123456",
},
properties=[{
"key": "source",
"value": "terraform",
}],
auth_custom_headers=[{
"key": "API_KEY",
"value": "test-api-key",
}])
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.NewNotificationDestination(ctx, "foo", &newrelic.NotificationDestinationArgs{
AccountId: pulumi.String("12345678"),
Name: pulumi.String("foo"),
Type: pulumi.String("WEBHOOK"),
SecureUrl: &newrelic.NotificationDestinationSecureUrlArgs{
Prefix: pulumi.String("https://webhook.mywebhook.com/"),
SecureSuffix: pulumi.String("service_id/123456"),
},
Properties: newrelic.NotificationDestinationPropertyArray{
&newrelic.NotificationDestinationPropertyArgs{
Key: pulumi.String("source"),
Value: pulumi.String("terraform"),
},
},
AuthCustomHeaders: newrelic.NotificationDestinationAuthCustomHeaderArray{
&newrelic.NotificationDestinationAuthCustomHeaderArgs{
Key: pulumi.String("API_KEY"),
Value: pulumi.String("test-api-key"),
},
},
})
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.NotificationDestination("foo", new()
{
AccountId = "12345678",
Name = "foo",
Type = "WEBHOOK",
SecureUrl = new NewRelic.Inputs.NotificationDestinationSecureUrlArgs
{
Prefix = "https://webhook.mywebhook.com/",
SecureSuffix = "service_id/123456",
},
Properties = new[]
{
new NewRelic.Inputs.NotificationDestinationPropertyArgs
{
Key = "source",
Value = "terraform",
},
},
AuthCustomHeaders = new[]
{
new NewRelic.Inputs.NotificationDestinationAuthCustomHeaderArgs
{
Key = "API_KEY",
Value = "test-api-key",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.NotificationDestination;
import com.pulumi.newrelic.NotificationDestinationArgs;
import com.pulumi.newrelic.inputs.NotificationDestinationSecureUrlArgs;
import com.pulumi.newrelic.inputs.NotificationDestinationPropertyArgs;
import com.pulumi.newrelic.inputs.NotificationDestinationAuthCustomHeaderArgs;
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 NotificationDestination("foo", NotificationDestinationArgs.builder()
.accountId("12345678")
.name("foo")
.type("WEBHOOK")
.secureUrl(NotificationDestinationSecureUrlArgs.builder()
.prefix("https://webhook.mywebhook.com/")
.secureSuffix("service_id/123456")
.build())
.properties(NotificationDestinationPropertyArgs.builder()
.key("source")
.value("terraform")
.build())
.authCustomHeaders(NotificationDestinationAuthCustomHeaderArgs.builder()
.key("API_KEY")
.value("test-api-key")
.build())
.build());
}
}
resources:
foo:
type: newrelic:NotificationDestination
properties:
accountId: 1.2345678e+07
name: foo
type: WEBHOOK
secureUrl:
prefix: https://webhook.mywebhook.com/
secureSuffix: service_id/123456
properties:
- key: source
value: terraform
authCustomHeaders:
- key: API_KEY
value: test-api-key
See additional examples.
Additional Examples
NOTE: We support all properties. The mentioned properties are just an example.
[WORKFLOW_AUTOMATION]
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.NotificationDestination("foo", {
accountId: "12345678",
name: "workflow-automation-destination-name",
type: "WORKFLOW_AUTOMATION",
properties: [{
key: "",
value: "",
}],
authCustomHeaders: [{
key: "Api-Key",
value: "YOUR_NR_USER_API_KEY",
}],
});
import pulumi
import pulumi_newrelic as newrelic
foo = newrelic.NotificationDestination("foo",
account_id="12345678",
name="workflow-automation-destination-name",
type="WORKFLOW_AUTOMATION",
properties=[{
"key": "",
"value": "",
}],
auth_custom_headers=[{
"key": "Api-Key",
"value": "YOUR_NR_USER_API_KEY",
}])
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.NewNotificationDestination(ctx, "foo", &newrelic.NotificationDestinationArgs{
AccountId: pulumi.String("12345678"),
Name: pulumi.String("workflow-automation-destination-name"),
Type: pulumi.String("WORKFLOW_AUTOMATION"),
Properties: newrelic.NotificationDestinationPropertyArray{
&newrelic.NotificationDestinationPropertyArgs{
Key: pulumi.String(""),
Value: pulumi.String(""),
},
},
AuthCustomHeaders: newrelic.NotificationDestinationAuthCustomHeaderArray{
&newrelic.NotificationDestinationAuthCustomHeaderArgs{
Key: pulumi.String("Api-Key"),
Value: pulumi.String("YOUR_NR_USER_API_KEY"),
},
},
})
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.NotificationDestination("foo", new()
{
AccountId = "12345678",
Name = "workflow-automation-destination-name",
Type = "WORKFLOW_AUTOMATION",
Properties = new[]
{
new NewRelic.Inputs.NotificationDestinationPropertyArgs
{
Key = "",
Value = "",
},
},
AuthCustomHeaders = new[]
{
new NewRelic.Inputs.NotificationDestinationAuthCustomHeaderArgs
{
Key = "Api-Key",
Value = "YOUR_NR_USER_API_KEY",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.NotificationDestination;
import com.pulumi.newrelic.NotificationDestinationArgs;
import com.pulumi.newrelic.inputs.NotificationDestinationPropertyArgs;
import com.pulumi.newrelic.inputs.NotificationDestinationAuthCustomHeaderArgs;
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 NotificationDestination("foo", NotificationDestinationArgs.builder()
.accountId("12345678")
.name("workflow-automation-destination-name")
.type("WORKFLOW_AUTOMATION")
.properties(NotificationDestinationPropertyArgs.builder()
.key("")
.value("")
.build())
.authCustomHeaders(NotificationDestinationAuthCustomHeaderArgs.builder()
.key("Api-Key")
.value("YOUR_NR_USER_API_KEY")
.build())
.build());
}
}
resources:
foo:
type: newrelic:NotificationDestination
properties:
accountId: 1.2345678e+07
name: workflow-automation-destination-name
type: WORKFLOW_AUTOMATION
properties:
- key: ""
value: ""
authCustomHeaders:
- key: Api-Key
value: YOUR_NR_USER_API_KEY
MICROSOFT_TEAMS
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.NotificationDestination("foo", {
accountId: "12345678",
name: "ms-teams-example",
type: "MICROSOFT_TEAMS",
properties: [{
key: "securityCode",
value: "abcdefgh",
}],
});
import pulumi
import pulumi_newrelic as newrelic
foo = newrelic.NotificationDestination("foo",
account_id="12345678",
name="ms-teams-example",
type="MICROSOFT_TEAMS",
properties=[{
"key": "securityCode",
"value": "abcdefgh",
}])
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.NewNotificationDestination(ctx, "foo", &newrelic.NotificationDestinationArgs{
AccountId: pulumi.String("12345678"),
Name: pulumi.String("ms-teams-example"),
Type: pulumi.String("MICROSOFT_TEAMS"),
Properties: newrelic.NotificationDestinationPropertyArray{
&newrelic.NotificationDestinationPropertyArgs{
Key: pulumi.String("securityCode"),
Value: pulumi.String("abcdefgh"),
},
},
})
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.NotificationDestination("foo", new()
{
AccountId = "12345678",
Name = "ms-teams-example",
Type = "MICROSOFT_TEAMS",
Properties = new[]
{
new NewRelic.Inputs.NotificationDestinationPropertyArgs
{
Key = "securityCode",
Value = "abcdefgh",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.NotificationDestination;
import com.pulumi.newrelic.NotificationDestinationArgs;
import com.pulumi.newrelic.inputs.NotificationDestinationPropertyArgs;
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 NotificationDestination("foo", NotificationDestinationArgs.builder()
.accountId("12345678")
.name("ms-teams-example")
.type("MICROSOFT_TEAMS")
.properties(NotificationDestinationPropertyArgs.builder()
.key("securityCode")
.value("abcdefgh")
.build())
.build());
}
}
resources:
foo:
type: newrelic:NotificationDestination
properties:
accountId: 1.2345678e+07
name: ms-teams-example
type: MICROSOFT_TEAMS
properties:
- key: securityCode
value: abcdefgh
ServiceNow
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.NotificationDestination("foo", {
accountId: "12345678",
name: "servicenow-example",
type: "SERVICE_NOW",
properties: [
{
key: "url",
value: "https://service-now.com/",
},
{
key: "two_way_integration",
value: "true",
},
],
authBasic: {
user: "username",
password: "password",
},
});
import pulumi
import pulumi_newrelic as newrelic
foo = newrelic.NotificationDestination("foo",
account_id="12345678",
name="servicenow-example",
type="SERVICE_NOW",
properties=[
{
"key": "url",
"value": "https://service-now.com/",
},
{
"key": "two_way_integration",
"value": "true",
},
],
auth_basic={
"user": "username",
"password": "password",
})
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.NewNotificationDestination(ctx, "foo", &newrelic.NotificationDestinationArgs{
AccountId: pulumi.String("12345678"),
Name: pulumi.String("servicenow-example"),
Type: pulumi.String("SERVICE_NOW"),
Properties: newrelic.NotificationDestinationPropertyArray{
&newrelic.NotificationDestinationPropertyArgs{
Key: pulumi.String("url"),
Value: pulumi.String("https://service-now.com/"),
},
&newrelic.NotificationDestinationPropertyArgs{
Key: pulumi.String("two_way_integration"),
Value: pulumi.String("true"),
},
},
AuthBasic: &newrelic.NotificationDestinationAuthBasicArgs{
User: pulumi.String("username"),
Password: pulumi.String("password"),
},
})
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.NotificationDestination("foo", new()
{
AccountId = "12345678",
Name = "servicenow-example",
Type = "SERVICE_NOW",
Properties = new[]
{
new NewRelic.Inputs.NotificationDestinationPropertyArgs
{
Key = "url",
Value = "https://service-now.com/",
},
new NewRelic.Inputs.NotificationDestinationPropertyArgs
{
Key = "two_way_integration",
Value = "true",
},
},
AuthBasic = new NewRelic.Inputs.NotificationDestinationAuthBasicArgs
{
User = "username",
Password = "password",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.NotificationDestination;
import com.pulumi.newrelic.NotificationDestinationArgs;
import com.pulumi.newrelic.inputs.NotificationDestinationPropertyArgs;
import com.pulumi.newrelic.inputs.NotificationDestinationAuthBasicArgs;
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 NotificationDestination("foo", NotificationDestinationArgs.builder()
.accountId("12345678")
.name("servicenow-example")
.type("SERVICE_NOW")
.properties(
NotificationDestinationPropertyArgs.builder()
.key("url")
.value("https://service-now.com/")
.build(),
NotificationDestinationPropertyArgs.builder()
.key("two_way_integration")
.value("true")
.build())
.authBasic(NotificationDestinationAuthBasicArgs.builder()
.user("username")
.password("password")
.build())
.build());
}
}
resources:
foo:
type: newrelic:NotificationDestination
properties:
accountId: 1.2345678e+07
name: servicenow-example
type: SERVICE_NOW
properties:
- key: url
value: https://service-now.com/
- key: two_way_integration
value: 'true'
authBasic:
user: username
password: password
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.NotificationDestination("foo", {
accountId: "12345678",
name: "email-example",
type: "EMAIL",
properties: [{
key: "email",
value: "email@email.com,email2@email.com",
}],
});
import pulumi
import pulumi_newrelic as newrelic
foo = newrelic.NotificationDestination("foo",
account_id="12345678",
name="email-example",
type="EMAIL",
properties=[{
"key": "email",
"value": "email@email.com,email2@email.com",
}])
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.NewNotificationDestination(ctx, "foo", &newrelic.NotificationDestinationArgs{
AccountId: pulumi.String("12345678"),
Name: pulumi.String("email-example"),
Type: pulumi.String("EMAIL"),
Properties: newrelic.NotificationDestinationPropertyArray{
&newrelic.NotificationDestinationPropertyArgs{
Key: pulumi.String("email"),
Value: pulumi.String("email@email.com,email2@email.com"),
},
},
})
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.NotificationDestination("foo", new()
{
AccountId = "12345678",
Name = "email-example",
Type = "EMAIL",
Properties = new[]
{
new NewRelic.Inputs.NotificationDestinationPropertyArgs
{
Key = "email",
Value = "email@email.com,email2@email.com",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.NotificationDestination;
import com.pulumi.newrelic.NotificationDestinationArgs;
import com.pulumi.newrelic.inputs.NotificationDestinationPropertyArgs;
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 NotificationDestination("foo", NotificationDestinationArgs.builder()
.accountId("12345678")
.name("email-example")
.type("EMAIL")
.properties(NotificationDestinationPropertyArgs.builder()
.key("email")
.value("email@email.com,email2@email.com")
.build())
.build());
}
}
resources:
foo:
type: newrelic:NotificationDestination
properties:
accountId: 1.2345678e+07
name: email-example
type: EMAIL
properties:
- key: email
value: email@email.com,email2@email.com
Jira
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.NotificationDestination("foo", {
accountId: "12345678",
name: "jira-example",
type: "JIRA",
properties: [{
key: "url",
value: "https://example.atlassian.net",
}],
authBasic: {
user: "example@email.com",
password: "password",
},
});
import pulumi
import pulumi_newrelic as newrelic
foo = newrelic.NotificationDestination("foo",
account_id="12345678",
name="jira-example",
type="JIRA",
properties=[{
"key": "url",
"value": "https://example.atlassian.net",
}],
auth_basic={
"user": "example@email.com",
"password": "password",
})
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.NewNotificationDestination(ctx, "foo", &newrelic.NotificationDestinationArgs{
AccountId: pulumi.String("12345678"),
Name: pulumi.String("jira-example"),
Type: pulumi.String("JIRA"),
Properties: newrelic.NotificationDestinationPropertyArray{
&newrelic.NotificationDestinationPropertyArgs{
Key: pulumi.String("url"),
Value: pulumi.String("https://example.atlassian.net"),
},
},
AuthBasic: &newrelic.NotificationDestinationAuthBasicArgs{
User: pulumi.String("example@email.com"),
Password: pulumi.String("password"),
},
})
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.NotificationDestination("foo", new()
{
AccountId = "12345678",
Name = "jira-example",
Type = "JIRA",
Properties = new[]
{
new NewRelic.Inputs.NotificationDestinationPropertyArgs
{
Key = "url",
Value = "https://example.atlassian.net",
},
},
AuthBasic = new NewRelic.Inputs.NotificationDestinationAuthBasicArgs
{
User = "example@email.com",
Password = "password",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.NotificationDestination;
import com.pulumi.newrelic.NotificationDestinationArgs;
import com.pulumi.newrelic.inputs.NotificationDestinationPropertyArgs;
import com.pulumi.newrelic.inputs.NotificationDestinationAuthBasicArgs;
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 NotificationDestination("foo", NotificationDestinationArgs.builder()
.accountId("12345678")
.name("jira-example")
.type("JIRA")
.properties(NotificationDestinationPropertyArgs.builder()
.key("url")
.value("https://example.atlassian.net")
.build())
.authBasic(NotificationDestinationAuthBasicArgs.builder()
.user("example@email.com")
.password("password")
.build())
.build());
}
}
resources:
foo:
type: newrelic:NotificationDestination
properties:
accountId: 1.2345678e+07
name: jira-example
type: JIRA
properties:
- key: url
value: https://example.atlassian.net
authBasic:
user: example@email.com
password: password
PagerDuty with service integration
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.NotificationDestination("foo", {
accountId: "12345678",
name: "pagerduty-service-example",
type: "PAGERDUTY_SERVICE_INTEGRATION",
properties: [{
key: "",
value: "",
}],
authToken: {
prefix: "Token token=",
token: "10567a689d984d03c021034b22a789e2",
},
});
import pulumi
import pulumi_newrelic as newrelic
foo = newrelic.NotificationDestination("foo",
account_id="12345678",
name="pagerduty-service-example",
type="PAGERDUTY_SERVICE_INTEGRATION",
properties=[{
"key": "",
"value": "",
}],
auth_token={
"prefix": "Token token=",
"token": "10567a689d984d03c021034b22a789e2",
})
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.NewNotificationDestination(ctx, "foo", &newrelic.NotificationDestinationArgs{
AccountId: pulumi.String("12345678"),
Name: pulumi.String("pagerduty-service-example"),
Type: pulumi.String("PAGERDUTY_SERVICE_INTEGRATION"),
Properties: newrelic.NotificationDestinationPropertyArray{
&newrelic.NotificationDestinationPropertyArgs{
Key: pulumi.String(""),
Value: pulumi.String(""),
},
},
AuthToken: &newrelic.NotificationDestinationAuthTokenArgs{
Prefix: pulumi.String("Token token="),
Token: pulumi.String("10567a689d984d03c021034b22a789e2"),
},
})
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.NotificationDestination("foo", new()
{
AccountId = "12345678",
Name = "pagerduty-service-example",
Type = "PAGERDUTY_SERVICE_INTEGRATION",
Properties = new[]
{
new NewRelic.Inputs.NotificationDestinationPropertyArgs
{
Key = "",
Value = "",
},
},
AuthToken = new NewRelic.Inputs.NotificationDestinationAuthTokenArgs
{
Prefix = "Token token=",
Token = "10567a689d984d03c021034b22a789e2",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.NotificationDestination;
import com.pulumi.newrelic.NotificationDestinationArgs;
import com.pulumi.newrelic.inputs.NotificationDestinationPropertyArgs;
import com.pulumi.newrelic.inputs.NotificationDestinationAuthTokenArgs;
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 NotificationDestination("foo", NotificationDestinationArgs.builder()
.accountId("12345678")
.name("pagerduty-service-example")
.type("PAGERDUTY_SERVICE_INTEGRATION")
.properties(NotificationDestinationPropertyArgs.builder()
.key("")
.value("")
.build())
.authToken(NotificationDestinationAuthTokenArgs.builder()
.prefix("Token token=")
.token("10567a689d984d03c021034b22a789e2")
.build())
.build());
}
}
resources:
foo:
type: newrelic:NotificationDestination
properties:
accountId: 1.2345678e+07
name: pagerduty-service-example
type: PAGERDUTY_SERVICE_INTEGRATION
properties:
- key: ""
value: ""
authToken:
prefix: Token token=
token: 10567a689d984d03c021034b22a789e2
PagerDuty with account integration
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.NotificationDestination("foo", {
accountId: "12345678",
name: "pagerduty-account-example",
type: "PAGERDUTY_ACCOUNT_INTEGRATION",
properties: [{
key: "two_way_integration",
value: "true",
}],
authToken: {
prefix: "Token token=",
token: "u+E8EU3MhsZwLfZ1ic1A",
},
});
import pulumi
import pulumi_newrelic as newrelic
foo = newrelic.NotificationDestination("foo",
account_id="12345678",
name="pagerduty-account-example",
type="PAGERDUTY_ACCOUNT_INTEGRATION",
properties=[{
"key": "two_way_integration",
"value": "true",
}],
auth_token={
"prefix": "Token token=",
"token": "u+E8EU3MhsZwLfZ1ic1A",
})
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.NewNotificationDestination(ctx, "foo", &newrelic.NotificationDestinationArgs{
AccountId: pulumi.String("12345678"),
Name: pulumi.String("pagerduty-account-example"),
Type: pulumi.String("PAGERDUTY_ACCOUNT_INTEGRATION"),
Properties: newrelic.NotificationDestinationPropertyArray{
&newrelic.NotificationDestinationPropertyArgs{
Key: pulumi.String("two_way_integration"),
Value: pulumi.String("true"),
},
},
AuthToken: &newrelic.NotificationDestinationAuthTokenArgs{
Prefix: pulumi.String("Token token="),
Token: pulumi.String("u+E8EU3MhsZwLfZ1ic1A"),
},
})
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.NotificationDestination("foo", new()
{
AccountId = "12345678",
Name = "pagerduty-account-example",
Type = "PAGERDUTY_ACCOUNT_INTEGRATION",
Properties = new[]
{
new NewRelic.Inputs.NotificationDestinationPropertyArgs
{
Key = "two_way_integration",
Value = "true",
},
},
AuthToken = new NewRelic.Inputs.NotificationDestinationAuthTokenArgs
{
Prefix = "Token token=",
Token = "u+E8EU3MhsZwLfZ1ic1A",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.NotificationDestination;
import com.pulumi.newrelic.NotificationDestinationArgs;
import com.pulumi.newrelic.inputs.NotificationDestinationPropertyArgs;
import com.pulumi.newrelic.inputs.NotificationDestinationAuthTokenArgs;
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 NotificationDestination("foo", NotificationDestinationArgs.builder()
.accountId("12345678")
.name("pagerduty-account-example")
.type("PAGERDUTY_ACCOUNT_INTEGRATION")
.properties(NotificationDestinationPropertyArgs.builder()
.key("two_way_integration")
.value("true")
.build())
.authToken(NotificationDestinationAuthTokenArgs.builder()
.prefix("Token token=")
.token("u+E8EU3MhsZwLfZ1ic1A")
.build())
.build());
}
}
resources:
foo:
type: newrelic:NotificationDestination
properties:
accountId: 1.2345678e+07
name: pagerduty-account-example
type: PAGERDUTY_ACCOUNT_INTEGRATION
properties:
- key: two_way_integration
value: 'true'
authToken:
prefix: Token token=
token: u+E8EU3MhsZwLfZ1ic1A
Mobile Push
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.NotificationDestination("foo", {
accountId: "12345678",
name: "mobile-push-example",
type: "MOBILE_PUSH",
properties: [{
key: "userId",
value: "12345678",
}],
});
import pulumi
import pulumi_newrelic as newrelic
foo = newrelic.NotificationDestination("foo",
account_id="12345678",
name="mobile-push-example",
type="MOBILE_PUSH",
properties=[{
"key": "userId",
"value": "12345678",
}])
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.NewNotificationDestination(ctx, "foo", &newrelic.NotificationDestinationArgs{
AccountId: pulumi.String("12345678"),
Name: pulumi.String("mobile-push-example"),
Type: pulumi.String("MOBILE_PUSH"),
Properties: newrelic.NotificationDestinationPropertyArray{
&newrelic.NotificationDestinationPropertyArgs{
Key: pulumi.String("userId"),
Value: pulumi.String("12345678"),
},
},
})
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.NotificationDestination("foo", new()
{
AccountId = "12345678",
Name = "mobile-push-example",
Type = "MOBILE_PUSH",
Properties = new[]
{
new NewRelic.Inputs.NotificationDestinationPropertyArgs
{
Key = "userId",
Value = "12345678",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.NotificationDestination;
import com.pulumi.newrelic.NotificationDestinationArgs;
import com.pulumi.newrelic.inputs.NotificationDestinationPropertyArgs;
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 NotificationDestination("foo", NotificationDestinationArgs.builder()
.accountId("12345678")
.name("mobile-push-example")
.type("MOBILE_PUSH")
.properties(NotificationDestinationPropertyArgs.builder()
.key("userId")
.value("12345678")
.build())
.build());
}
}
resources:
foo:
type: newrelic:NotificationDestination
properties:
accountId: 1.2345678e+07
name: mobile-push-example
type: MOBILE_PUSH
properties:
- key: userId
value: '12345678'
AWS Event Bridge
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.NotificationDestination("foo", {
accountId: "12345678",
name: "event-bridge-example",
type: "EVENT_BRIDGE",
properties: [
{
key: "AWSAccountId",
value: "123456789123456",
},
{
key: "AWSRegion",
value: "us-east-2",
},
],
});
import pulumi
import pulumi_newrelic as newrelic
foo = newrelic.NotificationDestination("foo",
account_id="12345678",
name="event-bridge-example",
type="EVENT_BRIDGE",
properties=[
{
"key": "AWSAccountId",
"value": "123456789123456",
},
{
"key": "AWSRegion",
"value": "us-east-2",
},
])
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.NewNotificationDestination(ctx, "foo", &newrelic.NotificationDestinationArgs{
AccountId: pulumi.String("12345678"),
Name: pulumi.String("event-bridge-example"),
Type: pulumi.String("EVENT_BRIDGE"),
Properties: newrelic.NotificationDestinationPropertyArray{
&newrelic.NotificationDestinationPropertyArgs{
Key: pulumi.String("AWSAccountId"),
Value: pulumi.String("123456789123456"),
},
&newrelic.NotificationDestinationPropertyArgs{
Key: pulumi.String("AWSRegion"),
Value: pulumi.String("us-east-2"),
},
},
})
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.NotificationDestination("foo", new()
{
AccountId = "12345678",
Name = "event-bridge-example",
Type = "EVENT_BRIDGE",
Properties = new[]
{
new NewRelic.Inputs.NotificationDestinationPropertyArgs
{
Key = "AWSAccountId",
Value = "123456789123456",
},
new NewRelic.Inputs.NotificationDestinationPropertyArgs
{
Key = "AWSRegion",
Value = "us-east-2",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.NotificationDestination;
import com.pulumi.newrelic.NotificationDestinationArgs;
import com.pulumi.newrelic.inputs.NotificationDestinationPropertyArgs;
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 NotificationDestination("foo", NotificationDestinationArgs.builder()
.accountId("12345678")
.name("event-bridge-example")
.type("EVENT_BRIDGE")
.properties(
NotificationDestinationPropertyArgs.builder()
.key("AWSAccountId")
.value("123456789123456")
.build(),
NotificationDestinationPropertyArgs.builder()
.key("AWSRegion")
.value("us-east-2")
.build())
.build());
}
}
resources:
foo:
type: newrelic:NotificationDestination
properties:
accountId: 1.2345678e+07
name: event-bridge-example
type: EVENT_BRIDGE
properties:
- key: AWSAccountId
value: '123456789123456'
- key: AWSRegion
value: us-east-2
Slack
In order to create a Slack destination, you have to grant our application access to your workspace. This process is based on OAuth and can only be done through a browser.
As a result, you cannot set up a Slack destination purely with Terraform code.
However, if you would like to use Slack-based destinations with other resources in the New Relic Terraform Provider, the data source newrelic.NotificationDestination may be used to fetch the ID of the destination; alternatively, you might want to source the ID of the destination from NerdGraph, or from the New Relic One UI.
Additional Information
More information about destinations integrations can be found in NewRelic documentation. More details about the destinations API can be found here.
Moving from Legacy Alert Channels to Notification Channels
As stated in the documentation of this resource and newrelic.NotificationChannel, destinations, created using the resource newrelic.NotificationDestination can be paired with newrelic.NotificationChannel to set up channels. These resources combined, are an alternative to the legacy resource newrelic.AlertChannel, which is deprecated and will be removed in a future major release, as stated in the documentation of the resource.
If you’re currently using newrelic.AlertChannel to manage channels, we strongly recommend migrating to these notifications-based resources at the earliest.
Please refer to the examples in this page, or this example for illustrations on setting up channels with these resources.
Create NotificationDestination Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new NotificationDestination(name: string, args: NotificationDestinationArgs, opts?: CustomResourceOptions);@overload
def NotificationDestination(resource_name: str,
args: NotificationDestinationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def NotificationDestination(resource_name: str,
opts: Optional[ResourceOptions] = None,
properties: Optional[Sequence[NotificationDestinationPropertyArgs]] = None,
type: Optional[str] = None,
account_id: Optional[str] = None,
active: Optional[bool] = None,
auth_basic: Optional[NotificationDestinationAuthBasicArgs] = None,
auth_custom_headers: Optional[Sequence[NotificationDestinationAuthCustomHeaderArgs]] = None,
auth_token: Optional[NotificationDestinationAuthTokenArgs] = None,
name: Optional[str] = None,
secure_url: Optional[NotificationDestinationSecureUrlArgs] = None)func NewNotificationDestination(ctx *Context, name string, args NotificationDestinationArgs, opts ...ResourceOption) (*NotificationDestination, error)public NotificationDestination(string name, NotificationDestinationArgs args, CustomResourceOptions? opts = null)
public NotificationDestination(String name, NotificationDestinationArgs args)
public NotificationDestination(String name, NotificationDestinationArgs args, CustomResourceOptions options)
type: newrelic:NotificationDestination
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 NotificationDestinationArgs
- 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 NotificationDestinationArgs
- 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 NotificationDestinationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NotificationDestinationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NotificationDestinationArgs
- 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 notificationDestinationResource = new NewRelic.NotificationDestination("notificationDestinationResource", new()
{
Properties = new[]
{
new NewRelic.Inputs.NotificationDestinationPropertyArgs
{
Key = "string",
Value = "string",
DisplayValue = "string",
Label = "string",
},
},
Type = "string",
AccountId = "string",
Active = false,
AuthBasic = new NewRelic.Inputs.NotificationDestinationAuthBasicArgs
{
Password = "string",
User = "string",
},
AuthCustomHeaders = new[]
{
new NewRelic.Inputs.NotificationDestinationAuthCustomHeaderArgs
{
Key = "string",
Value = "string",
},
},
AuthToken = new NewRelic.Inputs.NotificationDestinationAuthTokenArgs
{
Token = "string",
Prefix = "string",
},
Name = "string",
SecureUrl = new NewRelic.Inputs.NotificationDestinationSecureUrlArgs
{
Prefix = "string",
SecureSuffix = "string",
},
});
example, err := newrelic.NewNotificationDestination(ctx, "notificationDestinationResource", &newrelic.NotificationDestinationArgs{
Properties: newrelic.NotificationDestinationPropertyArray{
&newrelic.NotificationDestinationPropertyArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
DisplayValue: pulumi.String("string"),
Label: pulumi.String("string"),
},
},
Type: pulumi.String("string"),
AccountId: pulumi.String("string"),
Active: pulumi.Bool(false),
AuthBasic: &newrelic.NotificationDestinationAuthBasicArgs{
Password: pulumi.String("string"),
User: pulumi.String("string"),
},
AuthCustomHeaders: newrelic.NotificationDestinationAuthCustomHeaderArray{
&newrelic.NotificationDestinationAuthCustomHeaderArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
AuthToken: &newrelic.NotificationDestinationAuthTokenArgs{
Token: pulumi.String("string"),
Prefix: pulumi.String("string"),
},
Name: pulumi.String("string"),
SecureUrl: &newrelic.NotificationDestinationSecureUrlArgs{
Prefix: pulumi.String("string"),
SecureSuffix: pulumi.String("string"),
},
})
var notificationDestinationResource = new NotificationDestination("notificationDestinationResource", NotificationDestinationArgs.builder()
.properties(NotificationDestinationPropertyArgs.builder()
.key("string")
.value("string")
.displayValue("string")
.label("string")
.build())
.type("string")
.accountId("string")
.active(false)
.authBasic(NotificationDestinationAuthBasicArgs.builder()
.password("string")
.user("string")
.build())
.authCustomHeaders(NotificationDestinationAuthCustomHeaderArgs.builder()
.key("string")
.value("string")
.build())
.authToken(NotificationDestinationAuthTokenArgs.builder()
.token("string")
.prefix("string")
.build())
.name("string")
.secureUrl(NotificationDestinationSecureUrlArgs.builder()
.prefix("string")
.secureSuffix("string")
.build())
.build());
notification_destination_resource = newrelic.NotificationDestination("notificationDestinationResource",
properties=[{
"key": "string",
"value": "string",
"display_value": "string",
"label": "string",
}],
type="string",
account_id="string",
active=False,
auth_basic={
"password": "string",
"user": "string",
},
auth_custom_headers=[{
"key": "string",
"value": "string",
}],
auth_token={
"token": "string",
"prefix": "string",
},
name="string",
secure_url={
"prefix": "string",
"secure_suffix": "string",
})
const notificationDestinationResource = new newrelic.NotificationDestination("notificationDestinationResource", {
properties: [{
key: "string",
value: "string",
displayValue: "string",
label: "string",
}],
type: "string",
accountId: "string",
active: false,
authBasic: {
password: "string",
user: "string",
},
authCustomHeaders: [{
key: "string",
value: "string",
}],
authToken: {
token: "string",
prefix: "string",
},
name: "string",
secureUrl: {
prefix: "string",
secureSuffix: "string",
},
});
type: newrelic:NotificationDestination
properties:
accountId: string
active: false
authBasic:
password: string
user: string
authCustomHeaders:
- key: string
value: string
authToken:
prefix: string
token: string
name: string
properties:
- displayValue: string
key: string
label: string
value: string
secureUrl:
prefix: string
secureSuffix: string
type: string
NotificationDestination 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 NotificationDestination resource accepts the following input properties:
- Properties
List<Pulumi.
New Relic. Inputs. Notification Destination Property> - A nested block that describes a notification destination property. See Nested property blocks below for details.
- Type string
- The type of destination. One of:
EMAIL,SERVICE_NOW,SERVICE_NOW_APP,WEBHOOK,JIRA,MOBILE_PUSH,EVENT_BRIDGE,PAGERDUTY_ACCOUNT_INTEGRATIONorPAGERDUTY_SERVICE_INTEGRATION,MICROSOFT_TEAMS,WORKFLOW_AUTOMATION. The typesSLACKandSLACK_COLLABORATIONcan only be imported, updated and destroyed (cannot be created via terraform). - Account
Id string - Determines the New Relic account where the notification destination will be created. Defaults to the account associated with the API key used.
- Active bool
- Indicates whether the destination is active.
- Auth
Basic Pulumi.New Relic. Inputs. Notification Destination Auth Basic - A nested block that describes a basic username and password authentication credentials. Only one auth_basic block is permitted per notification destination definition. See Nested auth_basic blocks below for details.
- Auth
Custom List<Pulumi.Headers New Relic. Inputs. Notification Destination Auth Custom Header> - A nested block that describes a custom header authentication credentials. This field is required when the destination type is WORKFLOW_AUTOMATION and optional for other destination types. Multiple blocks are permitted per notification destination definition. Nested auth_custom_header blocks below for details.
- Auth
Token Pulumi.New Relic. Inputs. Notification Destination Auth Token - A nested block that describes a token authentication credentials. Only one auth_token block is permitted per notification destination definition. See Nested auth_token blocks below for details.
- Name string
- The name of the destination.
- Secure
Url Pulumi.New Relic. Inputs. Notification Destination Secure Url - A nested block that describes a URL that contains sensitive data at the path or parameters. Only one secure_url block is permitted per notification destination definition. See Nested secure_url blocks below for details.
- Properties
[]Notification
Destination Property Args - A nested block that describes a notification destination property. See Nested property blocks below for details.
- Type string
- The type of destination. One of:
EMAIL,SERVICE_NOW,SERVICE_NOW_APP,WEBHOOK,JIRA,MOBILE_PUSH,EVENT_BRIDGE,PAGERDUTY_ACCOUNT_INTEGRATIONorPAGERDUTY_SERVICE_INTEGRATION,MICROSOFT_TEAMS,WORKFLOW_AUTOMATION. The typesSLACKandSLACK_COLLABORATIONcan only be imported, updated and destroyed (cannot be created via terraform). - Account
Id string - Determines the New Relic account where the notification destination will be created. Defaults to the account associated with the API key used.
- Active bool
- Indicates whether the destination is active.
- Auth
Basic NotificationDestination Auth Basic Args - A nested block that describes a basic username and password authentication credentials. Only one auth_basic block is permitted per notification destination definition. See Nested auth_basic blocks below for details.
- Auth
Custom []NotificationHeaders Destination Auth Custom Header Args - A nested block that describes a custom header authentication credentials. This field is required when the destination type is WORKFLOW_AUTOMATION and optional for other destination types. Multiple blocks are permitted per notification destination definition. Nested auth_custom_header blocks below for details.
- Auth
Token NotificationDestination Auth Token Args - A nested block that describes a token authentication credentials. Only one auth_token block is permitted per notification destination definition. See Nested auth_token blocks below for details.
- Name string
- The name of the destination.
- Secure
Url NotificationDestination Secure Url Args - A nested block that describes a URL that contains sensitive data at the path or parameters. Only one secure_url block is permitted per notification destination definition. See Nested secure_url blocks below for details.
- properties
List<Notification
Destination Property> - A nested block that describes a notification destination property. See Nested property blocks below for details.
- type String
- The type of destination. One of:
EMAIL,SERVICE_NOW,SERVICE_NOW_APP,WEBHOOK,JIRA,MOBILE_PUSH,EVENT_BRIDGE,PAGERDUTY_ACCOUNT_INTEGRATIONorPAGERDUTY_SERVICE_INTEGRATION,MICROSOFT_TEAMS,WORKFLOW_AUTOMATION. The typesSLACKandSLACK_COLLABORATIONcan only be imported, updated and destroyed (cannot be created via terraform). - account
Id String - Determines the New Relic account where the notification destination will be created. Defaults to the account associated with the API key used.
- active Boolean
- Indicates whether the destination is active.
- auth
Basic NotificationDestination Auth Basic - A nested block that describes a basic username and password authentication credentials. Only one auth_basic block is permitted per notification destination definition. See Nested auth_basic blocks below for details.
- auth
Custom List<NotificationHeaders Destination Auth Custom Header> - A nested block that describes a custom header authentication credentials. This field is required when the destination type is WORKFLOW_AUTOMATION and optional for other destination types. Multiple blocks are permitted per notification destination definition. Nested auth_custom_header blocks below for details.
- auth
Token NotificationDestination Auth Token - A nested block that describes a token authentication credentials. Only one auth_token block is permitted per notification destination definition. See Nested auth_token blocks below for details.
- name String
- The name of the destination.
- secure
Url NotificationDestination Secure Url - A nested block that describes a URL that contains sensitive data at the path or parameters. Only one secure_url block is permitted per notification destination definition. See Nested secure_url blocks below for details.
- properties
Notification
Destination Property[] - A nested block that describes a notification destination property. See Nested property blocks below for details.
- type string
- The type of destination. One of:
EMAIL,SERVICE_NOW,SERVICE_NOW_APP,WEBHOOK,JIRA,MOBILE_PUSH,EVENT_BRIDGE,PAGERDUTY_ACCOUNT_INTEGRATIONorPAGERDUTY_SERVICE_INTEGRATION,MICROSOFT_TEAMS,WORKFLOW_AUTOMATION. The typesSLACKandSLACK_COLLABORATIONcan only be imported, updated and destroyed (cannot be created via terraform). - account
Id string - Determines the New Relic account where the notification destination will be created. Defaults to the account associated with the API key used.
- active boolean
- Indicates whether the destination is active.
- auth
Basic NotificationDestination Auth Basic - A nested block that describes a basic username and password authentication credentials. Only one auth_basic block is permitted per notification destination definition. See Nested auth_basic blocks below for details.
- auth
Custom NotificationHeaders Destination Auth Custom Header[] - A nested block that describes a custom header authentication credentials. This field is required when the destination type is WORKFLOW_AUTOMATION and optional for other destination types. Multiple blocks are permitted per notification destination definition. Nested auth_custom_header blocks below for details.
- auth
Token NotificationDestination Auth Token - A nested block that describes a token authentication credentials. Only one auth_token block is permitted per notification destination definition. See Nested auth_token blocks below for details.
- name string
- The name of the destination.
- secure
Url NotificationDestination Secure Url - A nested block that describes a URL that contains sensitive data at the path or parameters. Only one secure_url block is permitted per notification destination definition. See Nested secure_url blocks below for details.
- properties
Sequence[Notification
Destination Property Args] - A nested block that describes a notification destination property. See Nested property blocks below for details.
- type str
- The type of destination. One of:
EMAIL,SERVICE_NOW,SERVICE_NOW_APP,WEBHOOK,JIRA,MOBILE_PUSH,EVENT_BRIDGE,PAGERDUTY_ACCOUNT_INTEGRATIONorPAGERDUTY_SERVICE_INTEGRATION,MICROSOFT_TEAMS,WORKFLOW_AUTOMATION. The typesSLACKandSLACK_COLLABORATIONcan only be imported, updated and destroyed (cannot be created via terraform). - account_
id str - Determines the New Relic account where the notification destination will be created. Defaults to the account associated with the API key used.
- active bool
- Indicates whether the destination is active.
- auth_
basic NotificationDestination Auth Basic Args - A nested block that describes a basic username and password authentication credentials. Only one auth_basic block is permitted per notification destination definition. See Nested auth_basic blocks below for details.
- auth_
custom_ Sequence[Notificationheaders Destination Auth Custom Header Args] - A nested block that describes a custom header authentication credentials. This field is required when the destination type is WORKFLOW_AUTOMATION and optional for other destination types. Multiple blocks are permitted per notification destination definition. Nested auth_custom_header blocks below for details.
- auth_
token NotificationDestination Auth Token Args - A nested block that describes a token authentication credentials. Only one auth_token block is permitted per notification destination definition. See Nested auth_token blocks below for details.
- name str
- The name of the destination.
- secure_
url NotificationDestination Secure Url Args - A nested block that describes a URL that contains sensitive data at the path or parameters. Only one secure_url block is permitted per notification destination definition. See Nested secure_url blocks below for details.
- properties List<Property Map>
- A nested block that describes a notification destination property. See Nested property blocks below for details.
- type String
- The type of destination. One of:
EMAIL,SERVICE_NOW,SERVICE_NOW_APP,WEBHOOK,JIRA,MOBILE_PUSH,EVENT_BRIDGE,PAGERDUTY_ACCOUNT_INTEGRATIONorPAGERDUTY_SERVICE_INTEGRATION,MICROSOFT_TEAMS,WORKFLOW_AUTOMATION. The typesSLACKandSLACK_COLLABORATIONcan only be imported, updated and destroyed (cannot be created via terraform). - account
Id String - Determines the New Relic account where the notification destination will be created. Defaults to the account associated with the API key used.
- active Boolean
- Indicates whether the destination is active.
- auth
Basic Property Map - A nested block that describes a basic username and password authentication credentials. Only one auth_basic block is permitted per notification destination definition. See Nested auth_basic blocks below for details.
- auth
Custom List<Property Map>Headers - A nested block that describes a custom header authentication credentials. This field is required when the destination type is WORKFLOW_AUTOMATION and optional for other destination types. Multiple blocks are permitted per notification destination definition. Nested auth_custom_header blocks below for details.
- auth
Token Property Map - A nested block that describes a token authentication credentials. Only one auth_token block is permitted per notification destination definition. See Nested auth_token blocks below for details.
- name String
- The name of the destination.
- secure
Url Property Map - A nested block that describes a URL that contains sensitive data at the path or parameters. Only one secure_url block is permitted per notification destination definition. See Nested secure_url blocks below for details.
Outputs
All input properties are implicitly available as output properties. Additionally, the NotificationDestination resource produces the following output properties:
Look up Existing NotificationDestination Resource
Get an existing NotificationDestination 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?: NotificationDestinationState, opts?: CustomResourceOptions): NotificationDestination@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
active: Optional[bool] = None,
auth_basic: Optional[NotificationDestinationAuthBasicArgs] = None,
auth_custom_headers: Optional[Sequence[NotificationDestinationAuthCustomHeaderArgs]] = None,
auth_token: Optional[NotificationDestinationAuthTokenArgs] = None,
guid: Optional[str] = None,
last_sent: Optional[str] = None,
name: Optional[str] = None,
properties: Optional[Sequence[NotificationDestinationPropertyArgs]] = None,
secure_url: Optional[NotificationDestinationSecureUrlArgs] = None,
status: Optional[str] = None,
type: Optional[str] = None) -> NotificationDestinationfunc GetNotificationDestination(ctx *Context, name string, id IDInput, state *NotificationDestinationState, opts ...ResourceOption) (*NotificationDestination, error)public static NotificationDestination Get(string name, Input<string> id, NotificationDestinationState? state, CustomResourceOptions? opts = null)public static NotificationDestination get(String name, Output<String> id, NotificationDestinationState state, CustomResourceOptions options)resources: _: type: newrelic:NotificationDestination 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.
- Account
Id string - Determines the New Relic account where the notification destination will be created. Defaults to the account associated with the API key used.
- Active bool
- Indicates whether the destination is active.
- Auth
Basic Pulumi.New Relic. Inputs. Notification Destination Auth Basic - A nested block that describes a basic username and password authentication credentials. Only one auth_basic block is permitted per notification destination definition. See Nested auth_basic blocks below for details.
- Auth
Custom List<Pulumi.Headers New Relic. Inputs. Notification Destination Auth Custom Header> - A nested block that describes a custom header authentication credentials. This field is required when the destination type is WORKFLOW_AUTOMATION and optional for other destination types. Multiple blocks are permitted per notification destination definition. Nested auth_custom_header blocks below for details.
- Auth
Token Pulumi.New Relic. Inputs. Notification Destination Auth Token - A nested block that describes a token authentication credentials. Only one auth_token block is permitted per notification destination definition. See Nested auth_token blocks below for details.
- Guid string
- The unique entity identifier of the destination in New Relic.
- Last
Sent string - The last time a notification was sent.
- Name string
- The name of the destination.
- Properties
List<Pulumi.
New Relic. Inputs. Notification Destination Property> - A nested block that describes a notification destination property. See Nested property blocks below for details.
- Secure
Url Pulumi.New Relic. Inputs. Notification Destination Secure Url - A nested block that describes a URL that contains sensitive data at the path or parameters. Only one secure_url block is permitted per notification destination definition. See Nested secure_url blocks below for details.
- Status string
- The status of the destination.
- Type string
- The type of destination. One of:
EMAIL,SERVICE_NOW,SERVICE_NOW_APP,WEBHOOK,JIRA,MOBILE_PUSH,EVENT_BRIDGE,PAGERDUTY_ACCOUNT_INTEGRATIONorPAGERDUTY_SERVICE_INTEGRATION,MICROSOFT_TEAMS,WORKFLOW_AUTOMATION. The typesSLACKandSLACK_COLLABORATIONcan only be imported, updated and destroyed (cannot be created via terraform).
- Account
Id string - Determines the New Relic account where the notification destination will be created. Defaults to the account associated with the API key used.
- Active bool
- Indicates whether the destination is active.
- Auth
Basic NotificationDestination Auth Basic Args - A nested block that describes a basic username and password authentication credentials. Only one auth_basic block is permitted per notification destination definition. See Nested auth_basic blocks below for details.
- Auth
Custom []NotificationHeaders Destination Auth Custom Header Args - A nested block that describes a custom header authentication credentials. This field is required when the destination type is WORKFLOW_AUTOMATION and optional for other destination types. Multiple blocks are permitted per notification destination definition. Nested auth_custom_header blocks below for details.
- Auth
Token NotificationDestination Auth Token Args - A nested block that describes a token authentication credentials. Only one auth_token block is permitted per notification destination definition. See Nested auth_token blocks below for details.
- Guid string
- The unique entity identifier of the destination in New Relic.
- Last
Sent string - The last time a notification was sent.
- Name string
- The name of the destination.
- Properties
[]Notification
Destination Property Args - A nested block that describes a notification destination property. See Nested property blocks below for details.
- Secure
Url NotificationDestination Secure Url Args - A nested block that describes a URL that contains sensitive data at the path or parameters. Only one secure_url block is permitted per notification destination definition. See Nested secure_url blocks below for details.
- Status string
- The status of the destination.
- Type string
- The type of destination. One of:
EMAIL,SERVICE_NOW,SERVICE_NOW_APP,WEBHOOK,JIRA,MOBILE_PUSH,EVENT_BRIDGE,PAGERDUTY_ACCOUNT_INTEGRATIONorPAGERDUTY_SERVICE_INTEGRATION,MICROSOFT_TEAMS,WORKFLOW_AUTOMATION. The typesSLACKandSLACK_COLLABORATIONcan only be imported, updated and destroyed (cannot be created via terraform).
- account
Id String - Determines the New Relic account where the notification destination will be created. Defaults to the account associated with the API key used.
- active Boolean
- Indicates whether the destination is active.
- auth
Basic NotificationDestination Auth Basic - A nested block that describes a basic username and password authentication credentials. Only one auth_basic block is permitted per notification destination definition. See Nested auth_basic blocks below for details.
- auth
Custom List<NotificationHeaders Destination Auth Custom Header> - A nested block that describes a custom header authentication credentials. This field is required when the destination type is WORKFLOW_AUTOMATION and optional for other destination types. Multiple blocks are permitted per notification destination definition. Nested auth_custom_header blocks below for details.
- auth
Token NotificationDestination Auth Token - A nested block that describes a token authentication credentials. Only one auth_token block is permitted per notification destination definition. See Nested auth_token blocks below for details.
- guid String
- The unique entity identifier of the destination in New Relic.
- last
Sent String - The last time a notification was sent.
- name String
- The name of the destination.
- properties
List<Notification
Destination Property> - A nested block that describes a notification destination property. See Nested property blocks below for details.
- secure
Url NotificationDestination Secure Url - A nested block that describes a URL that contains sensitive data at the path or parameters. Only one secure_url block is permitted per notification destination definition. See Nested secure_url blocks below for details.
- status String
- The status of the destination.
- type String
- The type of destination. One of:
EMAIL,SERVICE_NOW,SERVICE_NOW_APP,WEBHOOK,JIRA,MOBILE_PUSH,EVENT_BRIDGE,PAGERDUTY_ACCOUNT_INTEGRATIONorPAGERDUTY_SERVICE_INTEGRATION,MICROSOFT_TEAMS,WORKFLOW_AUTOMATION. The typesSLACKandSLACK_COLLABORATIONcan only be imported, updated and destroyed (cannot be created via terraform).
- account
Id string - Determines the New Relic account where the notification destination will be created. Defaults to the account associated with the API key used.
- active boolean
- Indicates whether the destination is active.
- auth
Basic NotificationDestination Auth Basic - A nested block that describes a basic username and password authentication credentials. Only one auth_basic block is permitted per notification destination definition. See Nested auth_basic blocks below for details.
- auth
Custom NotificationHeaders Destination Auth Custom Header[] - A nested block that describes a custom header authentication credentials. This field is required when the destination type is WORKFLOW_AUTOMATION and optional for other destination types. Multiple blocks are permitted per notification destination definition. Nested auth_custom_header blocks below for details.
- auth
Token NotificationDestination Auth Token - A nested block that describes a token authentication credentials. Only one auth_token block is permitted per notification destination definition. See Nested auth_token blocks below for details.
- guid string
- The unique entity identifier of the destination in New Relic.
- last
Sent string - The last time a notification was sent.
- name string
- The name of the destination.
- properties
Notification
Destination Property[] - A nested block that describes a notification destination property. See Nested property blocks below for details.
- secure
Url NotificationDestination Secure Url - A nested block that describes a URL that contains sensitive data at the path or parameters. Only one secure_url block is permitted per notification destination definition. See Nested secure_url blocks below for details.
- status string
- The status of the destination.
- type string
- The type of destination. One of:
EMAIL,SERVICE_NOW,SERVICE_NOW_APP,WEBHOOK,JIRA,MOBILE_PUSH,EVENT_BRIDGE,PAGERDUTY_ACCOUNT_INTEGRATIONorPAGERDUTY_SERVICE_INTEGRATION,MICROSOFT_TEAMS,WORKFLOW_AUTOMATION. The typesSLACKandSLACK_COLLABORATIONcan only be imported, updated and destroyed (cannot be created via terraform).
- account_
id str - Determines the New Relic account where the notification destination will be created. Defaults to the account associated with the API key used.
- active bool
- Indicates whether the destination is active.
- auth_
basic NotificationDestination Auth Basic Args - A nested block that describes a basic username and password authentication credentials. Only one auth_basic block is permitted per notification destination definition. See Nested auth_basic blocks below for details.
- auth_
custom_ Sequence[Notificationheaders Destination Auth Custom Header Args] - A nested block that describes a custom header authentication credentials. This field is required when the destination type is WORKFLOW_AUTOMATION and optional for other destination types. Multiple blocks are permitted per notification destination definition. Nested auth_custom_header blocks below for details.
- auth_
token NotificationDestination Auth Token Args - A nested block that describes a token authentication credentials. Only one auth_token block is permitted per notification destination definition. See Nested auth_token blocks below for details.
- guid str
- The unique entity identifier of the destination in New Relic.
- last_
sent str - The last time a notification was sent.
- name str
- The name of the destination.
- properties
Sequence[Notification
Destination Property Args] - A nested block that describes a notification destination property. See Nested property blocks below for details.
- secure_
url NotificationDestination Secure Url Args - A nested block that describes a URL that contains sensitive data at the path or parameters. Only one secure_url block is permitted per notification destination definition. See Nested secure_url blocks below for details.
- status str
- The status of the destination.
- type str
- The type of destination. One of:
EMAIL,SERVICE_NOW,SERVICE_NOW_APP,WEBHOOK,JIRA,MOBILE_PUSH,EVENT_BRIDGE,PAGERDUTY_ACCOUNT_INTEGRATIONorPAGERDUTY_SERVICE_INTEGRATION,MICROSOFT_TEAMS,WORKFLOW_AUTOMATION. The typesSLACKandSLACK_COLLABORATIONcan only be imported, updated and destroyed (cannot be created via terraform).
- account
Id String - Determines the New Relic account where the notification destination will be created. Defaults to the account associated with the API key used.
- active Boolean
- Indicates whether the destination is active.
- auth
Basic Property Map - A nested block that describes a basic username and password authentication credentials. Only one auth_basic block is permitted per notification destination definition. See Nested auth_basic blocks below for details.
- auth
Custom List<Property Map>Headers - A nested block that describes a custom header authentication credentials. This field is required when the destination type is WORKFLOW_AUTOMATION and optional for other destination types. Multiple blocks are permitted per notification destination definition. Nested auth_custom_header blocks below for details.
- auth
Token Property Map - A nested block that describes a token authentication credentials. Only one auth_token block is permitted per notification destination definition. See Nested auth_token blocks below for details.
- guid String
- The unique entity identifier of the destination in New Relic.
- last
Sent String - The last time a notification was sent.
- name String
- The name of the destination.
- properties List<Property Map>
- A nested block that describes a notification destination property. See Nested property blocks below for details.
- secure
Url Property Map - A nested block that describes a URL that contains sensitive data at the path or parameters. Only one secure_url block is permitted per notification destination definition. See Nested secure_url blocks below for details.
- status String
- The status of the destination.
- type String
- The type of destination. One of:
EMAIL,SERVICE_NOW,SERVICE_NOW_APP,WEBHOOK,JIRA,MOBILE_PUSH,EVENT_BRIDGE,PAGERDUTY_ACCOUNT_INTEGRATIONorPAGERDUTY_SERVICE_INTEGRATION,MICROSOFT_TEAMS,WORKFLOW_AUTOMATION. The typesSLACKandSLACK_COLLABORATIONcan only be imported, updated and destroyed (cannot be created via terraform).
Supporting Types
NotificationDestinationAuthBasic, NotificationDestinationAuthBasicArgs
NotificationDestinationAuthCustomHeader, NotificationDestinationAuthCustomHeaderArgs
NotificationDestinationAuthToken, NotificationDestinationAuthTokenArgs
NotificationDestinationProperty, NotificationDestinationPropertyArgs
- Key string
- Notification property key.
- Value string
- Notification property value.
- Display
Value string - Notification property display key.
- Label string
- Notification property label.
- Key string
- Notification property key.
- Value string
- Notification property value.
- Display
Value string - Notification property display key.
- Label string
- Notification property label.
- key String
- Notification property key.
- value String
- Notification property value.
- display
Value String - Notification property display key.
- label String
- Notification property label.
- key string
- Notification property key.
- value string
- Notification property value.
- display
Value string - Notification property display key.
- label string
- Notification property label.
- key str
- Notification property key.
- value str
- Notification property value.
- display_
value str - Notification property display key.
- label str
- Notification property label.
- key String
- Notification property key.
- value String
- Notification property value.
- display
Value String - Notification property display key.
- label String
- Notification property label.
NotificationDestinationSecureUrl, NotificationDestinationSecureUrlArgs
- Prefix string
- The prefix of the URL.
- Secure
Suffix string - The suffix of the URL, which contains sensitive data.
- Prefix string
- The prefix of the URL.
- Secure
Suffix string - The suffix of the URL, which contains sensitive data.
- prefix String
- The prefix of the URL.
- secure
Suffix String - The suffix of the URL, which contains sensitive data.
- prefix string
- The prefix of the URL.
- secure
Suffix string - The suffix of the URL, which contains sensitive data.
- prefix str
- The prefix of the URL.
- secure_
suffix str - The suffix of the URL, which contains sensitive data.
- prefix String
- The prefix of the URL.
- secure
Suffix String - The suffix of the URL, which contains sensitive data.
Import
WARNING: Slack-based destinations can only be imported and destroyed; this resource does not support creating and updating Slack-based destinations, owing to the reasons stated above, under the Slack section.
Destination id can be found in the Destinations page > three dots at the right of the chosen destination > copy destination id to clipboard. This example is especially useful for slack destinations which must be imported.
- Add an empty resource to your terraform file:
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.NotificationDestination("foo", {});
import pulumi
import pulumi_newrelic as newrelic
foo = newrelic.NotificationDestination("foo")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var foo = new NewRelic.NotificationDestination("foo");
});
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.NewNotificationDestination(ctx, "foo", nil)
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.NotificationDestination;
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 NotificationDestination("foo");
}
}
resources:
foo:
type: newrelic:NotificationDestination
- Run import command:
terraform import newrelic_notification_destination.foo <destination_id> - Run the following command after the import successfully done and copy the information to your resource:
terraform state show newrelic_notification_destination.foo - Add
ignore_changesattribute onallin your imported resource:
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.
