Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix target docs #40

Merged
merged 1 commit into from
Sep 17, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 27 additions & 11 deletions website/docs/r/resource_target.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,45 @@ The target resource allows you to configure a Boundary target.
## Example Usage

```hcl
resource "boundary_organization" "foo" {}
resource "boundary_scope" "global" {
global_scope = true
scope_id = "global"
auto_create_role = true
}

resource "boundary_scope" "org" {
name = "organization_one"
description = "My first scope!"
scope_id = boundary_scope.global.id
auto_create_role = true
}

resource "boundary_project" "foo" {
name = "foo_project"
scope_id = boundary_organization.foo.id
resource "boundary_scope" "project" {
name = "project_one"
description = "My first scope!"
scope_id = boundary_scope.org.id
auto_create_role = true
}

resource "boundary_host_catalog" "foo" {
name = "test"
description = "test catalog"
scope_id = boundary_project.foo.id
type = "static"
scope_id = boundary_scope.project.id
type = "static"
}

resource "boundary_host" "foo" {
name = "foo"
host_catalog_id = boundary_host_catalog.foo.id
scope_id = boundary_project.foo.id
address = "10.0.0.1:80"
scope_id = boundary_scope.project.id
address = "10.0.0.1"
}

resource "boundary_host" "bar" {
name = "bar"
host_catalog_id = boundary_host_catalog.foo.id
scope_id = boundary_project.foo.id
address = "10.0.0.1:80"
scope_id = boundary_scope.project.id
address = "10.0.0.1"
}

resource "boundary_host_set" "foo" {
Expand All @@ -53,7 +66,8 @@ resource "boundary_host_set" "foo" {
resource "boundary_target" "foo" {
name = "foo"
description = "Foo target"
scope_id = boundary_project.foo.id
default_port = "22"
scope_id = boundary_scope.project.id
host_set_ids = [
boundary_host_set.foo.id
]
Expand All @@ -67,3 +81,5 @@ The following arguments are optional:
* `name` - The target name. Defaults to the resource name.
* `scope_id` - The scope ID in which the resource is created. Defaults to the provider's `default_scope` if unset.
* `host_set_ids` - A list of host set ID's.
* `default_port` - The default port for this target.
* `type` - The target resource type.