Skip to content

Commit ec95f5b

Browse files
committed
feat(tfsearch): TF-26847 TF-27904: Added: support for list resource
1 parent 5aa707b commit ec95f5b

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

schemas.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ type ProviderSchema struct {
9595

9696
// The schemas for resources identities in this provider.
9797
ResourceIdentitySchemas map[string]*IdentitySchema `json:"resource_identity_schemas,omitempty"`
98+
99+
// The schemas for any list resources in this provider.
100+
ListResourceSchemas map[string]*Schema `json:"list_resource_schemas,omitempty"`
98101
}
99102

100103
// Schema is the JSON representation of a particular schema

schemas_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ func TestProviderSchemasValidate(t *testing.T) {
2828
"a provider schema including resource identity schemas is validated": {
2929
testDataPath: "testdata/identity/schemas.json",
3030
},
31+
"a provider schema including list resource schemas is validated": {
32+
testDataPath: "testdata/list_resources/schemas.json",
33+
},
3134
}
3235

3336
for tn, tc := range cases {

testdata/list_resources/schemas.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"format_version":"0.1","provider_schemas":{"registry.terraform.io/hashicorp/null":{"provider":{"version":0,"block":{"description_kind":"plain"}},"list_resource_schemas":{"null_resource":{"version":0,"block":{"attributes":{"id":{"type":"string","description_kind":"plain","optional":true,"computed":true},"triggers":{"type":["map","string"],"description_kind":"plain","optional":true}},"description_kind":"plain"}}}}}}

0 commit comments

Comments
 (0)