terraform-provider-woodpecker/docs/resources/repository.md

2.5 KiB

page_title subcategory description
woodpecker_repository Resource - terraform-provider-woodpecker Provides a repository resource.

woodpecker_repository (Resource)

Provides a repository resource.

Example Usage

resource "woodpecker_repository" "test_repo" {
  full_name  = "Kichiyaki/test-repo"
  is_trusted = true
  visibility = "public"
}

Schema

Required

  • full_name (String) the full name of the repository (format: owner/reponame)

Optional

  • allow_pull_requests (Boolean) Enables handling webhook's pull request event. If disabled, then pipeline won't run for pull requests.
  • config_file (String) The path to the pipeline config file or folder. By default it is left empty which will use the following configuration resolution .woodpecker/.yml -> .woodpecker/.yaml -> .woodpecker.yml -> .woodpecker.yaml.
  • is_gated (Boolean) when true, every pipeline needs to be approved before being executed
  • is_trusted (Boolean) when true, underlying pipeline containers get access to escalated capabilities like mounting volumes
  • netrc_only_trusted (Boolean) whether netrc credentials should be only injected into trusted containers, see the docs for more info
  • timeout (Number) after this timeout a pipeline has to finish or will be treated as timed out (in minutes)
  • visibility (String) project visibility (public, private, internal), see the docs for more info

Read-Only

  • avatar_url (String) the repository's avatar URL
  • clone_url (String) the URL to clone repository
  • default_branch (String) the name of the default branch
  • forge_remote_id (String) the unique identifier for the repository on the forge
  • id (Number) the repository's id
  • is_private (Boolean) whether the repo (SCM) is private
  • name (String) the name of the repository
  • owner (String) the owner of the repository
  • scm (String) type of repository (see the source code)
  • url (String) the URL of the repository on the forge

Import

Import is supported using the following syntax:

terraform import woodpecker_repository.test "<owner>/<repo>"