Skip to content

Commit

Permalink
Fix: env0_git_token recreating in every tf apply (#708)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomerHeber committed Sep 12, 2023
1 parent 0a54bb1 commit 2501418
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion client/git_token.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package client
type GitToken struct {
Id string `json:"id"`
Name string `json:"name"`
Value string `json:"value"`
Value string `json:"value" tfschema:"-"`
OrganizationId string `json:"organizationId"`
}

Expand Down
18 changes: 10 additions & 8 deletions env0/resource_git_token_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,11 @@ func TestUnitGitTokenResource(t *testing.T) {
}),
},
{
ResourceName: resourceNameImport,
ImportState: true,
ImportStateId: gitToken.Name,
ImportStateVerify: true,
ResourceName: resourceNameImport,
ImportState: true,
ImportStateId: gitToken.Name,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"value"},
},
},
}
Expand All @@ -137,10 +138,11 @@ func TestUnitGitTokenResource(t *testing.T) {
}),
},
{
ResourceName: resourceNameImport,
ImportState: true,
ImportStateId: gitToken.Id,
ImportStateVerify: true,
ResourceName: resourceNameImport,
ImportState: true,
ImportStateId: gitToken.Id,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"value"},
},
},
}
Expand Down

0 comments on commit 2501418

Please sign in to comment.