@@ -19,9 +19,9 @@ func examplecloudListResource() testprovider.ListResource {
1919 Block : & tfprotov6.SchemaBlock {
2020 Attributes : []* tfprotov6.SchemaAttribute {
2121 {
22- Name : "id " ,
22+ Name : "resource_group_name " ,
2323 Type : tftypes .String ,
24- Computed : true ,
24+ Required : true ,
2525 },
2626 },
2727 },
@@ -33,57 +33,199 @@ func examplecloudListResource() testprovider.ListResource {
3333 Resource : teststep .Pointer (tftypes .NewValue (
3434 tftypes.Object {
3535 AttributeTypes : map [string ]tftypes.Type {
36- "id" : tftypes .String ,
37- "location" : tftypes .String ,
38- "name" : tftypes .String ,
36+ "id" : tftypes .String ,
37+ "location" : tftypes .String ,
38+ "name" : tftypes .String ,
39+ "resource_group_name" : tftypes .String ,
40+ "instances" : tftypes .Number ,
3941 },
4042 },
4143 map [string ]tftypes.Value {
42- "id" : tftypes .NewValue (tftypes .String , "westeurope/somevalue" ),
43- "location" : tftypes .NewValue (tftypes .String , "westeurope" ),
44- "name" : tftypes .NewValue (tftypes .String , "somevalue" ),
44+ "id" : tftypes .NewValue (tftypes .String , "foo/banane" ),
45+ "location" : tftypes .NewValue (tftypes .String , "westeurope" ),
46+ "name" : tftypes .NewValue (tftypes .String , "banane" ),
47+ "resource_group_name" : tftypes .NewValue (tftypes .String , "foo" ),
48+ "instances" : tftypes .NewValue (tftypes .Number , 5 ),
4549 },
4650 )),
4751 Identity : teststep .Pointer (tftypes .NewValue (
4852 tftypes.Object {
4953 AttributeTypes : map [string ]tftypes.Type {
50- "id" : tftypes .String ,
51- "location" : tftypes .String ,
54+ "resource_group_name" : tftypes .String ,
55+ "name" : tftypes .String ,
5256 },
5357 },
5458 map [string ]tftypes.Value {
55- "id " : tftypes .NewValue (tftypes .String , "westeurope/somevalue1 " ),
56- "location " : tftypes .NewValue (tftypes .String , "westeurope " ),
59+ "resource_group_name " : tftypes .NewValue (tftypes .String , "foo " ),
60+ "name " : tftypes .NewValue (tftypes .String , "banane " ),
5761 },
5862 )),
63+ DisplayName : "banane" ,
5964 })
6065 push (list.ListResult {
66+ Resource : teststep .Pointer (tftypes .NewValue (
67+ tftypes.Object {
68+ AttributeTypes : map [string ]tftypes.Type {
69+ "id" : tftypes .String ,
70+ "location" : tftypes .String ,
71+ "name" : tftypes .String ,
72+ "resource_group_name" : tftypes .String ,
73+ "instances" : tftypes .Number ,
74+ },
75+ },
76+ map [string ]tftypes.Value {
77+ "id" : tftypes .NewValue (tftypes .String , "foo/ananas" ),
78+ "location" : tftypes .NewValue (tftypes .String , "westeurope" ),
79+ "name" : tftypes .NewValue (tftypes .String , "ananas" ),
80+ "resource_group_name" : tftypes .NewValue (tftypes .String , "foo" ),
81+ "instances" : tftypes .NewValue (tftypes .Number , 9000 ),
82+ },
83+ )),
84+ Identity : teststep .Pointer (tftypes .NewValue (
85+ tftypes.Object {
86+ AttributeTypes : map [string ]tftypes.Type {
87+ "resource_group_name" : tftypes .String ,
88+ "name" : tftypes .String ,
89+ },
90+ },
91+ map [string ]tftypes.Value {
92+ "resource_group_name" : tftypes .NewValue (tftypes .String , "foo" ),
93+ "name" : tftypes .NewValue (tftypes .String , "ananas" ),
94+ },
95+ )),
96+ DisplayName : "ananas" ,
97+ })
98+ push (list.ListResult {
99+ Resource : teststep .Pointer (tftypes .NewValue (
100+ tftypes.Object {
101+ AttributeTypes : map [string ]tftypes.Type {
102+ "id" : tftypes .String ,
103+ "location" : tftypes .String ,
104+ "name" : tftypes .String ,
105+ "resource_group_name" : tftypes .String ,
106+ "instances" : tftypes .Number ,
107+ },
108+ },
109+ map [string ]tftypes.Value {
110+ "id" : tftypes .NewValue (tftypes .String , "foo/kiwi" ),
111+ "location" : tftypes .NewValue (tftypes .String , "westeurope" ),
112+ "name" : tftypes .NewValue (tftypes .String , "kiwi" ),
113+ "resource_group_name" : tftypes .NewValue (tftypes .String , "foo" ),
114+ "instances" : tftypes .NewValue (tftypes .Number , 88 ),
115+ },
116+ )),
117+ Identity : teststep .Pointer (tftypes .NewValue (
118+ tftypes.Object {
119+ AttributeTypes : map [string ]tftypes.Type {
120+ "resource_group_name" : tftypes .String ,
121+ "name" : tftypes .String ,
122+ },
123+ },
124+ map [string ]tftypes.Value {
125+ "resource_group_name" : tftypes .NewValue (tftypes .String , "foo" ),
126+ "name" : tftypes .NewValue (tftypes .String , "kiwi" ),
127+ },
128+ )),
129+ DisplayName : "kiwi" ,
130+ })
131+ push (list.ListResult {
132+ Resource : teststep .Pointer (tftypes .NewValue (
133+ tftypes.Object {
134+ AttributeTypes : map [string ]tftypes.Type {
135+ "id" : tftypes .String ,
136+ "location" : tftypes .String ,
137+ "name" : tftypes .String ,
138+ "resource_group_name" : tftypes .String ,
139+ "instances" : tftypes .Number ,
140+ },
141+ },
142+ map [string ]tftypes.Value {
143+ "id" : tftypes .NewValue (tftypes .String , "bar/papaya" ),
144+ "location" : tftypes .NewValue (tftypes .String , "westeurope" ),
145+ "name" : tftypes .NewValue (tftypes .String , "banane" ),
146+ "resource_group_name" : tftypes .NewValue (tftypes .String , "foo" ),
147+ "instances" : tftypes .NewValue (tftypes .Number , 3 ),
148+ },
149+ )),
61150 Identity : teststep .Pointer (tftypes .NewValue (
62151 tftypes.Object {
63152 AttributeTypes : map [string ]tftypes.Type {
64- "id" : tftypes .String ,
65- "location" : tftypes .String ,
153+ "resource_group_name" : tftypes .String ,
154+ "name" : tftypes .String ,
66155 },
67156 },
68157 map [string ]tftypes.Value {
69- "id " : tftypes .NewValue (tftypes .String , "westeurope/somevalue2 " ),
70- "location " : tftypes .NewValue (tftypes .String , "westeurope2 " ),
158+ "resource_group_name " : tftypes .NewValue (tftypes .String , "bar " ),
159+ "name " : tftypes .NewValue (tftypes .String , "papaya " ),
71160 },
72161 )),
162+ DisplayName : "papaya" ,
73163 })
74164 push (list.ListResult {
165+ Resource : teststep .Pointer (tftypes .NewValue (
166+ tftypes.Object {
167+ AttributeTypes : map [string ]tftypes.Type {
168+ "id" : tftypes .String ,
169+ "location" : tftypes .String ,
170+ "name" : tftypes .String ,
171+ "resource_group_name" : tftypes .String ,
172+ "instances" : tftypes .Number ,
173+ },
174+ },
175+ map [string ]tftypes.Value {
176+ "id" : tftypes .NewValue (tftypes .String , "bar/birne" ),
177+ "location" : tftypes .NewValue (tftypes .String , "westeurope" ),
178+ "name" : tftypes .NewValue (tftypes .String , "birne" ),
179+ "resource_group_name" : tftypes .NewValue (tftypes .String , "foo" ),
180+ "instances" : tftypes .NewValue (tftypes .Number , 8564 ),
181+ },
182+ )),
183+ Identity : teststep .Pointer (tftypes .NewValue (
184+ tftypes.Object {
185+ AttributeTypes : map [string ]tftypes.Type {
186+ "resource_group_name" : tftypes .String ,
187+ "name" : tftypes .String ,
188+ },
189+ },
190+ map [string ]tftypes.Value {
191+ "resource_group_name" : tftypes .NewValue (tftypes .String , "bar" ),
192+ "name" : tftypes .NewValue (tftypes .String , "birne" ),
193+ },
194+ )),
195+ DisplayName : "birne" ,
196+ })
197+ push (list.ListResult {
198+ Resource : teststep .Pointer (tftypes .NewValue (
199+ tftypes.Object {
200+ AttributeTypes : map [string ]tftypes.Type {
201+ "id" : tftypes .String ,
202+ "location" : tftypes .String ,
203+ "name" : tftypes .String ,
204+ "resource_group_name" : tftypes .String ,
205+ "instances" : tftypes .Number ,
206+ },
207+ },
208+ map [string ]tftypes.Value {
209+ "id" : tftypes .NewValue (tftypes .String , "bar/kirsche" ),
210+ "location" : tftypes .NewValue (tftypes .String , "westeurope" ),
211+ "name" : tftypes .NewValue (tftypes .String , "kirsche" ),
212+ "resource_group_name" : tftypes .NewValue (tftypes .String , "foo" ),
213+ "instances" : tftypes .NewValue (tftypes .Number , 500 ),
214+ },
215+ )),
75216 Identity : teststep .Pointer (tftypes .NewValue (
76217 tftypes.Object {
77218 AttributeTypes : map [string ]tftypes.Type {
78- "id" : tftypes .String ,
79- "location" : tftypes .String ,
219+ "resource_group_name" : tftypes .String ,
220+ "name" : tftypes .String ,
80221 },
81222 },
82223 map [string ]tftypes.Value {
83- "id " : tftypes .NewValue (tftypes .String , "westeurope/somevalue3 " ),
84- "location " : tftypes .NewValue (tftypes .String , "westeurope3 " ),
224+ "resource_group_name " : tftypes .NewValue (tftypes .String , "bar " ),
225+ "name " : tftypes .NewValue (tftypes .String , "kirsche " ),
85226 },
86227 )),
228+ DisplayName : "kirsche" ,
87229 })
88230 },
89231 },
0 commit comments