Commit afc2859e authored by Bart Van Bos's avatar Bart Van Bos Committed by GitHub

feat: Added support for kibana dashboard - 5601-tcp (#170)

parent b231ea82
This diff is collapsed.
......@@ -17,6 +17,7 @@ List of Security Groups implemented as Terraform modules
* [ipsec-4500](https://github.com/terraform-aws-modules/terraform-aws-security-group/tree/master/modules/ipsec-4500)
* [ipsec-500](https://github.com/terraform-aws-modules/terraform-aws-security-group/tree/master/modules/ipsec-500)
* [kafka](https://github.com/terraform-aws-modules/terraform-aws-security-group/tree/master/modules/kafka)
* [kibana](https://github.com/terraform-aws-modules/terraform-aws-security-group/tree/master/modules/kibana)
* [kubernetes-api](https://github.com/terraform-aws-modules/terraform-aws-security-group/tree/master/modules/kubernetes-api)
* [ldaps](https://github.com/terraform-aws-modules/terraform-aws-security-group/tree/master/modules/ldaps)
* [memcached](https://github.com/terraform-aws-modules/terraform-aws-security-group/tree/master/modules/memcached)
......
......@@ -35,7 +35,7 @@ No provider.
| auto\_computed\_ingress\_with\_self | List of maps defining computed ingress rules with self to add automatically | `list(map(string))` | `[]` | no |
| auto\_egress\_rules | List of egress rules to add automatically | `list(string)` | <pre>[<br> "all-all"<br>]</pre> | no |
| auto\_egress\_with\_self | List of maps defining egress rules with self to add automatically | `list(map(string))` | `[]` | no |
| auto\_ingress\_rules | List of ingress rules to add automatically | `list(string)` | <pre>[<br> "graphite-webui",<br> "graphite-2003-tcp",<br> "graphite-2004-tcp",<br> "graphite-2023-tcp",<br> "graphite-2024-tcp",<br> "graphite-8080-tcp",<br> "graphite-8125-tcp",<br> "graphite-8125-udp",<br> "graphite-8216-tcp"<br>]</pre> | no |
| auto\_ingress\_rules | List of ingress rules to add automatically | `list(string)` | <pre>[<br> "graphite-webui",<br> "graphite-2003-tcp",<br> "graphite-2004-tcp",<br> "graphite-2023-tcp",<br> "graphite-2024-tcp",<br> "graphite-8080-tcp",<br> "graphite-8125-tcp",<br> "graphite-8125-udp",<br> "graphite-8126-tcp"<br>]</pre> | no |
| auto\_ingress\_with\_self | List of maps defining ingress rules with self to add automatically | `list(map(string))` | <pre>[<br> {<br> "rule": "all-all"<br> }<br>]</pre> | no |
| auto\_number\_of\_computed\_egress\_rules | Number of computed egress rules to create by name | `number` | `0` | no |
| auto\_number\_of\_computed\_egress\_with\_self | Number of computed egress rules to create where 'self' is defined | `number` | `0` | no |
......
......@@ -6,7 +6,7 @@
variable "auto_ingress_rules" {
description = "List of ingress rules to add automatically"
type = list(string)
default = ["graphite-webui", "graphite-2003-tcp", "graphite-2004-tcp", "graphite-2023-tcp", "graphite-2024-tcp", "graphite-8080-tcp", "graphite-8125-tcp", "graphite-8125-udp", "graphite-8216-tcp"]
default = ["graphite-webui", "graphite-2003-tcp", "graphite-2004-tcp", "graphite-2023-tcp", "graphite-2024-tcp", "graphite-8080-tcp", "graphite-8125-tcp", "graphite-8125-udp", "graphite-8126-tcp"]
}
variable "auto_ingress_with_self" {
......
This diff is collapsed.
# This file was generated from values defined in rules.tf using update_groups.sh.
###################################
# DO NOT CHANGE THIS FILE MANUALLY
###################################
variable "auto_ingress_rules" {
description = "List of ingress rules to add automatically"
type = list(string)
default = ["kibana-tcp"]
}
variable "auto_ingress_with_self" {
description = "List of maps defining ingress rules with self to add automatically"
type = list(map(string))
default = [{ "rule" = "all-all" }]
}
variable "auto_egress_rules" {
description = "List of egress rules to add automatically"
type = list(string)
default = ["all-all"]
}
variable "auto_egress_with_self" {
description = "List of maps defining egress rules with self to add automatically"
type = list(map(string))
default = []
}
# Computed
variable "auto_computed_ingress_rules" {
description = "List of ingress rules to add automatically"
type = list(string)
default = []
}
variable "auto_computed_ingress_with_self" {
description = "List of maps defining computed ingress rules with self to add automatically"
type = list(map(string))
default = []
}
variable "auto_computed_egress_rules" {
description = "List of computed egress rules to add automatically"
type = list(string)
default = []
}
variable "auto_computed_egress_with_self" {
description = "List of maps defining computed egress rules with self to add automatically"
type = list(map(string))
default = []
}
# Number of computed rules
variable "auto_number_of_computed_ingress_rules" {
description = "Number of computed ingress rules to create by name"
type = number
default = 0
}
variable "auto_number_of_computed_ingress_with_self" {
description = "Number of computed ingress rules to create where 'self' is defined"
type = number
default = 0
}
variable "auto_number_of_computed_egress_rules" {
description = "Number of computed egress rules to create by name"
type = number
default = 0
}
variable "auto_number_of_computed_egress_with_self" {
description = "Number of computed egress rules to create where 'self' is defined"
type = number
default = 0
}
module "sg" {
source = "../../"
create = var.create
name = var.name
use_name_prefix = var.use_name_prefix
description = var.description
vpc_id = var.vpc_id
tags = var.tags
##########
# Ingress
##########
# Rules by names - open for default CIDR
ingress_rules = sort(compact(distinct(concat(var.auto_ingress_rules, var.ingress_rules, [""]))))
# Open for self
ingress_with_self = concat(var.auto_ingress_with_self, var.ingress_with_self)
# Open to IPv4 cidr blocks
ingress_with_cidr_blocks = var.ingress_with_cidr_blocks
# Open to IPv6 cidr blocks
ingress_with_ipv6_cidr_blocks = var.ingress_with_ipv6_cidr_blocks
# Open for security group id
ingress_with_source_security_group_id = var.ingress_with_source_security_group_id
# Default ingress CIDR blocks
ingress_cidr_blocks = var.ingress_cidr_blocks
ingress_ipv6_cidr_blocks = var.ingress_ipv6_cidr_blocks
# Default prefix list ids
ingress_prefix_list_ids = var.ingress_prefix_list_ids
###################
# Computed Ingress
###################
# Rules by names - open for default CIDR
computed_ingress_rules = sort(compact(distinct(concat(var.auto_computed_ingress_rules, var.computed_ingress_rules, [""]))))
# Open for self
computed_ingress_with_self = concat(var.auto_computed_ingress_with_self, var.computed_ingress_with_self)
# Open to IPv4 cidr blocks
computed_ingress_with_cidr_blocks = var.computed_ingress_with_cidr_blocks
# Open to IPv6 cidr blocks
computed_ingress_with_ipv6_cidr_blocks = var.computed_ingress_with_ipv6_cidr_blocks
# Open for security group id
computed_ingress_with_source_security_group_id = var.computed_ingress_with_source_security_group_id
#############################
# Number of computed ingress
#############################
number_of_computed_ingress_rules = var.auto_number_of_computed_ingress_rules + var.number_of_computed_ingress_rules
number_of_computed_ingress_with_self = var.auto_number_of_computed_ingress_with_self + var.number_of_computed_ingress_with_self
number_of_computed_ingress_with_cidr_blocks = var.number_of_computed_ingress_with_cidr_blocks
number_of_computed_ingress_with_ipv6_cidr_blocks = var.number_of_computed_ingress_with_ipv6_cidr_blocks
number_of_computed_ingress_with_source_security_group_id = var.number_of_computed_ingress_with_source_security_group_id
#########
# Egress
#########
# Rules by names - open for default CIDR
egress_rules = sort(compact(distinct(concat(var.auto_egress_rules, var.egress_rules, [""]))))
# Open for self
egress_with_self = concat(var.auto_egress_with_self, var.egress_with_self)
# Open to IPv4 cidr blocks
egress_with_cidr_blocks = var.egress_with_cidr_blocks
# Open to IPv6 cidr blocks
egress_with_ipv6_cidr_blocks = var.egress_with_ipv6_cidr_blocks
# Open for security group id
egress_with_source_security_group_id = var.egress_with_source_security_group_id
# Default egress CIDR blocks
egress_cidr_blocks = var.egress_cidr_blocks
egress_ipv6_cidr_blocks = var.egress_ipv6_cidr_blocks
# Default prefix list ids
egress_prefix_list_ids = var.egress_prefix_list_ids
##################
# Computed Egress
##################
# Rules by names - open for default CIDR
computed_egress_rules = sort(compact(distinct(concat(var.auto_computed_egress_rules, var.computed_egress_rules, [""]))))
# Open for self
computed_egress_with_self = concat(var.auto_computed_egress_with_self, var.computed_egress_with_self)
# Open to IPv4 cidr blocks
computed_egress_with_cidr_blocks = var.computed_egress_with_cidr_blocks
# Open to IPv6 cidr blocks
computed_egress_with_ipv6_cidr_blocks = var.computed_egress_with_ipv6_cidr_blocks
# Open for security group id
computed_egress_with_source_security_group_id = var.computed_egress_with_source_security_group_id
#############################
# Number of computed egress
#############################
number_of_computed_egress_rules = var.auto_number_of_computed_egress_rules + var.number_of_computed_egress_rules
number_of_computed_egress_with_self = var.auto_number_of_computed_egress_with_self + var.number_of_computed_egress_with_self
number_of_computed_egress_with_cidr_blocks = var.number_of_computed_egress_with_cidr_blocks
number_of_computed_egress_with_ipv6_cidr_blocks = var.number_of_computed_egress_with_ipv6_cidr_blocks
number_of_computed_egress_with_source_security_group_id = var.number_of_computed_egress_with_source_security_group_id
}
output "this_security_group_id" {
description = "The ID of the security group"
value = module.sg.this_security_group_id
}
output "this_security_group_vpc_id" {
description = "The VPC ID"
value = module.sg.this_security_group_vpc_id
}
output "this_security_group_owner_id" {
description = "The owner ID"
value = module.sg.this_security_group_owner_id
}
output "this_security_group_name" {
description = "The name of the security group"
value = module.sg.this_security_group_name
}
output "this_security_group_description" {
description = "The description of the security group"
value = module.sg.this_security_group_description
}
This diff is collapsed.
terraform {
required_version = "~> 0.12.6"
required_providers {
aws = "~> 2.42"
}
}
......@@ -56,7 +56,7 @@ variable "rules" {
graphite-8080-tcp = [8080, 8080, "tcp", "Graphite gunicorn port"]
graphite-8125-tcp = [8125, 8125, "tcp", "Statsd TCP"]
graphite-8125-udp = [8125, 8125, "udp", "Statsd UDP default"]
graphite-8216-tcp = [8216, 8126, "tcp", "Statsd admin"]
graphite-8126-tcp = [8126, 8126, "tcp", "Statsd admin"]
# HTTP
http-80-tcp = [80, 80, "tcp", "HTTP"]
http-8080-tcp = [8080, 8080, "tcp", "HTTP"]
......@@ -69,6 +69,8 @@ variable "rules" {
# Kafka
kafka-broker-tcp = [9092, 9092, "tcp", "Kafka broker 0.8.2+"]
kafka-broker-tls-tcp = [9094, 9094, "tcp", "Kafka TLS enabled broker 0.8.2+"]
# Kibana
kibana-tcp = [5601, 5601, "tcp", "Kibana Web Interface"]
# Kubernetes
kubernetes-api-tcp = [6443, 6443, "tcp", "Kubernetes API Server"]
# LDAPS
......@@ -199,7 +201,7 @@ variable "auto_groups" {
egress_rules = ["all-all"]
}
graphite-statsd = {
ingress_rules = ["graphite-webui", "graphite-2003-tcp", "graphite-2004-tcp", "graphite-2023-tcp", "graphite-2024-tcp", "graphite-8080-tcp", "graphite-8125-tcp", "graphite-8125-udp", "graphite-8216-tcp"]
ingress_rules = ["graphite-webui", "graphite-2003-tcp", "graphite-2004-tcp", "graphite-2023-tcp", "graphite-2024-tcp", "graphite-8080-tcp", "graphite-8125-tcp", "graphite-8125-udp", "graphite-8126-tcp"]
ingress_with_self = ["all-all"]
egress_rules = ["all-all"]
}
......@@ -243,6 +245,11 @@ variable "auto_groups" {
ingress_with_self = ["all-all"]
egress_rules = ["all-all"]
}
kibana = {
ingress_rules = ["kibana-tcp"]
ingress_with_self = ["all-all"]
egress_rules = ["all-all"]
}
ldaps = {
ingress_rules = ["ldaps-tcp"]
ingress_with_self = ["all-all"]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment