From a5fc90227e9cad1c1f14b9c74ee6a58c1eeea3b1 Mon Sep 17 00:00:00 2001 From: YKharouni Date: Wed, 27 Sep 2023 16:04:11 +0200 Subject: [PATCH] add prefix folder to store logs --- infrastructure/quick-deploy/aws/all-in-one/monitoring.tf | 2 +- .../quick-deploy/aws/multi-stages/monitoring/locals.tf | 1 - infrastructure/quick-deploy/aws/multi-stages/monitoring/main.tf | 2 +- .../quick-deploy/aws/multi-stages/monitoring/parameters.tfvars | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/infrastructure/quick-deploy/aws/all-in-one/monitoring.tf b/infrastructure/quick-deploy/aws/all-in-one/monitoring.tf index 7c38f6a45..81070756c 100644 --- a/infrastructure/quick-deploy/aws/all-in-one/monitoring.tf +++ b/infrastructure/quick-deploy/aws/all-in-one/monitoring.tf @@ -270,7 +270,7 @@ module "fluent_bit" { s3 = (var.s3.enabled ? { name = var.s3.name region = var.s3.region - prefix = var.s3.prefix + prefix = local.prefix enabled = true } : {}) } diff --git a/infrastructure/quick-deploy/aws/multi-stages/monitoring/locals.tf b/infrastructure/quick-deploy/aws/multi-stages/monitoring/locals.tf index 1bb8e5b47..c493b698f 100644 --- a/infrastructure/quick-deploy/aws/multi-stages/monitoring/locals.tf +++ b/infrastructure/quick-deploy/aws/multi-stages/monitoring/locals.tf @@ -94,5 +94,4 @@ locals { s3_enabled = tobool(try(var.monitoring.s3.enabled, false)) s3_name = try(var.monitoring.s3.name, "armonik-logs") s3_region = try(var.monitoring.s3.region, "eu-west-3") - s3_prefix = try(var.monitoring.s3.prefix, "main") } diff --git a/infrastructure/quick-deploy/aws/multi-stages/monitoring/main.tf b/infrastructure/quick-deploy/aws/multi-stages/monitoring/main.tf index 003f58e63..a73dde6bb 100644 --- a/infrastructure/quick-deploy/aws/multi-stages/monitoring/main.tf +++ b/infrastructure/quick-deploy/aws/multi-stages/monitoring/main.tf @@ -150,7 +150,7 @@ module "fluent_bit" { s3 = (local.s3_enabled ? { name = local.s3_name region = local.s3_region - prefix = local.s3_prefix + prefix = var.monitoring.s3.prefix enabled = true } : {}) } diff --git a/infrastructure/quick-deploy/aws/multi-stages/monitoring/parameters.tfvars b/infrastructure/quick-deploy/aws/multi-stages/monitoring/parameters.tfvars index 5540894f3..850c138c2 100644 --- a/infrastructure/quick-deploy/aws/multi-stages/monitoring/parameters.tfvars +++ b/infrastructure/quick-deploy/aws/multi-stages/monitoring/parameters.tfvars @@ -120,7 +120,7 @@ monitoring = { enabled = true name = "armonik-logs" region = "eu-west-3" - prefix = "main" + prefix = local.suffix arn = "arn:aws:s3:::armonik-logs" } fluent_bit = {