2023-09-12 11:37:31 -07:00
|
|
|
---
|
|
|
|
|
layout: docs
|
|
|
|
|
page_title: host-sets add-hosts - Command
|
2024-12-17 14:13:18 -05:00
|
|
|
description: >-
|
|
|
|
|
The "host-sets add-hosts" command adds new hosts to host set resources.
|
2023-09-12 11:37:31 -07:00
|
|
|
---
|
|
|
|
|
|
|
|
|
|
# host-sets add-hosts
|
|
|
|
|
|
|
|
|
|
Command: `host-sets add-hosts`
|
|
|
|
|
|
|
|
|
|
The `host-sets add-hosts` command lets you add hosts to host sets, if the types match and it is allowed by the host set type.
|
|
|
|
|
|
|
|
|
|
## Example
|
|
|
|
|
|
|
|
|
|
This example adds the hosts `hst_1234567890` and `hst_0987654321` to the host set `hsst_1234567890`:
|
|
|
|
|
|
|
|
|
|
```shell-session
|
|
|
|
|
$ boundary host-sets add-hosts -id hsst_1234567890 -host hst_1234567890 -host hst_0987654321
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
|
|
<CodeBlockConfig hideClipboard>
|
|
|
|
|
|
|
|
|
|
```shell-session
|
|
|
|
|
$ boundary host-sets add-hosts <subcommand> [options] [args]
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
</CodeBlockConfig>
|
|
|
|
|
|
|
|
|
|
### Command options
|
|
|
|
|
|
|
|
|
|
- `-host=<string>` - The hosts you want to add to the host set.
|
|
|
|
|
You can specify multiple hosts.
|
|
|
|
|
- `-id=<string>` - The ID of the host set you want to add hosts to.
|
|
|
|
|
- `-version=<int>` The version of the host set you want to add hosts to.
|
|
|
|
|
If you do not specify a version, the command performs a check-and-set automatically.
|
|
|
|
|
|
|
|
|
|
@include 'cmd-option-note.mdx'
|