Skip to content

Commit

Permalink
update pre-commit, regenerate
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Mar 1, 2021
1 parent 86b5137 commit c723101
Show file tree
Hide file tree
Showing 13 changed files with 80 additions and 46 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.31.0
rev: v1.47.0
hooks:
# - id: terraform_validate
- id: terraform_fmt
Expand Down
28 changes: 14 additions & 14 deletions it-linux-base/.x/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,38 +18,38 @@
*/

locals {
description = "Linux Common Base Ports"
description = "Linux Common Base Ports"
short_description = "Linux"
name = var.name
name = var.name
ports = [
[ 1433, 1433, "tcp" ],
[ 5023, 5023, "tcp" ]
[1433, 1433, "tcp"],
[5023, 5023, "tcp"]
]
}

resource "aws_security_group" "this_security_group" {
name = local.name
name = local.name
description = local.description
vpc_id = var.vpc_id
vpc_id = var.vpc_id

dynamic "ingress" {
for_each = local.ports
iterator = p
content {
description = local.description
from_port = p.value[0]
to_port = p.value[1]
protocol = p.value[2]
cidr_blocks = [ "0.0.0.0/0" ]
from_port = p.value[0]
to_port = p.value[1]
protocol = p.value[2]
cidr_blocks = ["0.0.0.0/0"]
}
}

egress {
description = "ALL ${local.description}"
from_port = 0
to_port = 0
protocol = -1
cidr_blocks = [ "0.0.0.0/0" ]
from_port = 0
to_port = 0
protocol = -1
cidr_blocks = ["0.0.0.0/0"]
}

tags = merge(
Expand Down
4 changes: 2 additions & 2 deletions it-linux-base/.x/output.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
output "this_security_group_id" {
description = "Created security group ID"
value = aws_security_group.this_security_group.id
value = aws_security_group.this_security_group.id
}

output "this_security_group_arn" {
description = "Created security group ARN"
value = aws_security_group.this_security_group.arn
value = aws_security_group.this_security_group.arn
}
12 changes: 6 additions & 6 deletions it-linux-base/.x/variables.tf
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
variable "vpc_id" {
description = "VPC ID Number"
type = string
type = string
}

variable "name" {
description = "Security group Name"
type = string
default = "m-rds-mssql"
type = string
default = "m-rds-mssql"
}

variable "tags" {
description = "Extra security group tags"
type = map
default = {
type = map
default = {
"CostAllocation" = "csvd:infrastructure"
"Environment" = "csvd-infrastructure"
"Environment" = "csvd-infrastructure"
}
}
4 changes: 2 additions & 2 deletions it-linux-base/.x/version.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
variable "_module_version" {
description = "Module version number"
type = string
default = "1.4"
type = string
default = "1.4"
}
1 change: 1 addition & 0 deletions it-linux-base/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,4 @@ No Modules.
| Name | Description |
|------|-------------|
| this\_security\_group\_arn | Created security group ARN |
| this\_security\_group\_id | Created security group ID |
12 changes: 12 additions & 0 deletions it-windows-base/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@ module "it-windows-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 |
Expand Down
11 changes: 11 additions & 0 deletions ois-scanner/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,17 @@ module "ois-scanner" {
|------|---------|
| aws | n/a |

## Modules

No Modules.

## Resources

| Name |
|------|
| [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 |
Expand Down
10 changes: 10 additions & 0 deletions rds-mssql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@ module "rds-mssql" {
|------|---------|
| aws | n/a |

## Modules

No Modules.

## Resources

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

## Inputs

| Name | Description | Type | Default | Required |
Expand Down
2 changes: 1 addition & 1 deletion rds-oracle/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ resource "aws_security_group" "this_security_group" {
description = local.description
vpc_id = var.vpc_id

# portlist
# portlist
dynamic "ingress" {
for_each = local.ports_map
iterator = p
Expand Down
4 changes: 2 additions & 2 deletions rds-oracle/output.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
output "this_security_group_id" {
description = "Created security group ID"
value = aws_security_group.this_security_group.id
value = aws_security_group.this_security_group.id
}

output "this_security_group_arn" {
description = "Created security group ARN"
value = aws_security_group.this_security_group.arn
value = aws_security_group.this_security_group.arn
}
14 changes: 7 additions & 7 deletions rds-oracle/ports.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ locals {
description = "module: Oracle common ports"
name = var.name
ports = [
[ 1521, 1521, "tcp", "oracle-db", [] ],
[ 1570, 1571, "tcp", "oracle-db", [] ],
[ 3872, 3872, "tcp", "inbound-oracle-OEM", [ "172.24.101.9/32", "172.24.101.10/32", "172.24.32.251/32" ] ],
[ 7799, 7799, "tcp", "oracle-OEM", [] ],
[1521, 1521, "tcp", "oracle-db", []],
[1570, 1571, "tcp", "oracle-db", []],
[3872, 3872, "tcp", "inbound-oracle-OEM", ["172.24.101.9/32", "172.24.101.10/32", "172.24.32.251/32"]],
[7799, 7799, "tcp", "oracle-OEM", []],
]
ingress_networks = var.networks
egress_networks = var.egress_networks
ports_fields = ["from","to","proto","description","cidr"]
ports_map = [ for p in local.ports: zipmap(local.ports_fields,p) ]
egress_networks = var.egress_networks
ports_fields = ["from", "to", "proto", "description", "cidr"]
ports_map = [for p in local.ports : zipmap(local.ports_fields, p)]
}
22 changes: 11 additions & 11 deletions rds-oracle/variables.tf
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
variable "vpc_id" {
description = "VPC ID Number"
type = string
type = string
}

variable "vpc_full_name" {
description = "VPC Name"
type = string
default = ""
type = string
default = ""
}

variable "name" {
description = "Security group Name"
type = string
# default = "m-rds-oracle"
type = string
# default = "m-rds-oracle"
default = "m-oracle-db"
}

variable "networks" {
description = "List of ingress networks (applies to all ports)"
type = list(string)
default = [ "0.0.0.0/0" ]
type = list(string)
default = ["0.0.0.0/0"]
}

variable "egress_networks" {
description = "List of egress networks (all ports)"
type = list(string)
default = [ "0.0.0.0/0" ]
type = list(string)
default = ["0.0.0.0/0"]
}

variable "tags" {
description = "Extra security group tags"
type = map
type = map
default = {
"CostAllocation" = "csvd:infrastructure"
"Environment" = "csvd-infrastructure"
"Environment" = "csvd-infrastructure"
}
}

0 comments on commit c723101

Please sign in to comment.