diff --git a/docs/data-sources/repository.md b/docs/data-sources/repository.md new file mode 100644 index 0000000..dfc1010 --- /dev/null +++ b/docs/data-sources/repository.md @@ -0,0 +1,37 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "quay_repository Data Source - quay" +subcategory: "" +description: |- + +--- + +# quay_repository (Data Source) + + + +## Example Usage + +```terraform +data "quay_organization" "main" { + name = "main" +} + +data "quay_repository" "test" { + name = "test" + namespace = data.quay_organization.main.name +} +``` + + +## Schema + +### Required + +- `name` (String) Repository name +- `namespace` (String) Repository namespace. Should be an organization name or username + +### Read-Only + +- `description` (String) Markdown description +- `visibility` (String) Repository visibility. Should be private or public. diff --git a/docs/resources/repository.md b/docs/resources/repository.md new file mode 100644 index 0000000..390db8e --- /dev/null +++ b/docs/resources/repository.md @@ -0,0 +1,49 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "quay_repository Resource - quay" +subcategory: "" +description: |- + +--- + +# quay_repository (Resource) + + + +## Example Usage + +```terraform +resource "quay_organization" "main" { + name = "main" + email = "quay+main@example.com" +} + +resource "quay_repository" "test" { + name = "test" + namespace = quay_organization.main.name + visibility = "private" + description = "test" +} +``` + + +## Schema + +### Required + +- `name` (String) Repository name +- `namespace` (String) Repository namespace. Should be an organization name or username + +### Optional + +- `description` (String) Markdown description +- `visibility` (String) Repository visibility. Should be private or public. + +## Import + +Import is supported using the following syntax: + +```shell +# An organization can be imported using its name. +terraform import quay_repository.test main/test +``` diff --git a/examples/data-sources/quay_repository/data-source.tf b/examples/data-sources/quay_repository/data-source.tf new file mode 100644 index 0000000..4e3aca9 --- /dev/null +++ b/examples/data-sources/quay_repository/data-source.tf @@ -0,0 +1,8 @@ +data "quay_organization" "main" { + name = "main" +} + +data "quay_repository" "test" { + name = "test" + namespace = data.quay_organization.main.name +} diff --git a/examples/resources/quay_repository/import.sh b/examples/resources/quay_repository/import.sh new file mode 100644 index 0000000..3004a61 --- /dev/null +++ b/examples/resources/quay_repository/import.sh @@ -0,0 +1,2 @@ +# An organization can be imported using its name. +terraform import quay_repository.test main/test diff --git a/examples/resources/quay_repository/resource.tf b/examples/resources/quay_repository/resource.tf new file mode 100644 index 0000000..f1902dc --- /dev/null +++ b/examples/resources/quay_repository/resource.tf @@ -0,0 +1,11 @@ +resource "quay_organization" "main" { + name = "main" + email = "quay+main@example.com" +} + +resource "quay_repository" "test" { + name = "test" + namespace = quay_organization.main.name + visibility = "private" + description = "test" +}