Skip to content

feat: Force labels to lower - #84

Merged
mitch-hamm merged 4 commits into
masterfrom
mh/force-labels-to-lower
Jun 10, 2026
Merged

feat: Force labels to lower#84
mitch-hamm merged 4 commits into
masterfrom
mh/force-labels-to-lower

Conversation

@mitch-hamm

@mitch-hamm mitch-hamm commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Summary

GCP labels require lowercase keys and values. Previously var.additional_tags was passed directly to label fields, which would cause a 400 Bad Request from the GCP API if any key or value contained uppercase characters.

This change normalizes all label keys and values to lowercase using a for expression across:

  • google_storage_bucket.velero (dns-bucket module)
  • google_storage_bucket.tiered_storage (dns-bucket module)
  • google_storage_bucket.loki (dns-bucket module)
  • google_dns_managed_zone.zone (dns-bucket module)
  • module.gke cluster resource labels (main.tf)

If additional_tags is empty ({}), the expression evaluates to {} and no labels are applied.

Test plan

  • Apply with uppercase tags and verify GCP accepts them
  • Apply with empty additional_tags and verify no labels error

@mitch-hamm
mitch-hamm requested a review from a team as a code owner June 5, 2026 16:30
@mitch-hamm
mitch-hamm requested a review from maxsxu June 8, 2026 18:19
@mitch-hamm
mitch-hamm merged commit 68e2bf5 into master Jun 10, 2026
6 checks passed
@mitch-hamm
mitch-hamm deleted the mh/force-labels-to-lower branch June 10, 2026 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants