summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorJulien Dessaux2023-06-19 00:05:58 +0200
committerJulien Dessaux2023-06-19 00:05:58 +0200
commit18ae275c5b071ed9e4cd1d407c08a7b8c1f526e3 (patch)
treeb056a349cfafd8c14dd5dbc7f0915d1a8a8a8283 /examples
parentImported and modified evcli's api client code (diff)
downloadterraform-provider-eventline-18ae275c5b071ed9e4cd1d407c08a7b8c1f526e3.tar.gz
terraform-provider-eventline-18ae275c5b071ed9e4cd1d407c08a7b8c1f526e3.tar.bz2
terraform-provider-eventline-18ae275c5b071ed9e4cd1d407c08a7b8c1f526e3.zip
Prepared everything for the first release
Diffstat (limited to 'examples')
-rw-r--r--examples/README.md9
-rw-r--r--examples/data-sources/projects/data-source.tf2
-rw-r--r--examples/provider/provider.tf4
-rw-r--r--examples/resources/project/import.sh1
-rw-r--r--examples/resources/project/resource.tf3
5 files changed, 19 insertions, 0 deletions
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"
+}