Our next-gen architecture is built to help you make sense of your ever-growing data Watch a 4-min demo video!

Back to All Docs

AWS CloudWatch Terraform Module AWS CloudWatch Terraform Module

Last Updated: Aug. 14, 2023

Terraform simplifies the manner we deploy our infrastructure and allows us to maintain it as code.

Using our Terraform Modules, you can easily install and manage Coralogix integrations with AWS services as modules in your infrastructure code.

Our modules are open source and available on our GitHub and in the Terraform Registry.

Installation

This module will be installing our Cloudwatch collection lambda.

STEP 1. Add this declaration to your Terraform project. Input the following parameters.

provider "aws" {
}
module "cloudwatch_logs" {
  source = "coralogix/aws/coralogix//modules/cloudwatch-logs"

  coralogix_region   = "Europe"
  private_key        = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXX"
  application_name   = "cloudwatch"
  subsystem_name     = "logs"
  log_groups         = ["test-log-group"]
}

Notes:

STEP 2. Execute the following:

$ terraform init
$ terraform plan
$ terraform apply

STEP 3. Run terraform destroy when you no longer need these resources.

If you want to use SSM in your integration you need to deploy our SSM layer:

provider "aws" {
}

module "lambda-secretLayer" {
  source = "coralogix/aws/coralogix//modules/lambda-secretLayer"

}

output "layer_arn" {
  value = module.lambda-secretLayer.lambda_layer_version_arn
}

Copy the output (the layer arn) and past it into the layer_arn variable in your integration, make sure you also set ssm_enable = True.

Additional Resources

DocumentationCoralogix Terraform Provider
External DocumentationGitHub
Terraform Registry

Support

Need help?

Our world-class customer success team is available 24/7 to walk you through your setup and answer any questions that may come up.

Feel free to reach out to us via our in-app chat or by sending us an email at [email protected].

On this page