Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid Bigtable instance_id length error in GCP terraform module #311

Open
vijay-wandb opened this issue Dec 3, 2024 · 0 comments
Open
Assignees
Labels
Priority-P1 High priority designation

Comments

@vijay-wandb
Copy link

The Bigtable instance created using @danielpanzella Terraform GCP branch at SSI (link) threw an error due to an invalid instance_id length

│
│   with module.wandb.module.bigtable[0].google_bigtable_instance.default,
│   on terraform-google-wandb/modules/bigtable/main.tf line 5, in resource "google_bigtable_instance" "default":
│    5: resource "google_bigtable_instance" "default" {

Just a FYI: The customer's workaround involves padding the namespace to meet the required length, but this may not work for us.

 % git diff
diff --git a/modules/bigtable/main.tf b/modules/bigtable/main.tf
index a49c0fc..7bab270 100644
--- a/modules/bigtable/main.tf
+++ b/modules/bigtable/main.tf
@@ -3,7 +3,7 @@ locals {
 }

 resource "google_bigtable_instance" "default" {
-  name                = var.namespace
+  name                = coalesce(substr("${var.namespace}000000", 0, 6), "default")
   deletion_protection = var.deletion_protection
   force_destroy       = !var.deletion_protection
@vijay-wandb vijay-wandb self-assigned this Dec 3, 2024
@vijay-wandb vijay-wandb added the Priority-P1 High priority designation label Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority-P1 High priority designation
Projects
None yet
Development

No branches or pull requests

1 participant