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" },
},
});
});
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
})
}
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());
}
}
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",
})
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",
},
});
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
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 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 EventStoreCloud.Integration("integrationResource", new()
{
Data =
{
{ "string", "any" },
},
Description = "string",
ProjectId = "string",
});
example, err := eventstorecloud.NewIntegration(ctx, "integrationResource", &eventstorecloud.IntegrationArgs{
Data: pulumi.Map{
"string": pulumi.Any("any"),
},
Description: pulumi.String("string"),
ProjectId: pulumi.String("string"),
})
var integrationResource = new Integration("integrationResource", IntegrationArgs.builder()
.data(Map.of("string", "any"))
.description("string")
.projectId("string")
.build());
integration_resource = eventstorecloud.Integration("integrationResource",
data={
"string": "any",
},
description="string",
project_id="string")
const integrationResource = new eventstorecloud.Integration("integrationResource", {
data: {
string: "any",
},
description: "string",
projectId: "string",
});
type: eventstorecloud:Integration
properties:
data:
string: any
description: string
projectId: 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
The Integration resource accepts the following input properties:
- Data Dictionary<string, object>
- Data for the integration
- Description string
- Human readable description of the integration
- Project
Id 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
- Project
Id 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
- project
Id 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
- project
Id 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 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
- project
Id 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)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Data Dictionary<string, object>
- Data for the integration
- Description string
- Human readable description of the integration
- Project
Id 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
- Project
Id 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
- project
Id 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
- project
Id 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 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
- project
Id String - ID of the project to which the integration applies
Import
$ pulumi import eventstorecloud:index/integration:Integration opsgenie_issues project_id:integration_id
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.