Skip to content

Commit

Permalink
feat: replace dot on a dash in label value (terraform-google-modules#31)
Browse files Browse the repository at this point in the history
Label value have only hyphens (-), underscores (_), lowercase characters, and numbers are allowed. International characters are allowed.
  • Loading branch information
Vendin authored and morgante committed Jan 23, 2020
1 parent 231f6ed commit 8875ebb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ resource "google_storage_bucket" "buckets" {
project = var.project_id
location = var.location
storage_class = var.storage_class
labels = merge(var.labels, { name = "${local.prefix}${lower(element(var.names, count.index))}" })
labels = merge(var.labels, { name = replace("${local.prefix}${lower(element(var.names, count.index))}", ".", "-") })
force_destroy = lookup(
var.force_destroy,
lower(element(var.names, count.index)),
Expand Down

0 comments on commit 8875ebb

Please sign in to comment.