From 1a2379f7607693aa79e5bba0cf2a4660e750c746 Mon Sep 17 00:00:00 2001 From: Seun Bolanle Date: Fri, 22 Oct 2021 13:47:56 +0100 Subject: [PATCH 1/2] feat: 7413: terraform required version change to 1.1.0 --- versions.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions.tf b/versions.tf index f361243..fb4b002 100644 --- a/versions.tf +++ b/versions.tf @@ -1,5 +1,5 @@ terraform { - required_version = ">= 0.13, < 0.14" + required_version = ">= 0.13, < 1.1.0" required_providers { datadog = { From 28cd26344af18cf7e30ca996e6ac9fb0ac7ce8f6 Mon Sep 17 00:00:00 2001 From: Seun Bolanle Date: Fri, 22 Oct 2021 21:08:42 +0100 Subject: [PATCH 2/2] feat: 7413: upgrade Module DataDog v2.5.0 --- main.tf | 10 ++++++++++ vars.tf | 10 ++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/main.tf b/main.tf index 7e82745..9a9ff9d 100644 --- a/main.tf +++ b/main.tf @@ -59,6 +59,7 @@ resource "aws_iam_policy" "datadog-core" { "apigateway:GET", "autoscaling:Describe*", "budgets:ViewBudget", + "cloudformation:DetectStack*", "cloudfront:GetDistributionConfig", "cloudfront:ListDistributions", "cloudtrail:DescribeTrails", @@ -76,6 +77,7 @@ resource "aws_iam_policy" "datadog-core" { "ec2:Describe*", "ec2:DescribeInstanceStatus", "ec2:DescribeInstances", + "ecs:Describe*", "ecs:List*", "elasticache:Describe*", "elasticache:List*", @@ -88,6 +90,7 @@ resource "aws_iam_policy" "datadog-core" { "es:ListTags", "es:ListDomainNames", "es:DescribeElasticsearchDomains", + "fsx:DescribeFileSystems", "health:DescribeEvents", "health:DescribeEventDetails", "health:DescribeAffectedEntities", @@ -104,6 +107,7 @@ resource "aws_iam_policy" "datadog-core" { "logs:PutSubscriptionFilter", "logs:DeleteSubscriptionFilter", "logs:DescribeSubscriptionFilters", + "organizations:DescribeOrganization", "rds:Describe*", "rds:List*", "redshift:DescribeClusters", @@ -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 +} diff --git a/vars.tf b/vars.tf index cf41362..2490816 100644 --- a/vars.tf +++ b/vars.tf @@ -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" { @@ -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" { @@ -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 = [] +}