2023-09-06 07:14:01 +05:30
|
|
|
---
|
|
|
|
# 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
|
|
|
|
}
|
|
|
|
|
2023-11-16 06:22:35 +05:30
|
|
|
// The token owner is the creator of the token
|
2023-09-06 07:14:01 +05:30
|
|
|
resource "gitea_token" "test_token" {
|
2023-11-16 06:22:35 +05:30
|
|
|
name = "test_token"
|
|
|
|
scopes = ["all"]
|
2023-09-06 07:14:01 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
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
|
2023-11-16 06:22:35 +05:30
|
|
|
- `scopes` (Set of String) List of string representations of scopes for the token
|
2023-09-06 07:14:01 +05:30
|
|
|
|
|
|
|
### Read-Only
|
|
|
|
|
|
|
|
- `id` (String) The ID of this resource.
|
|
|
|
- `last_eight` (String)
|
|
|
|
- `token` (String, Sensitive) The actual Access Token
|