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

GCS bucket names are not validated during terraform plan #17831

Labels
bug forward/review In review; remove label to forward service/storage

Comments

@nbugden
Copy link

nbugden commented Apr 12, 2024

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
  • Please do not leave +1 or me too comments, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.
  • If an issue is assigned to a user, that user is claiming responsibility for the issue.
  • Customers working with a Google Technical Account Manager or Customer Engineer can ask them to reach out internally to expedite investigation and resolution of this issue.

Terraform Version

Terraform v1.8.0
on darwin_arm64

Affected Resource(s)

resource "google_storage_bucket"

Terraform Configuration

resource "google_storage_bucket" "static-site" {
  name          = "my-really-long-bucket-name-with-invalid-ChAraCTers-*&^-and-google-in-the-name"
  location      = "US"
  force_destroy = false
}

Debug Output

No response

Expected Behavior

Terraform plan should fail when the bucket name(s) are invalid. When validating the terraform plan as part of PR check requirements, this would block merging bucket name(s) that cannot be applied.

Actual Behavior

Terraform plan is successful even though bucket name(s) are invalid. This results in merging bucket name(s) that cannot be applied during PR review. A follow up fix needs to be pushed and a partial terraform apply needs to be remediated.

Steps to reproduce

  1. terraform init
  2. terraform plan
  3. terraform apply

Important Factoids

No response

References

terraform-google-modules/terraform-google-cloud-storage#307
terraform-google-modules/terraform-google-cloud-storage#308
terraform-google-modules/terraform-example-foundation#1169

Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.