-
Notifications
You must be signed in to change notification settings - Fork 31
Closed
Description
Hi!
I'm facing a problem while adding a production domain to my project
For some reason, Vercel API thinks I'm adding a preview domain, but at the same time I pass git_branch
parameter which is equal to main
(terraform plan below) and corresponds to the value of Production Branch in my project (screenshot)
In general I want to create staging and production DNS records and assign those domains to Vercel Project via Terraform
I would appreciate it if you could help me address this problem
Terraform will perform the following actions:
# module.vercel["project-name"].vercel_project_domain.production[0] will be created
+ resource "vercel_project_domain" "production" {
+ domain = "project.domain.com"
+ git_branch = "main"
+ id = (known after apply)
+ project_id = "prj_augQzLjXXXXXXXXXX"
+ team_id = (known after apply)
}
Plan: 1 to add, 0 to change, 0 to destroy.
module.vercel["project-name"].vercel_project_domain.production[0]: Creating...
│ Error: Error adding domain to project
│
│ with module.vercel["project-name"].vercel_project_domain.production[0],
│ on ../../modules/vercel/main.tf line 95, in resource "vercel_project_domain" "production":
│ 95: resource "vercel_project_domain" "production" {
│
│ Could not add domain project.domain.com to project prj_augQzLjXXXXXXXXXX, unexpected error: cannot_set_production_branch_as_preview - Cannot set Production Branch "main" for a Preview Domain.
Metadata
Metadata
Assignees
Labels
No labels