Module library

Datadog Forwarders

Terraform module to create resources on AWS to forward logs/metrics to Datadog

Version
Submodules
log_forwarderrds_enhanced_monitoring_forwardervpc_flow_log_forwarder

Inputs

40 / 146
kms_aliasrequiredstring

Alias of KMS key used to encrypt the Datadog API keys - must start with `alias/`

agent_vpce_policyoptionalany

Policy to attach to the agent endpoint that controls access to the service. Defaults to full access

Defaultnull
agent_vpce_security_group_idsoptionallist(string)

IDs of security groups to attach to agent endpoint

Default[]
agent_vpce_subnet_idsoptionallist(string)

IDs of subnets to associate with agent endpoint

Default[]
agent_vpce_tagsoptionalmap(string)

A map of tags to apply to the Datadog agent endpoint

Default{}
api_vpce_policyoptionalany

Policy to attach to the API endpoint that controls access to the service. Defaults to full access

Defaultnull
api_vpce_security_group_idsoptionallist(string)

IDs of security groups to attach to API endpoint

Default[]
api_vpce_subnet_idsoptionallist(string)

IDs of subnets to associate with API endpoint

Default[]
api_vpce_tagsoptionalmap(string)

A map of tags to apply to the API endpoint

Default{}
bucket_attach_deny_insecure_transport_policyoptionalbool

Controls if S3 bucket should have deny non-SSL transport policy attacheds

Defaulttrue
bucket_blocked_encryption_typesoptionallist(string)

List of encryption types to block on the bucket (e.g. `["SSE-C"]`). Set to `[]` to block none. Defaults to blocking SSE-C, matching AWS's own default enforcement direction for new buckets, so the attribute doesn't drift against the provider's returned state on every plan

Default[…]
bucket_encryption_settingsoptionalmap(string)

S3 bucket server side encryption settings

Default{…}
bucket_nameoptionalstring

Lambda artifact S3 bucket name

Default""
create_agent_vpceoptionalbool

Controls whether an agent endpoint should be created

Defaultfalse
create_api_vpceoptionalbool

Controls whether a API endpoint should be created

Defaultfalse
create_bucketoptionalbool

Controls whether an S3 artifact bucket should be created. this is used for the zip archive as well as caching tags

Defaulttrue
create_log_forwarderoptionalbool

Controls whether log forwarder resources should be created

Defaulttrue
create_log_forwarder_roleoptionalbool

Controls whether an IAM role is created for the log forwarder

Defaulttrue
create_log_forwarder_role_policyoptionalbool

Controls whether an IAM role policy is created for the log forwarder

Defaulttrue
create_log_forwarder_vpceoptionalbool

Controls whether a log forwarder endpoint should be created

Defaultfalse
create_metrics_vpceoptionalbool

Controls whether a metrics VPC endpoint should be created

Defaultfalse
create_processes_vpceoptionalbool

Controls whether a processes endpoint should be created

Defaultfalse
create_rds_em_forwarderoptionalbool

Controls whether RDS enhanced monitoring forwarder resources should be created

Defaulttrue
create_rds_em_forwarder_roleoptionalbool

Controls whether an IAM role is created for the RDS enhanced monitoring forwarder

Defaulttrue
create_rds_em_forwarder_role_policyoptionalbool

Controls whether an IAM role policy is created for the RDS enhanced monitoring forwarder

Defaulttrue
create_traces_vpceoptionalbool

Controls whether a traces endpoint should be created

Defaultfalse
create_vpc_fl_forwarderoptionalbool

Controls whether VPC flow log forwarder resources should be created

Defaulttrue
create_vpc_fl_forwarder_roleoptionalbool

Controls whether an IAM role is created for the VPC flow log forwarder

Defaulttrue
create_vpc_fl_forwarder_role_policyoptionalbool

Controls whether an IAM role policy is created for the VPC flow log forwarder

Defaulttrue
dd_api_keyoptionalstring

The Datadog API key, which can be found from the APIs page (/account/settings#api). It will be stored in AWS Secrets Manager securely. If DdApiKeySecretArn is also set, this value will not be used. This value must still be set, however

Default""
dd_api_key_secret_arnoptionalstring

The ARN of the Secrets Manager secret storing the Datadog API key, if you already have it stored in Secrets Manager. You still need to set a dummy value for `dd_api_key` to satisfy the requirement, though that value won't be used

Default""
dd_app_keyoptionalstring

The Datadog application key associated with the user account that created it, which can be found from the APIs page

Default""
dd_siteoptionalstring

Define your Datadog Site to send data to. For the Datadog EU site, set to datadoghq.eu

Defaultdatadoghq.com
log_forwarder_architecturesoptionallist(string)

Instruction set architecture for your Lambda function. Valid values are `["x86_64"]` and `["arm64"]`. Default is `["arm64"]`

Default[…]
log_forwarder_bucket_prefixoptionalstring

S3 object key prefix to prepend to zip archive name

Default""
log_forwarder_bucket_tagsoptionalmap(any)

A map of tags to apply to the log forwarder bucket

Default{}
log_forwarder_environment_variablesoptionalmap(string)

A map of environment variables for the log forwarder lambda function

Default{}
log_forwarder_kms_key_arnoptionalstring

KMS key that is used to encrypt environment variables. If this configuration is not provided when environment variables are in use, AWS Lambda uses a default service key

Defaultnull
log_forwarder_lambda_tagsoptionalmap(string)

A map of tags to apply to the log forwarder lambda function

Default{}
log_forwarder_layersoptionallist(string)

List of Lambda Layer Version ARNs (maximum of 5) to attach to the log forwarder lambda

Default[]

1 of 146 must be supplied; the rest have defaults. Showing 40, so the site stays a static download — the remaining 106 are in the source.

Outputs

40 / 82
agent_endpoint_arn

ARN of the agent VPC endpoint

agent_endpoint_dns_entry

DNS entries of the agent VPC endpoint

agent_endpoint_id

ID of the agent VPC endpoint

agent_endpoint_network_interface_ids

One or more network interfaces for the agent VPC endpoint

agent_endpoint_owner_id

The ID of the AWS account that owns the agent VPC endpoint

agent_endpoint_state

The state of the agent VPC endpoint

api_endpoint_arn

ARN of the API VPC endpoint

api_endpoint_dns_entry

DNS entries of the API VPC endpoint

api_endpoint_id

ID of the API VPC endpoint

api_endpoint_network_interface_ids

One or more network interfaces for API api VPC endpoint

api_endpoint_owner_id

The ID of the AWS account that owns the API VPC endpoint

api_endpoint_state

The state of the API VPC endpoint

log_forwarder_cloudwatch_log_group_arn

The ARN of the log forwarder lambda function CloudWatch log group

log_forwarder_endpoint_arn

ARN of the log forwarder VPC endpoint

log_forwarder_endpoint_dns_entry

DNS entries of the log forwarder VPC endpoint

log_forwarder_endpoint_id

ID of the log forwarder VPC endpoint

log_forwarder_endpoint_network_interface_ids

One or more network interfaces for the log forwarder VPC endpoint

log_forwarder_endpoint_owner_id

The ID of the AWS account that owns the log forwarder VPC endpoint

log_forwarder_endpoint_state

The state of the log forwarder VPC endpoint

log_forwarder_lambda_arn

The ARN of the log forwarder lambda function

log_forwarder_lambda_kms_key_arn

(Optional) The ARN for the KMS encryption key for the log forwarder lambda function

log_forwarder_lambda_qualified_arn

The ARN of the log forwarder lambda function (if versioning is enabled via publish = true)

log_forwarder_lambda_source_code_hash

Base64-encoded representation of raw SHA-256 sum of the log forwarder zip file, provided either via filename or s3_* parameters

log_forwarder_lambda_version

Latest published version of the log forwarder lambda function

log_forwarder_role_arn

The log forwarder lambda role arn

log_forwarder_role_id

The log forwarder lambda role id

log_forwarder_role_name

The log forwarder lambda role name

log_forwarder_role_policy_arn

The ARN of the log forwarder lambda role policy

log_forwarder_role_policy_id

The ID of the log forwarder lambda role policy

log_forwarder_role_policy_name

The name of the log forwarder lambda role policy

log_forwarder_role_unique_id

The stable and unique string identifying the log forwarder lambda role

log_forwarder_s3_bucket_arn

The ARN of the log forwarder bucket. Will be of format arn:aws:s3:::bucketname

log_forwarder_s3_bucket_domain_name

The log forwarder bucket domain name. Will be of format bucketname.s3.amazonaws.com

log_forwarder_s3_bucket_id

The name of the log forwarder bucket

log_forwarder_s3_bucket_regional_domain_name

The log forwarder bucket region-specific domain name. The bucket domain name including the region name

log_forwarder_s3_object_etag

The ETag generated for the log forwarder lambda zip object (an MD5 sum of the object content)

log_forwarder_s3_object_id

The `key` of the log forwarder lambda zip archive

log_forwarder_s3_object_version

A unique version ID value for the log forwarder lambda zip object, if bucket versioning is enabled

metrics_endpoint_arn

ARN of the metrics VPC endpoint

metrics_endpoint_dns_entry

DNS entries of the metrics VPC endpoint

What the agent wires into the next module. An edge on the architecture diagram is one of these consumed by something else. Showing 40 of 82 — the rest are in the source.