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

Fix issue updating sensitive project environment variables #155

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

Merged
merged 1 commit into from
Mar 8, 2024

Conversation

dglsparsons
Copy link
Collaborator

Closes #154

@dglsparsons dglsparsons requested a review from craigandrews March 8, 2024 09:59
@@ -214,7 +214,7 @@ resource "vercel_project_environment_variable" "example_git_branch" {
resource "vercel_project_environment_variable" "example_sensitive" {
project_id = vercel_project.example.id
%[3]s
key = "foo_sensitive_updated"
key = "foo_sensitive"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test was faulty - updating the key forced a replacement, so it wasn't really testing that the other fields can be updated.

@@ -10,7 +10,6 @@ import (
// UpdateEnvironmentVariableRequest defines the information that needs to be passed to Vercel in order to
// update an environment variable.
type UpdateEnvironmentVariableRequest struct {
Key string `json:"key"`
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Key is required-replace, so should not be present in the update request.

craigandrews
craigandrews previously approved these changes Mar 8, 2024
@dglsparsons dglsparsons enabled auto-merge (squash) March 8, 2024 10:02
@dglsparsons dglsparsons merged commit e19ed08 into main Mar 8, 2024
@dglsparsons dglsparsons deleted the unable-to-update-sensitive-env-var branch March 8, 2024 10:38
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.

Cannot update sensitive environment variables
2 participants