Skip to content

Commit

Permalink
fix(k8s): labels must comply with DNS RFC1123
Browse files Browse the repository at this point in the history
  • Loading branch information
fredleger committed Dec 6, 2024
1 parent 24b78c1 commit 41d0286
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions k8s/k8s-secret/main.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
locals {
interpolated_tags = merge({
# NOTE: label names must comply with DNS rfc1123
"name" = var.name,
"customer" = var.customer,
"environment" = var.environment,
"managed-by" = "Terraform",
"last-modified-at" = time_static.last_update.rfc3339,
"name" = lower(replace(var.name, "/[^a-zA-Z0-9-]/", "-")),
"customer" = lower(replace(var.customer, "/[^a-zA-Z0-9-]/", "-")),
"environment" = lower(replace(var.environment, "/[^a-zA-Z0-9-]/", "-")),
"managed-by" = "terraform",
"last-modified-at" = lower(replace(time_static.last_update.rfc3339, "/[^a-zA-Z0-9-]/", "-")),
},
var.tags
)
Expand Down

0 comments on commit 41d0286

Please sign in to comment.