Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ resource "aws_iam_policy" "datadog-core" {
"apigateway:GET",
"autoscaling:Describe*",
"budgets:ViewBudget",
"cloudformation:DetectStack*",
"cloudfront:GetDistributionConfig",
"cloudfront:ListDistributions",
"cloudtrail:DescribeTrails",
Expand All @@ -76,6 +77,7 @@ resource "aws_iam_policy" "datadog-core" {
"ec2:Describe*",
"ec2:DescribeInstanceStatus",
"ec2:DescribeInstances",
"ecs:Describe*",
"ecs:List*",
"elasticache:Describe*",
"elasticache:List*",
Expand All @@ -88,6 +90,7 @@ resource "aws_iam_policy" "datadog-core" {
"es:ListTags",
"es:ListDomainNames",
"es:DescribeElasticsearchDomains",
"fsx:DescribeFileSystems",
"health:DescribeEvents",
"health:DescribeEventDetails",
"health:DescribeAffectedEntities",
Expand All @@ -104,6 +107,7 @@ resource "aws_iam_policy" "datadog-core" {
"logs:PutSubscriptionFilter",
"logs:DeleteSubscriptionFilter",
"logs:DescribeSubscriptionFilters",
"organizations:DescribeOrganization",
"rds:Describe*",
"rds:List*",
"redshift:DescribeClusters",
Expand Down Expand Up @@ -141,3 +145,9 @@ resource "aws_iam_role_policy_attachment" "datadog-core-attach" {
role = aws_iam_role.datadog-integration[0].name
policy_arn = aws_iam_policy.datadog-core[0].arn
}

resource "aws_iam_role_policy_attachment" "datadog-core-attach-extras" {
for_each = toset(var.extra_policy_arns)
role = aws_iam_role.datadog-integration[0].name
policy_arn = each.value
}
10 changes: 8 additions & 2 deletions vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ variable "env" {
}
variable "account_specific_namespace_rules" {
description = "account_specific_namespace_rules argument for datadog_integration_aws resource"
type = map
type = map(any)
default = {}
}
variable "elb_logs_bucket_prefix" {
Expand All @@ -66,7 +66,7 @@ variable "log_exclude_at_match" {
variable "dd_forwarder_template_version" {
description = "Sets Datadog Forwarder version to use"
type = string
default = "3.17.0"
default = "3.27.0"
}

variable "dd_forwarder_dd_site" {
Expand All @@ -86,3 +86,9 @@ variable "filter_tags" {
type = list(string)
default = []
}

variable "extra_policy_arns" {
description = "Extra policy arns to attach to the datadog-integration-role"
type = list(string)
default = []
}
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
terraform {
required_version = ">= 0.13, < 0.14"
required_version = ">= 0.13, < 1.1.0"

required_providers {
datadog = {
Expand Down