Skip to content

Commit 3f68703

Browse files
committed
Fixing instance sg dependency
1 parent bf4c9c7 commit 3f68703

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

operations/deployment/terraform/modules/02_networking.tf

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,8 @@ data "aws_security_group" "ec2_security_group" {
8080
}
8181

8282
resource "aws_security_group_rule" "ingress_http" {
83-
tags = {
84-
name = "Allow HTTP traffic"
85-
}
8683
type = "ingress"
87-
description = "${var.aws_resource_identifier} - HTTP"
84+
description = "Allow HTTP"
8885
from_port = 80
8986
to_port = 80
9087
protocol = "tcp"
@@ -93,11 +90,8 @@ resource "aws_security_group_rule" "ingress_http" {
9390
}
9491

9592
resource "aws_security_group_rule" "ingress_https" {
96-
tags = {
97-
name = "Allow HTTPS traffic"
98-
}
9993
type = "ingress"
100-
description = "${var.aws_resource_identifier} - HTTPS"
94+
description = "Allow HTTPS"
10195
from_port = 443
10296
to_port = 443
10397
protocol = "tcp"
@@ -106,11 +100,8 @@ resource "aws_security_group_rule" "ingress_https" {
106100
}
107101

108102
resource "aws_security_group_rule" "ingress_ssh" {
109-
tags = {
110-
name = "Allow SSH traffic"
111-
}
112103
type = "ingress"
113-
description = "SSH"
104+
description = "Allow SSH"
114105
from_port = 22
115106
to_port = 22
116107
protocol = "tcp"

operations/deployment/terraform/modules/03_ec2.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ resource "aws_instance" "server" {
55
associate_public_ip_address = true
66

77
subnet_id = var.create_vpc == "true" ? aws_subnet.public.*.id[0] : null
8-
vpc_security_group_ids = [aws_security_group.allow_http.id, aws_security_group.allow_https.id, aws_security_group.allow_ssh.id]
8+
vpc_security_group_ids = [aws_security_group.ec2_security_group.id]
99
user_data = <<EOF
1010
#!/bin/bash
1111
echo "symlink for python3 -> python"

0 commit comments

Comments
 (0)