mirror of
https://github.com/Kichiyaki/terraform-provider-woodpecker.git
synced 2024-06-26 14:27:41 +00:00
chore: add examples how to import resources
This commit is contained in:
parent
31cdcf48b4
commit
3a575d2f7b
|
@ -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>"
|
||||
```
|
||||
|
|
|
@ -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>"
|
||||
```
|
||||
|
|
|
@ -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>"
|
||||
```
|
||||
|
|
1
examples/resources/woodpecker_repository/import.sh
Normal file
1
examples/resources/woodpecker_repository/import.sh
Normal file
|
@ -0,0 +1 @@
|
|||
terraform import woodpecker_secret.test "<owner>/<repo>"
|
1
examples/resources/woodpecker_secret/import.sh
Normal file
1
examples/resources/woodpecker_secret/import.sh
Normal file
|
@ -0,0 +1 @@
|
|||
terraform import woodpecker_secret.test "<name>"
|
1
examples/resources/woodpecker_user/import.sh
Normal file
1
examples/resources/woodpecker_user/import.sh
Normal file
|
@ -0,0 +1 @@
|
|||
terraform import woodpecker_user.test "<login>"
|
Loading…
Reference in New Issue
Block a user