» datadog_integration_aws
Provides a Datadog - Amazon Web Services integration resource. This can be used to create and manage Datadog - Amazon Web Services integration.
Update operations are currently not supported with datadog API so any change forces a new resource.
» Example Usage
# Create a new Datadog - Amazon Web Services integration
resource "datadog_integration_aws" "sandbox" {
account_id = "1234567890"
role_name = "DatadogAWSIntegrationRole"
filter_tags = ["key:value"]
host_tags = ["key:value", "key2:value2"]
account_specific_namespace_rules = {
"auto_scaling" = false
"opsworks" = false
}
}
» Argument Reference
The following arguments are supported:
-
account_id
- (Required) Your AWS Account ID without dashes. -
role_name
- (Required) Your Datadog role delegation name. -
filter_tags
- (Optional) Array of EC2 tags (in the formkey:value
) defines a filter that Datadog use when collecting metrics from EC2. Wildcards, such as?
(for single characters) and*
(for multiple characters) can also be used.
Only hosts that match one of the defined tags will be imported into Datadog. The rest will be ignored. Host matching a given tag can also be excluded by adding !
before the tag.
e.x. env:production,instance-type:c1.*,!region:us-east-1
-
host_tags
- (Optinal) Array of tags (in the form key:value) to add to all hosts and metrics reporting through this integration. -
account_specific_namespace_rules
- (Optinal) Enables or disables metric collection for specific AWS namespaces for this AWS account only. A list of namespaces can be found at the available namespace rules API endpoint.
» See also
» Attributes Reference
The following attributes are exported:
-
external_id
- AWS External ID
» Import
Amazon Web Services integrations can be imported using their account ID
and role name
separated with a colon (:
), while the external_id
should be passed by setting an environment variable called EXTERNAL_ID
$ EXTERNAL_ID=${external_id} terraform import datadog_integration_aws.test ${account_id}:${role_name}