mirror of
https://git.uploadfilter24.eu/lerentis/terraform-provider-gitea.git
synced 2024-11-11 04:38:12 +00:00
67 lines
1.6 KiB
Markdown
67 lines
1.6 KiB
Markdown
---
|
|
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
|
page_title: "gitea_token Resource - terraform-provider-gitea"
|
|
subcategory: ""
|
|
description: |-
|
|
gitea_token manages gitea Access Tokens.
|
|
Due to upstream limitations (see https://gitea.com/gitea/go-sdk/issues/610) this resource
|
|
can only be used with username/password provider configuration.
|
|
WARNING:
|
|
Tokens will be stored in the terraform state!
|
|
---
|
|
|
|
# gitea_token (Resource)
|
|
|
|
`gitea_token` manages gitea Access Tokens.
|
|
|
|
Due to upstream limitations (see https://gitea.com/gitea/go-sdk/issues/610) this resource
|
|
can only be used with username/password provider configuration.
|
|
|
|
WARNING:
|
|
Tokens will be stored in the terraform state!
|
|
|
|
## Example Usage
|
|
|
|
```terraform
|
|
provider "gitea" {
|
|
base_url = var.gitea_url
|
|
# Token Auth can not be used with this resource
|
|
username = var.gitea_username
|
|
password = var.gitea_password
|
|
}
|
|
|
|
resource "gitea_user" "test" {
|
|
username = "test"
|
|
login_name = "test"
|
|
password = "Geheim1!"
|
|
email = "test@user.dev"
|
|
must_change_password = false
|
|
admin = true
|
|
}
|
|
|
|
resource "gitea_token" "test_token" {
|
|
username = resource.gitea_user.test.username
|
|
name = "test-token"
|
|
}
|
|
|
|
output "token" {
|
|
value = resource.gitea_token.test_token.token
|
|
sensitive = true
|
|
}
|
|
```
|
|
|
|
<!-- schema generated by tfplugindocs -->
|
|
## Schema
|
|
|
|
### Required
|
|
|
|
- `name` (String) The name of the Access Token
|
|
- `username` (String) The owner of the Access Token
|
|
|
|
### Read-Only
|
|
|
|
- `id` (String) The ID of this resource.
|
|
- `last_eight` (String)
|
|
- `token` (String, Sensitive) The actual Access Token
|
|
|
|
|