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

gcp_enforce_naming DOES NOT work when a random string added to resource name #404

Open
zack-amirakulov opened this issue Sep 24, 2021 · 0 comments

Comments

@zack-amirakulov
Copy link

gcp_enforce_naming DOES NOT work when a random string is added to the resource name. An error with placeholder-BpLnfgDs

Reproduced with the following TF code:

resource "random_string" "random_prefix" {
  length  = 8
  special = false
  upper   = false
}

resource "google_storage_bucket" "bucket" {
  name     = "${var.name}-${var.environment}-${random_string.random_prefix.result}"
  project  = var.project_id
  location = var.location
}

Getting error:
//storage.googleapis.com/placeholder-BpLnfgDs: placeholder-BpLnfgDs does not obey the naming convention. Use built-in Terraform modules for provisioning resources. Full address: //storage.googleapis.com/placeholder-BpLnfgDs

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

No branches or pull requests

1 participant