Skip to content

Commit

Permalink
re-order some stuff, include iperf3, riverbed
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Feb 26, 2021
1 parent 8c2ee3f commit de076e9
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 11 deletions.
4 changes: 3 additions & 1 deletion it-linux-base/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# v1.0 -- 20200603
* create from running security group for use throughout

* create from running security group for use throughout
# v1.1.0 -- 20210226
* updated some ports to sync with what is deployed
14 changes: 12 additions & 2 deletions it-linux-base/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,22 @@ module "it-linux-base" {
|------|---------|
| aws | n/a |

## Modules

No Modules.

## Resources

| Name |
|------|
| [aws_security_group](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/security_group) |
| [aws_security_group](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group) |
| [aws_vpc](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/vpc) |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| \_module\_version | Module version number | `string` | `"1.0.1"` | no |
| description | Security Group Description | `string` | `"Linux Common Base Security Group"` | no |
| egress\_networks | List of egress networks (all ports) | `list(string)` | <pre>[<br> "0.0.0.0/0"<br>]</pre> | no |
| egress\_security\_groups | List of egress security groups (all ports) | `list(string)` | `[]` | no |
Expand All @@ -53,4 +64,3 @@ module "it-linux-base" {
| Name | Description |
|------|-------------|
| this\_security\_group\_arn | Created security group ARN |
| this\_security\_group\_id | Created security group ID |
3 changes: 2 additions & 1 deletion it-linux-base/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ resource "aws_security_group" "this_security_group" {

tags = merge(
var.tags,
map("boc:tf_module_version", var._module_version),
map("boc:created_by", "terraform"),
map("boc:tf_module_version", local._module_version),
map("boc:vpc:info", join(" ", compact(list(var.vpc_id, var.vpc_full_name)))),
map("Name", "sg-${local.name}"),
)
Expand Down
12 changes: 9 additions & 3 deletions it-linux-base/ports.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ locals {
n_all = ["0.0.0.0/0"]
n_census = ["148.129.0.0/16", "192.168.0.0/16", "172.16.0.0/12", "10.0.0.0/8"]
n_mgmt = ["148.129.162.0/24", "148.129.95.0/24"]
n_riverbed = ["172.24.100.107/32"]
source_groups = ["all", "external"]
name = var.name
ports = [
Expand All @@ -22,17 +23,19 @@ locals {
[4949, 4949, "tcp", "Munin", local.n_mgmt, ["external"]],
[5001, 5003, "tcp", "iperf", local.n_all, ["external"]],
[5001, 5003, "udp", "iperf", local.n_all, ["external"]],
[5201, 5201, "tcp", "iperf3", local.n_all, ["external"]],
[5201, 5201, "udp", "iperf3", local.n_all, ["external"]],

[1556, 1556, "tcp", "Netbackup", local.n_all, ["external"]],
[13724, 13724, "tcp", "Netbackup", local.n_all, ["external"]],
[13782, 13782, "tcp", "Netbackup", local.n_all, ["external"]],
[10082, 10082, "tcp", "Netbackup-spoold", local.n_all, ["external"]],
[10102, 10102, "tcp", "Netbackup-spad", local.n_all, ["external"]],

[1830, 1830, "tcp", "Oracle-OEM", ["10.193.8.0/23"], ["external"]],

[1002, 1002, "tcp", "OPSware-Control", local.n_all, ["external"]],
[9080, 9080, "tcp", "", [local.n_census[2]], ["external"]],
[10082, 10082, "tcp", "Netbackup-spoold", local.n_all, ["external"]],
[10102, 10102, "tcp", "Netbackup-spad", local.n_all, ["external"]],
[27401, 27401, "tcp", "TransactionAgent", local.n_riverbed, ["external"]],
]

# these are ignored
Expand All @@ -49,3 +52,6 @@ locals {
s => [for p in local.p_map : p if contains(p["source_group"], s)]
}
}

# + sg_id=sg-9b19a7fe sg_name='it-linux-base' vpc_id=vpc-95ff37f0 sg_id=sg-9b19a7fe sg_name='it-linux-base' vpc_id=vpc-95ff37f0 direction=ingress pft=tcp,8080,8080 range=0.0.0.0/0
# + sg_id=sg-9b19a7fe sg_name='it-linux-base' vpc_id=vpc-95ff37f0 sg_id=sg-9b19a7fe sg_name='it-linux-base' vpc_id=vpc-95ff37f0 direction=ingress pft=tcp,1571,1571 range=0.0.0.0/0
6 changes: 2 additions & 4 deletions it-linux-base/version.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
variable "_module_version" {
description = "Module version number"
type = string
default = "1.0.1"
locals {
_module_version = "1.1.0"
}

0 comments on commit de076e9

Please sign in to comment.