-
Notifications
You must be signed in to change notification settings - Fork 31
Closed
Description
After upgrading from Terraform Vercel provider version 2.14 to 15.0, we started receiving multiple Value Conversion Errors related to unknown or computed values for the following attributes in the vercel_project resource:
• password_protection
• vercel_authentication
• options_allowlist
This occurs even when explicitly providing non-null defaults or conditionally setting these attributes
Versions:
• Terraform: 1.11.2
• Vercel Provider: 2.15.0 (previously working in 2.14.0)
Module invocation:
module "vercel_project_example" {
source = "./modules/vercel"
project = {
name = "example-project"
...
password_protection = {
deployment_type = "standard_protection"
password = data.vault_kv_secret_v2.this.data["VERCEL_PASSWORD"]
}
vercel_authentication = {
deployment_type = "none"
}
options_allowlist = {
paths = [{
value = "/"
}]
}
framework = "nextjs"
}
}
Resource definition (simplified):
resource "vercel_project" "this" {
...
password_protection = var.project.password_protection
vercel_authentication = var.project.vercel_authentication
options_allowlist = var.project.options_allowlist
}
variable "project" {
type = object({
...
password_protection = optional(object({
deployment_type = string
password = string
}))
vercel_authentication = optional(object({
deployment_type = string
}))
options_allowlist = optional(object({
paths = list(object({
value = string
}))
}))
})
}
Resulting Error (terraform plan):
│ Error: Value Conversion Error
│
│ with module.vercel_project_example.vercel_project.this,
│ on modules/vercel/main.tf line XX:
│ XX: password_protection = var.project.password_protection
│
│ Received unknown value, however the target type cannot handle unknown values. Use the corresponding `types` package type or a custom type that handles unknown values.
│
│ Path: password_protection
│ Target Type: *vercel.PasswordProtectionWithPassword
│ Suggested Type: basetypes.ObjectValue
(Identical error occurs for vercel_authentication and options_allowlist if their values are computed or unknown during plan.)
dglsparsons
Metadata
Metadata
Assignees
Labels
No labels