mirror of
https://github.com/Kichiyaki/terraform-provider-woodpecker.git
synced 2024-06-29 07:38:05 +00:00
55 lines
1.7 KiB
Markdown
55 lines
1.7 KiB
Markdown
---
|
|
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
|
page_title: "woodpecker_repository_cron Resource - terraform-provider-woodpecker"
|
|
subcategory: ""
|
|
description: |-
|
|
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](https://woodpecker-ci.org/docs/usage/cron).
|
|
|
|
## Example Usage
|
|
|
|
```terraform
|
|
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 generated by tfplugindocs -->
|
|
## Schema
|
|
|
|
### Required
|
|
|
|
- `name` (String) the name of the cron job
|
|
- `repository_id` (Number) the ID of the repository
|
|
- `schedule` (String) [cron expression](https://pkg.go.dev/github.com/robfig/cron#hdr-CRON_Expression_Format)
|
|
|
|
### 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:
|
|
|
|
```shell
|
|
terraform import woodpecker_repository_cron.test "<repository_id>/<id>"
|
|
```
|