We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
aws
ecs
fargate
1 parent a5c8415 commit 93c13b2Copy full SHA for 93c13b2
2 files changed
CHANGELOG.md
@@ -1,3 +1,6 @@
1
+# 0.2.1 (Mar 19, 2025)
2
+* Sanitize invalid cluster name (i.e. starts with `aws`, `ecs`, or `fargate`).
3
+
4
# 0.2.0 (Mar 19, 2025)
5
* Upgrade `aws_launch_configuration` to `aws_launch_template`.
6
ecs.tf
@@ -1,9 +1,14 @@
locals {
cluster_name = local.resource_name
+ valid_cluster_name = (
+ can(regex("^(aws|ecs|fargate)", local.cluster_name))
+ ? "_${local.cluster_name}"
+ : local.cluster_name
7
+ )
8
}
9
10
resource "aws_ecs_cluster" "this" {
- name = local.cluster_name
11
+ name = local.valid_cluster_name
12
tags = local.tags
13
14
// TODO: Enable execute command with encryption configured on logging
0 commit comments