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

Bucket names are not validated #307

Closed
nbugden opened this issue Mar 27, 2024 · 2 comments
Closed

Bucket names are not validated #307

nbugden opened this issue Mar 27, 2024 · 2 comments
Labels
bug Something isn't working Stale

Comments

@nbugden
Copy link

nbugden commented Mar 27, 2024

TL;DR

Terraform produces a valid plan despite bucket names not adhering to the bucket name requirements in the docs. When this plan is applied it fails to provision the bucket.

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.

Observed behavior

Terraform plan is successful even though bucket name(s) are invalid. When validating the terraform plan as part of PR check requirements, this would block allow merging bucket name(s) that cannot be applied. Resulting in a fix needing to be pushed.

Terraform Configuration

module "bucket" {
  source  = "terraform-google-modules/cloud-storage/google//modules/simple_bucket"
  version = "~> 5.0"

  name       = "my-really-long-bucket-name-with-invalid-ChAraCTers-*&^-and-google-in-the-name"
  project_id = "example-project"
  location   = "us-east1"
  iam_members = [{
    role   = "roles/storage.objectViewer"
    member = "user:[email protected]"
  }]
}

Terraform Version

Terraform v1.7.4
on darwin_arm64
+ provider registry.terraform.io/hashicorp/google v5.22.0
+ provider registry.terraform.io/hashicorp/google-beta v5.22.0
+ provider registry.terraform.io/hashicorp/null v3.2.2
+ provider registry.terraform.io/hashicorp/random v3.6.0
+ provider registry.terraform.io/hashicorp/time v0.11.1

Additional information

No response

@nbugden
Copy link
Author

nbugden commented Apr 12, 2024

Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the Stale label Jun 11, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Stale
Projects
None yet
Development

No branches or pull requests

1 participant