فهرست منبع

Adds qcompliance to the GC Test Splunk Cluster

Fred Damstra 4 سال پیش
والد
کامیت
7df87a83d8

+ 1 - 0
test/aws-us-gov/mdr-test-c2/150-splunk-cluster-master/.tfswitch.toml

@@ -0,0 +1 @@
+../../../../.tfswitch.toml

+ 1 - 0
test/aws-us-gov/mdr-test-c2/190-splunk-qcompliance-searchhead/.tfswitch.toml

@@ -0,0 +1 @@
+version = "0.13.5"

+ 43 - 0
test/aws-us-gov/mdr-test-c2/190-splunk-qcompliance-searchhead/terragrunt.hcl

@@ -0,0 +1,43 @@
+locals {
+  # If you want to use any of the variables in _this_ file, you have to load them here.
+  # However, they will all be available as inputs to the module loaded in terraform.source
+  # below.
+  environment_vars = read_terragrunt_config(find_in_parent_folders("env.hcl"))
+  partition_vars = read_terragrunt_config(find_in_parent_folders("partition.hcl"))
+  region_vars = read_terragrunt_config(find_in_parent_folders("region.hcl"))
+  account_vars = read_terragrunt_config(find_in_parent_folders("account.hcl"))
+  global_vars = read_terragrunt_config(find_in_parent_folders("globals.hcl"))
+}
+
+# Terragrunt will copy the Terraform configurations specified by the source parameter, along with any files in the
+# working directory, into a temporary folder, and execute your Terraform commands in that folder.
+terraform {
+  # Double slash is intentional and required to show root of modules
+  source = "git@github.mdr.defpoint.com:mdr-engineering/xdr-terraform-modules.git//base/splunk_servers/searchhead?ref=v1.10.7"
+}
+
+dependency "vpc" {
+  config_path = "../010-vpc-splunk"
+}
+
+# Include all settings from the root terragrunt.hcl file
+include {
+  path = find_in_parent_folders()
+}
+
+# These are the variables we have to pass in to use the module specified in the terragrunt source above
+inputs = {
+  # All of the inputs from the inherited hcl files are available automatically
+  # (via the `inputs` section of the root `terragrunt.hcl`). However, modules
+  # will be more flexible if you specify particular input values.
+  tags = {
+    Purpose = "QCompliance Searchhead"
+    Terraform = "aws/${basename(get_parent_terragrunt_dir())}/${path_relative_to_include()}/"
+  }
+  prefix = "qcompliance"
+  instance_type = local.account_vars.locals.instance_types["qcompliance"]
+  vpc_id = dependency.vpc.outputs.vpc_id
+  vpc_cidr = local.account_vars.locals.vpc_info["vpc-splunk"]["cidr"]
+  azs = dependency.vpc.outputs.azs
+  subnets = dependency.vpc.outputs.private_subnets
+}

+ 12 - 0
test/aws-us-gov/mdr-test-c2/account.hcl

@@ -56,6 +56,17 @@ locals {
       "/tmp": 4,  # minimum: 4
       "/opt/splunk": 30, # No minimum; not in base image
     },
+    "qcompliance" = {
+      "swap": 8,  # minimum: 8
+      "/": 10,    # minimum: 10
+      "/home": 4, # minimum: 4
+      "/var": 15, # minimum: 15
+      "/var/tmp": 4, # minimum: 4
+      "/var/log": 8, # minimum: 8
+      "/var/log/audit": 8, # minimum: 8
+      "/tmp": 4,  # minimum: 4
+      "/opt/splunk": 30, # No minimum; not in base image
+    },
     "heavy_forwarder" = {
       "swap": 8,  # minimum: 8
       "/": 10,    # minimum: 10
@@ -135,6 +146,7 @@ locals {
     "splunk-indexer" = "m5d.xlarge", # 16GB RAM, 150GB SSD
     "splunk-hf"      = "t3a.small", # legacy: t2.medium
     "splunk-sh"      = "t3a.small", # legacy: ? not sure
+    "qcompliance"    = "t3a.small", # legacy: ? not sure
   }
 
   # TODO: The instance types below should be moved to the instance_type map above