network_acl.tf 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. # Network ACLs enforce the basic rules of the topology, and are
  11. # further refined by security groups on instances.
  12. #
  13. # Topology has two "public" subnets (in different AZs) for
  14. # servers such as searchheads and HECs that are accessible publicly.
  15. #
  16. # It was two "private" subnets (in different AZs) for
  17. # servers such as indexers that aren't publicly available.
  18. #
  19. # The two AZ's can talk to each other.
  20. # The public subnets can be accessed by any service/source
  21. # allowed by the security group.
  22. # The private subnets are only accessible by the public
  23. # subnets, and port 22 from anywhere.
  24. #
  25. # Network ACLs allow all outbound. This should be restricted
  26. # via security groups to only those ports needed.
  27. resource "aws_network_acl" "acl_public" {
  28. vpc_id = "${aws_vpc.vpc_primary.id}"
  29. subnet_ids = ["${aws_subnet.subnet_public_a.id}"]
  30. egress {
  31. protocol = "-1"
  32. rule_no = 10
  33. action = "allow"
  34. cidr_block = "0.0.0.0/0"
  35. from_port = 0
  36. to_port = 0
  37. }
  38. ingress {
  39. protocol = "-1"
  40. rule_no = 10
  41. action = "allow"
  42. cidr_block = "0.0.0.0/0"
  43. from_port = 0
  44. to_port = 0
  45. }
  46. tags {
  47. Name = "Public Subnets"
  48. }
  49. }
  50. #resource "aws_network_acl" "acl_private" {
  51. # vpc_id = "${aws_vpc.vpc_primary.id}"
  52. # subnet_ids = ["${aws_subnet.subnet_private_a.id}", "${aws_subnet.subnet_private_b.id}"]
  53. # egress {
  54. # protocol = "-1"
  55. # rule_no = 10
  56. # action = "allow"
  57. # cidr_block = "0.0.0.0/0"
  58. # from_port = 0
  59. # to_port = 0
  60. # }
  61. #
  62. # ingress {
  63. # protocol = "-1"
  64. # rule_no = 10
  65. # action = "allow"
  66. # cidr_block = "${var.VPC-Subnet}"
  67. # from_port = 0
  68. # to_port = 0
  69. # }
  70. #
  71. # ingress {
  72. # protocol = "icmp"
  73. # rule_no = 20
  74. # action = "allow"
  75. # cidr_block = "0.0.0.0/0"
  76. # icmp_type = 8
  77. # from_port = 0
  78. # to_port = 0
  79. # }
  80. #
  81. # ingress {
  82. # protocol = "tcp"
  83. # rule_no = 30
  84. # action = "allow"
  85. # cidr_block = "0.0.0.0/0"
  86. # from_port = 22
  87. # to_port = 22
  88. # }
  89. #
  90. # tags {
  91. # Name = "Private Subnets"
  92. # }
  93. #}
  94. #