main.tf 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. provider "aws" {
  2. region = var.region
  3. profile = var.profile
  4. }
  5. module "vpc" {
  6. source = "../tfmodule-aws-2tier-vpc"
  7. region = var.region
  8. profile = var.profile
  9. vpc-name = var.vpc-name
  10. vpc-cidr = var.vpc-cidr
  11. vpc-azs = var.vpc-azs
  12. enable-private = false
  13. common-tags = {
  14. "Owner" = "maguec"
  15. }
  16. }
  17. module "nodes" {
  18. source = "../tfmodule-aws-redis-enterprise"
  19. region = var.region
  20. profile = var.profile
  21. open-nets = ["76.14.80.208/32"]
  22. data-node-count = 3
  23. re-volume-size = 500
  24. re-instance-type = "m5.4xlarge"
  25. vpc-cidr = var.vpc-cidr
  26. vpc-azs = var.vpc-azs
  27. vpc-name = var.vpc-name
  28. vpc-id = module.vpc.vpc-id
  29. vpc-subnets = module.vpc.subnets-public
  30. enable-flash = true
  31. common-tags = {
  32. "Owner" = "maguec"
  33. "Project" = "AWS Testing Environment"
  34. }
  35. }
  36. module "tmuxer" {
  37. source = "../tfmodule-cloud-tmux"
  38. ssh-key = "${var.vpc-name}.pem"
  39. user = "ubuntu"
  40. nodes = module.nodes.node-ips
  41. outpath = "."
  42. }
  43. module "dns-lb" {
  44. source = "../tfmodule-aws-dns-lb"
  45. profile = var.profile
  46. region = var.region
  47. vpc-subnets = module.vpc.subnets-public
  48. vpc-id = module.vpc.vpc-id
  49. node-ids = module.nodes.node-ids
  50. common-tags = {
  51. "Owner" = "maguec"
  52. "Project" = "AWS Testing Environment"
  53. }
  54. }