datadog-integration
This component is responsible for provisioning Datadog AWS integrations. It depends on the datadog-configuration
component to get the Datadog API keys.
See Datadog's documentation about provisioning keys for more information.
Usage
Stack Level: Global
Here's an example snippet for how to use this component. It's suggested to apply this component to all accounts which you want to track AWS metrics with DataDog.
components:
terraform:
datadog-integration:
settings:
spacelift:
workspace_enabled: true
vars:
enabled: true
Variables
Required Variables
Optional Variables
account_specific_namespace_rules
(map(string)
) optionalAn object, (in the form {"namespace1":true/false, "namespace2":true/false} ), that enables or disables metric collection for specific AWS namespaces for this AWS account only
Default value:
{ }
Automatically add host and filter tags for these context keys
Default value:
[
"namespace",
"tenant",
"stage"
]cspm_resource_collection_enabled
(bool
) optionalEnable Datadog Cloud Security Posture Management scanning of your AWS account.
See announcement for details.Default value:
null
datadog_aws_account_id
(string
) optionalThe AWS account ID Datadog's integration servers use for all integrations
Default value:
"464622532012"
excluded_regions
(list(string)
) optionalAn array of AWS regions to exclude from metrics collection
Default value:
[ ]
An array of EC2 tags (in the form
key:value
) that defines a filter that Datadog use when collecting metrics from EC2. Wildcards, such as ? (for single characters) and * (for multiple characters) can also be usedDefault value:
[ ]
An array of tags (in the form
key:value
) to add to all hosts and metrics reporting through this integrationDefault value:
[ ]
included_regions
(list(string)
) optionalAn array of AWS regions to include in metrics collection
Default value:
[ ]
integrations
(list(string)
) optionalList of AWS permission names to apply for different integrations (e.g. 'all', 'core')
Default value:
[
"all"
]metrics_collection_enabled
(bool
) optionalWhen enabled, a metric-by-metric crawl of the CloudWatch API pulls data and sends it
to Datadog. New metrics are pulled every ten minutes, on average.Default value:
null
resource_collection_enabled
(bool
) optionalSome Datadog products leverage information about how your AWS resources
(such as S3 Buckets, RDS snapshots, and CloudFront distributions) are configured.
Whenresource_collection_enabled
istrue
, Datadog collects this information
by making read-only API calls into your AWS account.Default value:
null
Context Variables
The following variables are defined in the context.tf
file of this module and part of the terraform-null-label pattern.
context.tf
file of this module and part of the terraform-null-label pattern.Outputs
aws_account_id
AWS Account ID of the IAM Role for the Datadog integration
aws_role_name
Name of the AWS IAM Role for the Datadog integration
datadog_external_id
Datadog integration external ID
Dependencies
Requirements
terraform
, version:>= 1.0.0
aws
, version:>= 4.9.0
datadog
, version:>= 3.3.0
Providers
aws
, version:>= 4.9.0
Modules
Name | Version | Source | Description |
---|---|---|---|
datadog_configuration | tags/v1.535.2 | github.com/cloudposse-terraform-components/aws-datadog-credentials//src/modules/datadog_keys | n/a |
datadog_integration | 2.0.0 | cloudposse/datadog-integration/aws | n/a |
iam_roles | latest | ../account-map/modules/iam-roles | n/a |
store_write | 0.13.0 | cloudposse/ssm-parameter-store/aws | n/a |
this | 0.25.0 | cloudposse/label/null | n/a |
Resources
The following resources are used by this module:
Data Sources
The following data sources are used by this module:
aws_regions.all
(data source)
References
- Datadog's documentation about provisioning keys
- cloudposse/terraform-aws-components - Cloud Posse's upstream component