Files
terraform-provider-threshold/docs/resources/host_set.md
T

84 lines
2.4 KiB
Markdown
Raw Normal View History

2020-09-02 14:36:52 -07:00
---
2021-01-14 14:07:36 -08:00
# generated by https://github.com/hashicorp/terraform-plugin-docs
2020-10-06 20:34:16 -04:00
page_title: "boundary_host_set Resource - terraform-provider-boundary"
subcategory: ""
2020-09-02 14:36:52 -07:00
description: |-
2020-10-06 20:34:16 -04:00
The host_set resource allows you to configure a Boundary host set. Host sets are always part of a host catalog, so a host catalog resource should be used inline or you should have the host catalog ID in hand to successfully configure a host set.
2020-09-02 14:36:52 -07:00
---
2020-10-06 20:34:16 -04:00
# Resource `boundary_host_set`
The host_set resource allows you to configure a Boundary host set. Host sets are always part of a host catalog, so a host catalog resource should be used inline or you should have the host catalog ID in hand to successfully configure a host set.
2020-09-02 14:36:52 -07:00
## Example Usage
2020-10-06 20:34:16 -04:00
```terraform
2020-09-17 15:34:00 -07:00
resource "boundary_scope" "org" {
2020-10-13 23:12:03 -04:00
name = "organization_one"
description = "My first scope!"
scope_id = "global"
auto_create_admin_role = true
auto_create_default_role = true
2020-09-17 15:34:00 -07:00
}
2020-09-02 14:36:52 -07:00
2020-09-17 15:34:00 -07:00
resource "boundary_scope" "project" {
2021-01-14 14:07:36 -08:00
name = "project_one"
description = "My first scope!"
scope_id = boundary_scope.org.id
auto_create_admin_role = true
2020-09-02 14:36:52 -07:00
}
resource "boundary_host_catalog" "static" {
2020-09-17 15:34:00 -07:00
scope_id = boundary_scope.project.id
2020-09-02 14:36:52 -07:00
}
resource "boundary_host" "1" {
name = "host_1"
description = "My first host!"
2020-09-20 12:13:08 -04:00
address = "10.0.0.1"
2020-09-02 14:36:52 -07:00
host_catalog_id = boundary_host_catalog.static.id
2020-09-17 15:34:00 -07:00
scope_id = boundary_scope.project.id
2020-09-02 14:36:52 -07:00
}
resource "boundary_host" "2" {
name = "host_2"
description = "My second host!"
2020-09-20 12:13:08 -04:00
address = "10.0.0.2"
2020-09-02 14:36:52 -07:00
host_catalog_id = boundary_host_catalog.static.id
2020-09-17 15:34:00 -07:00
scope_id = boundary_scope.project.id
2020-09-02 14:36:52 -07:00
}
resource "boundary_host_set" "web" {
host_catalog_id = boundary_host_catalog.static.id
2020-10-06 20:34:16 -04:00
host_ids = [
2020-09-02 14:36:52 -07:00
boundary_host.1.id,
boundary_host.2.id,
]
}
```
2021-01-14 14:07:36 -08:00
<!-- schema generated by tfplugindocs -->
2020-10-06 20:34:16 -04:00
## Schema
### Required
2021-01-14 14:07:36 -08:00
- **host_catalog_id** (String) The catalog for the hostset.
- **type** (String)
2020-10-06 20:34:16 -04:00
### Optional
2021-01-14 14:07:36 -08:00
- **description** (String) The hostset description.
- **host_ids** (Set of String) The list of host IDs contained in this set.
- **name** (String) The hostset name. Defaults to the resource name.
2020-09-02 14:36:52 -07:00
### Read-only
2021-01-14 14:07:36 -08:00
- **id** (String) The ID of the hostset.
2020-10-07 12:04:11 -04:00
## Import
2020-09-02 14:36:52 -07:00
2020-10-07 12:04:11 -04:00
Import is supported using the following syntax:
```shell
terraform import boundary_host_set.foo <my-id>
```