AWS resource metadata collection Terraform module
Use Coralogix Terraform modules to install and manage AWS service integrations with Coralogix as modules in your infrastructure code. This guide shows you how to install our Resource Metadata Collection Lambda.
Installation
Install our Resource Metadata Collection Lambda by adding one of the following declarations to your Terraform project:
Original mode
module "resource-metadata" {
source = "coralogix/aws/coralogix//modules/resource-metadata"
coralogix_region = "Europe"
private_key = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXX"
}
High volume mode
Use high volume mode when you have: - More than 5,000 Lambda functions in your target AWS region - A need to collect metadata from multiple AWS accounts and regions
Example with StaticIAM cross-account mode:
module "resource-metadata" {
source = "coralogix/aws/coralogix//modules/resource-metadata-sqs"
coralogix_region = "EU2"
api_key = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXX"
source_regions = ["eu-west-1", "eu-west-2"]
crossaccount_mode = "StaticIAM"
crossaccount_iam_role_name = "MyCrossAccountRole"
}
Example with Config cross-account mode:
module "resource-metadata" {
source = "coralogix/aws/coralogix//modules/resource-metadata-sqs"
coralogix_region = "EU2"
api_key = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXX"
crossaccount_mode = "Config"
crossaccount_config_aggregator = "MyCrossAccountAggregator"
# When the Config aggregator is in a different account, add:
# crossaccount_config_assume_role = "arn:aws:iam::123456789012:role/ConfigCrossAccountRole"
crossaccount_iam_role_name = "MyCrossAccountRole"
}
When the AWS Config aggregator lives in a different account, set crossaccount_config_assume_role to the IAM role ARN in that account. The collector will assume this role when querying Config.
Additional resources
Find our open-source modules in GitHub and the Coralogix Terraform Registry:
| Documentation | Coralogix Terraform Provider |
| Original Mode | GitHub Terraform Registry |
| High Volume Mode | GitHub Terraform Registry |