docs: separate worker and controller led resources (#619)

* docs: separate worker and controller led resources

* docs: change title for consistency

* docs: make docs

* chore: use unique names for workers and add an 'Example Usage' section
This commit is contained in:
Bruno Schaatsbergen authored and GitHub committed 2024-07-22 09:24:22 -04:00
1 parent f6539b969c
commit a256b763ae
5 files changed
+42 -23

No files matched your search

+8 -3
View File
@@ -1,5 +1,4 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "boundary_worker Resource - terraform-provider-boundary"
subcategory: ""
description: |-
@@ -12,16 +11,22 @@ The resource allows you to create a self-managed worker object.
## Example Usage
### Controller-led worker
```terraform
resource "boundary_worker" "controller_led" {
scope_id = "global"
name = "worker 1"
name = "controller-led-worker-1"
description = "self managed worker with controller led auth"
}
```
### Worker-led worker
```terraform
resource "boundary_worker" "worker_led" {
scope_id = "global"
name = "worker 2"
name = "worker-led-worker-1"
description = "self managed worker with worker led auth"
worker_generated_auth_token = var.worker_generated_auth_token
}
@@ -0,0 +1,5 @@
resource "boundary_worker" "controller_led" {
scope_id = "global"
name = "controller-led-worker-1"
description = "self managed worker with controller led auth"
}
@@ -1,13 +0,0 @@
resource "boundary_worker" "controller_led" {
scope_id = "global"
name = "worker 1"
description = "self managed worker with controller-led auth"
worker_generated_auth_token = var.worker_generated_auth_token
}
resource "boundary_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
}
@@ -1,12 +1,6 @@
resource "boundary_worker" "controller_led" {
scope_id = "global"
name = "worker 1"
description = "self managed worker with controller led auth"
}
resource "boundary_worker" "worker_led" {
scope_id = "global"
name = "worker 2"
name = "worker-led-worker-1"
description = "self managed worker with worker led auth"
worker_generated_auth_token = var.worker_generated_auth_token
}
+28
View File
@@ -0,0 +1,28 @@
---
page_title: "boundary_worker Resource - terraform-provider-boundary"
subcategory: ""
description: |-
{{ .Description | plainmarkdown | trimspace | prefixlines " " }}
---
# boundary_worker (Resource)
{{ .Description | trimspace }}
## Example Usage
### Controller-led worker
{{tffile "examples/resources/boundary_worker/controller_led.tf"}}
### Worker-led worker
{{tffile "examples/resources/boundary_worker/worker_led.tf"}}
{{ .SchemaMarkdown | trimspace }}
## Import
Import is supported using the following syntax:
{{codefile "shell" "examples/resources/boundary_worker/import.sh" }}