这是indexloc提供的服务,不要输入任何密码
Skip to content

"vercel_project_directory" data source does not parse the path properly when deploying on Windows. #50

@Tom-Br

Description

@Tom-Br

Hi,

I've been experimenting with Vercel deployments directly from the filepath in Terraform. However when deploying on a Windows OS the path and path_prefix are not interpretted correclty. As a result the deployment cannot find the right project structure during the build on Vercel and the code is "Not Found"

Steps to reproduce:

Terraform resources based on the guide on https://vercel.com/guides/integrating-terraform-with-vercel

data "vercel_project_directory" "example_mac" {
  path = "../nextjs-terraform-demo"
}

resource "vercel_project" "example_mac" {
  name = "example-mac"
  framework = "nextjs"
}

resource "vercel_deployment" "example_mac" {
  project_id = vercel_project.example_mac.id

  files = data.vercel_project_directory.example_mac.files
  path_prefix = data.vercel_project_directory.example_mac.path
}

Apply the terraform on a windows machine.

As a result the deployment has all the source files, but the files are not recognized in the Vercel Console.

Screenshot 2022-07-14 at 12 58 22

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions