Skip to content

Commit 40895b0

Browse files
committed
WIP
1 parent 86c3610 commit 40895b0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

provisioner/terraform/parse.go

+8
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,14 @@ func (s *server) loadWorkspaceTags(ctx context.Context, module *tfconfig.Module)
102102
return nil, xerrors.Errorf(`can't parse the resource coder_workspace_tags: %s`, diags.Error())
103103
}
104104

105+
if resContent == nil {
106+
continue // workspace tags are not present
107+
}
108+
109+
if _, ok := resContent.Attributes["tags"]; !ok {
110+
return nil, xerrors.Errorf(`"tags" attribute is required by coder_workspace_tags`)
111+
}
112+
105113
expr := resContent.Attributes["tags"].Expr
106114
tagsExpr, ok := expr.(*hclsyntax.ObjectConsExpr)
107115
if !ok {

0 commit comments

Comments
 (0)