|
1 | 1 | # terraform-provider-gitea
|
2 | 2 |
|
3 | 3 | Terraform Gitea Provider
|
| 4 | + |
| 5 | +This repo is mirrored from https://gitea.com/gitea/terraform-provider-gitea please send all issues and pull requests there. |
| 6 | + |
| 7 | +## Usage |
| 8 | + |
| 9 | +This is not a 1.0 release, so usage is subject to change! |
| 10 | + |
| 11 | +```terraform |
| 12 | +terraform { |
| 13 | + required_providers { |
| 14 | + gitea = { |
| 15 | + source = "go-gitea/gitea" |
| 16 | + version = "0.2.0" |
| 17 | + } |
| 18 | + } |
| 19 | +} |
| 20 | +
|
| 21 | +provider "gitea" { |
| 22 | + base_url = var.gitea_url # optionally use GITEA_BASE_URL env var |
| 23 | + token = var.gitea_token # optionally use GITEA_TOKEN env var |
| 24 | +
|
| 25 | + # Username/Password authentication is mutally exclusive with token authentication |
| 26 | + # username = var.username # optionally use GITEA_USERNAME env var |
| 27 | + # password = var.password # optionally use GITEA_PASSWORD env var |
| 28 | +
|
| 29 | + # A file containing the ca certificate to use in case ssl certificate is not from a standard chain |
| 30 | + cacert_file = var.cacert_file |
| 31 | + |
| 32 | + # If you are running a gitea instance with self signed TLS certificates |
| 33 | + # and you want to disable certificate validation you can deactivate it with this flag |
| 34 | + insecure = false |
| 35 | +} |
| 36 | +
|
| 37 | +resource "gitea_repository" "test" { |
| 38 | + username = "lerentis" |
| 39 | + name = "test" |
| 40 | + private = true |
| 41 | + issue_labels = "Default" |
| 42 | + license = "MIT" |
| 43 | + gitignores = "Go" |
| 44 | +} |
| 45 | +
|
| 46 | +resource "gitea_repository" "mirror" { |
| 47 | + username = "lerentis" |
| 48 | + name = "terraform-provider-gitea-mirror" |
| 49 | + description = "Mirror of Terraform Provider" |
| 50 | + mirror = true |
| 51 | + migration_clone_addresse = "https://git.uploadfilter24.eu/lerentis/terraform-provider-gitea.git" |
| 52 | + migration_service = "gitea" |
| 53 | + migration_service_auth_token = var.gitea_mirror_token |
| 54 | +} |
| 55 | +
|
| 56 | +resource "gitea_org" "test_org" { |
| 57 | + name = "test-org" |
| 58 | +} |
| 59 | +
|
| 60 | +resource "gitea_repository" "org_repo" { |
| 61 | + username = gitea_org.test_org.name |
| 62 | + name = "org-test-repo" |
| 63 | +} |
| 64 | +
|
| 65 | +``` |
| 66 | + |
| 67 | +## License |
| 68 | + |
| 69 | +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. |
| 70 | + |
| 71 | +## History |
| 72 | + |
| 73 | +This codebase was created at https://gitea.com/gitea/terraform-provider-gitea, was forked by @lerentis, and then their changes were merged back into the original repo. Thank you to everyone who contributed! |
| 74 | + |
0 commit comments