Skip to content

feat: Force labels to lower#84

Open
mitch-hamm wants to merge 4 commits into
masterfrom
mh/force-labels-to-lower
Open

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

Conversation

@mitch-hamm
Copy link
Copy Markdown
Contributor

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

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
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.

1 participant