started with documentation
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is failing

This commit is contained in:
2022-06-12 17:49:33 +02:00
parent f7d1914d45
commit cc6f0d460a
10 changed files with 298 additions and 96 deletions

View File

@ -10,7 +10,34 @@ description: |-
## Example Usage
```terraform
terraform {
required_providers {
gitea = {
source = "Lerentis/gitea"
version = "0.3.0"
}
}
}
provider "gitea" {
base_url = var.gitea_url # optionally use GITEA_BASE_URL env var
token = var.gitea_token # optionally use GITEA_TOKEN env var
# Username/Password authentication is mutally exclusive with token authentication
# username = var.username # optionally use GITEA_USERNAME env var
# password = var.password # optionally use GITEA_PASSWORD env var
# A file containing the ca certificate to use in case ssl certificate is not from a standard chain
cacert_file = var.cacert_file
# If you are running a gitea instance with self signed TLS certificates
# and you want to disable certificate validation you can deactivate it with this flag
insecure = false
}
```
<!-- schema generated by tfplugindocs -->
## Schema

View File

@ -3,30 +3,44 @@
page_title: "gitea_org Resource - terraform-provider-gitea"
subcategory: ""
description: |-
Handling Ogranisation resources
gitea_org manages a gitea organisation.
Organisations are a way to group repositories and abstract permission management in a gitea instance.
---
# gitea_org (Resource)
Handling Ogranisation resources
`gitea_org` manages a gitea organisation.
Organisations are a way to group repositories and abstract permission management in a gitea instance.
## Example Usage
```terraform
resource "gitea_org" "test_org" {
name = "test-org"
}
resource "gitea_repository" "org_repo" {
username = gitea_org.test_org.name
name = "org-test-repo"
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `name` (String)
- `name` (String) The name of the organisation without spaces.
### Optional
- `description` (String)
- `full_name` (String)
- `description` (String) A description of this organisation.
- `full_name` (String) The display name of the organisation. Defaults to the value of `name`.
- `location` (String)
- `repo_admin_change_team_access` (Boolean)
- `visibility` (String)
- `website` (String)
- `visibility` (String) Flag is this organisation should be publicly visible or not.
- `website` (String) A link to a website with more information about this organisation.
### Read-Only

View File

@ -3,22 +3,51 @@
page_title: "gitea_repository Resource - terraform-provider-gitea"
subcategory: ""
description: |-
Handling Repository resources
gitea_repository manages a gitea repository.
Per default this repository will be initializiled with the provided configuration (gitignore, License etc.).
If the username property is set to a organisation name, the provider will try to look if this organisation exists and create the repository under the organisation scope.
Repository migrations have some properties that are not available to regular repositories. These are all prefixed with migration_.
---
# gitea_repository (Resource)
Handling Repository resources
`gitea_repository` manages a gitea repository.
Per default this repository will be initializiled with the provided configuration (gitignore, License etc.).
If the `username` property is set to a organisation name, the provider will try to look if this organisation exists and create the repository under the organisation scope.
Repository migrations have some properties that are not available to regular repositories. These are all prefixed with `migration_`.
## Example Usage
```terraform
resource "gitea_repository" "test" {
username = "lerentis"
name = "test"
private = true
issue_labels = "Default"
license = "MIT"
gitignores = "Go"
}
resource "gitea_repository" "mirror" {
username = "lerentis"
name = "terraform-provider-gitea-mirror"
description = "Mirror of Terraform Provider"
mirror = true
migration_clone_addresse = "https://git.uploadfilter24.eu/lerentis/terraform-provider-gitea.git"
migration_service = "gitea"
migration_service_auth_token = var.gitea_mirror_token
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `name` (String)
- `username` (String)
- `name` (String) The Name of the repository
- `username` (String) The Owner of the repository
### Optional
@ -28,18 +57,21 @@ Handling Repository resources
- `allow_rebase_explicit` (Boolean)
- `allow_squash_merge` (Boolean)
- `archived` (Boolean)
- `auto_init` (Boolean)
- `auto_init` (Boolean) Flag if the repository should be initiated with the configured values
- `autodetect_manual_merge` (Boolean)
- `default_branch` (String)
- `description` (String)
- `gitignores` (String)
- `has_issues` (Boolean)
- `has_projects` (Boolean)
- `has_pull_requests` (Boolean)
- `has_wiki` (Boolean)
- `default_branch` (String) The default branch of the repository. Defaults to `main`
- `description` (String) The description of the repository.
- `gitignores` (String) A specific gitignore that should be commited to the repositoryon creation if `auto_init` is set to `true`
Need to exist in the gitea instance
- `has_issues` (Boolean) A flag if the repository should have issue management enabled or not.
- `has_projects` (Boolean) A flag if the repository should have the native project management enabled or not.
- `has_pull_requests` (Boolean) A flag if the repository should acceppt pull requests or not.
- `has_wiki` (Boolean) A flag if the repository should have the native wiki enabled or not.
- `ignore_whitespace_conflicts` (Boolean)
- `issue_labels` (String)
- `license` (String)
- `issue_labels` (String) The Issue Label configuration to be used in this repository.
Need to exist in the gitea instance
- `license` (String) The license under which the source code of this repository should be.
Need to exist in the gitea instance
- `migration_clone_addresse` (String)
- `migration_issue_labels` (Boolean)
- `migration_lfs` (Boolean)
@ -52,10 +84,10 @@ Handling Repository resources
- `migration_service_auth_token` (String, Sensitive)
- `migration_service_auth_username` (String)
- `mirror` (Boolean)
- `private` (Boolean)
- `private` (Boolean) Flag if the repository should be private or not.
- `readme` (String)
- `repo_template` (Boolean)
- `website` (String)
- `website` (String) A link to a website with more information.
### Read-Only