Skip to content

Commit

Permalink
feat: 7413: upgrade Module DataDog v2.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Seun Bolanle committed Oct 22, 2021
1 parent 1a2379f commit 28cd263
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
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 = []
}

0 comments on commit 28cd263

Please sign in to comment.