**Is your feature request related to a problem? Please describe.**
I hate to manually set Action secrets and variables. It is error-prone. It is super useful to set them via terraform as those values are probably in your state 😃.
Because my changes to gitea go-sdk were approved, it is now possible!
a239deff5a
**Describe the solution you'd like**
```
resource "gitea_repository_actions_variable" "test" {
repository_owner = "marek"
repository = "nginx"
variable_name = "FROM_TF"
value = "Test value"
}
resource "gitea_repository_actions_secret" "test" {
repository_owner = "marek"
repository = "nginx"
secret_name = "SECRET_FROM_TF"
secret_value = "Test secret"
}
```
closes#89
Co-authored-by: Marek Mościchowski <marek.moscichowski@miquido.com>
Reviewed-on: https://gitea.com/gitea/terraform-provider-gitea/pulls/88
Co-authored-by: Marek Mościchowski <marek@noreply.gitea.com>
Co-committed-by: Marek Mościchowski <marek@noreply.gitea.com>
This PR adds the ability to set scopes for tokens (they can not be used for much without). Removed the _username_ from the _token resource_ as the owner can not be configured, as it will be owned by the user creating the resource.
As far as I can tell, it's not possible to modify the scopes for a existing token using the API, so a token created by the provider will be recreated if the list of scopes is updated. This reflects what is possible using the GUI.
This PR fixes this issue: https://gitea.com/gitea/terraform-provider-gitea/issues/32
Reviewed-on: https://gitea.com/gitea/terraform-provider-gitea/pulls/33
Co-authored-by: tobiasbp <tobiasbp@noreply.gitea.com>
Co-committed-by: tobiasbp <tobiasbp@noreply.gitea.com>
This PR adds two new resources, _gitea_team_membership_ & _gitea_team_members_, in an attempt to decouple _gitea_team_ resources from team memberships. This facilitates the removal of members from teams without altering/recreating an existing _team_ resource.
This PR adresses this issue: https://gitea.com/gitea/terraform-provider-gitea/issues/30
The ability to set members in the _gitea_team_ resource has been removed.
The resources proposed here are inspired by similar resources in the _GitHub_ provider:
* [team_members](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/team_members)
* [team_membership](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/team_membership)
# gitea_team_members
A single resource manages all members of a team.
- This resource must be recreated when membership changes. This means, that other team members will temporarily loose their membership until the recreation of the resource is complete.
- If the recreation of the resource fails, other users will have lost their membership until the resource can be recreated.
# gitea_team_membership
A single resource holds the relationship between a single user and a single team.
- Memberships can be deleted without affecting other users.
Reviewed-on: https://gitea.com/gitea/terraform-provider-gitea/pulls/36
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com>
Co-authored-by: Tobias Balle-Petersen <tobiasbp@gmail.com>
Co-committed-by: Tobias Balle-Petersen <tobiasbp@gmail.com>
Hi all,
I've noticed that data source for `gitea_repo` is not working. Instead of trying to fetch data from `/api/v1/repos/<username>/<name>` it sends a reques as `/api/v1/repos/<username>/<username>`. I've updated the code to fix this.
Signed-off-by: petar.nikolovski <petar.nikolovski@united.cloud>
Reviewed-on: https://gitea.com/gitea/terraform-provider-gitea/pulls/9
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com>
Co-authored-by: petar.nikolovski <petar.nikolovski@noreply.gitea.com>
Co-committed-by: petar.nikolovski <petar.nikolovski@noreply.gitea.com>
Hi @techknowlogick 👋
as discussed on twitter the changes i made on my fork 😃
not sure if you are aware of this but currently hashicorp only allows publishing via github, so if you want to publish this provider to the terraform registry as well, feel free to also take a look at my goreleaser config and drone/github actions usage her: https://git.uploadfilter24.eu/lerentis/terraform-provider-gitea
Co-authored-by: Tobias Trabelsi <lerentis@uploadfilter24.eu>
Reviewed-on: https://gitea.com/gitea/terraform-provider-gitea/pulls/2
Co-authored-by: lerentis <lerentis@noreply.gitea.io>
Co-committed-by: lerentis <lerentis@noreply.gitea.io>