Skip to content

Latest commit

 

History

History
60 lines (49 loc) · 4.34 KB

File metadata and controls

60 lines (49 loc) · 4.34 KB

Terraform AWS Datadog Log Forwarder Lambda Module

This Terraform module deploys the Datadog Log Forwarder Lambda function as a Cloudformation stack. This is this recommended way by Datadog.

Inputs

Name Description Type Default Required
datadog_api_key Pass an existing Datadog API key to write to the SecretsManager Secret. string null no
datadog_site Datadog site to use. string "datadoghq.eu" no
lambda_function_name The name of the Lambda function. string null no
lambda_log_retention_days The number of days to retain log events for the Lambda in Cloudwatch. number 90 no
lambda_memory_size Amount of memory to allocate to the Lambda function. number 1024 no
lambda_reserved_concurrency The number of concurrent executions reserved for the Lambda. number null no
lambda_timeout The amount of time the Lambda function has to run in seconds. number 120 no
prefix Prefix to use for resources in this module. string n/a yes
s3_bucket_name The name of the S3 forwarder bucket to create. string null no
s3_mfa MFA device ARN including a TOTP token to enable MFA delete for the forwarder bucket. string null no
s3_mfa_delete Enable MFA Delete for the forwarder bucket. string "Disabled" no
s3_noncurrent_version_expiration Specifies when non-current object versions expire in the forwarder bucket. number 30 no
s3_versioning Enable S3 Versioning for the forwarder bucket. string "Enabled" no
stack_additional_parameters Additional parameters to pass to the CloudFormation template. map(string) {} no
stack_capabilities CloudFormation capabilities required to create the stack. list(string)
[
"CAPABILITY_IAM",
"CAPABILITY_NAMED_IAM",
"CAPABILITY_AUTO_EXPAND"
]
no
stack_template_url URL of the CloudFormation template to use to create the stack. string "https://datadog-cloudformation-template.s3.amazonaws.com/aws/forwarder/latest.yaml" no
tags n/a map(string) {} no

Outputs

Name Description
secretsmanager_secret_arn n/a
stack_outputs n/a

Providers

Name Version
aws >= 4.50

Resources

  • resource.aws_cloudformation_stack.main (modules/log_forwarder/main.tf#21)
  • resource.aws_s3_bucket_lifecycle_configuration.main (modules/log_forwarder/main.tf#57)
  • resource.aws_s3_bucket_versioning.main (modules/log_forwarder/main.tf#45)
  • resource.aws_secretsmanager_secret.main (modules/log_forwarder/main.tf#7)
  • resource.aws_secretsmanager_secret_version.main (modules/log_forwarder/main.tf#14)

Examples

Full

module "datadog_log_forwarder" {
  source = "../../"

  prefix          = "production-core"
  datadog_api_key = "1234567890abcdef"
}