Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
fklasen-snyk authored Mar 22, 2024
1 parent 3174b03 commit 2b67c26
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions modules/vpc/main.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
resource "aws_vpc" "example" {
resource "aws_vpc" "terraform_example" {
cidr_block = var.cidr
}

resource "aws_default_security_group" "default" {
vpc_id = aws_vpc.example.id
resource "aws_default_security_group" "terraform_default" {
vpc_id = aws_vpc.terraform_example.id

ingress {
protocol = -1
Expand All @@ -13,10 +13,10 @@ resource "aws_default_security_group" "default" {
}
}

resource "aws_security_group" "allow_ssh" {
name = "allow_ssh"
resource "aws_security_group" "terraform_allow_ssh" {
name = "terraform_allow_ssh"
description = "Allow SSH inbound from anywhere"
vpc_id = aws_vpc.example.id
vpc_id = aws_vpc.terraform_example.id

ingress {
from_port = 22
Expand All @@ -26,10 +26,10 @@ resource "aws_security_group" "allow_ssh" {
}
}

resource "aws_security_group" "allow_ssh_with_valid_cidr" {
name = "allow_ssh_with_valid_cidr"
resource "aws_security_group" "terraform_allow_ssh_with_valid_cidr" {
name = "terraform_allow_ssh_with_valid_cidr"
description = "Allow SSH inbound from specific range"
vpc_id = aws_vpc.example.id
vpc_id = aws_vpc.terraform_example.id

ingress {
from_port = 22
Expand Down
4 changes: 2 additions & 2 deletions modules/vpc/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
output "vpc_id" {
value = aws_vpc.example.id
value = aws_vpc.terraform_example.id
}

output "vpc_sg_id" {
value = aws_default_security_group.default.id
value = aws_default_security_group.terraform_default.id
}

0 comments on commit 2b67c26

Please sign in to comment.