diff --git a/docs/resources/repository.md b/docs/resources/repository.md index 273aa48..3b71585 100644 --- a/docs/resources/repository.md +++ b/docs/resources/repository.md @@ -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 "/" +``` diff --git a/docs/resources/secret.md b/docs/resources/secret.md index a40eaa2..3e7a3fa 100644 --- a/docs/resources/secret.md +++ b/docs/resources/secret.md @@ -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 "" +``` diff --git a/docs/resources/user.md b/docs/resources/user.md index a9257d1..c2cdb20 100644 --- a/docs/resources/user.md +++ b/docs/resources/user.md @@ -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 "" +``` diff --git a/examples/resources/woodpecker_repository/import.sh b/examples/resources/woodpecker_repository/import.sh new file mode 100644 index 0000000..585b1cd --- /dev/null +++ b/examples/resources/woodpecker_repository/import.sh @@ -0,0 +1 @@ +terraform import woodpecker_secret.test "/" diff --git a/examples/resources/woodpecker_secret/import.sh b/examples/resources/woodpecker_secret/import.sh new file mode 100644 index 0000000..0fe6a97 --- /dev/null +++ b/examples/resources/woodpecker_secret/import.sh @@ -0,0 +1 @@ +terraform import woodpecker_secret.test "" diff --git a/examples/resources/woodpecker_user/import.sh b/examples/resources/woodpecker_user/import.sh new file mode 100644 index 0000000..a53669d --- /dev/null +++ b/examples/resources/woodpecker_user/import.sh @@ -0,0 +1 @@ +terraform import woodpecker_user.test ""