1. Packages
  2. Event Store Cloud
  3. API Docs
  4. Integration
Event Store Cloud v0.2.17 published on Tuesday, Jan 21, 2025 by EventStore

eventstorecloud.Integration

Explore with Pulumi AI

Manages integration resources, for example Slack or OpsGenie.

Example Usage

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using EventStoreCloud = Pulumi.EventStoreCloud;

return await Deployment.RunAsync(() => 
{
    var opsgenieIssues = new EventStoreCloud.Integration("opsgenieIssues", new()
    {
        ProjectId = @var.Project_id,
        Description = "create OpsGenie alerts from issues",
        Data = 
        {
            { "sink", "opsGenie" },
            { "api_key", "<secret OpsGenie key here>" },
            { "source", "issues" },
        },
    });

    var slackNotifications = new EventStoreCloud.Integration("slackNotifications", new()
    {
        ProjectId = @var.Project_id,
        Description = "send Slack a message when a notification happens",
        Data = 
        {
            { "sink", "slack" },
            { "token", "<secret token here>" },
            { "channel_id", "#esc-cluster-notifications" },
            { "source", "notifications" },
        },
    });

});
Copy
package main

import (
	"github.com/EventStore/pulumi-eventstorecloud/sdk/go/eventstorecloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := eventstorecloud.NewIntegration(ctx, "opsgenieIssues", &eventstorecloud.IntegrationArgs{
			ProjectId:   pulumi.Any(_var.Project_id),
			Description: pulumi.String("create OpsGenie alerts from issues"),
			Data: pulumi.AnyMap{
				"sink":    pulumi.Any("opsGenie"),
				"api_key": pulumi.Any("<secret OpsGenie key here>"),
				"source":  pulumi.Any("issues"),
			},
		})
		if err != nil {
			return err
		}
		_, err = eventstorecloud.NewIntegration(ctx, "slackNotifications", &eventstorecloud.IntegrationArgs{
			ProjectId:   pulumi.Any(_var.Project_id),
			Description: pulumi.String("send Slack a message when a notification happens"),
			Data: pulumi.AnyMap{
				"sink":       pulumi.Any("slack"),
				"token":      pulumi.Any("<secret token here>"),
				"channel_id": pulumi.Any("#esc-cluster-notifications"),
				"source":     pulumi.Any("notifications"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.eventstorecloud.Integration;
import com.pulumi.eventstorecloud.IntegrationArgs;
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 opsgenieIssues = new Integration("opsgenieIssues", IntegrationArgs.builder()        
            .projectId(var_.project_id())
            .description("create OpsGenie alerts from issues")
            .data(Map.ofEntries(
                Map.entry("sink", "opsGenie"),
                Map.entry("api_key", "<secret OpsGenie key here>"),
                Map.entry("source", "issues")
            ))
            .build());

        var slackNotifications = new Integration("slackNotifications", IntegrationArgs.builder()        
            .projectId(var_.project_id())
            .description("send Slack a message when a notification happens")
            .data(Map.ofEntries(
                Map.entry("sink", "slack"),
                Map.entry("token", "<secret token here>"),
                Map.entry("channel_id", "#esc-cluster-notifications"),
                Map.entry("source", "notifications")
            ))
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as eventstorecloud from "@eventstore/pulumi-eventstorecloud";

const opsgenieIssues = new eventstorecloud.Integration("opsgenieIssues", {
    projectId: _var.project_id,
    description: "create OpsGenie alerts from issues",
    data: {
        sink: "opsGenie",
        api_key: "<secret OpsGenie key here>",
        source: "issues",
    },
});
const slackNotifications = new eventstorecloud.Integration("slackNotifications", {
    projectId: _var.project_id,
    description: "send Slack a message when a notification happens",
    data: {
        sink: "slack",
        token: "<secret token here>",
        channel_id: "#esc-cluster-notifications",
        source: "notifications",
    },
});
Copy
import pulumi
import pulumi_eventstorecloud as eventstorecloud

opsgenie_issues = eventstorecloud.Integration("opsgenieIssues",
    project_id=var["project_id"],
    description="create OpsGenie alerts from issues",
    data={
        "sink": "opsGenie",
        "api_key": "<secret OpsGenie key here>",
        "source": "issues",
    })
slack_notifications = eventstorecloud.Integration("slackNotifications",
    project_id=var["project_id"],
    description="send Slack a message when a notification happens",
    data={
        "sink": "slack",
        "token": "<secret token here>",
        "channel_id": "#esc-cluster-notifications",
        "source": "notifications",
    })
Copy
resources:
  opsgenieIssues:
    type: eventstorecloud:Integration
    properties:
      projectId: ${var.project_id}
      description: create OpsGenie alerts from issues
      data:
        sink: opsGenie
        api_key: <secret OpsGenie key here>
        source: issues
  slackNotifications:
    type: eventstorecloud:Integration
    properties:
      projectId: ${var.project_id}
      description: send Slack a message when a notification happens
      data:
        sink: slack
        token: <secret token here>
        channel_id: '#esc-cluster-notifications'
        source: notifications
Copy

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: IntegrationArgs,
                opts: Optional[ResourceOptions] = None)

@overload
def Integration(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                data: Optional[Mapping[str, Any]] = None,
                description: Optional[str] = None,
                project_id: Optional[str] = None)
func NewIntegration(ctx *Context, name string, args IntegrationArgs, opts ...ResourceOption) (*Integration, error)
public Integration(string name, IntegrationArgs args, CustomResourceOptions? opts = null)
public Integration(String name, IntegrationArgs args)
public Integration(String name, IntegrationArgs args, CustomResourceOptions options)
type: eventstorecloud:Integration
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. IntegrationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. IntegrationArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. IntegrationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. 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 EventStoreCloud.Integration("integrationResource", new()
{
    Data = 
    {
        { "string", "any" },
    },
    Description = "string",
    ProjectId = "string",
});
Copy
example, err := eventstorecloud.NewIntegration(ctx, "integrationResource", &eventstorecloud.IntegrationArgs{
	Data: pulumi.Map{
		"string": pulumi.Any("any"),
	},
	Description: pulumi.String("string"),
	ProjectId:   pulumi.String("string"),
})
Copy
var integrationResource = new Integration("integrationResource", IntegrationArgs.builder()
    .data(Map.of("string", "any"))
    .description("string")
    .projectId("string")
    .build());
Copy
integration_resource = eventstorecloud.Integration("integrationResource",
    data={
        "string": "any",
    },
    description="string",
    project_id="string")
Copy
const integrationResource = new eventstorecloud.Integration("integrationResource", {
    data: {
        string: "any",
    },
    description: "string",
    projectId: "string",
});
Copy
type: eventstorecloud:Integration
properties:
    data:
        string: any
    description: string
    projectId: string
Copy

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:

Data This property is required. Dictionary<string, object>
Data for the integration
Description This property is required. string
Human readable description of the integration
ProjectId
This property is required.
Changes to this property will trigger replacement.
string
ID of the project to which the integration applies
Data This property is required. map[string]interface{}
Data for the integration
Description This property is required. string
Human readable description of the integration
ProjectId
This property is required.
Changes to this property will trigger replacement.
string
ID of the project to which the integration applies
data This property is required. Map<String,Object>
Data for the integration
description This property is required. String
Human readable description of the integration
projectId
This property is required.
Changes to this property will trigger replacement.
String
ID of the project to which the integration applies
data This property is required. {[key: string]: any}
Data for the integration
description This property is required. string
Human readable description of the integration
projectId
This property is required.
Changes to this property will trigger replacement.
string
ID of the project to which the integration applies
data This property is required. Mapping[str, Any]
Data for the integration
description This property is required. str
Human readable description of the integration
project_id
This property is required.
Changes to this property will trigger replacement.
str
ID of the project to which the integration applies
data This property is required. Map<Any>
Data for the integration
description This property is required. String
Human readable description of the integration
projectId
This property is required.
Changes to this property will trigger replacement.
String
ID of the project to which the integration applies

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,
        data: Optional[Mapping[str, Any]] = None,
        description: Optional[str] = None,
        project_id: Optional[str] = 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: eventstorecloud:Integration    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Data Dictionary<string, object>
Data for the integration
Description string
Human readable description of the integration
ProjectId Changes to this property will trigger replacement. string
ID of the project to which the integration applies
Data map[string]interface{}
Data for the integration
Description string
Human readable description of the integration
ProjectId Changes to this property will trigger replacement. string
ID of the project to which the integration applies
data Map<String,Object>
Data for the integration
description String
Human readable description of the integration
projectId Changes to this property will trigger replacement. String
ID of the project to which the integration applies
data {[key: string]: any}
Data for the integration
description string
Human readable description of the integration
projectId Changes to this property will trigger replacement. string
ID of the project to which the integration applies
data Mapping[str, Any]
Data for the integration
description str
Human readable description of the integration
project_id Changes to this property will trigger replacement. str
ID of the project to which the integration applies
data Map<Any>
Data for the integration
description String
Human readable description of the integration
projectId Changes to this property will trigger replacement. String
ID of the project to which the integration applies

Import

 $ pulumi import eventstorecloud:index/integration:Integration opsgenie_issues project_id:integration_id
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
eventstorecloud EventStore/pulumi-eventstorecloud
License
Apache-2.0
Notes
This Pulumi package is based on the eventstorecloud Terraform Provider.