terraform-provider-vercel icon indicating copy to clipboard operation
terraform-provider-vercel copied to clipboard

project domain branch not set when defined

Open mislavcimpersak opened this issue 4 years ago • 4 comments

Hi there again! 😇

For given example

resource "vercel_project" "web" {
  name    = "web"

  git_repository {
    type = "gitlab"
    repo = "foo/bar"
  }

  domain {
    name = foo.example.com
    git_branch = "stage"
  }
}

project domain's git branch is not set.

In resource_project.go in lines 234-238 the code is not passing git_branch value and also not sending gitBranch as part of the request to create a project domain.


Terraform version: 1.0.2 vercel provider version: 0.11.0


And once again, thank you for working on this handy project 😉

mislavcimpersak avatar Aug 26 '21 13:08 mislavcimpersak

Hi @mislavcimpersak I recall having difficulties with that when I added the domain functionality. I think the vercel endpoint did not accept the branch for some reason, I am not sure :D

I'm happy to give it another shot though. Maybe tomorrow or next week.

Thanks for submitting the issue.

chronark avatar Aug 26 '21 14:08 chronark

Hmm, might be.

I've just tested adding a project domain via an API call and it worked, just had to make sure that the branch really exists in the repo, otherwise vercel throws "Branch "foo-bar" not found in the connected Git repository." error.

Thank you for looking into this 😉

mislavcimpersak avatar Aug 26 '21 15:08 mislavcimpersak

Hey, we've just run into the same problem. Did this ever get solved? Thanks for building this!

Snailed avatar Dec 21 '21 14:12 Snailed

Unfortunately I can't spend as much time on this as I would like at the moment. Maybe you can give it a shot and I'll help you out where I can?

chronark avatar Dec 21 '21 18:12 chronark