Skip to content

Commit 3fba08a

Browse files
committed
feat: Make the OTEL image configuration.
1 parent 824b9e7 commit 3fba08a

3 files changed

Lines changed: 10 additions & 1 deletion

File tree

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ module "ecs_service" {
162162
region = data.aws_region.current.name
163163
namespace = "${var.project}/${var.service}"
164164
env_vars = var.environment_variables
165+
otel_image = var.otel_image
165166
otel_log_level = var.otel_log_level
166167
otel_secrets = var.otel_secrets
167168
otel_ssm_arn = aws_ssm_parameter.otel_config.arn

templates/container_definitions.yaml.tftpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
%{~ endfor ~}
6060
%{~ endif ~}
6161
- name: otel-collector
62-
image: public.ecr.aws/aws-observability/aws-otel-collector:${otel_version}
62+
image: ${otel_image}:${otel_version}
6363
memory: 512
6464
cpu: 256
6565
essential: false

variables.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,14 @@ variable "otel_config" {
324324
default = null
325325
}
326326

327+
variable "otel_image" {
328+
type = string
329+
description = <<-EOT
330+
Container image to use for the OpenTelemetry collector sidecar.
331+
EOT
332+
default = "public.ecr.aws/aws-observability/aws-otel-collector"
333+
}
334+
327335
variable "otel_log_level" {
328336
type = string
329337
description = "Log level for the OpenTelemetry collector."

0 commit comments

Comments
 (0)