- Notifications
You must be signed in to change notification settings - Fork23
Open
Description
Hi there,
Terraform Version
Terraform 1.5.2
Affected Resource(s)
- coder_parameter
Terraform Configuration Files
data"coder_parameter""admin_password" {name="admin_password"display_name="Admin Password"description="Choose a password for admin account must be at least 8 letters long, must contain at least one number and one letter"type="string"icon="/emojis/1f510.png"mutable=falsevalidation {regex="[a-z][0-9][a-z0-9]{6,}|[a-z]{2}[0-9][a-z0-9]{5,}|[a-z]{3}[0-9][a-z0-9]{4,}|[a-z]{5}[0-9][a-z0-9]{3,}|[a-z]{6}[0-9][a-z0-9]{2,}|[a-z]{7,}[0-9][a-z0-9]*|[0-9][a-z][a-z0-9]{6,}|[0-9]{2}[a-z][a-z0-9]{5,}|[0-9]{3}[a-z][a-z0-9]{4,}|[0-9]{5}[a-z][a-z0-9]{3,}|[0-9]{6}[a-z][a-z0-9]{2,}|[0-9]{7,}[a-z][a-z0-9]*"error="Invalid password: must be at least 8 letters long, must contain at least one number and one letter" }}
Debug Output
Initializing provider plugins...- Finding coder/coder versions matching "~> 0.11.0"...- Finding hashicorp/kubernetes versions matching "~> 2.18"...- Installing hashicorp/kubernetes v2.22.0...- Installed hashicorp/kubernetes v2.22.0 (signed by HashiCorp)- Installing coder/coder v0.11.1...- Installed coder/coder v0.11.1 (signed by a HashiCorp partner, key ID 93C75807601AA0EC)Partner and community providers are signed by their developers.If you'd like to know more about provider signing, you can read about it here:https://www.terraform.io/docs/cli/plugins/signing.htmlTerraform has created a lock file .terraform.lock.hcl to record the providerselections it made above. Include this file in your version control repositoryso that Terraform can guarantee to make the same selections by default whenyou run "terraform init" in the future.Terraform has been successfully initialized!You may now begin working with Terraform. Try running "terraform plan" to seeany changes that are required for your infrastructure. All Terraform commandsshould now work.If you ever set or change modules or backend configuration for Terraform,rerun this command to reinitialize your working directory. If you forget, othercommands will detect it and remind you to do so if necessary.Terraform 1.5.2data.coder_workspace.me: Refreshing...data.coder_parameter.admin_password: Refreshing...data.coder_workspace.me: Refresh complete after 0s [id=3edada7d-297c-4b04-93fb-63081f75dae9]coder_agent.dremio: Plan to createcoder_app.dremio: Plan to createkubernetes_persistent_volume_claim.dremio-data: Plan to createkubernetes_service.dremio-service: Plan to createcoder_metadata.dremio[0]: Plan to createPlan: 5 to add, 0 to change, 0 to destroy.Error: Invalid password: must be at least 8 letters long, must contain at least one number and one letter (value "" does not match "[a-z][0-9][a-z0-9]{6,}|[a-z]{2}[0-9][a-z0-9]{5,}|[a-z]{3}[0-9][a-z0-9]{4,}|[a-z]{5}[0-9][a-z0-9]{3,}|[a-z]{6}[0-9][a-z0-9]{2,}|[a-z]{7,}[0-9][a-z0-9]*|[0-9][a-z][a-z0-9]{6,}|[0-9]{2}[a-z][a-z0-9]{5,}|[0-9]{3}[a-z][a-z0-9]{4,}|[0-9]{5}[a-z][a-z0-9]{3,}|[0-9]{6}[a-z][a-z0-9]{2,}|[0-9]{7,}[a-z][a-z0-9]*")on main.tf line 67, in data "coder_parameter" "admin_password": 67: data "coder_parameter" "admin_password" {
Expected Behavior
Coder parameter should be validated in the workspace creation phase
Actual Behavior
Coder parameter are validated during the template build phase
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
- add a parameter to a coder template with a validation property and without dafault values.