Bladeren bron

add tmuxer and dns load balancer

Chris Mague 4 jaren geleden
bovenliggende
commit
800cb17f36
1 gewijzigde bestanden met toevoegingen van 24 en 12 verwijderingen
  1. 24 12
      main.tf

+ 24 - 12
main.tf

@@ -11,8 +11,8 @@ module "vpc" {
   vpc-cidr       = var.vpc-cidr
   vpc-azs        = var.vpc-azs
   enable-private = false
-  common-tags    = {
-    "Owner"      = "maguec"
+  common-tags = {
+    "Owner" = "maguec"
   }
 }
 
@@ -30,17 +30,29 @@ module "nodes" {
   vpc-id           = module.vpc.vpc-id
   vpc-subnets      = module.vpc.subnets-public
   enable-flash     = true
-  common-tags      = {
-    "Owner"        = "maguec"
-    "Project"      = "Visa-Backup-Restore-Test"
-    "Gabe"         = "Please-Leave-UP"
+  common-tags = {
+    "Owner"   = "maguec"
+    "Project" = "AWS Testing Environment"
   }
 }
 
-output "node-ips" {
-  value = <<EOT
-  %{ for ip in module.nodes.node-ips ~}
-  ssh -i ~/.ssh/${var.vpc-name}.pem -o IdentitiesOnly=yes  -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ubuntu@${ip}
-  %{ endfor ~}
-  EOT
+module "tmuxer" {
+  source  = "../tfmodule-cloud-tmux"
+  ssh-key = "${var.vpc-name}.pem"
+  user    = "ubuntu"
+  nodes   = module.nodes.node-ips
+  outpath = "."
+}
+
+module "dns-lb" {
+  source      = "../tfmodule-aws-dns-lb"
+  profile     = var.profile
+  region      = var.region
+  vpc-subnets = module.vpc.subnets-public
+  vpc-id      = module.vpc.vpc-id
+  node-ids    = module.nodes.node-ids
+  common-tags = {
+    "Owner"   = "maguec"
+    "Project" = "AWS Testing Environment"
+  }
 }