rollbar.Integration
Explore with Pulumi AI
rollbar.Integration
Resource
=========================
Rollbar projects can be configured with different notification integrations (aka “channels”) and rules for when to send notifications to those integration platforms. This resource manages the configuration for the integrations(limited to the Slack, Webhook, Email and PagerDuty channels at the moment) for the project configured for the Rollbar provider.
This resource can manage configuration for the Slack, Webhook, Email and PagerDuty channels. See the following api documentation for more details about the arguments with respect to these channels:
- Rollbar API Slack Integration, Rollbar Slack Integration Documentation
- Rollbar API Webhook Integration, Rollbar Webhook Integration Documentation
- Rollbar API PagerDuty Integration, Rollbar PagerDuty Integration Documentation
- Rollbar API Email Integration
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as rollbar from "@pulumi/rollbar";
const slackIntegration = new rollbar.Integration("slackIntegration", {slacks: [{
channel: "#demo",
enabled: false,
serviceAccountId: "1234r45",
showMessageButtons: true,
}]});
const webhookIntegration = new rollbar.Integration("webhookIntegration", {webhooks: [{
enabled: true,
url: "https://www.example.com",
}]});
const emailIntegration = new rollbar.Integration("emailIntegration", {emails: [{
enabled: true,
scrubParams: true,
}]});
const pagerdutyIntegration = new rollbar.Integration("pagerdutyIntegration", {pagerduties: [{
enabled: false,
serviceKey: "123456789",
}]});
import pulumi
import pulumi_rollbar as rollbar
slack_integration = rollbar.Integration("slackIntegration", slacks=[{
"channel": "#demo",
"enabled": False,
"service_account_id": "1234r45",
"show_message_buttons": True,
}])
webhook_integration = rollbar.Integration("webhookIntegration", webhooks=[{
"enabled": True,
"url": "https://www.example.com",
}])
email_integration = rollbar.Integration("emailIntegration", emails=[{
"enabled": True,
"scrub_params": True,
}])
pagerduty_integration = rollbar.Integration("pagerdutyIntegration", pagerduties=[{
"enabled": False,
"service_key": "123456789",
}])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/rollbar/rollbar"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := rollbar.NewIntegration(ctx, "slackIntegration", &rollbar.IntegrationArgs{
Slacks: rollbar.IntegrationSlackArray{
&rollbar.IntegrationSlackArgs{
Channel: pulumi.String("#demo"),
Enabled: pulumi.Bool(false),
ServiceAccountId: pulumi.String("1234r45"),
ShowMessageButtons: pulumi.Bool(true),
},
},
})
if err != nil {
return err
}
_, err = rollbar.NewIntegration(ctx, "webhookIntegration", &rollbar.IntegrationArgs{
Webhooks: rollbar.IntegrationWebhookArray{
&rollbar.IntegrationWebhookArgs{
Enabled: pulumi.Bool(true),
Url: pulumi.String("https://www.example.com"),
},
},
})
if err != nil {
return err
}
_, err = rollbar.NewIntegration(ctx, "emailIntegration", &rollbar.IntegrationArgs{
Emails: rollbar.IntegrationEmailArray{
&rollbar.IntegrationEmailArgs{
Enabled: pulumi.Bool(true),
ScrubParams: pulumi.Bool(true),
},
},
})
if err != nil {
return err
}
_, err = rollbar.NewIntegration(ctx, "pagerdutyIntegration", &rollbar.IntegrationArgs{
Pagerduties: rollbar.IntegrationPagerdutyArray{
&rollbar.IntegrationPagerdutyArgs{
Enabled: pulumi.Bool(false),
ServiceKey: pulumi.String("123456789"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Rollbar = Pulumi.Rollbar;
return await Deployment.RunAsync(() =>
{
var slackIntegration = new Rollbar.Integration("slackIntegration", new()
{
Slacks = new[]
{
new Rollbar.Inputs.IntegrationSlackArgs
{
Channel = "#demo",
Enabled = false,
ServiceAccountId = "1234r45",
ShowMessageButtons = true,
},
},
});
var webhookIntegration = new Rollbar.Integration("webhookIntegration", new()
{
Webhooks = new[]
{
new Rollbar.Inputs.IntegrationWebhookArgs
{
Enabled = true,
Url = "https://www.example.com",
},
},
});
var emailIntegration = new Rollbar.Integration("emailIntegration", new()
{
Emails = new[]
{
new Rollbar.Inputs.IntegrationEmailArgs
{
Enabled = true,
ScrubParams = true,
},
},
});
var pagerdutyIntegration = new Rollbar.Integration("pagerdutyIntegration", new()
{
Pagerduties = new[]
{
new Rollbar.Inputs.IntegrationPagerdutyArgs
{
Enabled = false,
ServiceKey = "123456789",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.rollbar.Integration;
import com.pulumi.rollbar.IntegrationArgs;
import com.pulumi.rollbar.inputs.IntegrationSlackArgs;
import com.pulumi.rollbar.inputs.IntegrationWebhookArgs;
import com.pulumi.rollbar.inputs.IntegrationEmailArgs;
import com.pulumi.rollbar.inputs.IntegrationPagerdutyArgs;
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 slackIntegration = new Integration("slackIntegration", IntegrationArgs.builder()
.slacks(IntegrationSlackArgs.builder()
.channel("#demo")
.enabled(false)
.serviceAccountId("1234r45")
.showMessageButtons(true)
.build())
.build());
var webhookIntegration = new Integration("webhookIntegration", IntegrationArgs.builder()
.webhooks(IntegrationWebhookArgs.builder()
.enabled(true)
.url("https://www.example.com")
.build())
.build());
var emailIntegration = new Integration("emailIntegration", IntegrationArgs.builder()
.emails(IntegrationEmailArgs.builder()
.enabled(true)
.scrubParams(true)
.build())
.build());
var pagerdutyIntegration = new Integration("pagerdutyIntegration", IntegrationArgs.builder()
.pagerduties(IntegrationPagerdutyArgs.builder()
.enabled(false)
.serviceKey("123456789")
.build())
.build());
}
}
resources:
slackIntegration:
type: rollbar:Integration
properties:
slacks:
- channel: '#demo'
enabled: false
serviceAccountId: 1234r45
showMessageButtons: true
webhookIntegration:
type: rollbar:Integration
properties:
webhooks:
- enabled: true
url: https://www.example.com
emailIntegration:
type: rollbar:Integration
properties:
emails:
- enabled: true
scrubParams: true
pagerdutyIntegration:
type: rollbar:Integration
properties:
pagerduties:
- enabled: false
serviceKey: '123456789'
Create Integration Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Integration(name: string, args?: IntegrationArgs, opts?: CustomResourceOptions);
@overload
def Integration(resource_name: str,
args: Optional[IntegrationArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Integration(resource_name: str,
opts: Optional[ResourceOptions] = None,
emails: Optional[Sequence[IntegrationEmailArgs]] = None,
integration_id: Optional[str] = None,
pagerduties: Optional[Sequence[IntegrationPagerdutyArgs]] = None,
slacks: Optional[Sequence[IntegrationSlackArgs]] = None,
webhooks: Optional[Sequence[IntegrationWebhookArgs]] = None)
func NewIntegration(ctx *Context, name string, args *IntegrationArgs, opts ...ResourceOption) (*Integration, error)
public Integration(string name, IntegrationArgs? args = null, CustomResourceOptions? opts = null)
public Integration(String name, IntegrationArgs args)
public Integration(String name, IntegrationArgs args, CustomResourceOptions options)
type: rollbar:Integration
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 IntegrationArgs
- 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 IntegrationArgs
- 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 IntegrationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args IntegrationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args IntegrationArgs
- 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 integrationResource = new Rollbar.Integration("integrationResource", new()
{
Emails = new[]
{
new Rollbar.Inputs.IntegrationEmailArgs
{
Enabled = false,
ScrubParams = false,
},
},
IntegrationId = "string",
Pagerduties = new[]
{
new Rollbar.Inputs.IntegrationPagerdutyArgs
{
Enabled = false,
ServiceKey = "string",
},
},
Slacks = new[]
{
new Rollbar.Inputs.IntegrationSlackArgs
{
Channel = "string",
Enabled = false,
ServiceAccountId = "string",
ShowMessageButtons = false,
},
},
Webhooks = new[]
{
new Rollbar.Inputs.IntegrationWebhookArgs
{
Enabled = false,
Url = "string",
},
},
});
example, err := rollbar.NewIntegration(ctx, "integrationResource", &rollbar.IntegrationArgs{
Emails: rollbar.IntegrationEmailArray{
&rollbar.IntegrationEmailArgs{
Enabled: pulumi.Bool(false),
ScrubParams: pulumi.Bool(false),
},
},
IntegrationId: pulumi.String("string"),
Pagerduties: rollbar.IntegrationPagerdutyArray{
&rollbar.IntegrationPagerdutyArgs{
Enabled: pulumi.Bool(false),
ServiceKey: pulumi.String("string"),
},
},
Slacks: rollbar.IntegrationSlackArray{
&rollbar.IntegrationSlackArgs{
Channel: pulumi.String("string"),
Enabled: pulumi.Bool(false),
ServiceAccountId: pulumi.String("string"),
ShowMessageButtons: pulumi.Bool(false),
},
},
Webhooks: rollbar.IntegrationWebhookArray{
&rollbar.IntegrationWebhookArgs{
Enabled: pulumi.Bool(false),
Url: pulumi.String("string"),
},
},
})
var integrationResource = new Integration("integrationResource", IntegrationArgs.builder()
.emails(IntegrationEmailArgs.builder()
.enabled(false)
.scrubParams(false)
.build())
.integrationId("string")
.pagerduties(IntegrationPagerdutyArgs.builder()
.enabled(false)
.serviceKey("string")
.build())
.slacks(IntegrationSlackArgs.builder()
.channel("string")
.enabled(false)
.serviceAccountId("string")
.showMessageButtons(false)
.build())
.webhooks(IntegrationWebhookArgs.builder()
.enabled(false)
.url("string")
.build())
.build());
integration_resource = rollbar.Integration("integrationResource",
emails=[{
"enabled": False,
"scrub_params": False,
}],
integration_id="string",
pagerduties=[{
"enabled": False,
"service_key": "string",
}],
slacks=[{
"channel": "string",
"enabled": False,
"service_account_id": "string",
"show_message_buttons": False,
}],
webhooks=[{
"enabled": False,
"url": "string",
}])
const integrationResource = new rollbar.Integration("integrationResource", {
emails: [{
enabled: false,
scrubParams: false,
}],
integrationId: "string",
pagerduties: [{
enabled: false,
serviceKey: "string",
}],
slacks: [{
channel: "string",
enabled: false,
serviceAccountId: "string",
showMessageButtons: false,
}],
webhooks: [{
enabled: false,
url: "string",
}],
});
type: rollbar:Integration
properties:
emails:
- enabled: false
scrubParams: false
integrationId: string
pagerduties:
- enabled: false
serviceKey: string
slacks:
- channel: string
enabled: false
serviceAccountId: string
showMessageButtons: false
webhooks:
- enabled: false
url: string
Integration 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 Integration resource accepts the following input properties:
- Emails
List<Integration
Email> - Email integration
- Integration
Id string - Composite ID of the project ID and the integration name
- Pagerduties
List<Integration
Pagerduty> - PagerDuty integration
- Slacks
List<Integration
Slack> - Slack integration
- Webhooks
List<Integration
Webhook> - Webhook integration
- Emails
[]Integration
Email Args - Email integration
- Integration
Id string - Composite ID of the project ID and the integration name
- Pagerduties
[]Integration
Pagerduty Args - PagerDuty integration
- Slacks
[]Integration
Slack Args - Slack integration
- Webhooks
[]Integration
Webhook Args - Webhook integration
- emails
List<Integration
Email> - Email integration
- integration
Id String - Composite ID of the project ID and the integration name
- pagerduties
List<Integration
Pagerduty> - PagerDuty integration
- slacks
List<Integration
Slack> - Slack integration
- webhooks
List<Integration
Webhook> - Webhook integration
- emails
Integration
Email[] - Email integration
- integration
Id string - Composite ID of the project ID and the integration name
- pagerduties
Integration
Pagerduty[] - PagerDuty integration
- slacks
Integration
Slack[] - Slack integration
- webhooks
Integration
Webhook[] - Webhook integration
- emails
Sequence[Integration
Email Args] - Email integration
- integration_
id str - Composite ID of the project ID and the integration name
- pagerduties
Sequence[Integration
Pagerduty Args] - PagerDuty integration
- slacks
Sequence[Integration
Slack Args] - Slack integration
- webhooks
Sequence[Integration
Webhook Args] - Webhook integration
- emails List<Property Map>
- Email integration
- integration
Id String - Composite ID of the project ID and the integration name
- pagerduties List<Property Map>
- PagerDuty integration
- slacks List<Property Map>
- Slack integration
- webhooks List<Property Map>
- Webhook integration
Outputs
All input properties are implicitly available as output properties. Additionally, the Integration resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing Integration Resource
Get an existing Integration 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?: IntegrationState, opts?: CustomResourceOptions): Integration
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
emails: Optional[Sequence[IntegrationEmailArgs]] = None,
integration_id: Optional[str] = None,
pagerduties: Optional[Sequence[IntegrationPagerdutyArgs]] = None,
slacks: Optional[Sequence[IntegrationSlackArgs]] = None,
webhooks: Optional[Sequence[IntegrationWebhookArgs]] = None) -> Integration
func GetIntegration(ctx *Context, name string, id IDInput, state *IntegrationState, opts ...ResourceOption) (*Integration, error)
public static Integration Get(string name, Input<string> id, IntegrationState? state, CustomResourceOptions? opts = null)
public static Integration get(String name, Output<String> id, IntegrationState state, CustomResourceOptions options)
resources: _: type: rollbar:Integration 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.
- Emails
List<Integration
Email> - Email integration
- Integration
Id string - Composite ID of the project ID and the integration name
- Pagerduties
List<Integration
Pagerduty> - PagerDuty integration
- Slacks
List<Integration
Slack> - Slack integration
- Webhooks
List<Integration
Webhook> - Webhook integration
- Emails
[]Integration
Email Args - Email integration
- Integration
Id string - Composite ID of the project ID and the integration name
- Pagerduties
[]Integration
Pagerduty Args - PagerDuty integration
- Slacks
[]Integration
Slack Args - Slack integration
- Webhooks
[]Integration
Webhook Args - Webhook integration
- emails
List<Integration
Email> - Email integration
- integration
Id String - Composite ID of the project ID and the integration name
- pagerduties
List<Integration
Pagerduty> - PagerDuty integration
- slacks
List<Integration
Slack> - Slack integration
- webhooks
List<Integration
Webhook> - Webhook integration
- emails
Integration
Email[] - Email integration
- integration
Id string - Composite ID of the project ID and the integration name
- pagerduties
Integration
Pagerduty[] - PagerDuty integration
- slacks
Integration
Slack[] - Slack integration
- webhooks
Integration
Webhook[] - Webhook integration
- emails
Sequence[Integration
Email Args] - Email integration
- integration_
id str - Composite ID of the project ID and the integration name
- pagerduties
Sequence[Integration
Pagerduty Args] - PagerDuty integration
- slacks
Sequence[Integration
Slack Args] - Slack integration
- webhooks
Sequence[Integration
Webhook Args] - Webhook integration
- emails List<Property Map>
- Email integration
- integration
Id String - Composite ID of the project ID and the integration name
- pagerduties List<Property Map>
- PagerDuty integration
- slacks List<Property Map>
- Slack integration
- webhooks List<Property Map>
- Webhook integration
Supporting Types
IntegrationEmail, IntegrationEmailArgs
- Enabled bool
- Boolean that enables the PagerDuty notifications globally
- Scrub
Params bool Optional Boolean that enables scrubbing param values (when set to true)
PagerDuty:
- Enabled bool
- Boolean that enables the PagerDuty notifications globally
- Scrub
Params bool Optional Boolean that enables scrubbing param values (when set to true)
PagerDuty:
- enabled Boolean
- Boolean that enables the PagerDuty notifications globally
- scrub
Params Boolean Optional Boolean that enables scrubbing param values (when set to true)
PagerDuty:
- enabled boolean
- Boolean that enables the PagerDuty notifications globally
- scrub
Params boolean Optional Boolean that enables scrubbing param values (when set to true)
PagerDuty:
- enabled bool
- Boolean that enables the PagerDuty notifications globally
- scrub_
params bool Optional Boolean that enables scrubbing param values (when set to true)
PagerDuty:
- enabled Boolean
- Boolean that enables the PagerDuty notifications globally
- scrub
Params Boolean Optional Boolean that enables scrubbing param values (when set to true)
PagerDuty:
IntegrationPagerduty, IntegrationPagerdutyArgs
- Enabled bool
- Boolean that enables the PagerDuty notifications globally
- Service
Key string - PagerDuty service key linked to PagerDuty account
- Enabled bool
- Boolean that enables the PagerDuty notifications globally
- Service
Key string - PagerDuty service key linked to PagerDuty account
- enabled Boolean
- Boolean that enables the PagerDuty notifications globally
- service
Key String - PagerDuty service key linked to PagerDuty account
- enabled boolean
- Boolean that enables the PagerDuty notifications globally
- service
Key string - PagerDuty service key linked to PagerDuty account
- enabled bool
- Boolean that enables the PagerDuty notifications globally
- service_
key str - PagerDuty service key linked to PagerDuty account
- enabled Boolean
- Boolean that enables the PagerDuty notifications globally
- service
Key String - PagerDuty service key linked to PagerDuty account
IntegrationSlack, IntegrationSlackArgs
- Channel string
- The default Slack channel name to send the messages. Requires a
#
as a prefix - Enabled bool
- Boolean that enables the PagerDuty notifications globally
- Service
Account stringId - The Rollbar Slack service account ID configured for the account. You can find your service account ID here
- bool
Boolean that enables the Slack actionable buttons
Webhook:
- Channel string
- The default Slack channel name to send the messages. Requires a
#
as a prefix - Enabled bool
- Boolean that enables the PagerDuty notifications globally
- Service
Account stringId - The Rollbar Slack service account ID configured for the account. You can find your service account ID here
- bool
Boolean that enables the Slack actionable buttons
Webhook:
- channel String
- The default Slack channel name to send the messages. Requires a
#
as a prefix - enabled Boolean
- Boolean that enables the PagerDuty notifications globally
- service
Account StringId - The Rollbar Slack service account ID configured for the account. You can find your service account ID here
- Boolean
Boolean that enables the Slack actionable buttons
Webhook:
- channel string
- The default Slack channel name to send the messages. Requires a
#
as a prefix - enabled boolean
- Boolean that enables the PagerDuty notifications globally
- service
Account stringId - The Rollbar Slack service account ID configured for the account. You can find your service account ID here
- boolean
Boolean that enables the Slack actionable buttons
Webhook:
- channel str
- The default Slack channel name to send the messages. Requires a
#
as a prefix - enabled bool
- Boolean that enables the PagerDuty notifications globally
- service_
account_ strid - The Rollbar Slack service account ID configured for the account. You can find your service account ID here
- bool
Boolean that enables the Slack actionable buttons
Webhook:
- channel String
- The default Slack channel name to send the messages. Requires a
#
as a prefix - enabled Boolean
- Boolean that enables the PagerDuty notifications globally
- service
Account StringId - The Rollbar Slack service account ID configured for the account. You can find your service account ID here
- Boolean
Boolean that enables the Slack actionable buttons
Webhook:
IntegrationWebhook, IntegrationWebhookArgs
Package Details
- Repository
- rollbar rollbar/terraform-provider-rollbar
- License
- Notes
- This Pulumi package is based on the
rollbar
Terraform Provider.