terragrunt.hcl 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. locals {
  2. # If you want to use any of the variables in _this_ file, you have to load them here.
  3. # However, they will all be available as inputs to the module loaded in terraform.source
  4. # below.
  5. # e.g. inherited variables:
  6. environment_vars = read_terragrunt_config(find_in_parent_folders("env.hcl"))
  7. partition_vars = read_terragrunt_config(find_in_parent_folders("partition.hcl"))
  8. region_vars = read_terragrunt_config(find_in_parent_folders("region.hcl"))
  9. account_vars = read_terragrunt_config(find_in_parent_folders("account.hcl"))
  10. global_vars = read_terragrunt_config(find_in_parent_folders("globals.hcl"))
  11. }
  12. # Terragrunt will copy the Terraform configurations specified by the source parameter, along with any files in the
  13. # working directory, into a temporary folder, and execute your Terraform commands in that folder.
  14. terraform {
  15. # Double slash is intentional and required to show root of modules
  16. source = "git@github.xdr.accenturefederalcyber.com:mdr-engineering/xdr-terraform-modules.git//thirdparty/terraform-aws-kinesis-firehose-splunk?ref=v1.10.8"
  17. }
  18. dependency "c2_account_standards" {
  19. config_path = local.account_vars.locals.c2_account_standards_path
  20. }
  21. # Include all settings from the root terragrunt.hcl file
  22. include {
  23. path = find_in_parent_folders()
  24. }
  25. # These are the variables we have to pass in to use the module specified in the terragrunt source above
  26. inputs = {
  27. # All of the inputs from the inherited hcl files are available automatically
  28. # (via the `inputs` section of the root `terragrunt.hcl`). However, modules
  29. # will be more flexible if you specify particular input values.
  30. tags = {
  31. Terraform = "aws/${basename(get_parent_terragrunt_dir())}/${path_relative_to_include()}/"
  32. }
  33. cloudtrail_key_arn = dependency.c2_account_standards.outputs.cloudtrail_logging_bucket.kms_key_id
  34. region = local.region_vars.locals.aws_region
  35. arn_cloudwatch_logs_to_ship = "arn:${local.partition_vars.locals.aws_partition}:logs:${local.region_vars.locals.aws_region}::log-group:/aws/lambda/portal_data_sync"
  36. name_cloudwatch_logs_to_ship = "/aws/lambda/portal_data_sync"
  37. hec_token = local.account_vars.locals.portal_data_sync_hec_token
  38. hec_url = "https://${local.environment_vars.locals.hec_pub_ack}:8088"
  39. firehose_name = "portal_data_sync_to_splunk"
  40. cloudwatch_log_retention = 14 # keep kinesis logs this long
  41. log_stream_name = "SplunkDelivery_PortalDataSync"
  42. s3_bucket_name = "kinesis-portaldatasyncs-${local.account_vars.locals.aws_account_id}-${local.region_vars.locals.aws_region}"
  43. cloudwatch_to_firehose_trust_iam_role_name = "CloudWatchToSplunkFirehoseTrust_PortalDataSync"
  44. kinesis_firehose_lambda_role_name = "KinesisFirehoseToLambaRole_PortalDataSync"
  45. lambda_function_name = "kinesis-firehose-transform-PortalDataSync"
  46. kinesis_firehose_iam_policy_name = "KinesisFirehose-Policy-PortalDataSync"
  47. kinesis_firehose_role_name = "KinesisFirehoseRole-PortalDataSync"
  48. lambda_iam_policy_name = "Kinesis-Firehose-to-Splunk-Policy-PortalDataSync"
  49. cloudwatch_to_fh_access_policy_name = "KinesisCloudWatchToFirehosePolicy_PortalDataSync"
  50. }
  51. terraform_version_constraint = "= 0.15.1"
  52. terragrunt_version_constraint = ">= 0.29, < 0.30"