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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add validation for disk names. #18165

Open
natedogith1 opened this issue May 16, 2024 · 1 comment
Open

Add validation for disk names. #18165

natedogith1 opened this issue May 16, 2024 · 1 comment

Comments

@natedogith1
Copy link

natedogith1 commented May 16, 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.

Description

Disk names should be validated during the plan.

New or Affected Resource(s)

  • google_compute_disk

Potential Terraform Configuration

This should fail, because underscores (_) aren't allowed in disk names.

resource "google_compute_disk" "default" {
  name  = "test_disk"
  type  = "pd-ssd"
  zone  = "us-central1-a"
  image = "debian-11-bullseye-v20220719"
  labels = {
    environment = "dev"
  }
  physical_block_size_bytes = 4096
}

References

#12378

b/341735700

@github-actions github-actions bot added forward/review In review; remove label to forward service/compute-pd labels May 16, 2024
@melinath melinath added size/xs and removed forward/review In review; remove label to forward labels May 20, 2024
@melinath
Copy link
Collaborator

melinath commented May 20, 2024

Note: It may be possible to use ValidateGCEName for this, assuming the logic matches the API logic in all cases.

@melinath melinath added this to the Goals milestone May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants