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

1.7 KiB

page_title subcategory description
woodpecker_repository_cron Resource - terraform-provider-woodpecker This resource allows you to add/remove cron jobs for specific repositories. When applied, a new cron job will be created. When destroyed, that cron job will be removed. For more information see the Woodpecker docs https://woodpecker-ci.org/docs/usage/cron.

woodpecker_repository_cron (Resource)

This resource allows you to add/remove cron jobs for specific repositories. When applied, a new cron job will be created. When destroyed, that cron job will be removed. For more information see the Woodpecker docs.

Example Usage

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

resource "woodpecker_repository_cron" "test" {
  repository_id = woodpecker_repository.test_repo.id
  name          = "test"
  schedule      = "@daily"
}

Schema

Required

  • name (String) the name of the cron job
  • repository_id (Number) the ID of the repository
  • schedule (String) cron expression

Optional

  • branch (String) the name of the branch (uses default branch if empty)

Read-Only

  • created_at (Number) date the cron job was created
  • creator_id (Number) id of user who created the cron job
  • id (Number) the id of the cron job

Import

Import is supported using the following syntax:

terraform import woodpecker_repository_cron.test "<repository_id>/<id>"