Skip to content

Commit

Permalink
docs: add target resource docs
Browse files Browse the repository at this point in the history
  • Loading branch information
malnick committed Sep 3, 2020
1 parent 73a0d29 commit 8a8f806
Showing 1 changed file with 69 additions and 0 deletions.
69 changes: 69 additions & 0 deletions website/docs/r/resource_target.html.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
layout: "boundary"
page_title: "Boundary: target_resource"
sidebar_current: "docs-boundary-target-resource"
description: |-
Target resource for the Boundary Terraform provider.
---

# boundary_target_resource
The target resource allows you to configure a Boundary target.

## Example Usage

```hcl
resource "boundary_organization" "foo" {}
resource "boundary_project" "foo" {
name = "foo_project"
scope_id = boundary_organization.foo.id
}
resource "boundary_host_catalog" "foo" {
name = "test"
description = "test catalog"
scope_id = boundary_project.foo.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"
}
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"
}
resource "boundary_host_set" "foo" {
name = "foo"
host_catalog_id = boundary_host_catalog.foo.id
host_ids = [
boundary_host.foo.id,
boundary_host.bar.id,
]
}
resource "boundary_target" "foo" {
name = "foo"
description = "Foo target"
scope_id = boundary_project.foo.id
host_set_ids = [
boundary_host_set.foo.id
]
}
```

## Argument Reference

The following arguments are optional:
* `description` - The target description.
* `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.

0 comments on commit 8a8f806

Please sign in to comment.