Skip to content

Commit

Permalink
add splunk_name for configs
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Nov 24, 2021
1 parent 3362c30 commit b31c37e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cloudtrail/generate_splunk.cloudtrail.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ resource "null_resource" "splunk_cloudtrail" {
}
provisioner "local-exec" {
working_dir = "setup"
command = "echo '${data.template_file.splunk_cloudtrail.rendered}' > inputs.cloudtrail.${local.account_id}.${local.region}.conf"
command = "echo '${data.template_file.splunk_cloudtrail.rendered}' > inputs.${local.splunk_name}.${local.account_id}.${local.region}.conf"
}
}
2 changes: 2 additions & 0 deletions cloudtrail/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ locals {

role_name = format("%v%v", local._prefixes["role"], local.name)
policy_name = format("%v%v", local._prefixes["policy"], local.name)

splunk_name = var.enable_organization ? "org-cloudtrail" : "cloudtrail"
}

data "aws_kms_key" "incoming_key" {
Expand Down

0 comments on commit b31c37e

Please sign in to comment.