Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
terraform-aws-security-group
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Terraform Modules
terraform-aws-security-group
Commits
ff0e15dd
Unverified
Commit
ff0e15dd
authored
Apr 17, 2020
by
Bart Van Bos
Committed by
GitHub
Apr 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: Added support for graphite-statsd stack (#169)
parent
8b540d30
Changes
9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
693 additions
and
2 deletions
+693
-2
README.md
README.md
+2
-2
README.md
modules/README.md
+1
-0
README.md
modules/graphite-statsd/README.md
+109
-0
auto_values.tf
modules/graphite-statsd/auto_values.tf
+79
-0
main.tf
modules/graphite-statsd/main.tf
+114
-0
outputs.tf
modules/graphite-statsd/outputs.tf
+24
-0
variables.tf
modules/graphite-statsd/variables.tf
+342
-0
versions.tf
modules/graphite-statsd/versions.tf
+7
-0
rules.tf
rules.tf
+15
-0
No files found.
README.md
View file @
ff0e15dd
This diff is collapsed.
Click to expand it.
modules/README.md
View file @
ff0e15dd
...
...
@@ -9,6 +9,7 @@ List of Security Groups implemented as Terraform modules
*
[
docker-swarm
](
https://github.com/terraform-aws-modules/terraform-aws-security-group/tree/master/modules/docker-swarm
)
*
[
elasticsearch
](
https://github.com/terraform-aws-modules/terraform-aws-security-group/tree/master/modules/elasticsearch
)
*
[
grafana
](
https://github.com/terraform-aws-modules/terraform-aws-security-group/tree/master/modules/grafana
)
*
[
graphite-statsd
](
https://github.com/terraform-aws-modules/terraform-aws-security-group/tree/master/modules/graphite-statsd
)
*
[
http-80
](
https://github.com/terraform-aws-modules/terraform-aws-security-group/tree/master/modules/http-80
)
*
[
http-8080
](
https://github.com/terraform-aws-modules/terraform-aws-security-group/tree/master/modules/http-8080
)
*
[
https-443
](
https://github.com/terraform-aws-modules/terraform-aws-security-group/tree/master/modules/https-443
)
...
...
modules/graphite-statsd/README.md
0 → 100644
View file @
ff0e15dd
This diff is collapsed.
Click to expand it.
modules/graphite-statsd/auto_values.tf
0 → 100644
View file @
ff0e15dd
# 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
=
[
"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"
]
}
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
}
modules/graphite-statsd/main.tf
0 → 100644
View file @
ff0e15dd
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
}
modules/graphite-statsd/outputs.tf
0 → 100644
View file @
ff0e15dd
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
}
modules/graphite-statsd/variables.tf
0 → 100644
View file @
ff0e15dd
This diff is collapsed.
Click to expand it.
modules/graphite-statsd/versions.tf
0 → 100644
View file @
ff0e15dd
terraform
{
required_version
=
"~> 0.12.6"
required_providers
{
aws
=
"~> 2.42"
}
}
rules.tf
View file @
ff0e15dd
...
...
@@ -47,6 +47,16 @@ variable "rules" {
elasticsearch
-
java
-
tcp
=
[
9300
,
9300
,
"tcp"
,
"Elasticsearch Java interface"
]
# Grafana
grafana
-
tcp
=
[
3000
,
3000
,
"tcp"
,
"Grafana Dashboard"
]
# Graphite Statsd
graphite
-
webui
=
[
80
,
80
,
"tcp"
,
"Graphite admin interface"
]
graphite
-
2003
-
tcp
=
[
2003
,
2003
,
"tcp"
,
"Carbon receiver plain text"
]
graphite
-
2004
-
tcp
=
[
2004
,
2004
,
"tcp"
,
"Carbon receiver pickle"
]
graphite
-
2023
-
tcp
=
[
2023
,
2023
,
"tcp"
,
"Carbon aggregator plaintext"
]
graphite
-
2024
-
tcp
=
[
2024
,
2024
,
"tcp"
,
"Carbon aggregator pickle"
]
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"
]
# HTTP
http
-
80
-
tcp
=
[
80
,
80
,
"tcp"
,
"HTTP"
]
http
-
8080
-
tcp
=
[
8080
,
8080
,
"tcp"
,
"HTTP"
]
...
...
@@ -188,6 +198,11 @@ variable "auto_groups" {
ingress_with_self
=
[
"all-all"
]
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_with_self
=
[
"all-all"
]
egress_rules
=
[
"all-all"
]
}
http
-
80
=
{
ingress_rules
=
[
"http-80-tcp"
]
ingress_with_self
=
[
"all-all"
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment