File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -532,7 +532,19 @@ func (wd *WorkingDir) Query(ctx context.Context) ([]string, error) {
532532 var buffer bytes.Buffer
533533 err := wd .tf .QueryJSON (context .Background (), & buffer )
534534
535- // Marshall buffer? JSON.mashallto___ terraform-json.Query
535+ // terraform-exec also only exposes the raw json writer for now
536+ // So we have to Marshall buffer something like JSON.mashallto___ for terraform-json.Query
537+ /* The struct Terraform is using to encode a query result:
538+ type QueryResult struct {
539+ Address string `json:"address"`
540+ DisplayName string `json:"display_name"`
541+ Identity map[string]json.RawMessage `json:"identity"`
542+ ResourceType string `json:"resource_type"`
543+ ResourceObject map[string]json.RawMessage `json:"resource_object,omitempty"`
544+ Config string `json:"config,omitempty"`
545+ ImportConfig string `json:"import_config,omitempty"`
546+ }
547+ */
536548
537549 if err != nil {
538550 return nil , fmt .Errorf ("error running terraform query command: %w" , err )
You can’t perform that action at this time.
0 commit comments