terraform.tfvars 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. region = "us-east-1"
  2. cidr_block = "10.0.0.0/16"
  3. public_subnet_az = ["us-east-1a", "us-east-1b"]
  4. public_subnet_cidr = ["10.0.0.0/20", "10.0.16.0/20"]
  5. private_subnet_az = "us-east-1b"
  6. private_subnet_cidr = "10.0.32.0/20"
  7. tags = {
  8. "Infra" = "LiveLike"
  9. }
  10. ingress_alb_sg_rule = {
  11. inbound_80 = {
  12. from_port = 80
  13. to_port = 80
  14. protocol = "TCP"
  15. cidr_blocks = ["0.0.0.0/0"]
  16. },
  17. inbound_443 = {
  18. from_port = 443
  19. to_port = 443
  20. protocol = "TCP"
  21. cidr_blocks = ["0.0.0.0/0"]
  22. }
  23. }
  24. egress_alb_sg_rule = {
  25. ec2_egress = {
  26. from_port = 0
  27. to_port = 0
  28. protocol = "-1"
  29. }
  30. }
  31. ingress_ec2_sg_rule = {
  32. alb_ingress = {
  33. from_port = 0
  34. to_port = 0
  35. protocol = "-1"
  36. },
  37. allow_ssh_from_vpc = {
  38. from_port = 22
  39. to_port = 22
  40. protocol = "TCP"
  41. cidr_blocks = ["10.0.0.0/16"]
  42. }
  43. }
  44. egress_ec2_sg_rule = {
  45. egress_80 = {
  46. from_port = 80
  47. to_port = 80
  48. protocol = "TCP"
  49. cidr_blocks = ["0.0.0.0/0"]
  50. },
  51. egress_443 = {
  52. from_port = 443
  53. to_port = 443
  54. protocol = "TCP"
  55. cidr_blocks = ["0.0.0.0/0"]
  56. }
  57. }
  58. ec2_alb_target_group = {
  59. name = "ec2-alb-target-group"
  60. port = 80
  61. protocol = "HTTP"
  62. deregistration_delay = "60"
  63. }
  64. alb_listener = {
  65. # redirect_80 = {
  66. # port = "80"
  67. # protocol = "HTTP"
  68. # action_type = "redirect"
  69. # redirect = {
  70. # status_code = "HTTP_301"
  71. # port = "443"
  72. # protocol = "HTTPS"
  73. # }
  74. # },
  75. # listener_443 = {
  76. # port = "443"
  77. # protocol = "HTTPS"
  78. # ssl_policy = "ELBSecurityPolicy-TLS13-1-2-2021-06"
  79. # certificate_arn = ""
  80. # action_type = "forward"
  81. # }
  82. listener_80 = {
  83. port = "80"
  84. protocol = "HTTP"
  85. action_type = "forward"
  86. }
  87. }
  88. alb_ec2 = {
  89. name = "alb-for-ec2"
  90. enable_deletion_protection = false
  91. internal = false
  92. load_balancer_type = "application"
  93. }
  94. ec2_launch_template = {
  95. name = "ec2-launch-template"
  96. device_name = "/dev/sda1"
  97. ebs_volume_size = 20
  98. ebs_volume_type = "gp3"
  99. instance_type = "t3.micro"
  100. ebs_optimized = true
  101. key_name = "livelike"
  102. }
  103. ec2_autoscaling_group = {
  104. name = "ec2-autoscaling-group"
  105. min_size = 1
  106. max_size = 2
  107. desired_capacity = 1
  108. default_cooldown = 60
  109. health_check_grace_period = 120
  110. }