IntegrationLog

This resource allows you to create and manage third party log integrations for a CloudAMQP instance. Once configured, the logs produced will be forward to corresponding integration.

Only available for dedicated subscription plans.

Argument Reference (cloudwatchlog)

Cloudwatch argument reference and example. Create an IAM user with programmatic access and the following permissions:

  • CreateLogGroup
  • CreateLogStream
  • DescribeLogGroups
  • DescribeLogStreams
  • PutLogEvents

Integration service reference

Valid names for third party log integration.

Name Description
cloudwatchlog Create a IAM with programmatic access.
logentries Create a Logentries token at https://logentries.com/app#/add-log/manual
loggly Create a Loggly token at https://your-company}.loggly.com/tokens
papertrail Create a Papertrail endpoint https://papertrailapp.com/systems/setup
splunk Create a HTTP Event Collector token at https://.cloud.splunk.com/en-US/manager/search/http-eventcollector
datadog Create a Datadog API key at app.datadoghq.com
stackdriver Create a service account and add ‘monitor metrics writer’ role, then download credentials.

Integration Type reference

Valid arguments for third party log integrations.

Required arguments for all integrations: name

Name Type Required arguments
CloudWatch cloudwatchlog access_key_id, secret_access_key, region
Log Entries logentries token
Loggly loggly token
Papertrail papertrail url
Splunk splunk token, host_port
Data Dog datadog region, api_keys, tags
Stackdriver stackdriver project_id, private_key, client_email

Dependency

This resource depends on CloudAMQP instance identifier, cloudamqp_instance.instance.id.

Example Usage

using Pulumi;
using CloudAmqp = Pulumi.CloudAmqp;

class MyStack : Stack
{
    public MyStack()
    {
        var cloudwatch = new CloudAmqp.IntegrationLog("cloudwatch", new CloudAmqp.IntegrationLogArgs
        {
            InstanceId = cloudamqp_instance.Instance.Id,
            AccessKeyId = @var.Aws_access_key_id,
            SecretAccessKey = @var.Aws_secret_access_key,
            Region = @var.Aws_region,
        });
        var logentries = new CloudAmqp.IntegrationLog("logentries", new CloudAmqp.IntegrationLogArgs
        {
            InstanceId = cloudamqp_instance.Instance.Id,
            Token = @var.Logentries_token,
        });
        var loggly = new CloudAmqp.IntegrationLog("loggly", new CloudAmqp.IntegrationLogArgs
        {
            InstanceId = cloudamqp_instance.Instance.Id,
            Token = @var.Loggly_token,
        });
        var papertrail = new CloudAmqp.IntegrationLog("papertrail", new CloudAmqp.IntegrationLogArgs
        {
            InstanceId = cloudamqp_instance.Instance.Id,
            Url = @var.Papertrail_url,
        });
        var splunk = new CloudAmqp.IntegrationLog("splunk", new CloudAmqp.IntegrationLogArgs
        {
            InstanceId = cloudamqp_instance.Instance.Id,
            Token = @var.Splunk_token,
            HostPort = @var.Splunk_host_port,
        });
        var datadog = new CloudAmqp.IntegrationLog("datadog", new CloudAmqp.IntegrationLogArgs
        {
            InstanceId = cloudamqp_instance.Instance.Id,
            Region = @var.Datadog_region,
            ApiKey = @var.Datadog_api_key,
            Tags = @var.Datadog_tags,
        });
        var stackdriver = new CloudAmqp.IntegrationLog("stackdriver", new CloudAmqp.IntegrationLogArgs
        {
            InstanceId = cloudamqp_instance.Instance.Id,
            ProjectId = @var.Stackdriver_project_id,
            PrivateKey = @var.Stackdriver_private_key,
            ClientEmail = @var.Stackdriver_client_email,
        });
    }

}
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cloudamqp.NewIntegrationLog(ctx, "cloudwatch", &cloudamqp.IntegrationLogArgs{
			InstanceId:      pulumi.Any(cloudamqp_instance.Instance.Id),
			AccessKeyId:     pulumi.Any(_var.Aws_access_key_id),
			SecretAccessKey: pulumi.Any(_var.Aws_secret_access_key),
			Region:          pulumi.Any(_var.Aws_region),
		})
		if err != nil {
			return err
		}
		_, err = cloudamqp.NewIntegrationLog(ctx, "logentries", &cloudamqp.IntegrationLogArgs{
			InstanceId: pulumi.Any(cloudamqp_instance.Instance.Id),
			Token:      pulumi.Any(_var.Logentries_token),
		})
		if err != nil {
			return err
		}
		_, err = cloudamqp.NewIntegrationLog(ctx, "loggly", &cloudamqp.IntegrationLogArgs{
			InstanceId: pulumi.Any(cloudamqp_instance.Instance.Id),
			Token:      pulumi.Any(_var.Loggly_token),
		})
		if err != nil {
			return err
		}
		_, err = cloudamqp.NewIntegrationLog(ctx, "papertrail", &cloudamqp.IntegrationLogArgs{
			InstanceId: pulumi.Any(cloudamqp_instance.Instance.Id),
			Url:        pulumi.Any(_var.Papertrail_url),
		})
		if err != nil {
			return err
		}
		_, err = cloudamqp.NewIntegrationLog(ctx, "splunk", &cloudamqp.IntegrationLogArgs{
			InstanceId: pulumi.Any(cloudamqp_instance.Instance.Id),
			Token:      pulumi.Any(_var.Splunk_token),
			HostPort:   pulumi.Any(_var.Splunk_host_port),
		})
		if err != nil {
			return err
		}
		_, err = cloudamqp.NewIntegrationLog(ctx, "datadog", &cloudamqp.IntegrationLogArgs{
			InstanceId: pulumi.Any(cloudamqp_instance.Instance.Id),
			Region:     pulumi.Any(_var.Datadog_region),
			ApiKey:     pulumi.Any(_var.Datadog_api_key),
			Tags:       pulumi.Any(_var.Datadog_tags),
		})
		if err != nil {
			return err
		}
		_, err = cloudamqp.NewIntegrationLog(ctx, "stackdriver", &cloudamqp.IntegrationLogArgs{
			InstanceId:  pulumi.Any(cloudamqp_instance.Instance.Id),
			ProjectId:   pulumi.Any(_var.Stackdriver_project_id),
			PrivateKey:  pulumi.Any(_var.Stackdriver_private_key),
			ClientEmail: pulumi.Any(_var.Stackdriver_client_email),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_cloudamqp as cloudamqp

cloudwatch = cloudamqp.IntegrationLog("cloudwatch",
    instance_id=cloudamqp_instance["instance"]["id"],
    access_key_id=var["aws_access_key_id"],
    secret_access_key=var["aws_secret_access_key"],
    region=var["aws_region"])
logentries = cloudamqp.IntegrationLog("logentries",
    instance_id=cloudamqp_instance["instance"]["id"],
    token=var["logentries_token"])
loggly = cloudamqp.IntegrationLog("loggly",
    instance_id=cloudamqp_instance["instance"]["id"],
    token=var["loggly_token"])
papertrail = cloudamqp.IntegrationLog("papertrail",
    instance_id=cloudamqp_instance["instance"]["id"],
    url=var["papertrail_url"])
splunk = cloudamqp.IntegrationLog("splunk",
    instance_id=cloudamqp_instance["instance"]["id"],
    token=var["splunk_token"],
    host_port=var["splunk_host_port"])
datadog = cloudamqp.IntegrationLog("datadog",
    instance_id=cloudamqp_instance["instance"]["id"],
    region=var["datadog_region"],
    api_key=var["datadog_api_key"],
    tags=var["datadog_tags"])
stackdriver = cloudamqp.IntegrationLog("stackdriver",
    instance_id=cloudamqp_instance["instance"]["id"],
    project_id=var["stackdriver_project_id"],
    private_key=var["stackdriver_private_key"],
    client_email=var["stackdriver_client_email"])
import * as pulumi from "@pulumi/pulumi";
import * as cloudamqp from "@pulumi/cloudamqp";

const cloudwatch = new cloudamqp.IntegrationLog("cloudwatch", {
    instanceId: cloudamqp_instance.instance.id,
    accessKeyId: _var.aws_access_key_id,
    secretAccessKey: _var.aws_secret_access_key,
    region: _var.aws_region,
});
const logentries = new cloudamqp.IntegrationLog("logentries", {
    instanceId: cloudamqp_instance.instance.id,
    token: _var.logentries_token,
});
const loggly = new cloudamqp.IntegrationLog("loggly", {
    instanceId: cloudamqp_instance.instance.id,
    token: _var.loggly_token,
});
const papertrail = new cloudamqp.IntegrationLog("papertrail", {
    instanceId: cloudamqp_instance.instance.id,
    url: _var.papertrail_url,
});
const splunk = new cloudamqp.IntegrationLog("splunk", {
    instanceId: cloudamqp_instance.instance.id,
    token: _var.splunk_token,
    hostPort: _var.splunk_host_port,
});
const datadog = new cloudamqp.IntegrationLog("datadog", {
    instanceId: cloudamqp_instance.instance.id,
    region: _var.datadog_region,
    apiKey: _var.datadog_api_key,
    tags: _var.datadog_tags,
});
const stackdriver = new cloudamqp.IntegrationLog("stackdriver", {
    instanceId: cloudamqp_instance.instance.id,
    projectId: _var.stackdriver_project_id,
    privateKey: _var.stackdriver_private_key,
    clientEmail: _var.stackdriver_client_email,
});

Create a IntegrationLog Resource

new IntegrationLog(name: string, args: IntegrationLogArgs, opts?: CustomResourceOptions);
@overload
def IntegrationLog(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   access_key_id: Optional[str] = None,
                   api_key: Optional[str] = None,
                   client_email: Optional[str] = None,
                   host_port: Optional[str] = None,
                   instance_id: Optional[int] = None,
                   name: Optional[str] = None,
                   private_key: Optional[str] = None,
                   project_id: Optional[str] = None,
                   region: Optional[str] = None,
                   secret_access_key: Optional[str] = None,
                   tags: Optional[str] = None,
                   token: Optional[str] = None,
                   url: Optional[str] = None)
@overload
def IntegrationLog(resource_name: str,
                   args: IntegrationLogArgs,
                   opts: Optional[ResourceOptions] = None)
func NewIntegrationLog(ctx *Context, name string, args IntegrationLogArgs, opts ...ResourceOption) (*IntegrationLog, error)
public IntegrationLog(string name, IntegrationLogArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args IntegrationLogArgs
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 IntegrationLogArgs
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 IntegrationLogArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args IntegrationLogArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

IntegrationLog 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 IntegrationLog resource accepts the following input properties:

InstanceId int
Instance identifier used to make proxy calls
AccessKeyId string
AWS access key identifier.
ApiKey string
The API key.
ClientEmail string
The client email registered for the integration service.
HostPort string
Destination to send the logs.
Name string
The name of the third party log integration. See
PrivateKey string
The private access key.
ProjectId string
The project identifier.
Region string
Region hosting the integration service.
SecretAccessKey string
AWS secret access key.
Tags string
Tag the integration, e.g. env=prod, region=europe.
Token string
Token used for authentication.
Url string
Endpoint to log integration.
InstanceId int
Instance identifier used to make proxy calls
AccessKeyId string
AWS access key identifier.
ApiKey string
The API key.
ClientEmail string
The client email registered for the integration service.
HostPort string
Destination to send the logs.
Name string
The name of the third party log integration. See
PrivateKey string
The private access key.
ProjectId string
The project identifier.
Region string
Region hosting the integration service.
SecretAccessKey string
AWS secret access key.
Tags string
Tag the integration, e.g. env=prod, region=europe.
Token string
Token used for authentication.
Url string
Endpoint to log integration.
instanceId number
Instance identifier used to make proxy calls
accessKeyId string
AWS access key identifier.
apiKey string
The API key.
clientEmail string
The client email registered for the integration service.
hostPort string
Destination to send the logs.
name string
The name of the third party log integration. See
privateKey string
The private access key.
projectId string
The project identifier.
region string
Region hosting the integration service.
secretAccessKey string
AWS secret access key.
tags string
Tag the integration, e.g. env=prod, region=europe.
token string
Token used for authentication.
url string
Endpoint to log integration.
instance_id int
Instance identifier used to make proxy calls
access_key_id str
AWS access key identifier.
api_key str
The API key.
client_email str
The client email registered for the integration service.
host_port str
Destination to send the logs.
name str
The name of the third party log integration. See
private_key str
The private access key.
project_id str
The project identifier.
region str
Region hosting the integration service.
secret_access_key str
AWS secret access key.
tags str
Tag the integration, e.g. env=prod, region=europe.
token str
Token used for authentication.
url str
Endpoint to log integration.

Outputs

All input properties are implicitly available as output properties. Additionally, the IntegrationLog 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 str
The provider-assigned unique ID for this managed resource.

Look up an Existing IntegrationLog Resource

Get an existing IntegrationLog 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?: IntegrationLogState, opts?: CustomResourceOptions): IntegrationLog
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        access_key_id: Optional[str] = None,
        api_key: Optional[str] = None,
        client_email: Optional[str] = None,
        host_port: Optional[str] = None,
        instance_id: Optional[int] = None,
        name: Optional[str] = None,
        private_key: Optional[str] = None,
        project_id: Optional[str] = None,
        region: Optional[str] = None,
        secret_access_key: Optional[str] = None,
        tags: Optional[str] = None,
        token: Optional[str] = None,
        url: Optional[str] = None) -> IntegrationLog
func GetIntegrationLog(ctx *Context, name string, id IDInput, state *IntegrationLogState, opts ...ResourceOption) (*IntegrationLog, error)
public static IntegrationLog Get(string name, Input<string> id, IntegrationLogState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

AccessKeyId string
AWS access key identifier.
ApiKey string
The API key.
ClientEmail string
The client email registered for the integration service.
HostPort string
Destination to send the logs.
InstanceId int
Instance identifier used to make proxy calls
Name string
The name of the third party log integration. See
PrivateKey string
The private access key.
ProjectId string
The project identifier.
Region string
Region hosting the integration service.
SecretAccessKey string
AWS secret access key.
Tags string
Tag the integration, e.g. env=prod, region=europe.
Token string
Token used for authentication.
Url string
Endpoint to log integration.
AccessKeyId string
AWS access key identifier.
ApiKey string
The API key.
ClientEmail string
The client email registered for the integration service.
HostPort string
Destination to send the logs.
InstanceId int
Instance identifier used to make proxy calls
Name string
The name of the third party log integration. See
PrivateKey string
The private access key.
ProjectId string
The project identifier.
Region string
Region hosting the integration service.
SecretAccessKey string
AWS secret access key.
Tags string
Tag the integration, e.g. env=prod, region=europe.
Token string
Token used for authentication.
Url string
Endpoint to log integration.
accessKeyId string
AWS access key identifier.
apiKey string
The API key.
clientEmail string
The client email registered for the integration service.
hostPort string
Destination to send the logs.
instanceId number
Instance identifier used to make proxy calls
name string
The name of the third party log integration. See
privateKey string
The private access key.
projectId string
The project identifier.
region string
Region hosting the integration service.
secretAccessKey string
AWS secret access key.
tags string
Tag the integration, e.g. env=prod, region=europe.
token string
Token used for authentication.
url string
Endpoint to log integration.
access_key_id str
AWS access key identifier.
api_key str
The API key.
client_email str
The client email registered for the integration service.
host_port str
Destination to send the logs.
instance_id int
Instance identifier used to make proxy calls
name str
The name of the third party log integration. See
private_key str
The private access key.
project_id str
The project identifier.
region str
Region hosting the integration service.
secret_access_key str
AWS secret access key.
tags str
Tag the integration, e.g. env=prod, region=europe.
token str
Token used for authentication.
url str
Endpoint to log integration.

Import

cloudamqp_integration_logcan be imported using the resource identifier together with CloudAMQP instance identifier. The name and identifier are CSV separated, see example below.

 $ pulumi import cloudamqp:index/integrationLog:IntegrationLog <resource_name> <id>,<instance_id>`

Package Details

Repository
https://github.com/pulumi/pulumi-cloudamqp
License
Apache-2.0
Notes
This Pulumi package is based on the cloudamqp Terraform Provider.