Skip to content

Commit e19ed08

Browse files
authored
Fix issue updating sensitive project environment variables (#155)
Closes #154
1 parent a7b5bed commit e19ed08

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

client/environment_variable_update.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import (
1010
// UpdateEnvironmentVariableRequest defines the information that needs to be passed to Vercel in order to
1111
// update an environment variable.
1212
type UpdateEnvironmentVariableRequest struct {
13-
Key string `json:"key"`
1413
Value string `json:"value"`
1514
Target []string `json:"target"`
1615
GitBranch *string `json:"gitBranch,omitempty"`

vercel/resource_project_environment_variable_model.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ func (e *ProjectEnvironmentVariable) toUpdateEnvironmentVariableRequest() client
5858
}
5959

6060
return client.UpdateEnvironmentVariableRequest{
61-
Key: e.Key.ValueString(),
6261
Value: e.Value.ValueString(),
6362
Target: target,
6463
GitBranch: toStrPointer(e.GitBranch),

vercel/resource_project_environment_variable_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ func TestAcc_ProjectEnvironmentVariables(t *testing.T) {
9696
resource.TestCheckResourceAttr("vercel_project_environment_variable.example_git_branch", "git_branch", "test"),
9797

9898
testAccProjectEnvironmentVariableExists("vercel_project_environment_variable.example_sensitive", testTeam()),
99-
resource.TestCheckResourceAttr("vercel_project_environment_variable.example_sensitive", "key", "foo_sensitive_updated"),
99+
resource.TestCheckResourceAttr("vercel_project_environment_variable.example_sensitive", "key", "foo_sensitive"),
100100
resource.TestCheckResourceAttr("vercel_project_environment_variable.example_sensitive", "value", "bar-sensitive-updated"),
101101
resource.TestCheckTypeSetElemAttr("vercel_project_environment_variable.example_sensitive", "target.*", "production"),
102102
resource.TestCheckResourceAttr("vercel_project_environment_variable.example_sensitive", "sensitive", "true"),
@@ -214,7 +214,7 @@ resource "vercel_project_environment_variable" "example_git_branch" {
214214
resource "vercel_project_environment_variable" "example_sensitive" {
215215
project_id = vercel_project.example.id
216216
%[3]s
217-
key = "foo_sensitive_updated"
217+
key = "foo_sensitive"
218218
value = "bar-sensitive-updated"
219219
target = ["production"]
220220
sensitive = true

0 commit comments

Comments
 (0)