From 384101af4b3d819fadcd9d3906f351d66f698756 Mon Sep 17 00:00:00 2001 From: Sam Ainsworth Date: Wed, 11 Oct 2023 12:41:22 +0100 Subject: [PATCH] UML-3115 Terraform linting --- terraform/environment/refactor.tf | 2 +- terraform/environment/region/actor_ecs.tf | 2 +- terraform/environment/region/admin_ecs.tf | 2 +- terraform/environment/region/api_ecs.tf | 2 +- terraform/environment/region/ecs_cluster.tf | 2 +- terraform/environment/region/outputs.tf | 8 +++++--- terraform/environment/region/pdf_ecs.tf | 2 +- terraform/environment/region/viewer_ecs.tf | 2 +- 8 files changed, 12 insertions(+), 10 deletions(-) diff --git a/terraform/environment/refactor.tf b/terraform/environment/refactor.tf index d74db5d718..2337056964 100644 --- a/terraform/environment/refactor.tf +++ b/terraform/environment/refactor.tf @@ -1,6 +1,6 @@ moved { from = aws_ecs_cluster.use-an-lpa - to = module.eu_west_1.aws_ecs_cluster.use-an-lpa + to = module.eu_west_1.aws_ecs_cluster.use_an_lpa } moved { diff --git a/terraform/environment/region/actor_ecs.tf b/terraform/environment/region/actor_ecs.tf index 238efb6396..ffc8dad3e0 100644 --- a/terraform/environment/region/actor_ecs.tf +++ b/terraform/environment/region/actor_ecs.tf @@ -3,7 +3,7 @@ resource "aws_ecs_service" "actor" { name = "actor-service" - cluster = aws_ecs_cluster.use-an-lpa.id + cluster = aws_ecs_cluster.use_an_lpa.id task_definition = aws_ecs_task_definition.actor.arn desired_count = var.autoscaling.use.minimum platform_version = "1.4.0" diff --git a/terraform/environment/region/admin_ecs.tf b/terraform/environment/region/admin_ecs.tf index 3c5b14c504..fc8c404a99 100644 --- a/terraform/environment/region/admin_ecs.tf +++ b/terraform/environment/region/admin_ecs.tf @@ -3,7 +3,7 @@ resource "aws_ecs_service" "admin" { name = "admin-service" - cluster = aws_ecs_cluster.use-an-lpa.id + cluster = aws_ecs_cluster.use_an_lpa.id task_definition = aws_ecs_task_definition.admin.arn desired_count = 1 platform_version = "1.4.0" diff --git a/terraform/environment/region/api_ecs.tf b/terraform/environment/region/api_ecs.tf index 3b34187849..314ebbd673 100644 --- a/terraform/environment/region/api_ecs.tf +++ b/terraform/environment/region/api_ecs.tf @@ -3,7 +3,7 @@ resource "aws_ecs_service" "api" { name = "api-service" - cluster = aws_ecs_cluster.use-an-lpa.id + cluster = aws_ecs_cluster.use_an_lpa.id task_definition = aws_ecs_task_definition.api.arn desired_count = var.autoscaling.api.minimum platform_version = "1.4.0" diff --git a/terraform/environment/region/ecs_cluster.tf b/terraform/environment/region/ecs_cluster.tf index ab51fb0c38..111072b9d1 100644 --- a/terraform/environment/region/ecs_cluster.tf +++ b/terraform/environment/region/ecs_cluster.tf @@ -1,4 +1,4 @@ -resource "aws_ecs_cluster" "use-an-lpa" { +resource "aws_ecs_cluster" "use_an_lpa" { name = "${var.environment_name}-use-an-lpa" setting { name = "containerInsights" diff --git a/terraform/environment/region/outputs.tf b/terraform/environment/region/outputs.tf index 21f6615277..27aac90a33 100644 --- a/terraform/environment/region/outputs.tf +++ b/terraform/environment/region/outputs.tf @@ -1,9 +1,10 @@ output "ecs_cluster" { - value = aws_ecs_cluster.use-an-lpa + description = "The ECS cluster object" + value = aws_ecs_cluster.use_an_lpa } output "ecs_services" { - # Produce a map of service names to service objects + description = "Objects containing the ECS services" value = { actor = aws_ecs_service.actor admin = aws_ecs_service.admin @@ -14,5 +15,6 @@ output "ecs_services" { } output "admin_domain" { - value = "https://${var.route_53_fqdns.admin}" + description = "The URL for the admin interface" + value = "https://${var.route_53_fqdns.admin}" } \ No newline at end of file diff --git a/terraform/environment/region/pdf_ecs.tf b/terraform/environment/region/pdf_ecs.tf index 896c647115..d8746cad25 100644 --- a/terraform/environment/region/pdf_ecs.tf +++ b/terraform/environment/region/pdf_ecs.tf @@ -3,7 +3,7 @@ resource "aws_ecs_service" "pdf" { name = "pdf-service" - cluster = aws_ecs_cluster.use-an-lpa.id + cluster = aws_ecs_cluster.use_an_lpa.id task_definition = aws_ecs_task_definition.pdf.arn desired_count = var.autoscaling.pdf.minimum platform_version = "1.4.0" diff --git a/terraform/environment/region/viewer_ecs.tf b/terraform/environment/region/viewer_ecs.tf index e018b64b1b..19adb5470a 100644 --- a/terraform/environment/region/viewer_ecs.tf +++ b/terraform/environment/region/viewer_ecs.tf @@ -3,7 +3,7 @@ resource "aws_ecs_service" "viewer" { name = "viewer-service" - cluster = aws_ecs_cluster.use-an-lpa.id + cluster = aws_ecs_cluster.use_an_lpa.id task_definition = aws_ecs_task_definition.viewer.arn desired_count = var.autoscaling.view.minimum platform_version = "1.4.0"