Skip to content

Fix: vercel_project_domain should wait SSL certificate to be considered deployed #287

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
polo4096 opened this issue Mar 19, 2025 · 0 comments

Comments

@polo4096
Copy link

When deploying a project domain for a Pre-production /Custom environment, vercel_project_domain should wait to be fully deployed with SSL certificate so any resources depending on it won't fail as vercel_alias.

resource "vercel_deployment" "example" {
  project_id  = data.vercel_project.example.id
  files       = data.vercel_prebuilt_project.example.output
  path_prefix = data.vercel_prebuilt_project.example.path
  production = false
}

resource "vercel_project_domain" "example" {
  project_id = data.vercel_project.example.id
  domain = "www.example.com"
}

resource "vercel_alias" "example" {
  alias = vercel_project_domain.example.domain
  deployment_id = vercel_deployment.reconditioning.id
}

We'll get this error :

│ Error: Error creating alias
│ 
│   with vercel_alias.example,
│   on main.tf line 21, in resource "vercel_alias" "example":
│   21: resource "vercel_alias" "example" {
│ 
│ Could not create alias, unexpected error: cert_missing - The domain you are trying to associate is missing a SSL certificate

Retrying a few seconds later to apply vercel_alias will success as SSL certificate will be emitted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant