Skip to content

Commit

Permalink
doc: Add git token documentation (#317)
Browse files Browse the repository at this point in the history
  • Loading branch information
mzottola committed Dec 8, 2023
1 parent ff2966a commit 4a0a919
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 0 deletions.
40 changes: 40 additions & 0 deletions docs/resources/git_token.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,43 @@
Provides a Qovery git token resource. This can be used to create and manage Qovery git token.


## Example
```terraform
resource "qovery_git_token" "my_git_token" {
# Required
organization_id = qovery_organization.my_organization.id
name = "my-git-token"
type = "GITHUB"
token = "my-git-provider-token"
# Optional
description = "Github token"
# Only necessary for BITBUCKET git tokens
bitbucket_workspace = "workspace-bitbucket"
}
```

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

### Required

- `name` (String) Name of the git token.
- `organization_id` (String) Id of the organization.
- `token` (String, Sensitive) Value of the git token.
- `type` (String) Type of the git token.
- Can be: `BITBUCKET`, `GITHUB`, `GITLAB`.

### Optional

- `bitbucket_workspace` (String) (Mandatory only for Bitbucket git token) Workspace where the token has permissions .
- `description` (String) Description of the git token.

### Read-Only

- `id` (String) Id of the git token.
## Import
```shell
terraform import qovery_git_token.my_git_token "<organization_id>,<git_token_id>"
```
1 change: 1 addition & 0 deletions examples/resources/qovery_git_token/examples.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
empty
1 change: 1 addition & 0 deletions examples/resources/qovery_git_token/import.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
terraform import qovery_git_token.my_git_token "<organization_id>,<git_token_id>"
13 changes: 13 additions & 0 deletions examples/resources/qovery_git_token/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
resource "qovery_git_token" "my_git_token" {
# Required
organization_id = qovery_organization.my_organization.id
name = "my-git-token"
type = "GITHUB"
token = "my-git-provider-token"

# Optional
description = "Github token"

# Only necessary for BITBUCKET git tokens
bitbucket_workspace = "workspace-bitbucket"
}

0 comments on commit 4a0a919

Please sign in to comment.