diff --git a/tfstructs/parser_config.go b/tfstructs/parser_config.go index bd83dd3..e4f1f08 100644 --- a/tfstructs/parser_config.go +++ b/tfstructs/parser_config.go @@ -229,7 +229,7 @@ func GetAttributeCompletion(result []lsp.CompletionItem, configType string, orig schema, _ := res.GetRawProviderSchema() for k, v := range schema.Block.Attributes { - if (v.Optional || v.Required) && !v.Computed { + if v.Optional || v.Required { result = append(result, lsp.CompletionItem{ Label: k, Detail: fmt.Sprintf(" (%s) %s", checkRequire(v), v.Type.FriendlyName()), @@ -264,8 +264,10 @@ func GetAttributeCompletion(result []lsp.CompletionItem, configType string, orig }, true, nil } + helper.DumpLog(res) + for k, v := range res.Schema.Block.Attributes { - if (v.Optional || v.Required) && !v.Computed { + if v.Optional || v.Required { result = append(result, lsp.CompletionItem{ Label: k, Detail: fmt.Sprintf(" (%s) %s", checkRequire(v), v.Type.FriendlyName()), @@ -301,7 +303,7 @@ func GetAttributeCompletion(result []lsp.CompletionItem, configType string, orig } for k, v := range res.Schema.Block.Attributes { - if (v.Optional || v.Required) && !v.Computed { + if v.Optional || v.Required { result = append(result, lsp.CompletionItem{ Label: k, Detail: fmt.Sprintf(" (%s) %s", checkRequire(v), v.Type.FriendlyName()), @@ -380,7 +382,7 @@ func GetNestingCompletion(blocks []*hcl.Block, result []lsp.CompletionItem, conf if resultBlock != nil { for k, v := range resultBlock.Attributes { - if (v.Optional || v.Required) && !v.Computed { + if v.Optional || v.Required { result = append(result, lsp.CompletionItem{ Label: k, Detail: fmt.Sprintf(" (%s) %s", checkRequire(v), v.Type.FriendlyName()), @@ -453,7 +455,7 @@ func GetNestingCompletion(blocks []*hcl.Block, result []lsp.CompletionItem, conf if resultBlock != nil { for k, v := range resultBlock.Attributes { - if (v.Optional || v.Required) && !v.Computed { + if v.Optional || v.Required { result = append(result, lsp.CompletionItem{ Label: k, Detail: fmt.Sprintf(" (%s) %s", checkRequire(v), v.Type.FriendlyName()), @@ -526,7 +528,7 @@ func GetNestingCompletion(blocks []*hcl.Block, result []lsp.CompletionItem, conf if resultBlock != nil { for k, v := range resultBlock.Attributes { - if (v.Optional || v.Required) && !v.Computed { + if v.Optional || v.Required { result = append(result, lsp.CompletionItem{ Label: k, Detail: fmt.Sprintf(" (%s) %s", checkRequire(v), v.Type.FriendlyName()),