terraform-provider-gitea/docs/resources/repository.md
Tobias Trabelsi cc6f0d460a
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is failing
started with documentation
2022-06-12 17:49:33 +02:00

4.1 KiB

page_title subcategory description
gitea_repository Resource - terraform-provider-gitea gitea_repository manages a gitea repository. Per default this repository will be initializiled with the provided configuration (gitignore, License etc.). If the username property is set to a organisation name, the provider will try to look if this organisation exists and create the repository under the organisation scope. Repository migrations have some properties that are not available to regular repositories. These are all prefixed with migration_.

gitea_repository (Resource)

gitea_repository manages a gitea repository.

Per default this repository will be initializiled with the provided configuration (gitignore, License etc.). If the username property is set to a organisation name, the provider will try to look if this organisation exists and create the repository under the organisation scope.

Repository migrations have some properties that are not available to regular repositories. These are all prefixed with migration_.

Example Usage

resource "gitea_repository" "test" {
  username     = "lerentis"
  name         = "test"
  private      = true
  issue_labels = "Default"
  license      = "MIT"
  gitignores   = "Go"
}

resource "gitea_repository" "mirror" {
  username                     = "lerentis"
  name                         = "terraform-provider-gitea-mirror"
  description                  = "Mirror of Terraform Provider"
  mirror                       = true
  migration_clone_addresse     = "https://git.uploadfilter24.eu/lerentis/terraform-provider-gitea.git"
  migration_service            = "gitea"
  migration_service_auth_token = var.gitea_mirror_token
}

Schema

Required

  • name (String) The Name of the repository
  • username (String) The Owner of the repository

Optional

  • allow_manual_merge (Boolean)
  • allow_merge_commits (Boolean)
  • allow_rebase (Boolean)
  • allow_rebase_explicit (Boolean)
  • allow_squash_merge (Boolean)
  • archived (Boolean)
  • auto_init (Boolean) Flag if the repository should be initiated with the configured values
  • autodetect_manual_merge (Boolean)
  • default_branch (String) The default branch of the repository. Defaults to main
  • description (String) The description of the repository.
  • gitignores (String) A specific gitignore that should be commited to the repositoryon creation if auto_init is set to true Need to exist in the gitea instance
  • has_issues (Boolean) A flag if the repository should have issue management enabled or not.
  • has_projects (Boolean) A flag if the repository should have the native project management enabled or not.
  • has_pull_requests (Boolean) A flag if the repository should acceppt pull requests or not.
  • has_wiki (Boolean) A flag if the repository should have the native wiki enabled or not.
  • ignore_whitespace_conflicts (Boolean)
  • issue_labels (String) The Issue Label configuration to be used in this repository. Need to exist in the gitea instance
  • license (String) The license under which the source code of this repository should be. Need to exist in the gitea instance
  • migration_clone_addresse (String)
  • migration_issue_labels (Boolean)
  • migration_lfs (Boolean)
  • migration_lfs_endpoint (String)
  • migration_milestones (Boolean)
  • migration_mirror_interval (String) valid time units are 'h', 'm', 's'. 0 to disable automatic sync
  • migration_releases (Boolean)
  • migration_service (String) git/github/gitlab/gitea/gogs
  • migration_service_auth_password (String, Sensitive)
  • migration_service_auth_token (String, Sensitive)
  • migration_service_auth_username (String)
  • mirror (Boolean)
  • private (Boolean) Flag if the repository should be private or not.
  • readme (String)
  • repo_template (Boolean)
  • website (String) A link to a website with more information.

Read-Only

  • created (String)
  • id (String) The ID of this resource.
  • permission_admin (Boolean)
  • permission_pull (Boolean)
  • permission_push (Boolean)
  • updated (String)