Skip to content

Commit

Permalink
Merge pull request #48 from DopplerHQ/nic/create-secret-fix
Browse files Browse the repository at this point in the history
Fix issue preventing creation of new secret resources
  • Loading branch information
nmanoogian authored Apr 27, 2023
2 parents 8dd7d46 + 01987e0 commit 3e82872
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doppler/resource_secret.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func resourceSecretUpdate(ctx context.Context, d *schema.ResourceData, m interfa
value := d.Get("value").(string)

secrets := []RawSecret{{Name: name, Value: &value}}
if d.HasChange("name") {
if !d.IsNewResource() && d.HasChange("name") {
previousName, _ := d.GetChange("name")
secrets = append(secrets, RawSecret{Name: previousName.(string), Value: nil})
}
Expand Down

0 comments on commit 3e82872

Please sign in to comment.