terraform-provider-vercel
terraform-provider-vercel copied to clipboard
Resource Project: Blocks of type "domain" are not expected here.
Hi there, i'm having troubles when try to add domain block in project resource.
Terraform Version
Run terraform -v
to show the version. We support terraform v0.13+
terraform -v
Terraform v1.0.4
on darwin_amd64
+ provider registry.terraform.io/chronark/vercel v0.10.4
+ provider registry.terraform.io/hashicorp/google-beta v4.1.0
Affected Resource(s)
Please list the resources as a list, for example:
- vercel_project
If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.
Terraform Configuration Files
provider "vercel" {
# Configuration options
token = var.vercel_token
}
resource "vercel_domain" "main" {
for_each = var.states
name = each.value.domain
}
resource "vercel_project" "projects" {
for_each = var.states
name = "${each.value.state}-${var.project_name}"
team_id = var.team_id
framework = "nextjs"
build_command = "yarn build"
git_repository {
type = "github"
repo = var.github_repo
}
domain {
name = vercel_domain.main.name
}
// domain {
// name = "www.${vercel_domain.main.name}"
// redirect = vercel_domain.main.name
// redirect_status_code = 308
// }
}
Debug Output

Panic Output
No panic
Expected Behavior
Should create project in Vercel, without this domain block in project resource everything works fine.
Actual Behavior
Unsupported block
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
-
terraform apply
orterraform plan
Important Factoids
References
Yeah that looks good to be correct. I'll check it out tomorrow to find the error
Hey @chronark
btw, i have a feeling that domain resource also don't work how it supposed. Using same config but without domain (list block in project) i see that resource domain is created:
but no changes in Vercel UI. Domain is custom domain
- i expect domain appear in vercel -> team -> domains