chore: add examples how to import resources

This commit is contained in:
Dawid Wysokiński 2023-09-02 07:39:56 +02:00
parent 31cdcf48b4
commit 3a575d2f7b
Signed by: Kichiyaki
GPG Key ID: B5445E357FB8B892
6 changed files with 27 additions and 0 deletions

View File

@ -49,3 +49,11 @@ resource "woodpecker_repository" "test_repo" {
- `owner` (String) the owner of the repository
- `scm` (String) type of repository (see [the source code](https://github.com/woodpecker-ci/woodpecker/blob/main/server/model/const.go#L67))
- `url` (String) the URL of the repository on the forge
## Import
Import is supported using the following syntax:
```shell
terraform import woodpecker_secret.test "<owner>/<repo>"
```

View File

@ -38,3 +38,11 @@ resource "woodpecker_secret" "test" {
### Read-Only
- `id` (Number) the secret's id
## Import
Import is supported using the following syntax:
```shell
terraform import woodpecker_secret.test "<name>"
```

View File

@ -41,3 +41,11 @@ resource "woodpecker_user" "test" {
- `id` (Number) the user's id
- `is_active` (Boolean) whether user is active in the system
## Import
Import is supported using the following syntax:
```shell
terraform import woodpecker_user.test "<login>"
```

View File

@ -0,0 +1 @@
terraform import woodpecker_secret.test "<owner>/<repo>"

View File

@ -0,0 +1 @@
terraform import woodpecker_secret.test "<name>"

View File

@ -0,0 +1 @@
terraform import woodpecker_user.test "<login>"