Working sample service with ECS
for now this is just a hello world service with a public IP
This commit is contained in:
parent
e830889432
commit
9d426917f7
@ -1,8 +1,8 @@
|
|||||||
resource "aws_eip" "alpha_eip" {
|
resource "aws_eip" "alpha_eip" {
|
||||||
instance = aws_instance.alpha.id
|
instance = aws_instance.atlas.id
|
||||||
vpc = true
|
vpc = true
|
||||||
tags = {
|
tags = {
|
||||||
Name = "Alpha EIP"
|
Name = "Atlas EIP"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,39 @@
|
|||||||
# Here are general definitions for security rulesets
|
# Here are general definitions for security rulesets
|
||||||
|
|
||||||
|
resource "aws_security_group" "ecs_web_ingress" {
|
||||||
|
name = "Alpha-Web-Ingress"
|
||||||
|
description = "Allow web traffic into the host"
|
||||||
|
vpc_id = aws_vpc.athens_vpc.id
|
||||||
|
ingress {
|
||||||
|
cidr_blocks = ["0.0.0.0/0"]
|
||||||
|
from_port = 443
|
||||||
|
to_port = 443
|
||||||
|
protocol = "tcp"
|
||||||
|
}
|
||||||
|
ingress {
|
||||||
|
cidr_blocks = ["0.0.0.0/0"]
|
||||||
|
from_port = 80
|
||||||
|
to_port = 80
|
||||||
|
protocol = "tcp"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "aws_security_group" "base_ecs" {
|
||||||
|
vpc_id = aws_vpc.athens_vpc.id
|
||||||
|
egress {
|
||||||
|
cidr_blocks = ["0.0.0.0/0"]
|
||||||
|
from_port = 443
|
||||||
|
to_port = 443
|
||||||
|
protocol = "tcp"
|
||||||
|
}
|
||||||
|
egress {
|
||||||
|
cidr_blocks = ["0.0.0.0/0"]
|
||||||
|
from_port = 2049
|
||||||
|
to_port = 2049
|
||||||
|
protocol = "tcp"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
resource "aws_security_group" "general_web_req" {
|
resource "aws_security_group" "general_web_req" {
|
||||||
name = "Athens General web server ruleset"
|
name = "Athens General web server ruleset"
|
||||||
description = "Allowing strictly web traffic"
|
description = "Allowing strictly web traffic"
|
||||||
|
Loading…
Reference in New Issue
Block a user