Răsfoiți Sursa

Merge pull request #408 from mdr-engineering/feature/ftd_MSOCI-1274_VMRay_Modernization

Updates mdr-test-malware and reinstates vmray
Frederick Damstra 4 ani în urmă
părinte
comite
9c5c3d55bd

+ 0 - 2
common/aws-us-gov/partition.hcl

@@ -64,8 +64,6 @@ locals {
     "common" = concat(local.account_map["prod"], local.account_map["common"], local.account_map["test"]),
   }
 
-  aws_marketplace_ubuntu_owner_id = "874634375141"
-
   partition_tags = {
     aws_partition = local.aws_partition
   }

+ 0 - 2
common/aws/partition.hcl

@@ -64,8 +64,6 @@ locals {
     "common" = concat(local.account_map["prod"], local.account_map["common"], local.account_map["test"]),
   }
 
-  aws_marketplace_ubuntu_owner_id = "679593333241"
-
   partition_tags = {
     aws_partition = local.aws_partition
   }

+ 1 - 1
test/aws-us-gov/mdr-test-malware/005-iam/terragrunt.hcl

@@ -18,7 +18,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.xdr.accenturefederalcyber.com:mdr-engineering/xdr-terraform-modules.git//base/iam?ref=v0.9.4"
+  source = "git@github.xdr.accenturefederalcyber.com:mdr-engineering/xdr-terraform-modules.git//base/iam?ref=v2.1.4"
 }
 
 # Include all settings from the root terragrunt.hcl file

+ 1 - 1
test/aws-us-gov/mdr-test-malware/006-account-standards-regional/us-gov-west-1/terragrunt.hcl

@@ -20,7 +20,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.xdr.accenturefederalcyber.com:mdr-engineering/xdr-terraform-modules.git//base/account_standards_regional?ref=v2.1.0"
+  source = "git@github.xdr.accenturefederalcyber.com:mdr-engineering/xdr-terraform-modules.git//base/account_standards_regional?ref=v2.1.4"
 }
 
 # Include all settings from the root terragrunt.hcl file

+ 1 - 1
test/aws-us-gov/mdr-test-malware/006-account-standards/terragrunt.hcl

@@ -14,7 +14,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.xdr.accenturefederalcyber.com:mdr-engineering/xdr-terraform-modules.git//base/account_standards?ref=v2.1.0"
+  source = "git@github.xdr.accenturefederalcyber.com:mdr-engineering/xdr-terraform-modules.git//base/account_standards?ref=v2.1.4"
 }
 
 dependency "c2_account_standards" {

+ 1 - 1
test/aws-us-gov/mdr-test-malware/007-aws-scheduler/terragrunt.hcl

@@ -14,7 +14,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.xdr.accenturefederalcyber.com:mdr-engineering/xdr-terraform-modules.git//base/aws_scheduler?ref=v1.0.4"
+  source = "git@github.xdr.accenturefederalcyber.com:mdr-engineering/xdr-terraform-modules.git//base/aws_scheduler?ref=v2.1.4"
 }
 
 # Include all settings from the root terragrunt.hcl file

+ 1 - 1
test/aws-us-gov/mdr-test-malware/007-backups/terragrunt.hcl

@@ -14,7 +14,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.xdr.accenturefederalcyber.com:mdr-engineering/xdr-terraform-modules.git//base/backups?ref=v2.1.0"
+  source = "git@github.xdr.accenturefederalcyber.com:mdr-engineering/xdr-terraform-modules.git//base/backups?ref=v2.1.4"
 }
 
 # Include all settings from the root terragrunt.hcl file

+ 2 - 1
test/aws-us-gov/mdr-test-malware/010-vpc-vmray/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.xdr.accenturefederalcyber.com:mdr-engineering/xdr-terraform-modules.git//base/standard_vpc?ref=v2.1.0"
+  source = "git@github.xdr.accenturefederalcyber.com:mdr-engineering/xdr-terraform-modules.git//base/standard_vpc?ref=v2.1.4"
 }
 
 dependency "transit_gateway" {
@@ -37,6 +37,7 @@ inputs = {
   tags = {
     Terraform = "aws/${basename(get_parent_terragrunt_dir())}/${path_relative_to_include()}/"
   }
+  enable_nat_gateway = true
 }
 terraform_version_constraint = "= 0.15.1"
 terragrunt_version_constraint = ">= 0.29, < 0.30"

+ 10 - 7
test/aws-us-gov/mdr-test-malware/044-VMRay-Instances/terragrunt.hcl

@@ -18,8 +18,12 @@ 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.xdr.accenturefederalcyber.com:mdr-engineering/xdr-terraform-modules.git//base/vmray_instances?ref=v0.9.4"
-  source = "git@github.xdr.accenturefederalcyber.com:mdr-engineering/xdr-terraform-modules.git//base/terminated?ref=v1.23.6"
+  source = "git@github.xdr.accenturefederalcyber.com:mdr-engineering/xdr-terraform-modules.git//base/vmray_instances?ref=v2.1.4"
+  #source = "git@github.xdr.accenturefederalcyber.com:mdr-engineering/xdr-terraform-modules.git//base/terminated?ref=v1.23.6"
+}
+
+dependency "vpc" {
+  config_path = "../010-vpc-vmray"
 }
 
 # Include all settings from the root terragrunt.hcl file
@@ -32,15 +36,14 @@ 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.
-  vmray_server_instance_type  = local.account_vars.locals.vmray_server_instance_type
-  vmray_worker_instance_type  = local.account_vars.locals.vmray_worker_instance_type
-  vmray_worker_instance_count = local.account_vars.locals.vmray_worker_instance_count
-  vmray_key_name              = local.account_vars.locals.vmray_key_name
-  
   tags = {
     Purpose = "Malware Detonation"
     Terraform = "aws/${basename(get_parent_terragrunt_dir())}/${path_relative_to_include()}/"
   }
+  vpc_id = dependency.vpc.outputs.vpc_id
+  azs = dependency.vpc.outputs.azs
+  public_subnets = dependency.vpc.outputs.public_subnets
+  private_subnets = dependency.vpc.outputs.private_subnets
 }
 terraform_version_constraint = "= 0.15.1"
 terragrunt_version_constraint = ">= 0.29, < 0.30"

+ 1 - 1
test/aws-us-gov/mdr-test-malware/072-salt-master-inventory-role/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.xdr.accenturefederalcyber.com:mdr-engineering/xdr-terraform-modules.git//base/salt_master_inventory_role?ref=v1.24.0"
+  source = "git@github.xdr.accenturefederalcyber.com:mdr-engineering/xdr-terraform-modules.git//base/salt_master_inventory_role?ref=v2.1.4"
 }
 
 # Include all settings from the root terragrunt.hcl file

+ 7 - 4
test/aws-us-gov/mdr-test-malware/account.hcl

@@ -22,9 +22,12 @@ locals {
     }
   }
 
-  # VMRay Specific
-  vmray_server_instance_type = "t3a.micro"
-  vmray_worker_instance_type = "c5n.metal"
+  instance_types = {
+#    "vmray-server" = "t3a.micro",
+    "vmray-server" = "c5n.metal", # Temporary, while testing all-in-one
+    "vmray-worker" = "c5n.metal"
+#    "vmray-worker" = "c5n.metal"
+  }
+
   vmray_worker_instance_count = 0
-  vmray_key_name = "fdamstra" # This is for initial provisioning only. DO NOT CHANGE.
 }