Thank you for your interest in contributing to the Gitea Terraform Provider! This document outlines the basic process to contribute effectively.
- Fork the repository on Gitea.
- Clone your fork locally.
- Create a branch for your changes.
See also Hashicorp's Terraform Provider tutorial
docker run -p 3000:3000 gitea/gitea:latest-rootlessVisit http://localhost:3000 and go through the setup:
- Url: http://localhost:3000
- Username: gitea_admin
- Password: gitea_admin
- Email: admin@gitea.local
This involves 2 main steps:
go install .to install the provider binary.- Use .terraformrc file to point to that binary instead of the terraform registry.
See Terraform docs on development overrides for provider developers
Also see this tutorial section for a bit more context.
Example linux ~/.terraformrc file:
provider_installation {
dev_overrides {
"go-gitea/gitea" = "/home/<username>/go/bin"
}
# For all other providers, install them directly from their origin provider
# registries as normal. If you omit this, Terraform will _only_ use
# the dev_overrides block, and so no other providers will be available.
direct {}
}
With the local provider and the local Gitea instance set up properly as per above chapters, the example module can be applied:
- navigate into
examples/ - run terraform commands