Skip to content

Commit 7d85e11

Browse files
committed
added list resource for org quota
1 parent 2cb1031 commit 7d85e11

File tree

6 files changed

+643
-5
lines changed

6 files changed

+643
-5
lines changed
Lines changed: 255 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,255 @@
1+
---
2+
version: 2
3+
interactions:
4+
- id: 0
5+
request:
6+
proto: HTTP/1.1
7+
proto_major: 1
8+
proto_minor: 1
9+
content_length: 0
10+
transfer_encoding: []
11+
trailer: {}
12+
host: api.x.x.x.x.com
13+
remote_addr: ""
14+
request_uri: ""
15+
body: ""
16+
form: {}
17+
headers:
18+
Authorization:
19+
- Bearer redacted
20+
User-Agent:
21+
- Terraform/1.14.3 terraform-provider-cloudfoundry/dev
22+
url: https://api.x.x.x.x.com/v3/organizations/7c8b9705-bc7c-4a96-9af0-6674c8290615
23+
method: GET
24+
response:
25+
proto: HTTP/1.1
26+
proto_major: 1
27+
proto_minor: 1
28+
transfer_encoding: []
29+
trailer: {}
30+
content_length: 734
31+
uncompressed: false
32+
body: '{"guid":"7c8b9705-bc7c-4a96-9af0-6674c8290615","created_at":"2026-03-03T10:07:27Z","updated_at":"2026-03-03T10:07:27Z","name":"test","suspended":false,"relationships":{"quota":{"data":{"guid":"16b266a3-d9b1-4c53-aab7-3526ba9aa636"}}},"metadata":{"labels":{},"annotations":{}},"links":{"self":{"href":"https://api.x.x.x.x.com/v3/organizations/7c8b9705-bc7c-4a96-9af0-6674c8290615"},"domains":{"href":"https://api.x.x.x.x.com/v3/organizations/7c8b9705-bc7c-4a96-9af0-6674c8290615/domains"},"default_domain":{"href":"https://api.x.x.x.x.com/v3/organizations/7c8b9705-bc7c-4a96-9af0-6674c8290615/domains/default"},"quota":{"href":"https://api.x.x.x.x.com/v3/organization_quotas/16b266a3-d9b1-4c53-aab7-3526ba9aa636"}}}'
33+
headers:
34+
Content-Length:
35+
- "734"
36+
Content-Type:
37+
- application/json; charset=utf-8
38+
Date:
39+
- Thu, 26 Mar 2026 12:30:02 GMT
40+
Referrer-Policy:
41+
- strict-origin-when-cross-origin
42+
Server:
43+
- istio-envoy
44+
X-B3-Spanid:
45+
- 6d2241bd28cf425d
46+
X-B3-Traceid:
47+
- 6149b7b8319046026d2241bd28cf425d
48+
X-Content-Type-Options:
49+
- nosniff
50+
X-Download-Options:
51+
- noopen
52+
X-Envoy-Upstream-Service-Time:
53+
- "155"
54+
X-Frame-Options:
55+
- SAMEORIGIN
56+
X-Permitted-Cross-Domain-Policies:
57+
- none
58+
X-Runtime:
59+
- "0.041259"
60+
X-Vcap-Request-Id:
61+
- 6149b7b8-3190-4602-6d22-41bd28cf425d::82a812d7-b77c-4f5a-a95d-828a140d53fa
62+
X-Xss-Protection:
63+
- 1; mode=block
64+
status: 200 OK
65+
code: 200
66+
duration: 176.712291ms
67+
- id: 1
68+
request:
69+
proto: HTTP/1.1
70+
proto_major: 1
71+
proto_minor: 1
72+
content_length: 0
73+
transfer_encoding: []
74+
trailer: {}
75+
host: api.x.x.x.x.com
76+
remote_addr: ""
77+
request_uri: ""
78+
body: ""
79+
form: {}
80+
headers:
81+
Authorization:
82+
- Bearer redacted
83+
User-Agent:
84+
- Terraform/1.14.3 terraform-provider-cloudfoundry/dev
85+
url: https://api.x.x.x.x.com/v3/roles?organization_guids=7c8b9705-bc7c-4a96-9af0-6674c8290615&page=1&per_page=50
86+
method: GET
87+
response:
88+
proto: HTTP/1.1
89+
proto_major: 1
90+
proto_minor: 1
91+
transfer_encoding: []
92+
trailer: {}
93+
content_length: 1059
94+
uncompressed: false
95+
body: '{"pagination":{"total_results":1,"total_pages":1,"first":{"href":"https://api.x.x.x.x.com/v3/roles?order_by=%2Bcreated_at\u0026organization_guids=7c8b9705-bc7c-4a96-9af0-6674c8290615\u0026page=1\u0026per_page=50"},"last":{"href":"https://api.x.x.x.x.com/v3/roles?order_by=%2Bcreated_at\u0026organization_guids=7c8b9705-bc7c-4a96-9af0-6674c8290615\u0026page=1\u0026per_page=50"},"next":null,"previous":null},"resources":[{"guid":"a8320596-5c60-47f9-a7ba-2083eadae14e","created_at":"2026-03-03T10:07:28Z","updated_at":"2026-03-03T10:07:28Z","type":"organization_user","relationships":{"user":{"data":{"guid":"1a6c31b5-e857-4ed0-ad48-a27843a9dd36"}},"organization":{"data":{"guid":"7c8b9705-bc7c-4a96-9af0-6674c8290615"}},"space":{"data":null}},"links":{"self":{"href":"https://api.x.x.x.x.com/v3/roles/a8320596-5c60-47f9-a7ba-2083eadae14e"},"user":{"href":"https://api.x.x.x.x.com/v3/users/1a6c31b5-e857-4ed0-ad48-a27843a9dd36"},"organization":{"href":"https://api.x.x.x.x.com/v3/organizations/7c8b9705-bc7c-4a96-9af0-6674c8290615"}}}]}'
96+
headers:
97+
Content-Length:
98+
- "1059"
99+
Content-Type:
100+
- application/json; charset=utf-8
101+
Date:
102+
- Thu, 26 Mar 2026 12:30:02 GMT
103+
Referrer-Policy:
104+
- strict-origin-when-cross-origin
105+
Server:
106+
- istio-envoy
107+
X-B3-Spanid:
108+
- 6f635cf61790d1c8
109+
X-B3-Traceid:
110+
- 1ded0d7c62b64dc06f635cf61790d1c8
111+
X-Content-Type-Options:
112+
- nosniff
113+
X-Download-Options:
114+
- noopen
115+
X-Envoy-Upstream-Service-Time:
116+
- "206"
117+
X-Frame-Options:
118+
- SAMEORIGIN
119+
X-Permitted-Cross-Domain-Policies:
120+
- none
121+
X-Runtime:
122+
- "0.198454"
123+
X-Vcap-Request-Id:
124+
- 1ded0d7c-62b6-4dc0-6f63-5cf61790d1c8::a976764b-5c45-457e-958f-48ba4f6fc100
125+
X-Xss-Protection:
126+
- 1; mode=block
127+
status: 200 OK
128+
code: 200
129+
duration: 207.917375ms
130+
- id: 2
131+
request:
132+
proto: HTTP/1.1
133+
proto_major: 1
134+
proto_minor: 1
135+
content_length: 0
136+
transfer_encoding: []
137+
trailer: {}
138+
host: api.x.x.x.x.com
139+
remote_addr: ""
140+
request_uri: ""
141+
body: ""
142+
form: {}
143+
headers:
144+
Authorization:
145+
- Bearer redacted
146+
User-Agent:
147+
- Terraform/1.14.3 terraform-provider-cloudfoundry/dev
148+
url: https://api.x.x.x.x.com/v3/organizations/7c8b9705-bc7c-4a96-9af0-6674c8290615
149+
method: GET
150+
response:
151+
proto: HTTP/1.1
152+
proto_major: 1
153+
proto_minor: 1
154+
transfer_encoding: []
155+
trailer: {}
156+
content_length: 734
157+
uncompressed: false
158+
body: '{"guid":"7c8b9705-bc7c-4a96-9af0-6674c8290615","created_at":"2026-03-03T10:07:27Z","updated_at":"2026-03-03T10:07:27Z","name":"test","suspended":false,"relationships":{"quota":{"data":{"guid":"16b266a3-d9b1-4c53-aab7-3526ba9aa636"}}},"metadata":{"labels":{},"annotations":{}},"links":{"self":{"href":"https://api.x.x.x.x.com/v3/organizations/7c8b9705-bc7c-4a96-9af0-6674c8290615"},"domains":{"href":"https://api.x.x.x.x.com/v3/organizations/7c8b9705-bc7c-4a96-9af0-6674c8290615/domains"},"default_domain":{"href":"https://api.x.x.x.x.com/v3/organizations/7c8b9705-bc7c-4a96-9af0-6674c8290615/domains/default"},"quota":{"href":"https://api.x.x.x.x.com/v3/organization_quotas/16b266a3-d9b1-4c53-aab7-3526ba9aa636"}}}'
159+
headers:
160+
Content-Length:
161+
- "734"
162+
Content-Type:
163+
- application/json; charset=utf-8
164+
Date:
165+
- Thu, 26 Mar 2026 12:30:02 GMT
166+
Referrer-Policy:
167+
- strict-origin-when-cross-origin
168+
Server:
169+
- istio-envoy
170+
X-B3-Spanid:
171+
- 5ceb615caed92718
172+
X-B3-Traceid:
173+
- 494648e2c95e4fdf5ceb615caed92718
174+
X-Content-Type-Options:
175+
- nosniff
176+
X-Download-Options:
177+
- noopen
178+
X-Envoy-Upstream-Service-Time:
179+
- "23"
180+
X-Frame-Options:
181+
- SAMEORIGIN
182+
X-Permitted-Cross-Domain-Policies:
183+
- none
184+
X-Runtime:
185+
- "0.012180"
186+
X-Vcap-Request-Id:
187+
- 494648e2-c95e-4fdf-5ceb-615caed92718::06fba4ca-75ea-4145-a421-12a45b0832e2
188+
X-Xss-Protection:
189+
- 1; mode=block
190+
status: 200 OK
191+
code: 200
192+
duration: 27.007917ms
193+
- id: 3
194+
request:
195+
proto: HTTP/1.1
196+
proto_major: 1
197+
proto_minor: 1
198+
content_length: 0
199+
transfer_encoding: []
200+
trailer: {}
201+
host: api.x.x.x.x.com
202+
remote_addr: ""
203+
request_uri: ""
204+
body: ""
205+
form: {}
206+
headers:
207+
Authorization:
208+
- Bearer redacted
209+
User-Agent:
210+
- Terraform/1.14.3 terraform-provider-cloudfoundry/dev
211+
url: https://api.x.x.x.x.com/v3/roles?organization_guids=7c8b9705-bc7c-4a96-9af0-6674c8290615&page=1&per_page=50
212+
method: GET
213+
response:
214+
proto: HTTP/1.1
215+
proto_major: 1
216+
proto_minor: 1
217+
transfer_encoding: []
218+
trailer: {}
219+
content_length: 1059
220+
uncompressed: false
221+
body: '{"pagination":{"total_results":1,"total_pages":1,"first":{"href":"https://api.x.x.x.x.com/v3/roles?order_by=%2Bcreated_at\u0026organization_guids=7c8b9705-bc7c-4a96-9af0-6674c8290615\u0026page=1\u0026per_page=50"},"last":{"href":"https://api.x.x.x.x.com/v3/roles?order_by=%2Bcreated_at\u0026organization_guids=7c8b9705-bc7c-4a96-9af0-6674c8290615\u0026page=1\u0026per_page=50"},"next":null,"previous":null},"resources":[{"guid":"a8320596-5c60-47f9-a7ba-2083eadae14e","created_at":"2026-03-03T10:07:28Z","updated_at":"2026-03-03T10:07:28Z","type":"organization_user","relationships":{"user":{"data":{"guid":"1a6c31b5-e857-4ed0-ad48-a27843a9dd36"}},"organization":{"data":{"guid":"7c8b9705-bc7c-4a96-9af0-6674c8290615"}},"space":{"data":null}},"links":{"self":{"href":"https://api.x.x.x.x.com/v3/roles/a8320596-5c60-47f9-a7ba-2083eadae14e"},"user":{"href":"https://api.x.x.x.x.com/v3/users/1a6c31b5-e857-4ed0-ad48-a27843a9dd36"},"organization":{"href":"https://api.x.x.x.x.com/v3/organizations/7c8b9705-bc7c-4a96-9af0-6674c8290615"}}}]}'
222+
headers:
223+
Content-Length:
224+
- "1059"
225+
Content-Type:
226+
- application/json; charset=utf-8
227+
Date:
228+
- Thu, 26 Mar 2026 12:30:02 GMT
229+
Referrer-Policy:
230+
- strict-origin-when-cross-origin
231+
Server:
232+
- istio-envoy
233+
X-B3-Spanid:
234+
- 43903b698458105d
235+
X-B3-Traceid:
236+
- 11c2c74a009f448d43903b698458105d
237+
X-Content-Type-Options:
238+
- nosniff
239+
X-Download-Options:
240+
- noopen
241+
X-Envoy-Upstream-Service-Time:
242+
- "37"
243+
X-Frame-Options:
244+
- SAMEORIGIN
245+
X-Permitted-Cross-Domain-Policies:
246+
- none
247+
X-Runtime:
248+
- "0.021943"
249+
X-Vcap-Request-Id:
250+
- 11c2c74a-009f-448d-4390-3b698458105d::ad0f2f68-3a87-4a16-bbec-05fdd319d804
251+
X-Xss-Protection:
252+
- 1; mode=block
253+
status: 200 OK
254+
code: 200
255+
duration: 41.262833ms

cloudfoundry/provider/list_resource_org.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ type orgListResource struct {
1919
cfClient *cfv3client.Client
2020
}
2121

22-
// type orgListResourceFilter struct {
23-
// LabelsFilter types.String `tfsdk:"labels_filter"`
24-
// }
25-
2622
func NewOrgListResource() list.ListResource {
2723
return &orgListResource{}
2824
}
@@ -56,7 +52,6 @@ func (r *orgListResource) ListResourceConfigSchema(
5652
) {
5753
resp.Schema = schema.Schema{
5854
MarkdownDescription: "This list resource allows you to discover all organizations the user has access to.",
59-
//Attributes: map[string]schema.Attribute{},
6055
}
6156
}
6257

0 commit comments

Comments
 (0)