File tree Expand file tree Collapse file tree 4 files changed +10
-10
lines changed
Expand file tree Collapse file tree 4 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ locals {
2929 public_domain = local. is_sandbox_env ? var. public_sandbox_domain : var. public_domain
3030
3131 # Logic / vars for reporting
32- reporting_bucket_arn = local. is_dev_env ? data. aws_s3_bucket . source-data-bucket [0 ]. arn : data . aws_s3_bucket . source-data-bucket . arn
32+ reporting_bucket_arn = local. is_dev_env ? data. aws_s3_bucket . source-data-bucket [0 ]. arn : null
3333
3434 # Logic / vars for splunk environment
3535 splunk_environment = local. is_sandbox_env ? " ${ var . account_name } sandbox" : var. account_name
Original file line number Diff line number Diff line change @@ -27,12 +27,12 @@ data "aws_iam_policy_document" "firehose" {
2727 " s3:PutObject" ,
2828 ]
2929
30- resources = [
30+ resources = compact ( [
3131 aws_s3_bucket . firehose . arn ,
3232 " ${ aws_s3_bucket . firehose . arn } /*" ,
3333 var . reporting_bucket_arn ,
3434 " ${ var . reporting_bucket_arn } /*" ,
35- ]
35+ ])
3636 effect = " Allow"
3737 }
3838
@@ -72,12 +72,12 @@ data "aws_iam_policy_document" "firehose" {
7272 actions = [
7373 " logs:PutLogEvents" ,
7474 ]
75- resources = [
75+ resources = compact ( [
7676 aws_cloudwatch_log_group . firehose . arn ,
7777 aws_cloudwatch_log_stream . firehose . arn ,
7878 local . iam_firehose . cloudwatch_reporting_log_group_arn ,
7979 local . iam_firehose . cloudwatch_reporting_log_stream_arn ,
80- ]
80+ ])
8181 effect = " Allow"
8282 }
8383}
Original file line number Diff line number Diff line change @@ -20,10 +20,10 @@ data "aws_iam_policy_document" "firehose_subscription" {
2020 " firehose:*" ,
2121 ]
2222 effect = " Allow"
23- resources = [
23+ resources = compact ( [
2424 aws_kinesis_firehose_delivery_stream . firehose . arn ,
2525 local . iam_subscriptions . firehose_reporting_stream_arn ,
26- ]
26+ ])
2727 }
2828 statement {
2929 actions = [
Original file line number Diff line number Diff line change @@ -32,12 +32,12 @@ locals {
3232 }
3333
3434 iam_firehose = {
35- cloudwatch_reporting_log_group_arn = var.reporting_infra_toggle ? aws_cloudwatch_log_group.firehose_reporting[0 ].arn : aws_cloudwatch_log_group.firehose_reporting.arn
36- cloudwatch_reporting_log_stream_arn = var.reporting_infra_toggle ? aws_cloudwatch_log_stream.firehose_reporting[0 ].arn : aws_cloudwatch_log_stream.firehose_reporting.arn
35+ cloudwatch_reporting_log_group_arn = var.reporting_infra_toggle ? aws_cloudwatch_log_group.firehose_reporting[0 ].arn : null
36+ cloudwatch_reporting_log_stream_arn = var.reporting_infra_toggle ? aws_cloudwatch_log_stream.firehose_reporting[0 ].arn : null
3737 }
3838
3939 iam_subscriptions = {
40- firehose_reporting_stream_arn = var.reporting_infra_toggle ? aws_kinesis_firehose_delivery_stream.reporting_stream[0 ].arn : aws_kinesis_firehose_delivery_stream.reporting_stream.arn
40+ firehose_reporting_stream_arn = var.reporting_infra_toggle ? aws_kinesis_firehose_delivery_stream.reporting_stream[0 ].arn : null
4141 }
4242
4343}
You can’t perform that action at this time.
0 commit comments