Skip to content

Commit

Permalink
update state on read
Browse files Browse the repository at this point in the history
  • Loading branch information
samir-gandhi committed Nov 16, 2023
1 parent d89d5ee commit 278ef68
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/service/davinci/resource_variable.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,16 @@ func resourceVariableRead(ctx context.Context, d *schema.ResourceData, meta inte
for _, res := range resp {
s := strings.Split(variableName, "##SK##")
name := s[0]
context := s[1]
if err := d.Set("name", name); err != nil {
return diag.FromErr(err)
}
if err := d.Set("context", context); err != nil {
return diag.FromErr(err)
}
if err := d.Set("environment_id", res.CompanyID); err != nil {
return diag.FromErr(err)
}
if err := d.Set("type", res.Type); err != nil {
return diag.FromErr(err)
}
Expand Down

0 comments on commit 278ef68

Please sign in to comment.