Skip to main content

cdk-datadog-integration

Project description

AWS Cloud Development Kit (CDK) Datadog Integration

This construct makes it easy to integrate your AWS account with Datadog. It creates nested stacks based on the official Datadog Cloudformation templates using Amazon Cloud Development Kit (CDK).

Basic Usage

  1. Install the package

    npm i --save cdk-datadog-integration
    

    Or via pypi, NuGet, or GitHub Packages.

  2. Import the stack and pass the required parameters.

    import * as cdk from "aws-cdk-lib";
    import { MonitoringInfrastructureStack } from "../lib/monitoring-infrastructure-stack";
    
    const app = new cdk.App();
    new MonitoringInfrastructureStack(app, "MonitoringInfrastructure");
    
    import * as cdk from "aws-cdk-lib";
    import * as secrets from "aws-cdk-lib/aws-secretsmanager";
    import { DatadogIntegrationStack } from "cdk-datadog-integration";
    
    export class MonitoringInfrastructureStack extends cdk.Stack {
      constructor(scope: cdk.App, id: string, props?: cdk.StackProps) {
        super(scope, id, props);
    
        const datadog = new DatadogIntegrationStack(this, "Datadog", {
          // Generate an ID here: https://app.datadoghq.com/account/settings#integrations/amazon-web-services
          externalId: "",
    
          // Create or lookup a `Secret` that contains your Datadog API Key
          // See https://docs.aws.amazon.com/cdk/api/latest/docs/aws-secretsmanager-readme.html for details on Secrets in CDK
          // Get your API key here: https://app.datadoghq.com/account/settings#api
          apiKey: secrets.Secret.fromSecretNameV2(
            this,
            "DatadogApiKey",
            "<your secret name>"
          ),
        });
      }
    }
    

Configuration

Use DatadogIntegrationConfig to set additional configuration parameters. Check out docs for more details on what's available.

Additionally, a CDK Construct is exposed, should you want to add additional customizations vs. using the out-of-the-box Stack.

CDK Version Compatibility

This package is expected to work with all recent versions of CDK v2. It has been tested with 2.1.0 so almost certainly works will all newer versions, and probably works with some older versions too, but is untested.

If you're still on CDK v1, you can use cdk-datadog-integration@1, but this version is unmaintained. Please upgrade to CDKv2.

How it Works

This module uses the CfnStack CDK Construct to import the three CloudFormation stacks referenced by the main Datadog CloudFormation template. By referencing the Datadog-provided templates, you can be confident that the integration works exactly as Datadog intends.

Author

This package is created and maintained by Ben Limmer, a freelance architect and consultant. I love helping businesses of all sizes solve their hardest technology problems. Let's connect if I can be of help!

Contributing

PRs are welcome!

Releasing

To release, merge your PR to main.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cdk-datadog-integration-2.0.3.tar.gz (47.9 kB view details)

Uploaded Source

Built Distribution

cdk_datadog_integration-2.0.3-py3-none-any.whl (46.1 kB view details)

Uploaded Python 3

File details

Details for the file cdk-datadog-integration-2.0.3.tar.gz.

File metadata

File hashes

Hashes for cdk-datadog-integration-2.0.3.tar.gz
Algorithm Hash digest
SHA256 3b1a59996648eb3a0345a1c66adf987cc355bfc9dcb0ad13edcd826ce43ffb3a
MD5 51a9d955ce2498b510e9439989083859
BLAKE2b-256 64316e1bb450fb714e10be639e55e65ecd5c374620c42ac82c0265cd227eda94

See more details on using hashes here.

File details

Details for the file cdk_datadog_integration-2.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for cdk_datadog_integration-2.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e05e7c59beaa3902cfd4eb595ae1cafd810a48573595edeef745f5dec04e0442
MD5 9e29f3ca08d1ab3cd81a0aaf33925bce
BLAKE2b-256 a440333826d3dcf29d4b2088d21ff998f1528611b7f439333158cda7703e3d10

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page