Browse Source

Fixes issues during the moose test migration

* Legacy splunk subnet was completely wrong
* Disabled legacy DNS for the cm
* Added the Frozen Bucket
Fred Damstra 4 years ago
parent
commit
b108f09407

+ 1 - 0
test/aws-us-gov/mdr-test-c2/140-splunk-frozen-bucket/.tfswitch.toml

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

+ 33 - 0
test/aws-us-gov/mdr-test-c2/140-splunk-frozen-bucket/terragrunt.hcl

@@ -0,0 +1,33 @@
+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/frozen_s3_bucket?ref=v1.10.1"
+}
+
+# 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 = "Splunk Frozen Data"
+    Terraform = "aws/${basename(get_parent_terragrunt_dir())}/${path_relative_to_include()}/"
+  }
+}

+ 1 - 1
test/aws-us-gov/mdr-test-c2/150-splunk-cluster-master/terragrunt.hcl

@@ -13,7 +13,7 @@ locals {
 # 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/cluster_master?ref=v1.0.0"
+  source = "git@github.mdr.defpoint.com:mdr-engineering/xdr-terraform-modules.git//base/splunk_servers/cluster_master?ref=v1.10.1"
 }
 
 dependency "vpc" {

+ 1 - 1
test/aws-us-gov/mdr-test-c2/160-splunk-indexer-cluster/terragrunt.hcl

@@ -13,7 +13,7 @@ locals {
 # 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/indexer_cluster?ref=v1.0.0"
+  source = "git@github.mdr.defpoint.com:mdr-engineering/xdr-terraform-modules.git//base/splunk_servers/indexer_cluster?ref=v1.10.1"
 }
 
 dependency "vpc" {

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

@@ -19,7 +19,7 @@ locals {
     "99.56.213.129/32", # Fred Damstra's Home IP - For testing
   ]
   splunk_legacy_cidr = [ # Allow splunk ports to/from here, too
-    "10.80.100.0/22",
+    "10.96.0.0/16",
   ]
   splunk_asg_sizes = [ 1, 1, 1 ] # How many?
   splunk_volume_sizes = {

+ 1 - 1
test/env.hcl

@@ -108,7 +108,7 @@ locals {
   # 2) Reapply the legacy-mdr-*/026-legacy-dns-entries module.
   # 3) Create a new entry in the module with which you're creating the new instance.
   legacy_private_dns = {
-    "moose-splunk-cm" = "10.96.101.87",
+    #"moose-splunk-cm" = "10.96.101.87",
     #"moose-splunk-hf" = "10.96.101.75",
     #"moose-splunk-sh" = "10.96.101.154", # needed for xdr-inventory
     #"clu" = "10.96.101.122",