Simplifying nginx vars
This commit is contained in:
parent
550cb2eb70
commit
17d3f66073
@ -59,7 +59,7 @@ variable "shockrah_xyz_s3_secret_key" {
|
|||||||
sensitive = true
|
sensitive = true
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "shockrah_xyz_nginx_port" {
|
variable "nginx_port" {
|
||||||
description = "Port for shockrah.xyz"
|
description = "Port for shockrah.xyz"
|
||||||
type = number
|
type = number
|
||||||
default = 80
|
default = 80
|
||||||
|
@ -22,7 +22,7 @@ resource "aws_lb" "alpha" {
|
|||||||
#####################################################################
|
#####################################################################
|
||||||
resource "aws_lb_target_group" "shockrah_xyz" {
|
resource "aws_lb_target_group" "shockrah_xyz" {
|
||||||
name = "${var.athens_prefix}-shockrah-xyz"
|
name = "${var.athens_prefix}-shockrah-xyz"
|
||||||
port = var.shockrah_xyz_nginx_port
|
port = var.nginx_port
|
||||||
protocol = "HTTP"
|
protocol = "HTTP"
|
||||||
target_type = "ip"
|
target_type = "ip"
|
||||||
vpc_id = aws_vpc.athens_vpc.id
|
vpc_id = aws_vpc.athens_vpc.id
|
||||||
|
@ -19,10 +19,9 @@ resource "aws_ecs_task_definition" "beta" {
|
|||||||
memory = 512
|
memory = 512
|
||||||
essential = true
|
essential = true
|
||||||
portMappings = [
|
portMappings = [
|
||||||
# blog.shockrah.xyz
|
|
||||||
{
|
{
|
||||||
containerPort = var.shockrah_xyz_nginx_port,
|
containerPort = var.nginx_port,
|
||||||
hostPort = var.shockrah_xyz_nginx_port
|
hostPort = var.nginx_port
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
logConfiguration = {
|
logConfiguration = {
|
||||||
@ -50,7 +49,7 @@ resource "aws_ecs_service" "beta_reverse_proxy" {
|
|||||||
load_balancer {
|
load_balancer {
|
||||||
target_group_arn = aws_lb_target_group.shockrah_xyz.arn
|
target_group_arn = aws_lb_target_group.shockrah_xyz.arn
|
||||||
container_name = "${var.athens_prefix}-beta-container"
|
container_name = "${var.athens_prefix}-beta-container"
|
||||||
container_port = var.shockrah_xyz_nginx_port
|
container_port = var.nginx_port
|
||||||
}
|
}
|
||||||
|
|
||||||
network_configuration {
|
network_configuration {
|
||||||
|
Loading…
Reference in New Issue
Block a user