main.tf 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. resource "aws_elb" "main" {
  2. name = "fifthsun"
  3. subnets = ["subnet-03a35875"]
  4. security_groups = ["sg-308eab57"]
  5. instances = ["i-9ef3dd46"]
  6. cross_zone_load_balancing = false
  7. idle_timeout = 250
  8. connection_draining = false
  9. connection_draining_timeout = 300
  10. internal = false
  11. access_logs {
  12. bucket = "5thsunelblogs"
  13. bucket_prefix = ""
  14. interval = 5
  15. }
  16. listener {
  17. instance_port = 80
  18. instance_protocol = "http"
  19. lb_port = 80
  20. lb_protocol = "http"
  21. ssl_certificate_id = ""
  22. }
  23. listener {
  24. instance_port = 80
  25. instance_protocol = "http"
  26. lb_port = 443
  27. lb_protocol = "https"
  28. ssl_certificate_id = "arn:aws:iam::531003974115:server-certificate/nuxeocloud2016"
  29. }
  30. health_check {
  31. healthy_threshold = 2
  32. unhealthy_threshold = 4
  33. interval = 30
  34. target = "TCP:8080"
  35. timeout = 10
  36. }
  37. tags {
  38. "billing-category" = "customer"
  39. "billing-subcategory" = "fifthsun"
  40. "Name" = "fifthsun"
  41. }
  42. }
  43. resource "aws_elb" "internal" {
  44. name = "fifthsun-internal"
  45. subnets = ["subnet-03a35875"]
  46. security_groups = ["sg-308eab57"]
  47. instances = ["i-9ef3dd46"]
  48. cross_zone_load_balancing = false
  49. idle_timeout = 1800
  50. connection_draining = false
  51. connection_draining_timeout = 300
  52. internal = true
  53. listener {
  54. instance_port = 80
  55. instance_protocol = "http"
  56. lb_port = 80
  57. lb_protocol = "http"
  58. ssl_certificate_id = ""
  59. }
  60. listener {
  61. instance_port = 80
  62. instance_protocol = "http"
  63. lb_port = 443
  64. lb_protocol = "https"
  65. ssl_certificate_id = "arn:aws:iam::531003974115:server-certificate/nuxeocloud2016"
  66. }
  67. health_check {
  68. healthy_threshold = 2
  69. unhealthy_threshold = 3
  70. interval = 30
  71. target = "TCP:8080"
  72. timeout = 5
  73. }
  74. tags {
  75. "billing-category" = "customer"
  76. "billing-subcategory" = "fifthsun"
  77. "Name" = "fifthsun-internal"
  78. }
  79. }