Explorar el Código

Merge pull request #457 from mdr-engineering/feature/dw_MSOCI-1623_tq_server

MSOCI-1623 Adds Threatquotient Server in test
Duane Waddle hace 3 años
padre
commit
144dfa8ad4

+ 6 - 0
prod/env.hcl

@@ -18,6 +18,12 @@ locals {
   hec_pub_ack = "moose-hec-ack.xdr.accenturefederalcyber.com"
   aws_waf_logs_hec_token = "FA38B8DD-1398-46D0-BD79-BA046C6064B0" # HEC token for posting WAF logs to the moose HEC
 
+  # Supernet(s) for the environment, see IP Address Allocation in wiki
+  supernets = [
+    "10.1.0.0/16",  # Common Services (gov and commercial) supernet
+    "10.32.0.0/12", # Prod (gov and commercial) supernet
+  ]
+
   # When there are multiples, put govcloud first, then commercial, and alternate if there are more than 2.
   # Put any standalone IPs at the end.
   cidr_map = {

+ 44 - 0
test/aws-us-gov/mdr-test-c2/280-threatquotient/terragrunt.hcl

@@ -0,0 +1,44 @@
+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.xdr.accenturefederalcyber.com:mdr-engineering/xdr-terraform-modules.git//base/threatquotient?ref=v3.1.3"
+}
+
+dependency "vpc" {
+  config_path = "../010-vpc-system-services"
+}
+
+# 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 = "Threatquotient"
+    Terraform = "aws/${basename(get_parent_terragrunt_dir())}/${path_relative_to_include()}/"
+  }
+  instance_type = local.account_vars.locals.instance_types["threatq"]
+  vpc_id = dependency.vpc.outputs.vpc_id
+  vpc_cidr = local.account_vars.locals.vpc_info["vpc-splunk"]["cidr"]
+  azs = dependency.vpc.outputs.azs
+  public_subnets = dependency.vpc.outputs.public_subnets # Phantom is on a PUBLIC subnet for direct comm
+}
+terraform_version_constraint = "= 1.0.7"
+terragrunt_version_constraint = "= 0.32.3"

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

@@ -166,6 +166,7 @@ locals {
     "splunk-indexer" = "m5d.xlarge", # 16GB RAM, 150GB SSD
     "splunk-mc"      = "t3a.small", # Legacy: t2.small, prod m4.large
     "splunk-sh"      = "t3a.small", # legacy: ? not sure
+    "threatq"        = "t3a.2xlarge", # legacy: t2.medium
     "portal"         = "t3a.medium", # legacy: t2.medium
   }
 

+ 6 - 0
test/env.hcl

@@ -18,6 +18,12 @@ locals {
   hec_pub_ack = "moose-hec-ack.xdrtest.accenturefederalcyber.com"
   aws_waf_logs_hec_token = "FA38B8DD-1398-46D0-BD79-BA046C6064B0" # HEC token for posting WAF logs to the moose HEC
 
+  # Supernet(s) for the environment, see IP Address Allocation in wiki
+  supernets = [
+    "10.1.0.0/16",  # Common Services (gov and commercial) supernet
+    "10.16.0.0/12", # Test (gov and commercial) supernet
+  ]
+
   # When there are multiples, put govcloud first, then commercial, and alternate if there are more than 2.
   # Put any standalone IPs at the end.
   cidr_map = {