From b26b1e82a7a86485d00376d0d5dca62e5d9ca565 Mon Sep 17 00:00:00 2001 From: Fabio Cicerchia Date: Thu, 26 Dec 2024 19:34:41 +0100 Subject: [PATCH] fixed sg id + lint --- sys/terraform/ecs.tf | 48 ++++++++++++++++++++++---------------------- sys/terraform/elb.tf | 2 +- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/sys/terraform/ecs.tf b/sys/terraform/ecs.tf index f1bc0646..bfa59e61 100644 --- a/sys/terraform/ecs.tf +++ b/sys/terraform/ecs.tf @@ -77,31 +77,31 @@ resource "aws_ecs_service" "ecsservice" { resource "aws_ecs_task_definition" "ecstask" { execution_role_arn = var.exec_role_arn container_definitions = templatefile("ecs/task-definition.json", { - account_id = data.aws_caller_identity.current.account_id - aws_region = data.aws_region.current.name - service_name = var.service_name - ecr_image_tag_nginx = var.ecr_image_tag_nginx - ecr_image_tag_php = var.ecr_image_tag_php - cloudwatchloggroup = aws_cloudwatch_log_group.cloudwatchloggroup.name - env_appdebug = var.env_appdebug - env_appenv = var.env_appenv - env_appsecret = var.env_appsecret - env_appxdebug = var.env_appxdebug - env_appxdebughost = var.env_appxdebughost + account_id = data.aws_caller_identity.current.account_id + aws_region = data.aws_region.current.name + service_name = var.service_name + ecr_image_tag_nginx = var.ecr_image_tag_nginx + ecr_image_tag_php = var.ecr_image_tag_php + cloudwatchloggroup = aws_cloudwatch_log_group.cloudwatchloggroup.name + env_appdebug = var.env_appdebug + env_appenv = var.env_appenv + env_appsecret = var.env_appsecret + env_appxdebug = var.env_appxdebug + env_appxdebughost = var.env_appxdebughost env_bitbucketauthmethod = var.env_bitbucketauthmethod - env_bitbucketsecret = var.env_bitbucketsecret - env_bitbuckettoken = var.env_bitbuckettoken - env_circlecitoken = var.env_circlecitoken - env_githubauthmethod = var.env_githubauthmethod - env_githubsecret = var.env_githubsecret - env_githubusername = var.env_githubusername - env_gitlabtoken = var.env_gitlabtoken - env_phpfpmhost = var.env_phpfpmhost - env_redishost = var.env_redishost - env_redishost = var.env_redishost - env_resolverip = var.env_resolverip - env_sentrydsn = var.env_sentrydsn - env_trustedproxies = var.env_trustedproxies + env_bitbucketsecret = var.env_bitbucketsecret + env_bitbuckettoken = var.env_bitbuckettoken + env_circlecitoken = var.env_circlecitoken + env_githubauthmethod = var.env_githubauthmethod + env_githubsecret = var.env_githubsecret + env_githubusername = var.env_githubusername + env_gitlabtoken = var.env_gitlabtoken + env_phpfpmhost = var.env_phpfpmhost + env_redishost = var.env_redishost + env_redishost = var.env_redishost + env_resolverip = var.env_resolverip + env_sentrydsn = var.env_sentrydsn + env_trustedproxies = var.env_trustedproxies }) memory = "2048" family = var.service_name diff --git a/sys/terraform/elb.tf b/sys/terraform/elb.tf index fc197e8a..c54d7535 100644 --- a/sys/terraform/elb.tf +++ b/sys/terraform/elb.tf @@ -38,7 +38,7 @@ resource "aws_lb_target_group" "elbtargetgroup" { resource "aws_lb" "elb" { name = "${var.service_name}-elb" subnets = var.subnets - security_groups = [aws_security_group.sgelb.name] + security_groups = [aws_security_group.sgelb.id] } resource "aws_lb_listener" "elblistener80" {