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

feat: upgrade api versions to v10 #256

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

Closed
wants to merge 4 commits into from
Closed

Conversation

qlimenoque
Copy link
Contributor

This PR fixes #255

What was done:

  1. Upgraded API versions used by Provider to v10 (which is latest according to Vercel API Documentation)
  2. Added CreateEnvironmentVariableResponse, since new format of response is returned in v10
  3. Removed validation of target parameter to be empty. in project_environment_variable resource
    The requests from Vercel Web UI (Network tab) and Terraform Provider were different and API reacted differently.
    The examples of the requests body

Vercel Web UI

{
  "key": "NEXT_PUBLIC_MY_KEY",
  "value": "",
  "target": [],
  "customEnvironmentIds": [
    "env_********************"
  ],
  "type": "sensitive",
  "comment": "Sensitive test environment variable"
}

Terraform Provider

{
  "key": "NEXT_PUBLIC_MY_KEY",
  "value": "**********",
  "customEnvironmentIds": [
    "env_********************"
  ],
  "type": "sensitive",
  "comment": "Sensitive test environment variable"
}

It means now you have to add target = [] if you want to add environment variable only to custom_environment_ids

Unfortunately, I wasn't able to perform the full test on my own.
My changes might not be perfect, so I welcome your comments and contributions

@dglsparsons
Copy link
Collaborator

I'm pulling this PR into #260, so i can have running tests + a couple of fixes. 🙏

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

Successfully merging this pull request may close these issues.

Bug: requests to create environment variables for custom environments are created with the wrong target
3 participants