Skip to content

Commit

Permalink
fix changes for cloudtrail,config
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Jul 15, 2022
1 parent 6aca890 commit 5c2a595
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,3 +172,6 @@
- config
- configrules
- description

* 1.16.1 -- 2022-07-15
- fix updates to cloudtrail, config
4 changes: 2 additions & 2 deletions cloudtrail/generate_splunk.cloudtrail.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ data "template_file" "splunk_cloudtrail" {
# }

resource "null_resource" "splunk_cloudtrail" {
count = var.enable_sqs ? 1 : 0
triggers = {
filename = format("inputs.%v.%v-%v.%v.conf", local.splunk_name, local.account_id, local.account_alias, local.region)
directory = format("%v/setup", path.root)
}
count = var.enable_sqs ? 1 : 0

provisioner "local-exec" {
command = "test -d ${self.triggers.directory} || mkdir ${self.triggers.directory}"
Expand All @@ -41,5 +41,5 @@ resource "local_file" "splunk_cloudtrail" {

content = data.template_file.splunk_cloudtrail.rendered
file_permission = "0644"
filename = format("%v/%v", null_resource.splunk_cloudtrail.triggers.directory, null_resource.splunk_cloudtrail.triggers.filename)
filename = var.enable_sqs ? format("%v/%v", null_resource.splunk_cloudtrail[0].triggers.directory, null_resource.splunk_cloudtrail[0].triggers.filename) : null
}
2 changes: 1 addition & 1 deletion common/version.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
locals {
_module_version = "1.16.0"
_module_version = "1.16.1"
}
4 changes: 2 additions & 2 deletions config/generate_splunk.config.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ data "template_file" "splunk_config" {
account_id = local.account_id
account_alias = local.account_alias
# entry_uuid = random_uuid.splunk_config.result
region = local.config_region
region = local.region
queue_url = aws_sqs_queue.config.id
}
}
Expand All @@ -24,7 +24,7 @@ data "template_file" "splunk_config" {
# }
# provisioner "local-exec" {
# working_dir = "setup"
# command = "echo '${data.template_file.splunk_config.rendered}' > inputs.config.${local.account_id}.${local.config_region}.conf"
# command = "echo '${data.template_file.splunk_config.rendered}' > inputs.config.${local.account_id}.${local.region}.conf"
# }
# }

Expand Down
4 changes: 2 additions & 2 deletions config/generate_splunk.config_rules.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ data "template_file" "splunk_configrules" {
account_id = local.account_id
account_alias = local.account_alias
# entry_uuid = random_uuid.splunk_configrules.result
region = local.config_region
region = local.region
}
}

Expand All @@ -23,7 +23,7 @@ data "template_file" "splunk_configrules" {
# }
# provisioner "local-exec" {
# working_dir = "setup"
# command = "echo '${data.template_file.splunk_configrules.rendered}' > aws_config_rules_tasks.${local.account_id}.${local.config_region}.conf"
# command = "echo '${data.template_file.splunk_configrules.rendered}' > aws_config_rules_tasks.${local.account_id}.${local.region}.conf"
# }
# }

Expand Down

0 comments on commit 5c2a595

Please sign in to comment.