Ver Fonte

Merge pull request #244 from mdr-engineering/feature/bp_MSOCI-1448_portal_gc

Adds portal to GC
Brad Poulton há 4 anos atrás
pai
commit
3d5ab4995e

+ 15 - 1
globals.hcl

@@ -20,7 +20,21 @@ locals {
     "99.56.213.129/32",    # Fred Damstra
     "97.117.81.187/32",    # Colby Williams
   ]
-  portal_test_whitelist = local.trusted_ips # for now, an alias
+
+  portal_test_whitelist = [ # IPs for Portal Test and vmray
+    "12.245.107.250/32",   # DPS Office Legato
+    "12.204.167.162/32",   # DPS Office San Antonio
+    "54.86.98.62/32",      # DPS AWS User VPN
+    "75.138.227.80/32",    # Duane Waddle
+    "24.11.231.98/32",     # George Starcher
+    "99.151.37.185/32",    # Wesley Leonard
+    "70.106.200.157/32",   # John Reuther
+    "73.10.53.113/32",     # Rick Page Home
+    "50.21.207.50/32",     # Brad Poulton
+    "70.160.60.248/32",    # Brandon Naughton 
+    "99.56.213.129/32",    # Frederick Damstra
+    "97.117.81.187/32",    # Colby Williams
+  ]
 
   #Customer External IPs
   #To increase flexibility and to provide better documentation,

+ 1 - 0
test/aws-us-gov/mdr-test-c2/099-vault-configuration/.tfswitch.toml

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

+ 1 - 1
test/aws-us-gov/mdr-test-c2/099-vault-configuration/terragrunt.hcl

@@ -31,7 +31,7 @@ generate "vault-provider" {
   contents  = <<EOF
 #Provider block for Vault. 
 provider "vault" {
-  version = "~> 2.15.0"
+  version = "~> 2.18.0"
   address = "https://${dependency.instance-vault.outputs.vault_alb_address}"
 }
 EOF

+ 1 - 0
test/aws-us-gov/mdr-test-c2/200-customer-portal/.tfswitch.toml

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

+ 45 - 0
test/aws-us-gov/mdr-test-c2/200-customer-portal/terragrunt.hcl

@@ -0,0 +1,45 @@
+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/customer_portal?ref=v1.23.3"
+}
+
+dependency "vpc" {
+  config_path = "../010-vpc-portal"
+}
+
+# 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 = "Customer Portal"
+    Terraform = "aws/${basename(get_parent_terragrunt_dir())}/${path_relative_to_include()}/"
+    Schedule  = "none"
+  }
+  instance_name = "customer-portal"
+  instance_type = local.account_vars.locals.instance_types["portal"]
+  vpc_id = dependency.vpc.outputs.vpc_id
+  vpc_cidr = local.account_vars.locals.vpc_info["vpc-portal"]["cidr"]
+  azs = dependency.vpc.outputs.azs
+  private_subnets = dependency.vpc.outputs.private_subnets
+  public_subnets = dependency.vpc.outputs.public_subnets
+}

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

@@ -160,6 +160,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
+    "portal"         = "t3a.medium", # legacy: t2.medium
   }
 
   # TODO: The instance types below should be moved to the instance_type map above

+ 1 - 1
test/env.hcl

@@ -157,6 +157,6 @@ locals {
   # cnames only
   legacy_public_cname_dns = {
     #"iratemoses" = "moose-legacy-hec-1138113830.us-gov-east-1.elb.amazonaws.com",
-    "portal" = "portal-alb-test-868493124.us-east-1.elb.amazonaws.com"
+    #"portal" = "portal-alb-test-868493124.us-east-1.elb.amazonaws.com"
   }
 }