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
3 changes: 2 additions & 1 deletion logs_monitoring.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ resource "aws_cloudformation_stack" "datadog-forwarder" {
FunctionName = "${local.stack_prefix}datadog-forwarder"
}
template_url = "https://datadog-cloudformation-template.s3.amazonaws.com/aws/forwarder/${var.dd_forwarder_template_version}.yaml"
tags = merge(local.default_tags, var.tags)

lifecycle {
ignore_changes = [
Expand All @@ -21,7 +22,7 @@ resource "aws_cloudformation_stack" "datadog-forwarder" {
resource "aws_secretsmanager_secret" "datadog_api_key" {
name_prefix = "${local.stack_prefix}datadog-api-key"
description = "Datadog API Key"
tags = local.default_tags
tags = merge(local.default_tags, var.tags)
}

resource "aws_secretsmanager_secret_version" "datadog_api_key" {
Expand Down
2 changes: 2 additions & 0 deletions logs_monitoring_elb.tf
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ data "aws_iam_policy_document" "elb_logs" {
resource "aws_s3_bucket" "elb_logs" {
count = var.create_elb_logs_bucket ? 1 : 0
bucket = local.elb_logs_s3_bucket
tags = merge(local.default_tags, var.tags)

}

resource "aws_s3_bucket_policy" "elb_logs" {
Expand Down
6 changes: 3 additions & 3 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@ EOF

tags = merge(local.default_tags, {
description = "This role allows the datadog AWS account to access this account for metrics collection"
})
}, var.tags)
}

resource "aws_iam_policy" "datadog-core" {
count = var.enable_datadog_aws_integration ? 1 : 0
name = "datadog-core-integration"
path = "/"
description = "This IAM policy allows for core datadog integration permissions"

policy = <<EOF
tags = merge(local.default_tags, var.tags)
policy = <<EOF
{
"Version": "2012-10-17",
"Statement": [
Expand Down
6 changes: 6 additions & 0 deletions vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,9 @@ variable "extra_policy_arns" {
type = list(string)
default = []
}

variable "tags" {
description = "A map of tags to assign to resources."
type = map(string)
default = {}
}
Loading