Skip to content

Commit

Permalink
Merge pull request #81 from jysaad/remove-enable-variable
Browse files Browse the repository at this point in the history
  • Loading branch information
lorengordon authored Sep 14, 2020
2 parents a726808 + 77e3553 commit d0b3b5c
Show file tree
Hide file tree
Showing 14 changed files with 9 additions and 118 deletions.
3 changes: 1 addition & 2 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[bumpversion]
current_version = 1.0.3
current_version = 2.0.0
commit = True
message = Bumps version to {new_version}
tag = False
tag_name = {new_version}

1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ Terraform module to create an EC2 security group
|------|-------------|------|---------|:--------:|
| name | Name of the Security Group | `string` | n/a | yes |
| vpc\_id | VPC ID in which to create the Security Group | `string` | n/a | yes |
| create\_sg | Toggle controlling whether to create the security group | `bool` | `true` | no |
| description | Description of the Security Group | `string` | `"Managed by Terraform"` | no |
| egress\_rules | A schema list of egress rules for the Security Group, see <https://www.terraform.io/docs/providers/aws/r/security_group.html#egress> | `list` | `[]` | no |
| ingress\_rules | A schema list of ingress rules for the Security Group, see <https://www.terraform.io/docs/providers/aws/r/security_group.html#ingress> | `list` | `[]` | no |
Expand Down
1 change: 0 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ provider "aws" {
}

resource "aws_security_group" "this" {
count = var.create_sg ? 1 : 0

name = var.name
description = var.description
Expand Down
8 changes: 4 additions & 4 deletions outputs.tf
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
output "id" {
description = "The ID of the Security Group"
value = join("", aws_security_group.this.*.id)
value = aws_security_group.this.id
}

output "arn" {
description = "The ARN of the Security Group"
value = join("", aws_security_group.this.*.arn)
value = aws_security_group.this.arn
}

output "name" {
description = "The name of the Security Group"
value = join("", aws_security_group.this.*.name)
value = aws_security_group.this.name
}

output "owner_id" {
description = "The owner ID of the Security Group"
value = join("", aws_security_group.this.*.owner_id)
value = aws_security_group.this.owner_id
}
23 changes: 0 additions & 23 deletions tests/create_sg/README.md

This file was deleted.

5 changes: 2 additions & 3 deletions tests/create_sg/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ module "create_security_group" {
aws = aws
}

create_sg = true
name = "tardigrade-security-group-testing"
vpc_id = module.vpc.vpc_id
name = "tardigrade-security-group-testing"
vpc_id = module.vpc.vpc_id
tags = {
environment = "testing"
}
Expand Down
4 changes: 0 additions & 4 deletions tests/create_sg/versions.tf

This file was deleted.

23 changes: 0 additions & 23 deletions tests/no_create_sg/README.md

This file was deleted.

17 changes: 0 additions & 17 deletions tests/no_create_sg/main.tf

This file was deleted.

4 changes: 0 additions & 4 deletions tests/no_create_sg/versions.tf

This file was deleted.

23 changes: 0 additions & 23 deletions tests/use_all_variables/README.md

This file was deleted.

5 changes: 2 additions & 3 deletions tests/use_all_variables/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ module "use_all_variables" {
aws = aws
}

create_sg = true
name = "tardigrade-security-group-testing"
vpc_id = module.vpc.vpc_id
name = "tardigrade-security-group-testing"
vpc_id = module.vpc.vpc_id
ingress_rules = [
{
"from_port" = "0",
Expand Down
4 changes: 0 additions & 4 deletions tests/use_all_variables/versions.tf

This file was deleted.

6 changes: 0 additions & 6 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
variable "create_sg" {
description = "Toggle controlling whether to create the security group"
type = bool
default = true
}

variable "name" {
description = "Name of the Security Group"
type = string
Expand Down

0 comments on commit d0b3b5c

Please sign in to comment.