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 # Alpha cluster definition
########################### ###########################
resource "aws_ecs_cluster" "alpha" { resource "aws_ecs_cluster" "alpha" {
name = "${var.athens_prefix}-athens-alpha" name = "${var.athens_prefix}-alpha-cluster"
configuration { configuration {
execute_command_configuration { execute_command_configuration {
logging = "OVERRIDE" logging = "OVERRIDE"

View File

@ -139,3 +139,9 @@ variable "shockrah_xyz_s3_server" {
sensitive = true 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" { resource "aws_lb_target_group" "shockrah_xyz" {
name = "${var.athens_prefix}-shockrah-xyz" name = "${var.athens_prefix}-shockrah-xyz"
port = 80 port = var.shockrah_xyz_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