-
Notifications
You must be signed in to change notification settings - Fork 32
Closed
Description
Followed the steps here to create a token scoped to my org:
https://vercel.com/support/articles/how-do-i-use-a-vercel-api-access-token#how-to-create-the-token
I've verified my local's have the values required. Is there an additional step I'm missing?
Placed token in the provider block:
provider "vercel" {
api_token = "..."
}
data "vercel_project_directory" "files" {
path = "../"
}
data "vercel_project" "project" {
team_id = local.team_id
name = local.project_name
}
resource "vercel_deployment" "project" {
# team_id = local.team_id # doesn't matter if I specify this
project_id = data.vercel_project.project.id
files = data.vercel_project_directory.files.files
path_prefix = data.vercel_project_directory.files.path
production = false
}
Error Message
For some reason it's trying to deploy to my personal account rather than respecting the team_id. Looking through the trace logs it looks like it might not be adding the teamId to the create deployment request.
Could not upload deployment file ../pages/Users.ts, unexpected error: forbidden - Not authorized: Authorization is missing access to scope "rizowski". You must re-authenticate to this scope or use a token with access to this scope.
Additional info
Provider Version : ~> 0.4
installed v0.5.0
terraform version: `1.2.2
I know it can fetch projects from the right team, since I'm using that above. It's just not allowing deployments.
Metadata
Metadata
Assignees
Labels
No labels