Skip to content

Commit

Permalink
Merge pull request #18 from aidanmelen/v1.2.0
Browse files Browse the repository at this point in the history
added default name tag. added confluent managed rules
  • Loading branch information
aidanmelen authored Sep 23, 2022
2 parents 5d05b26 + 4ac7573 commit dc3455a
Show file tree
Hide file tree
Showing 35 changed files with 6,218 additions and 6,331 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
NAME := security-group-v2
HOSTNAME := aidanmelen
PROVIDER := aws
VERSION := 1.1.0
VERSION := 1.2.0
SHELL := /bin/bash


Expand Down
22 changes: 9 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Create a Security Group with the following rules:
#tfsec:ignore:aws-ec2-no-public-egress-sgr
module "security_group" {
source = "aidanmelen/security-group-v2/aws"
version = ">= 1.1.0"
version = ">= 1.2.0"
name = local.name
description = "Allow TLS inbound traffic"
Expand All @@ -42,10 +42,6 @@ module "security_group" {
egress = [
{ rule = "all-all-to-public" }
]
tags = {
"Name" = local.name
}
}
```

Expand Down Expand Up @@ -88,15 +84,15 @@ Run Terratest using the [Makefile](https://github.com/aidanmelen/terraform-aws-s
### Results

```
Terratest Suite (v1.1.0)
--- PASS: TestTerraformBasicExample (23.48s)
--- PASS: TestTerraformCompleteExample (49.69s)
--- PASS: TestTerraformCustomerRulesExample (36.73s)
--- PASS: TestTerraformManagedRulesExample (36.19s)
Terratest Suite (v1.2.0)
--- PASS: TestTerraformBasicExample (24.12s)
--- PASS: TestTerraformCompleteExample (50.08s)
--- PASS: TestTerraformCustomerRulesExample (34.89s)
--- PASS: TestTerraformManagedRulesExample (33.99s)
--- PASS: TestTerraformCommonRulesExample (27.24s)
--- PASS: TestTerraformMatrixRulesExample (34.10s)
--- PASS: TestTerraformComputedRulesExample (46.96s)
--- PASS: TestTerraformRulesOnlyExample (22.63s)
--- PASS: TestTerraformMatrixRulesExample (34.88s)
--- PASS: TestTerraformComputedRulesExample (41.59s)
--- PASS: TestTerraformRulesOnlyExample (22.57s)
```

## Makefile Targets
Expand Down
6 changes: 1 addition & 5 deletions examples/basic/.main.tf.docs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#tfsec:ignore:aws-ec2-no-public-egress-sgr
module "security_group" {
source = "aidanmelen/security-group-v2/aws"
version = ">= 1.1.0"
version = ">= 1.2.0"

name = local.name
description = "Allow TLS inbound traffic"
Expand All @@ -18,8 +18,4 @@ module "security_group" {
egress = [
{ rule = "all-all-to-public" }
]

tags = {
"Name" = local.name
}
}
6 changes: 1 addition & 5 deletions examples/basic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Note that this example may create resources which cost money. Run `terraform des
#tfsec:ignore:aws-ec2-no-public-egress-sgr
module "security_group" {
source = "aidanmelen/security-group-v2/aws"
version = ">= 1.1.0"
version = ">= 1.2.0"
name = local.name
description = "Allow TLS inbound traffic"
Expand All @@ -44,10 +44,6 @@ module "security_group" {
egress = [
{ rule = "all-all-to-public" }
]
tags = {
"Name" = local.name
}
}
```

Expand Down
4 changes: 0 additions & 4 deletions examples/basic/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,4 @@ module "security_group" {
egress = [
{ rule = "all-all-to-public" }
]

tags = {
"Name" = local.name
}
}
12 changes: 2 additions & 10 deletions examples/common/.main.tf.docs
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,26 @@
#tfsec:ignore:aws-ec2-no-public-egress-sgr
module "public_https_sg" {
source = "aidanmelen/security-group-v2/aws"
version = ">= 1.1.0"
version = ">= 1.2.0"

name = "${local.name}-https"
description = "${local.name}-https"
vpc_id = data.aws_vpc.default.id

ingress = [{ rule = "https-tcp-from-public" }, { rule = "all-all-from-self" }]
egress = [{ rule = "all-all-to-public" }]

tags = {
"Name" = "${local.name}-https"
}
}

#tfsec:ignore:aws-vpc-no-public-ingress-sgr
#tfsec:ignore:aws-ec2-no-public-egress-sgr
module "public_http_sg" {
source = "aidanmelen/security-group-v2/aws"
version = ">= 1.1.0"
version = ">= 1.2.0"

name = "${local.name}-http"
description = "${local.name}-http"
vpc_id = data.aws_vpc.default.id

ingress = [{ rule = "http-tcp-from-public" }, { rule = "all-all-from-self" }]
egress = [{ rule = "all-all-to-public" }]

tags = {
"Name" = "${local.name}-http"
}
}
12 changes: 2 additions & 10 deletions examples/common/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,36 +27,28 @@ Note that this example may create resources which cost money. Run `terraform des
#tfsec:ignore:aws-ec2-no-public-egress-sgr
module "public_https_sg" {
source = "aidanmelen/security-group-v2/aws"
version = ">= 1.1.0"
version = ">= 1.2.0"
name = "${local.name}-https"
description = "${local.name}-https"
vpc_id = data.aws_vpc.default.id
ingress = [{ rule = "https-tcp-from-public" }, { rule = "all-all-from-self" }]
egress = [{ rule = "all-all-to-public" }]
tags = {
"Name" = "${local.name}-https"
}
}
#tfsec:ignore:aws-vpc-no-public-ingress-sgr
#tfsec:ignore:aws-ec2-no-public-egress-sgr
module "public_http_sg" {
source = "aidanmelen/security-group-v2/aws"
version = ">= 1.1.0"
version = ">= 1.2.0"
name = "${local.name}-http"
description = "${local.name}-http"
vpc_id = data.aws_vpc.default.id
ingress = [{ rule = "http-tcp-from-public" }, { rule = "all-all-from-self" }]
egress = [{ rule = "all-all-to-public" }]
tags = {
"Name" = "${local.name}-http"
}
}
```

Expand Down
8 changes: 0 additions & 8 deletions examples/common/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ module "public_https_sg" {

ingress = [{ rule = "https-tcp-from-public" }, { rule = "all-all-from-self" }]
egress = [{ rule = "all-all-to-public" }]

tags = {
"Name" = "${local.name}-https"
}
}

#tfsec:ignore:aws-vpc-no-public-ingress-sgr
Expand All @@ -26,8 +22,4 @@ module "public_http_sg" {

ingress = [{ rule = "http-tcp-from-public" }, { rule = "all-all-from-self" }]
egress = [{ rule = "all-all-to-public" }]

tags = {
"Name" = "${local.name}-http"
}
}
4 changes: 2 additions & 2 deletions examples/complete/.main.tf.docs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#tfsec:ignore:aws-ec2-no-public-egress-sgr
module "security_group" {
source = "aidanmelen/security-group-v2/aws"
version = ">= 1.1.0"
version = ">= 1.2.0"

name = local.name
description = local.name
Expand Down Expand Up @@ -104,6 +104,6 @@ module "security_group" {

module "disabled_sg" {
source = "aidanmelen/security-group-v2/aws"
version = ">= 1.1.0"
version = ">= 1.2.0"
create = false
}
4 changes: 2 additions & 2 deletions examples/complete/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Note that this example may create resources which cost money. Run `terraform des
#tfsec:ignore:aws-ec2-no-public-egress-sgr
module "security_group" {
source = "aidanmelen/security-group-v2/aws"
version = ">= 1.1.0"
version = ">= 1.2.0"
name = local.name
description = local.name
Expand Down Expand Up @@ -133,7 +133,7 @@ module "security_group" {
module "disabled_sg" {
source = "aidanmelen/security-group-v2/aws"
version = ">= 1.1.0"
version = ">= 1.2.0"
create = false
}
```
Expand Down
6 changes: 1 addition & 5 deletions examples/computed/.main.tf.docs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ resource "aws_ec2_managed_prefix_list" "other" {

module "security_group" {
source = "aidanmelen/security-group-v2/aws"
version = ">= 1.1.0"
version = ">= 1.2.0"

name = local.name
description = local.name
Expand Down Expand Up @@ -83,8 +83,4 @@ module "security_group" {
rules = [{ rule = "postgresql-tcp" }],
source_security_group_id = aws_security_group.other.id
}

tags = {
"Name" = local.name
}
}
6 changes: 1 addition & 5 deletions examples/computed/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ resource "aws_ec2_managed_prefix_list" "other" {
module "security_group" {
source = "aidanmelen/security-group-v2/aws"
version = ">= 1.1.0"
version = ">= 1.2.0"
name = local.name
description = local.name
Expand Down Expand Up @@ -106,10 +106,6 @@ module "security_group" {
rules = [{ rule = "postgresql-tcp" }],
source_security_group_id = aws_security_group.other.id
}
tags = {
"Name" = local.name
}
}
```

Expand Down
4 changes: 0 additions & 4 deletions examples/computed/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,4 @@ module "security_group" {
rules = [{ rule = "postgresql-tcp" }],
source_security_group_id = aws_security_group.other.id
}

tags = {
"Name" = local.name
}
}
6 changes: 1 addition & 5 deletions examples/customer/.main.tf.docs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#tfsec:ignore:aws-ec2-no-public-egress-sgr
module "security_group" {
source = "aidanmelen/security-group-v2/aws"
version = ">= 1.1.0"
version = ">= 1.2.0"

name = local.name
description = local.name
Expand Down Expand Up @@ -73,8 +73,4 @@ module "security_group" {
self = true
}
]

tags = {
"Name" = local.name
}
}
6 changes: 1 addition & 5 deletions examples/customer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Note that this example may create resources which cost money. Run `terraform des
#tfsec:ignore:aws-ec2-no-public-egress-sgr
module "security_group" {
source = "aidanmelen/security-group-v2/aws"
version = ">= 1.1.0"
version = ">= 1.2.0"
name = local.name
description = local.name
Expand Down Expand Up @@ -96,10 +96,6 @@ module "security_group" {
self = true
}
]
tags = {
"Name" = local.name
}
}
```

Expand Down
4 changes: 0 additions & 4 deletions examples/customer/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,4 @@ module "security_group" {
self = true
}
]

tags = {
"Name" = local.name
}
}
6 changes: 1 addition & 5 deletions examples/managed/.main.tf.docs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#tfsec:ignore:aws-ec2-no-public-egress-sgr
module "security_group" {
source = "aidanmelen/security-group-v2/aws"
version = ">= 1.1.0"
version = ">= 1.2.0"

name = local.name
description = local.name
Expand Down Expand Up @@ -53,8 +53,4 @@ module "security_group" {
self = true
}
]

tags = {
"Name" = local.name
}
}
6 changes: 1 addition & 5 deletions examples/managed/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Note that this example may create resources which cost money. Run `terraform des
#tfsec:ignore:aws-ec2-no-public-egress-sgr
module "security_group" {
source = "aidanmelen/security-group-v2/aws"
version = ">= 1.1.0"
version = ">= 1.2.0"
name = local.name
description = local.name
Expand Down Expand Up @@ -76,10 +76,6 @@ module "security_group" {
self = true
}
]
tags = {
"Name" = local.name
}
}
```

Expand Down
4 changes: 0 additions & 4 deletions examples/managed/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,4 @@ module "security_group" {
self = true
}
]

tags = {
"Name" = local.name
}
}
6 changes: 1 addition & 5 deletions examples/matrix/.main.tf.docs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module "security_group" {
source = "aidanmelen/security-group-v2/aws"
version = ">= 1.1.0"
version = ">= 1.2.0"

name = local.name
vpc_id = data.aws_vpc.default.id
Expand Down Expand Up @@ -28,8 +28,4 @@ module "security_group" {
cidr_blocks = ["10.0.0.0/24", "10.0.1.0/24"]
source_security_group_id = data.aws_security_group.default.id
}

tags = {
"Name" = local.name
}
}
Loading

0 comments on commit dc3455a

Please sign in to comment.