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

48 lines
1.4 KiB
Markdown
Raw Permalink Normal View History

2023-08-28 05:59:47 +00:00
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "woodpecker_secret Resource - terraform-provider-woodpecker"
subcategory: ""
description: |-
This resource allows you to add/remove global secrets. When applied, a new secret will be created. When destroyed, that secret will be removed. For more information see the Woodpecker docs https://woodpecker-ci.org/docs/usage/secrets.
---
# woodpecker_secret (Resource)
This resource allows you to add/remove global secrets. When applied, a new secret will be created. When destroyed, that secret will be removed. For more information see [the Woodpecker docs](https://woodpecker-ci.org/docs/usage/secrets).
## Example Usage
```terraform
# Create a secret
resource "woodpecker_secret" "test" {
name = "test"
value = "test"
events = ["cron", "deployment"]
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
2024-03-31 06:12:53 +00:00
- `events` (Set of String) events for which the secret is available (push, tag, pull_request, pull_request_closed, deployment, cron, manual, release)
2023-08-28 05:59:47 +00:00
- `name` (String) the name of the secret
- `value` (String, Sensitive) the value of the secret
### Optional
- `images` (Set of String) list of Docker images for which this secret is available, leave blank to allow all images
### Read-Only
- `id` (Number) the secret's id
## Import
Import is supported using the following syntax:
```shell
terraform import woodpecker_secret.test "<name>"
```