Avoiding hard coded values and improving cluster name

This commit is contained in:
shockrah 2023-02-10 21:30:20 -08:00
parent 203ec7f434
commit 53267daf99
3 changed files with 8 additions and 2 deletions

View File

@ -5,7 +5,7 @@
# Alpha cluster definition
###########################
resource "aws_ecs_cluster" "alpha" {
name = "${var.athens_prefix}-athens-alpha"
name = "${var.athens_prefix}-alpha-cluster"
configuration {
execute_command_configuration {
logging = "OVERRIDE"

View File

@ -139,3 +139,9 @@ variable "shockrah_xyz_s3_server" {
sensitive = true
}
variable "shockrah_xyz_nginx_port" {
description = "Port for shockrah.xyz"
type = number
default = 80
}

View File

@ -22,7 +22,7 @@ resource "aws_lb" "alpha" {
#####################################################################
resource "aws_lb_target_group" "shockrah_xyz" {
name = "${var.athens_prefix}-shockrah-xyz"
port = 80
port = var.shockrah_xyz_nginx_port
protocol = "HTTP"
target_type = "ip"
vpc_id = aws_vpc.athens_vpc.id