Skip to content

Commit

Permalink
fix iam policy
Browse files Browse the repository at this point in the history
  • Loading branch information
OmarNour14 committed Oct 19, 2022
1 parent e6ce70f commit 642987e
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ resource "datadog_integration_aws" "core" {
account_specific_namespace_rules = var.account_specific_namespace_rules
excluded_regions = var.excluded_regions
filter_tags = var.filter_tags
resource_collection_enabled = true
cspm_resource_collection_enabled = true
resource_collection_enabled = var.resource_collection_enabled
cspm_resource_collection_enabled = var.cspm_resource_collection_enabled
}

# resource "datadog_integration_aws_tag_filter" "rds-tag-filters" {
# resource "datadog_integration_aws_tag_filter" "rds-tag-filters"{
# count = var.enable_datadog_aws_integration ? 1 : 0
# account_id = var.aws_account_id
# namespace = "rds"
Expand Down Expand Up @@ -87,8 +87,6 @@ resource "aws_iam_policy" "datadog-core" {
"ec2:Describe*",
"ec2:DescribeInstanceStatus",
"ec2:DescribeInstances",
"eks:Describe*",
"eks:List*",
"ecs:Describe*",
"ecs:List*",
"elasticache:Describe*",
Expand Down Expand Up @@ -155,7 +153,7 @@ EOF
resource "aws_iam_role_policy_attachment" "cpsm-resource-collection" {
count = var.enable_datadog_aws_integration ? 1 : 0
role = aws_iam_role.datadog-integration[0].name
policy_arn = data.aws_iam_policy.securityAudit[0].arn
policy_arn = data.aws_iam_policy.securityAudit.arn
}

resource "aws_iam_role_policy_attachment" "datadog-core-attach" {
Expand Down

0 comments on commit 642987e

Please sign in to comment.