File tree 4 files changed +13
-4
lines changed
4 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ resource "aws_cloudformation_stack" "datadog-forwarder" {
10
10
FunctionName = " ${ local . stack_prefix } datadog-forwarder"
11
11
}
12
12
template_url = " https://datadog-cloudformation-template.s3.amazonaws.com/aws/forwarder/${ var . dd_forwarder_template_version } .yaml"
13
+ tags = merge (local. default_tags , var. tags )
13
14
14
15
lifecycle {
15
16
ignore_changes = [
@@ -21,7 +22,7 @@ resource "aws_cloudformation_stack" "datadog-forwarder" {
21
22
resource "aws_secretsmanager_secret" "datadog_api_key" {
22
23
name_prefix = " ${ local . stack_prefix } datadog-api-key"
23
24
description = " Datadog API Key"
24
- tags = local. default_tags
25
+ tags = merge ( local. default_tags , var . tags )
25
26
}
26
27
27
28
resource "aws_secretsmanager_secret_version" "datadog_api_key" {
Original file line number Diff line number Diff line change @@ -44,6 +44,8 @@ data "aws_iam_policy_document" "elb_logs" {
44
44
resource "aws_s3_bucket" "elb_logs" {
45
45
count = var. create_elb_logs_bucket ? 1 : 0
46
46
bucket = local. elb_logs_s3_bucket
47
+ tags = merge (local. default_tags , var. tags )
48
+
47
49
}
48
50
49
51
resource "aws_s3_bucket_policy" "elb_logs" {
Original file line number Diff line number Diff line change 41
41
42
42
tags = merge (local. default_tags , {
43
43
description = " This role allows the datadog AWS account to access this account for metrics collection"
44
- })
44
+ }, var . tags )
45
45
}
46
46
47
47
resource "aws_iam_policy" "datadog-core" {
48
48
count = var. enable_datadog_aws_integration ? 1 : 0
49
49
name = " datadog-core-integration"
50
50
path = " /"
51
51
description = " This IAM policy allows for core datadog integration permissions"
52
-
53
- policy = << EOF
52
+ tags = merge (local . default_tags , var . tags )
53
+ policy = << EOF
54
54
{
55
55
"Version": "2012-10-17",
56
56
"Statement": [
Original file line number Diff line number Diff line change @@ -97,3 +97,9 @@ variable "extra_policy_arns" {
97
97
type = list (string )
98
98
default = []
99
99
}
100
+
101
+ variable "tags" {
102
+ description = " A map of tags to assign to resources."
103
+ type = map (string )
104
+ default = {}
105
+ }
You can’t perform that action at this time.
0 commit comments