From 1affa9d4279a577a0a6d35aedda309107b1a6551 Mon Sep 17 00:00:00 2001 From: Henry Schokkenbroek Date: Fri, 4 Apr 2025 12:11:53 +0200 Subject: [PATCH] feat: Added managed storage KMS configuration --- modules/cluster/main.tf | 18 ++++++++++++++++++ versions.tf | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/modules/cluster/main.tf b/modules/cluster/main.tf index cecf7e44..49f4f4c8 100644 --- a/modules/cluster/main.tf +++ b/modules/cluster/main.tf @@ -40,6 +40,15 @@ resource "aws_ecs_cluster" "this" { } } } + + dynamic "managed_storage_configuration" { + for_each = try([configuration.value.managed_storage_configuration], [{}]) + + content { + kms_key_id = try(managed_storage_configuration.value.kms_key_id, null) + fargate_ephemeral_storage_kms_key_id = try(managed_storage_configuration.value.fargate_ephemeral_storage_kms_key_id, null) + } + } } } @@ -67,6 +76,15 @@ resource "aws_ecs_cluster" "this" { } } } + + dynamic "managed_storage_configuration" { + for_each = try([configuration.value.managed_storage_configuration], [{}]) + + content { + kms_key_id = try(managed_storage_configuration.value.kms_key_id, null) + fargate_ephemeral_storage_kms_key_id = try(managed_storage_configuration.value.fargate_ephemeral_storage_kms_key_id, null) + } + } } } diff --git a/versions.tf b/versions.tf index 682191e7..fb27a46b 100644 --- a/versions.tf +++ b/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 4.66.1" + version = ">= 5.59.0" } } }