Skip to content

Commit 06b6b82

Browse files
authored
Merge pull request #9 from enthought/add-datasources
Add organization robot and organization team data sources
2 parents 880f56d + 649188c commit 06b6b82

File tree

12 files changed

+633
-0
lines changed

12 files changed

+633
-0
lines changed

code_generator/provider_code_spec.json

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,86 @@
365365
]
366366
}
367367
},
368+
{
369+
"name": "organization_robot",
370+
"schema": {
371+
"attributes": [
372+
{
373+
"name": "description",
374+
"string": {
375+
"computed_optional_required": "computed",
376+
"description": "Text description"
377+
}
378+
},
379+
{
380+
"name": "fullname",
381+
"string": {
382+
"computed_optional_required": "computed",
383+
"description": "Robot full name"
384+
}
385+
},
386+
{
387+
"name": "name",
388+
"string": {
389+
"computed_optional_required": "required",
390+
"description": "Robot short name"
391+
}
392+
},
393+
{
394+
"name": "orgname",
395+
"string": {
396+
"computed_optional_required": "required",
397+
"description": "Organization name"
398+
}
399+
}
400+
]
401+
}
402+
},
403+
{
404+
"name": "organization_team",
405+
"schema": {
406+
"attributes": [
407+
{
408+
"name": "description",
409+
"string": {
410+
"computed_optional_required": "computed",
411+
"description": "Markdown description"
412+
}
413+
},
414+
{
415+
"name": "members",
416+
"list": {
417+
"computed_optional_required": "computed",
418+
"description": "List of team members",
419+
"element_type": {
420+
"string": {}
421+
}
422+
}
423+
},
424+
{
425+
"name": "name",
426+
"string": {
427+
"computed_optional_required": "required",
428+
"description": "Team name"
429+
}
430+
},
431+
{
432+
"name": "orgname",
433+
"string": {
434+
"computed_optional_required": "required",
435+
"description": "Organization name"
436+
}
437+
},
438+
{
439+
"name": "role",
440+
"string": {
441+
"computed_optional_required": "computed",
442+
"description": "Team role"
443+
}
444+
}
445+
]
446+
}
447+
},
368448
{
369449
"name": "organization_team_permission",
370450
"schema": {
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "quay_organization_robot Data Source - quay"
4+
subcategory: ""
5+
description: |-
6+
7+
---
8+
9+
# quay_organization_robot (Data Source)
10+
11+
12+
13+
## Example Usage
14+
15+
```terraform
16+
resource "quay_organization" "org" {
17+
name = "org"
18+
19+
}
20+
21+
data "quay_organization_robot" "robot" {
22+
name = "robot"
23+
orgname = quay_organization.org.name
24+
}
25+
```
26+
27+
<!-- schema generated by tfplugindocs -->
28+
## Schema
29+
30+
### Required
31+
32+
- `name` (String) Robot short name
33+
- `orgname` (String) Organization name
34+
35+
### Read-Only
36+
37+
- `description` (String) Text description
38+
- `fullname` (String) Robot full name
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "quay_organization_team Data Source - quay"
4+
subcategory: ""
5+
description: |-
6+
7+
---
8+
9+
# quay_organization_team (Data Source)
10+
11+
12+
13+
## Example Usage
14+
15+
```terraform
16+
resource "quay_organization" "org" {
17+
name = "org"
18+
19+
}
20+
21+
resource "quay_repository" "repo" {
22+
name = "repo"
23+
namespace = quay_organization.org.name
24+
}
25+
26+
resource "quay_organization_robot" "robot" {
27+
name = "robot"
28+
orgname = quay_organization.org.name
29+
}
30+
31+
data "quay_organization_team" "team" {
32+
name = "team"
33+
orgname = quay_organization.org.name
34+
}
35+
```
36+
37+
<!-- schema generated by tfplugindocs -->
38+
## Schema
39+
40+
### Required
41+
42+
- `name` (String) Team name
43+
- `orgname` (String) Organization name
44+
45+
### Read-Only
46+
47+
- `description` (String) Markdown description
48+
- `members` (List of String) List of team members
49+
- `role` (String) Team role
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
resource "quay_organization" "org" {
2+
name = "org"
3+
4+
}
5+
6+
data "quay_organization_robot" "robot" {
7+
name = "robot"
8+
orgname = quay_organization.org.name
9+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
resource "quay_organization" "org" {
2+
name = "org"
3+
4+
}
5+
6+
resource "quay_repository" "repo" {
7+
name = "repo"
8+
namespace = quay_organization.org.name
9+
}
10+
11+
resource "quay_organization_robot" "robot" {
12+
name = "robot"
13+
orgname = quay_organization.org.name
14+
}
15+
16+
data "quay_organization_team" "team" {
17+
name = "team"
18+
orgname = quay_organization.org.name
19+
}

internal/datasource_organization_robot/organization_robot_data_source_gen.go

Lines changed: 44 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/datasource_organization_team/organization_team_data_source_gen.go

Lines changed: 51 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)