From 8875ebbc645e1a6196c61a9f4d0cfaf3fa0f6569 Mon Sep 17 00:00:00 2001 From: Vendin Date: Thu, 23 Jan 2020 18:37:00 +0300 Subject: [PATCH] feat: replace dot on a dash in label value (#31) Label value have only hyphens (-), underscores (_), lowercase characters, and numbers are allowed. International characters are allowed. --- main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.tf b/main.tf index 8f611e4b..98b18fe8 100644 --- a/main.tf +++ b/main.tf @@ -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)),