2022-01-19 16:19:09 -08:00
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title : "boundary_host_set_static Resource - terraform-provider-boundary"
subcategory : ""
description : |-
2024-10-26 14:48:46 -07:00
The host_set_static 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.
2022-01-19 16:19:09 -08:00
---
# boundary_host_set_static (Resource)
The host_set_static 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.
2022-09-21 13:45:56 -07:00
## Example Usage
2022-01-19 16:19:09 -08:00
2022-09-21 13:45:56 -07:00
```terraform
resource "boundary_scope" "org" {
name = "organization_one"
description = "My first scope!"
scope_id = "global"
auto_create_admin_role = true
auto_create_default_role = true
}
resource "boundary_scope" "project" {
name = "project_one"
description = "My first scope!"
scope_id = boundary_scope . org . id
auto_create_admin_role = true
}
resource "boundary_host_catalog_static" "example" {
scope_id = boundary_scope . project . id
}
resource "boundary_host_static" "first" {
name = "host_1"
description = "My first host!"
address = "10.0.0.1"
host_catalog_id = boundary_host_catalog_static . example . id
}
resource "boundary_host_static" "second" {
name = "host_2"
description = "My second host!"
address = "10.0.0.2"
host_catalog_id = boundary_host_catalog_static . example . id
}
resource "boundary_host_set_static" "web" {
host_catalog_id = boundary_host_catalog_static . example . id
host_ids = [
boundary_host_static . first . id ,
boundary_host_static . second . id ,
]
}
```
2022-01-19 16:19:09 -08:00
<!-- schema generated by tfplugindocs -->
## Schema
### Required
2022-05-13 18:10:43 -07:00
- `host_catalog_id` (String) The catalog for the host set.
2022-01-19 16:19:09 -08:00
### Optional
2022-05-13 18:10:43 -07:00
- `description` (String) The host set description.
- `host_ids` (Set of String) The list of host IDs contained in this set.
- `name` (String) The host set name. Defaults to the resource name.
- `type` (String) The type of host set
2022-01-19 16:19:09 -08:00
### Read-Only
2022-05-13 18:10:43 -07:00
- `id` (String) The ID of the host set.
2022-01-19 16:19:09 -08:00
2022-09-21 13:45:56 -07:00
## Import
Import is supported using the following syntax:
2022-01-19 16:19:09 -08:00
2025-07-08 13:23:01 -04:00
The [`terraform import` command ](https://developer.hashicorp.com/terraform/cli/commands/import ) can be used, for example:
2022-09-21 13:45:56 -07:00
```shell
terraform import boundary_host_set_static.foo <my-id>
```