From 18ae275c5b071ed9e4cd1d407c08a7b8c1f526e3 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Mon, 19 Jun 2023 00:05:58 +0200 Subject: Prepared everything for the first release --- examples/README.md | 9 +++++++++ examples/data-sources/projects/data-source.tf | 2 ++ examples/provider/provider.tf | 4 ++++ examples/resources/project/import.sh | 1 + examples/resources/project/resource.tf | 3 +++ 5 files changed, 19 insertions(+) create mode 100644 examples/README.md create mode 100644 examples/data-sources/projects/data-source.tf create mode 100644 examples/provider/provider.tf create mode 100644 examples/resources/project/import.sh create mode 100644 examples/resources/project/resource.tf (limited to 'examples') diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 0000000..026c42c --- /dev/null +++ b/examples/README.md @@ -0,0 +1,9 @@ +# Examples + +This directory contains examples that are mostly used for documentation, but can also be run/tested manually via the Terraform CLI. + +The document generation tool looks for files in the following locations by default. All other *.tf files besides the ones mentioned below are ignored by the documentation tool. This is useful for creating examples that can run and/or ar testable even if some parts are not relevant for the documentation. + +* **provider/provider.tf** example file for the provider index page +* **data-sources/`full data source name`/data-source.tf** example file for the named data source page +* **resources/`full resource name`/resource.tf** example file for the named data source page diff --git a/examples/data-sources/projects/data-source.tf b/examples/data-sources/projects/data-source.tf new file mode 100644 index 0000000..f68d2cc --- /dev/null +++ b/examples/data-sources/projects/data-source.tf @@ -0,0 +1,2 @@ +data "projects" "example" { +} diff --git a/examples/provider/provider.tf b/examples/provider/provider.tf new file mode 100644 index 0000000..699cdb4 --- /dev/null +++ b/examples/provider/provider.tf @@ -0,0 +1,4 @@ +provider "eventline" { + api_key = "12345678-9abc-def0-1234-56789abcdef0" + endpoint = "http://localhost:8085/" +} diff --git a/examples/resources/project/import.sh b/examples/resources/project/import.sh new file mode 100644 index 0000000..c6bc21c --- /dev/null +++ b/examples/resources/project/import.sh @@ -0,0 +1 @@ +terraform import eventline_project.test 0123456789ABCDEFGHIJKLMNOPQ diff --git a/examples/resources/project/resource.tf b/examples/resources/project/resource.tf new file mode 100644 index 0000000..e39b50f --- /dev/null +++ b/examples/resources/project/resource.tf @@ -0,0 +1,3 @@ +resource "project" "example" { + name = "example" +} -- cgit v1.2.3