security.tf 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. ###############################################
  2. # DO NOT EDIT THIS FILE
  3. #
  4. # This file is generated through 'make all'.
  5. # If you need to make changes, make your changes
  6. # to the corresponding .j file and then rerun
  7. # make all
  8. ###############################################
  9. #######
  10. # A security group for the ELB so it is accessible via the web
  11. resource "aws_security_group" "sg_instance_access" {
  12. name = "sg_instance_access"
  13. description = "Allows ssh/http/https in from me. Allows outbound on select ports."
  14. vpc_id = "${aws_vpc.vpc_primary.id}"
  15. # SSH, HTTP, and HTTPS inbound from me
  16. ingress {
  17. from_port = 22
  18. to_port = 22
  19. protocol = "tcp"
  20. cidr_blocks = "${var.Trusted-CIDR}"
  21. }
  22. ingress {
  23. from_port = 80
  24. to_port = 80
  25. protocol = "tcp"
  26. cidr_blocks = "${var.Trusted-CIDR}"
  27. }
  28. ingress {
  29. from_port = 443
  30. to_port = 443
  31. protocol = "tcp"
  32. cidr_blocks = "${var.Trusted-CIDR}"
  33. }
  34. # Outbound Access
  35. egress {
  36. from_port = 20
  37. to_port = 21
  38. protocol = "tcp"
  39. cidr_blocks = ["0.0.0.0/0"]
  40. }
  41. egress {
  42. from_port = 22
  43. to_port = 22
  44. protocol = "tcp"
  45. cidr_blocks = ["0.0.0.0/0"]
  46. }
  47. egress {
  48. from_port = 53
  49. to_port = 53
  50. protocol = "tcp"
  51. cidr_blocks = ["0.0.0.0/0"]
  52. }
  53. egress {
  54. from_port = 53
  55. to_port = 53
  56. protocol = "udp"
  57. cidr_blocks = ["0.0.0.0/0"]
  58. }
  59. egress {
  60. from_port = 80
  61. to_port = 80
  62. protocol = "tcp"
  63. cidr_blocks = ["0.0.0.0/0"]
  64. }
  65. egress {
  66. from_port = 443
  67. to_port = 443
  68. protocol = "tcp"
  69. cidr_blocks = ["0.0.0.0/0"]
  70. }
  71. }