From 9fca93399bcc95b768c03189dcd9e94ba6c38c70 Mon Sep 17 00:00:00 2001 From: grantorchard Date: Sat, 18 Feb 2023 07:35:00 +1100 Subject: [PATCH] Docs update (#309) * add initial prototype of self managed worker resource and associated tests * Add self managed worker resource and associated tests * Update internal/provider/resource_self_managed_worker.go Accept suggested schema changes for tags Co-authored-by: Johan Brandhorst-Satzkorn * add environment variable check for worker led auth testing * change resource name from self_managed_worker to worker for consistency with the api * update tag schemas, ensure all attributes have descriptions * add generated docs for worker * add examples for worker resource * add examples for worker resource * remove merge conflict * Remove funtionality for reflecting tags in the schema * remove unused attributes (all tags) from schema, updates tests to use 'boundary_worker' on resource checks * update example for inclusion in the website docs --------- Co-authored-by: Johan Brandhorst-Satzkorn --- docs/resources/worker.md | 15 +++++++++++++++ examples/resources/boundary_worker/resource.tf | 12 ++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 examples/resources/boundary_worker/resource.tf diff --git a/docs/resources/worker.md b/docs/resources/worker.md index e3f43a29..b888c224 100644 --- a/docs/resources/worker.md +++ b/docs/resources/worker.md @@ -10,7 +10,22 @@ description: |- The resource allows you to create a self-managed worker object. +## Example Usage +```terraform +resource "boundary_worker" "controller_led" { + scope_id = "global" + name = "worker 1" + description = "self managed worker with controller led auth" +} + +resource "boundary_self_managed_worker" "worker_led" { + scope_id = "global" + name = "worker 2" + description = "self managed worker with worker led auth" + worker_generated_auth_token = var.worker_generated_auth_token +} +``` ## Schema diff --git a/examples/resources/boundary_worker/resource.tf b/examples/resources/boundary_worker/resource.tf new file mode 100644 index 00000000..3e0f54f9 --- /dev/null +++ b/examples/resources/boundary_worker/resource.tf @@ -0,0 +1,12 @@ +resource "boundary_worker" "controller_led" { + scope_id = "global" + name = "worker 1" + description = "self managed worker with controller led auth" +} + +resource "boundary_self_managed_worker" "worker_led" { + scope_id = "global" + name = "worker 2" + description = "self managed worker with worker led auth" + worker_generated_auth_token = var.worker_generated_auth_token +} \ No newline at end of file