Skip to content

Commit

Permalink
replace null with empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Nov 16, 2021
1 parent 3f623d8 commit dfdb34b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cloudtrail/sns.tf
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ data "aws_iam_policy_document" "cloudtrail_topic" {
variable = "AWS:SourceOwner"
values = [local.account_id]
}
resources = [var.enable_sns ? aws_sns_topic.cloudtrail[0].arn : null]
resources = [var.enable_sns ? aws_sns_topic.cloudtrail[0].arn : ""]
}
statement {
sid = "CloudTrailSNSPolicy"
Expand All @@ -50,6 +50,6 @@ data "aws_iam_policy_document" "cloudtrail_topic" {
identifiers = ["cloudtrail.amazonaws.com"]
}
actions = ["sns:Publish"]
resources = [var.enable_sns ? aws_sns_topic.cloudtrail[0].arn : null]
resources = [var.enable_sns ? aws_sns_topic.cloudtrail[0].arn : ""]
}
}
8 changes: 4 additions & 4 deletions cloudtrail/sqs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ data "aws_iam_policy_document" "cloudtrail_deadletter" {
sid = "AllowSNSSendMessage"
effect = "Allow"
actions = ["SQS:SendMessage"]
resources = [var.enable_sqs ? aws_sqs_queue.cloudtrail_deadletter[0].arn : null]
resources = [var.enable_sqs ? aws_sqs_queue.cloudtrail_deadletter[0].arn : ""]
principals {
type = "AWS"
identifiers = ["*"]
}
condition {
test = "ArnEquals"
variable = "aws:SourceArn"
values = [var.enable_sns ? aws_sns_topic.cloudtrail[0].arn : null]
values = [var.enable_sns ? aws_sns_topic.cloudtrail[0].arn : ""]
}
}
}
Expand Down Expand Up @@ -80,15 +80,15 @@ data "aws_iam_policy_document" "cloudtrail_sqs" {
sid = "AllowSNSSendMessage"
effect = "Allow"
actions = ["SQS:SendMessage"]
resources = [var.enable_sqs ? aws_sqs_queue.cloudtrail[0].arn : null]
resources = [var.enable_sqs ? aws_sqs_queue.cloudtrail[0].arn : ""]
principals {
type = "AWS"
identifiers = ["*"]
}
condition {
test = "ArnEquals"
variable = "aws:SourceArn"
values = [var.enable_sns ? aws_sns_topic.cloudtrail[0].arn : null]
values = [var.enable_sns ? aws_sns_topic.cloudtrail[0].arn : ""]
}
}
}
Expand Down

0 comments on commit dfdb34b

Please sign in to comment.