main.tf 1.5 KB

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