Skip to content

Commit 50a80f3

Browse files
authored
Merge pull request #15 from fnaoto/feature/fix_document
Add document
2 parents 4a9a645 + bac67bc commit 50a80f3

File tree

9 files changed

+287
-75
lines changed

9 files changed

+287
-75
lines changed

docs/data-sources/app_collaborator.md

Lines changed: 41 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,38 +3,63 @@
33
page_title: "deploygate_app_collaborator Data Source - terraform-provider-deploygate"
44
subcategory: ""
55
description: |-
6-
6+
The deploygate_app_collaborator data srouce is used to get informantion about existing app collaborators of deploygate.
77
---
88

99
# deploygate_app_collaborator (Data Source)
1010

11+
The deploygate_app_collaborator data srouce is used to get informantion about existing app collaborators of deploygate.
1112

13+
<!-- schema generated by tfplugindocs -->
14+
## Example Usage
15+
---
1216

17+
```tf
18+
# Provider
1319
20+
provider "deploygate" {
21+
alias = "user"
22+
api_key = var.user_api_key
23+
# Or export DG_API_KEY (Environment variable).
24+
}
1425
15-
<!-- schema generated by tfplugindocs -->
16-
## Schema
26+
variable "user_api_key" {
27+
type = string
28+
# Or export TF_VAR_user_api_key (Environment variable).
29+
}
1730
18-
### Required
31+
# Data
1932
20-
- **app_id** (String)
21-
- **owner** (String)
22-
- **platform** (String)
33+
data "deploygate_app_collaborator" "current" {
34+
provider = deploygate.user
35+
platform = "android"
36+
app_id = "com.deploygate.sample"
37+
owner = "owner-name"
38+
}
2339
24-
### Optional
40+
# Output
2541
26-
- **id** (String) The ID of this resource.
42+
output "data_app_collaborator_users" {
43+
value = data.deploygate_app_collaborator.current.users
44+
}
45+
```
2746

28-
### Read-Only
47+
## Argument Reference
48+
---
2949

30-
- **users** (Set of Object) (see [below for nested schema](#nestedatt--users))
50+
- **app_id** (Required) `(String)` Id of application. Something like `com.deploygate.sample` or `com.deploygate.sample.DeployGateSample`.
3151

32-
<a id="nestedatt--users"></a>
33-
### Nested Schema for `users`
52+
- **owner** (Required) `(String)` Name of application owner. As same as account id of application owner.
53+
54+
- **platform** (Required) `(String)` Platform of application, `android` or `ios`.
55+
56+
## Attributes Reference
57+
---
3458

35-
Read-Only:
59+
- **users** `(Object)` (see [below for users](#users))
3660

37-
- **name** (String)
38-
- **role** (Number)
61+
### users
3962

63+
- **name** `(String)` Name of the user.
4064

65+
- **role** `(Number)` Role of the user.

docs/data-sources/organization_member.md

Lines changed: 41 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,39 +3,63 @@
33
page_title: "deploygate_organization_member Data Source - terraform-provider-deploygate"
44
subcategory: ""
55
description: |-
6-
6+
The deploygate_organization_member data source is used to get informantion about existing organization member of deploygate.
77
---
88

99
# deploygate_organization_member (Data Source)
1010

11+
The deploygate_organization_member data source is used to get informantion about existing organization member of deploygate.
1112

13+
<!-- schema generated by tfplugindocs -->
14+
## Example Usage
15+
---
1216

17+
```tf
18+
# Provider
1319
20+
provider "deploygate" {
21+
alias = "organization"
22+
api_key = var.organization_api_key
23+
# Or export DG_API_KEY (Environment variable).
24+
}
1425
15-
<!-- schema generated by tfplugindocs -->
16-
## Schema
26+
variable "organization_api_key" {
27+
type = string
28+
# Or export TF_VAR_organization_api_key (Environment variable).
29+
}
30+
31+
# Data
1732
18-
### Required
33+
data "deploygate_organization_member" "current" {
34+
provider = deploygate.organization
35+
organization = "organization-name"
36+
}
1937
20-
- **organization** (String)
38+
# Output
2139
22-
### Optional
40+
output "data_organization_member_members" {
41+
value = data.deploygate_organization_member.current.members
42+
}
43+
```
2344

24-
- **id** (String) The ID of this resource.
45+
## Argument Reference
46+
---
47+
48+
- **organization** (Required) `(String)` Name of the organization. [Check your organizations](https://deploygate.com/organizations)
49+
50+
## Attributes Reference
51+
---
2552

26-
### Read-Only
53+
- **members** `(Object)` Data of the organization members. (see [below for members](#members))
2754

28-
- **members** (Set of Object) (see [below for nested schema](#nestedatt--members))
55+
### members
2956

30-
<a id="nestedatt--members"></a>
31-
### Nested Schema for `members`
57+
- **icon_url** `(String)` Icon URL for user profile.
3258

33-
Read-Only:
59+
- **inviting** `(Boolean)` If the user has been inviting or not.
3460

35-
- **icon_url** (String)
36-
- **inviting** (Boolean)
37-
- **name** (String)
38-
- **type** (String)
39-
- **url** (String)
61+
- **name** `(String)` Name of the user.
4062

63+
- **type** `(String)` Type of the user that is user or tester.
4164

65+
- **url** `(String)` Url of the user account.

docs/index.md

Lines changed: 90 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,103 @@
22
# generated by https://github.com/hashicorp/terraform-plugin-docs
33
page_title: "deploygate Provider"
44
subcategory: ""
5-
description: |-
6-
5+
description: |-
6+
The deploygate provider is used to manage app collaborators and organizations members of deploygate.
77
---
88

99
# deploygate Provider
1010

11+
The deploygate provider is used to manage app collaborators and organizations members of the deploygate.
1112

13+
The deploygate is distribution platform for in-development mobile app (iOS and Android), delivering apps for teams/organizations/testers.
1214

13-
15+
Try the [deploygate](https://deploygate.com/).
1416

1517
<!-- schema generated by tfplugindocs -->
16-
## Schema
18+
## Example Usage
19+
---
20+
21+
Terraform 0.13 and later:
22+
23+
```tf
24+
terraform {
25+
required_providers {
26+
deploygate = {
27+
source = "fnaoto/deploygate"
28+
}
29+
}
30+
}
31+
32+
provider "deploygate" {
33+
alias = "user"
34+
api_key = "< user_api_key >"
35+
}
36+
37+
provider "deploygate" {
38+
alias = "organization"
39+
api_key = "< organization_api_key >"
40+
}
41+
```
42+
43+
Terraform 0.12 and earlier:
44+
45+
```sh
46+
# Make binary of deploygate provider.
47+
$ git clone [email protected]:fnaoto/terraform-provider-deploygate.git
48+
$ make
49+
```
50+
51+
```tf
52+
provider "deploygate" {
53+
alias = "user"
54+
api_key = "< user_api_key >"
55+
}
56+
57+
provider "deploygate" {
58+
alias = "organization"
59+
api_key = "< organization_api_key >"
60+
}
61+
```
62+
63+
## Authentication
64+
---
65+
66+
The deploygate providing credentials for authentication.
67+
68+
- [User API Key](https://deploygate.com/settings)
69+
- [Organization API Key](https://docs.deploygate.com/docs/organization-api-key)
70+
71+
### Static
72+
73+
(Not recommended) Static API Key can be adding an `api_key`, in-line in the deploygate provider block.
74+
75+
- Example
76+
77+
```
78+
provider "deploygate" {
79+
alias = "user"
80+
api_key = "< user_api_key >"
81+
}
82+
83+
provider "deploygate" {
84+
alias = "organization"
85+
api_key = "< organization_api_key >"
86+
}
87+
```
88+
89+
### Environment Variables
90+
91+
You can provide api_key via `DG_API_KEY`, environment variables.
92+
93+
- Example
94+
95+
```
96+
provider "deploygate" {}
97+
```
98+
99+
## Argument Reference
100+
---
17101

18-
### Optional
102+
The following arguments are supported in the deploygate provider block:
19103

20-
- **api_key** (String, Sensitive)
104+
- **api_key** - (Optional) `(String)` This is the deploygate api key. It must be provided, but it can also be sourced from the `DG_API_KEY` environment variable.

docs/resources/app_collaborator.md

Lines changed: 47 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,38 +3,68 @@
33
page_title: "deploygate_app_collaborator Resource - terraform-provider-deploygate"
44
subcategory: ""
55
description: |-
6-
6+
The deploygate_app_collaborator resource is used to manage app collaborators of deploygate.
77
---
88

99
# deploygate_app_collaborator (Resource)
1010

11+
The deploygate_app_collaborator resource is used to manage app collaborators of deploygate.
1112

13+
<!-- schema generated by tfplugindocs -->
14+
## Example Usage
15+
---
1216

17+
```tf
18+
# Provider
19+
20+
provider "deploygate" {
21+
alias = "user"
22+
api_key = var.user_api_key
23+
# Or export DG_API_KEY (Environment variable).
24+
}
25+
26+
variable "user_api_key" {
27+
type = string
28+
# Or export TF_VAR_user_api_key (Environment variable).
29+
}
30+
31+
# Resource
32+
33+
resource "deploygate_app_collaborator" "current" {
34+
provider = deploygate.user
35+
platform = "android"
36+
app_id = "com.deploygate.sample"
37+
owner = "account-id"
38+
users {
39+
name = "collaborator-id"
40+
}
41+
}
42+
```
43+
44+
## Argument Reference
45+
---
1346

47+
- **app_id** (Required) `(String)` Id of application. Something like `com.deploygate.sample` or `com.deploygate.sample.DeployGateSample`.
1448

15-
<!-- schema generated by tfplugindocs -->
16-
## Schema
17-
18-
### Required
49+
- **owner** (Required) `(String)` Name of application owner. As same as account id of application owner.
1950

20-
- **app_id** (String)
21-
- **owner** (String)
22-
- **platform** (String)
23-
- **users** (Block Set, Min: 1) (see [below for nested schema](#nestedblock--users))
51+
- **platform** (Required) `(String)` Platform of application, `android` or `ios`.
2452

25-
### Optional
53+
- **users** (Required) `(Block)` To add a deploygate user to the application collaborators. (see [below for users](#users))
2654

27-
- **id** (String) The ID of this resource.
55+
#### users
2856

29-
<a id="nestedblock--users"></a>
30-
### Nested Schema for `users`
57+
The users blocks supports the following arguments:
3158

32-
Required:
59+
- **name** (Required) `(String)` Name of a user to add to collaborators.
3360

34-
- **name** (String)
61+
## Attributes Reference
62+
---
3563

36-
Optional:
64+
- **users** `(Object)` (see [below for users](#users))
3765

38-
- **role** (Number)
66+
### users
3967

68+
- **name** `(String)` Name of the user.
4069

70+
- **role** `(Number)` Role of the user.

0 commit comments

Comments
 (0)