Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Parameter validation applied during template build

Abierto
#144 2 comentarios 0 reacciones 1 asignado Ver en GitHub

@stirby ya está trabajando en esto.

Desde el 29/7/2025.

Evaluación

Este issue todavía no se ha evaluado.

Descripción

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      = false
  validation {
    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.html
Terraform has created a lock file .terraform.lock.hcl to record the provider
selections it made above. Include this file in your version control repository
so that Terraform can guarantee to make the same selections by default when
you run "terraform init" in the future.
Terraform has been successfully initialized!
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should 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, other
commands will detect it and remind you to do so if necessary.
Terraform 1.5.2
data.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 create
coder_app.dremio: Plan to create
kubernetes_persistent_volume_claim.dremio-data: Plan to create
kubernetes_service.dremio-service: Plan to create
coder_metadata.dremio[0]: Plan to create
Plan: 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:

  1. add a parameter to a coder template with a validation property and without dafault values.
Lenguaje dominante
Go
Estrellas
60
Forks
28
Merge medio
16 d 22 h
PR fusionados (30 d)
1

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

  • Sin Dockerfile ni archivo de Docker Compose
  • Sin plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de coder/terraform-provider-coder

Todos los issues de coder/terraform-provider-coder

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.