Skip to content

Commit 4b0315e

Browse files
committed
Disable port 80 and allow extensibility
1 parent 62432d3 commit 4b0315e

2 files changed

Lines changed: 7 additions & 27 deletions

File tree

main.tf

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -29,30 +29,6 @@ resource "aws_security_group_rule" "secure_sgs" {
2929
security_group_id = "${aws_security_group.elasticsearch.id}"
3030
}
3131

32-
resource "aws_security_group_rule" "nonsecure_cidrs" {
33-
count = "${length(var.ingress_allow_cidr_blocks) > 0 ? 1 : 0}"
34-
35-
type = "ingress"
36-
from_port = 80
37-
to_port = 80
38-
protocol = "TCP"
39-
cidr_blocks = ["${var.ingress_allow_cidr_blocks}"]
40-
41-
security_group_id = "${aws_security_group.elasticsearch.id}"
42-
}
43-
44-
resource "aws_security_group_rule" "nonsecure_sgs" {
45-
count = "${length(var.ingress_allow_security_groups)}"
46-
47-
type = "ingress"
48-
from_port = 80
49-
to_port = 80
50-
protocol = "tcp"
51-
source_security_group_id = "${element(var.ingress_allow_security_groups, count.index)}"
52-
53-
security_group_id = "${aws_security_group.elasticsearch.id}"
54-
}
55-
5632
resource "aws_security_group_rule" "egress_all" {
5733
type = "egress"
5834
from_port = 0

outputs.tf

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ output "es_endpoint" {
33
}
44

55
output "es_arn" {
6-
value ="${aws_elasticsearch_domain.es.arn}"
6+
value = "${aws_elasticsearch_domain.es.arn}"
77
}
88

99
output "es_domain_id" {
10-
value = "${aws_elasticsearch_domain.es.domain_id}"
10+
value = "${aws_elasticsearch_domain.es.domain_id}"
1111
}
1212

1313
output "es_kibana_endpoint" {
14-
value = "${aws_elasticsearch_domain.es.kibana_endpoint}"
14+
value = "${aws_elasticsearch_domain.es.kibana_endpoint}"
1515
}
1616

1717
output "es_availability_zones_ids" {
@@ -21,3 +21,7 @@ output "es_availability_zones_ids" {
2121
output "es_vpc_ids" {
2222
value = "${aws_elasticsearch_domain.es.vpc_options.0.vpc_id}"
2323
}
24+
25+
output "es_sg" {
26+
value = "${aws_security_group.elasticsearch.id}"
27+
}

0 commit comments

Comments
 (0)