Browse Source

Merge pull request #241 from mdr-engineering/feature/ftd_MSOCI-1515_NessusInitialDraft

Creates Nessus Modules in Test and Prod
Frederick Damstra 4 years ago
parent
commit
21dca262db

+ 1 - 0
prod/aws-us-gov/mdr-prod-c2/270-nessus-security-center/.tfswitch.toml

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

+ 42 - 0
prod/aws-us-gov/mdr-prod-c2/270-nessus-security-center/terragrunt.hcl

@@ -0,0 +1,42 @@
+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/nessus/instance_security_center?ref=v1.23.0"
+}
+
+dependency "vpc" {
+  config_path = "../010-vpc-private-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 = "Tenable Nessus Security Center"
+    Terraform = "aws/${basename(get_parent_terragrunt_dir())}/${path_relative_to_include()}/"
+  }
+  instance_type = local.account_vars.locals.instance_types["nessus_security_center"]
+  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
+}

+ 1 - 0
prod/aws-us-gov/mdr-prod-c2/275-nessus-security-scanners/.tfswitch.toml

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

+ 42 - 0
prod/aws-us-gov/mdr-prod-c2/275-nessus-security-scanners/terragrunt.hcl

@@ -0,0 +1,42 @@
+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/nessus/instance_nessus_scanner?ref=v1.23.0"
+}
+
+dependency "vpc" {
+  config_path = "../030-qualys-vpc"
+}
+
+# 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 = "Tenable Nessus Scanners"
+    Terraform = "aws/${basename(get_parent_terragrunt_dir())}/${path_relative_to_include()}/"
+  }
+  instance_type = local.account_vars.locals.instance_types["nessus_scanners"]
+  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
+}

+ 5 - 0
prod/aws-us-gov/mdr-prod-c2/account.hcl

@@ -145,6 +145,8 @@ locals {
     "github-backup"  = "t3a.medium", # legacy: t2.medium
     "github-backup"  = "t3a.medium", # legacy: t2.medium
     "jira-rds"       = "db.t3.medium",
     "jira-rds"       = "db.t3.medium",
     "jira-server"    = "t3a.medium", # legacy test: t2.small, legacy prod: t2.medium
     "jira-server"    = "t3a.medium", # legacy test: t2.small, legacy prod: t2.medium
+    "nessus_security_center" = "m5a.xlarge",
+    "nessus_scanners" = "m5a.large",
     "phantom"        = "m5a.4xlarge", # legacy test: t2.medium, legacy prod: m4.4xlarge
     "phantom"        = "m5a.4xlarge", # legacy test: t2.medium, legacy prod: m4.4xlarge
     "qcompliance"    = "c5a.8xlarge", # legacy: c4.8xlarge
     "qcompliance"    = "c5a.8xlarge", # legacy: c4.8xlarge
     "splunk-cm"      = "m5a.xlarge",
     "splunk-cm"      = "m5a.xlarge",
@@ -166,6 +168,9 @@ locals {
   # mailrelay
   # mailrelay
   mailrelay_instance_type = "t3a.micro"
   mailrelay_instance_type = "t3a.micro"
 
 
+  # Nessus Scanner Variables
+  nessus_scanner_count = 2
+
   # OpenVPN Server
   # OpenVPN Server
   openvpn_instance_type = "t3a.medium"
   openvpn_instance_type = "t3a.medium"
 
 

+ 1 - 0
test/aws-us-gov/mdr-test-c2/270-nessus-security-center/.tfswitch.toml

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

+ 42 - 0
test/aws-us-gov/mdr-test-c2/270-nessus-security-center/terragrunt.hcl

@@ -0,0 +1,42 @@
+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/nessus/instance_security_center?ref=v1.23.0"
+}
+
+dependency "vpc" {
+  config_path = "../010-vpc-private-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 = "Tenable Nessus Security Center"
+    Terraform = "aws/${basename(get_parent_terragrunt_dir())}/${path_relative_to_include()}/"
+  }
+  instance_type = local.account_vars.locals.instance_types["nessus_security_center"]
+  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
+}

+ 1 - 0
test/aws-us-gov/mdr-test-c2/275-nessus-security-scanners/.tfswitch.toml

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

+ 42 - 0
test/aws-us-gov/mdr-test-c2/275-nessus-security-scanners/terragrunt.hcl

@@ -0,0 +1,42 @@
+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/nessus/instance_nessus_scanner?ref=v1.23.0"
+}
+
+dependency "vpc" {
+  config_path = "../030-qualys-vpc"
+}
+
+# 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 = "Tenable Nessus Scanners"
+    Terraform = "aws/${basename(get_parent_terragrunt_dir())}/${path_relative_to_include()}/"
+  }
+  instance_type = local.account_vars.locals.instance_types["nessus_scanners"]
+  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
+}

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

@@ -146,6 +146,8 @@ locals {
     "github-backup"  = "t3a.medium", # legacy: t2.micro
     "github-backup"  = "t3a.medium", # legacy: t2.micro
     "jira-rds"       = "db.t3.medium",
     "jira-rds"       = "db.t3.medium",
     "jira-server"    = "t3a.small", # legacy test: t2.small, legacy prod: t2.medium
     "jira-server"    = "t3a.small", # legacy test: t2.small, legacy prod: t2.medium
+    "nessus_security_center" = "m5a.xlarge",
+    "nessus_scanners" = "m5a.large",
     "phantom"        = "t3a.medium", # legacy test: t2.medium, legacy prod: m4.4xlarge
     "phantom"        = "t3a.medium", # legacy test: t2.medium, legacy prod: m4.4xlarge
     "qcompliance"    = "t3a.small", # legacy: ? not sure
     "qcompliance"    = "t3a.small", # legacy: ? not sure
     "splunk-cm"      = "t3a.small",  # legacy: t2.small
     "splunk-cm"      = "t3a.small",  # legacy: t2.small
@@ -170,6 +172,9 @@ locals {
   # Mail Relay Server
   # Mail Relay Server
   mailrelay_instance_type = "t3a.micro"
   mailrelay_instance_type = "t3a.micro"
 
 
+  # Nessus Scanner Variables
+  nessus_scanner_count = 2
+
   # OpenVPN Server
   # OpenVPN Server
   openvpn_instance_type = "t3a.medium"
   openvpn_instance_type = "t3a.medium"