-
Notifications
You must be signed in to change notification settings - Fork 409
Open
Labels
Description
Terraform, Provider, Kubernetes and Helm Versions
Terraform version: 1.11.4
Provider version: 2.17.0
Kubernetes version: 1.32
The current latest version, v3.0.0-pre2, has this issue as well.
Affected Resource(s)
- helm_release
Terraform Configuration Files
resource "helm_release" "this" {
name = "underscore_is_not_allowed"
repository = "https://kubernetes-sigs.github.io/metrics-server/"
chart = "metrics-server"
namespace = "kube-system"
version = "3.12.1"
values = [""]
}Debug Output
NOTE: In addition to Terraform debugging, please set HELM_DEBUG=1 to enable debugging info from helm.
Panic Output
N/A
Steps to Reproduce
terraform planterraform apply
Expected Behavior
terraform plan should fail early with the same error that only appears during terraform apply.
Currently, there is partial validation: only the length of the name is validated during terraform plan, but the full regex check only occurs during terraform apply.
For consistency, it would be nice if the complete release name validation were also performed at plan time.
The error currently shown only at apply time is:
Error: release name "underscore_is_not_allowed": invalid release name, must match regex ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ and the length must not be longer than 53
Actual Behavior
terraform plan succeeds, but terraform apply fails with the above error.
Important Factoids
N/A
References
- Length check added in response to Helm Release Name not Validated on Plan #1224
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment