+ vpc id to sec groups

This commit is contained in:
shockrah 2021-11-25 00:11:51 -08:00
parent fbf6016d14
commit 44bb460afc

View File

@ -1,8 +1,9 @@
# Here are general definitions for security rulesets # Here are general definitions for security rulesets
resource "aws_security_group" "basic_web_sec" { resource "aws_security_group" "basic_web_sec" {
name = "General web server ruleset" name = "Athens General web server ruleset"
description = "Allowing strictly web traffic" description = "Allowing strictly web traffic"
vpc_id = aws_vpc.athens_vpc.id
# Intake of web requests(only serving TLS enabled traffic) # Intake of web requests(only serving TLS enabled traffic)
ingress { ingress {
cidr_blocks = ["0.0.0.0/0"] cidr_blocks = ["0.0.0.0/0"]
@ -22,6 +23,8 @@ resource "aws_security_group" "basic_web_sec" {
} }
resource "aws_security_group" "internal_ssh_recv" { resource "aws_security_group" "internal_ssh_recv" {
name = "Athens Internal SSH RECV"
vpc_id = aws_vpc.athens_vpc.id
ingress { ingress {
cidr_blocks = [var.crete_cidr] cidr_blocks = [var.crete_cidr]
from_port = 22 from_port = 22
@ -34,6 +37,8 @@ resource "aws_security_group" "internal_ssh_recv" {
# Note this one is kinda special because the dev box # Note this one is kinda special because the dev box
# itself is _kinda_ special(?) # itself is _kinda_ special(?)
resource "aws_security_group" "gamma_sec" { resource "aws_security_group" "gamma_sec" {
name = "Athens Gamma Sec"
vpc_id = aws_vpc.athens_vpc.id
ingress { ingress {
cidr_blocks = ["0.0.0.0/0"] cidr_blocks = ["0.0.0.0/0"]
from_port = 22 from_port = 22