tf query: add identity version for the list_resource_found message (#176)
diff --git a/logging_query.go b/logging_query.go
index 7ec5912..a21e908 100644
--- a/logging_query.go
+++ b/logging_query.go
@@ -29,13 +29,14 @@
}
type ListResourceFoundData struct {
- Address string `json:"address"`
- DisplayName string `json:"display_name"`
- Identity map[string]json.RawMessage `json:"identity"`
- ResourceType string `json:"resource_type"`
- ResourceObject map[string]json.RawMessage `json:"resource_object,omitempty"`
- Config string `json:"config,omitempty"`
- ImportConfig string `json:"import_config,omitempty"`
+ Address string `json:"address"`
+ DisplayName string `json:"display_name"`
+ Identity map[string]json.RawMessage `json:"identity"`
+ IdentityVersion int64 `json:"identity_version"`
+ ResourceType string `json:"resource_type"`
+ ResourceObject map[string]json.RawMessage `json:"resource_object,omitempty"`
+ Config string `json:"config,omitempty"`
+ ImportConfig string `json:"import_config,omitempty"`
}
// ListCompleteMessage represents "query" result message of type "list_complete"
diff --git a/logging_test.go b/logging_test.go
index e6a1119..f616789 100644
--- a/logging_test.go
+++ b/logging_test.go
@@ -120,7 +120,7 @@
},
},
{
- `{"@level":"info","@message":"list.concept_pet.pets: Result found","@module":"terraform.ui","@timestamp":"2025-08-28T18:07:11.534589+00:00","list_resource_found":{"address":"list.concept_pet.pets","display_name":"This is a easy-antelope","identity":{"id":"easy-antelope","legs":6},"resource_type":"concept_pet"},"type":"list_resource_found"}`,
+ `{"@level":"info","@message":"list.concept_pet.pets: Result found","@module":"terraform.ui","@timestamp":"2025-08-28T18:07:11.534589+00:00","list_resource_found":{"address":"list.concept_pet.pets","display_name":"This is a easy-antelope","identity":{"id":"easy-antelope","legs":6},"identity_version":1,"resource_type":"concept_pet"},"type":"list_resource_found"}`,
ListResourceFoundMessage{
baseLogMessage: baseLogMessage{
Lvl: Info,
@@ -135,6 +135,7 @@
"id": json.RawMessage(`"easy-antelope"`),
"legs": json.RawMessage("6"),
},
+ IdentityVersion: 1,
},
},
},