From 278ef6876325576489c5fd93900a4029b5dbabb6 Mon Sep 17 00:00:00 2001 From: samir-gandhi Date: Thu, 16 Nov 2023 21:44:30 +0000 Subject: [PATCH] update state on read --- internal/service/davinci/resource_variable.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/internal/service/davinci/resource_variable.go b/internal/service/davinci/resource_variable.go index 3916e645..4f878390 100644 --- a/internal/service/davinci/resource_variable.go +++ b/internal/service/davinci/resource_variable.go @@ -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) }