@@ -30,7 +30,36 @@ func appResource() *schema.Resource {
3030 Description : "Use this resource to define shortcuts to access applications in a workspace." ,
3131 CreateContext : func (c context.Context , resourceData * schema.ResourceData , i interface {}) diag.Diagnostics {
3232 resourceData .SetId (uuid .NewString ())
33- return nil
33+
34+ diags := diag.Diagnostics {}
35+
36+ hiddenData := resourceData .Get ("hidden" )
37+ if hidden , ok := hiddenData .(bool ); ! ok {
38+ return diag .Errorf ("hidden should be a bool" )
39+ } else if hidden {
40+ if _ , ok := resourceData .GetOk ("display_name" ); ok {
41+ diags = append (diags , diag.Diagnostic {
42+ Severity : diag .Warning ,
43+ Summary : "`display_name` set when app is hidden" ,
44+ })
45+ }
46+
47+ if _ , ok := resourceData .GetOk ("icon" ); ok {
48+ diags = append (diags , diag.Diagnostic {
49+ Severity : diag .Warning ,
50+ Summary : "`icon` set when app is hidden" ,
51+ })
52+ }
53+
54+ if _ , ok := resourceData .GetOk ("order" ); ok {
55+ diags = append (diags , diag.Diagnostic {
56+ Severity : diag .Warning ,
57+ Summary : "`order` set when app is hidden" ,
58+ })
59+ }
60+ }
61+
62+ return diags
3463 },
3564 ReadContext : func (c context.Context , resourceData * schema.ResourceData , i interface {}) diag.Diagnostics {
3665 return nil
0 commit comments