Skip to content

Commit

Permalink
docs: generate docs for teams and users
Browse files Browse the repository at this point in the history
  • Loading branch information
pandatix committed Feb 15, 2024
1 parent b89600b commit ea10cf5
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 1 deletion.
30 changes: 30 additions & 0 deletions docs/data-sources/teams.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "ctfd_teams Data Source - terraform-provider-ctfd"
subcategory: ""
description: |-
---

# ctfd_teams (Data Source)





<!-- schema generated by tfplugindocs -->
## Schema

### Read-Only

- `affiliation` (String) Affiliation to a company or agency.
- `banned` (Boolean) Is true if the team is banned from the CTF.
- `captain` (String) Member who is captain of the team. Must be part of the members too.
- `country` (String) Country the team represent or is hail from.
- `email` (String) Email of the team.
- `hidden` (Boolean) Is true if the team is hidden to the participants.
- `id` (String) Identifier of the user.
- `members` (List of String) List of members (User), defined by their IDs.
- `name` (String) Name of the team.
- `password` (String) Password of the team. Notice that during a CTF you may not want to update those to avoid defaulting team accesses.
- `website` (String) Website, blog, or anything similar (displayed to other participants).
2 changes: 1 addition & 1 deletion docs/data-sources/users.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ description: |-
- `id` (String) Identifier of the user.
- `language` (String) Language the user is fluent in.
- `name` (String) Name or pseudo of the user.
- `password` (String) Password of the user. Notice than during a CTF you may not want to update those to avoid defaulting user accesses.
- `password` (String) Password of the user. Notice that during a CTF you may not want to update those to avoid defaulting user accesses.
- `type` (String) Generic type for RBAC purposes.
- `verified` (Boolean) Is true if the user has verified its account by email, or if set by an admin.
- `website` (String) Website, blog, or anything similar (displayed to other participants).
63 changes: 63 additions & 0 deletions docs/resources/team.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "ctfd_team Resource - terraform-provider-ctfd"
subcategory: ""
description: |-
CTFd defines a Team as a group of Users who will attend the Capture The Flag event.
---

# ctfd_team (Resource)

CTFd defines a Team as a group of Users who will attend the Capture The Flag event.

## Example Usage

```terraform
resource "ctfd_user" "ctfer" {
name = "CTFer"
email = "[email protected]"
password = "password"
}
resource "ctfd_team" "cybercombattants" {
name = "Les cybercombattants de l'innovation"
email = "[email protected]"
password = "password"
members = [
ctfd_user.ctfer.id,
]
captain = ctfd_user.ctfer.id
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `captain` (String) Member who is captain of the team. Must be part of the members too.
- `email` (String) Email of the team.
- `members` (List of String) List of members (User), defined by their IDs.
- `name` (String) Name of the team.
- `password` (String) Password of the team. Notice that during a CTF you may not want to update those to avoid defaulting team accesses.

### Optional

- `affiliation` (String) Affiliation to a company or agency.
- `banned` (Boolean) Is true if the team is banned from the CTF.
- `country` (String) Country the team represent or is hail from.
- `hidden` (Boolean) Is true if the team is hidden to the participants.
- `website` (String) Website, blog, or anything similar (displayed to other participants).

### Read-Only

- `id` (String) Identifier of the user.

## Import

Import is supported using the following syntax:

```shell
# User can be imported by the CTFd ID (check URLs)
terraform import ctfd_team.cybercombattants 1
```

0 comments on commit ea10cf5

Please sign in to comment.