@ -210,6 +287,22 @@ If you [created an alias](#create-an-alias-for-an-existing-target) without assoc
The alias `value` must comply with DNS naming rules.
- `-authorize-session-host-id=<string>` - Optionally indicates the host ID to use when you use the alias to authorize a session.
</Tab>
<Tab heading="Terraform" group="terraform">
If you created a `boundary_alias_target` resource without setting a `destination_id` attribute, update the `destination_id` and reapply the following policy:
@ -252,7 +345,7 @@ And the following host set and hosts exist:
- Host: `dev-040`, ID `hst_7wGXkF8e0Q`
- Host: `dev-041`, ID `hst_zlRwMMPKwp`
Because the `linux-dev-servers` hosts are functionally equivalent, you can create a single target for the host set, and create an alias for the target.
Because the `linux-dev-servers` hosts are functionally equivalent, you can create a single target for the host set, and create an alias for the target.
We recommend creating DNS-like aliases to ensure consistent naming conventions. In this example, an alias pattern might be:
@ -362,6 +455,30 @@ Then add the `linux-dev-servers` host set (ID `hsst_56oiL0WaKu`) to the new `lin
In the following examples, Terraform resources are named with underscores instead of dashes, such as `linux_dev_servers`. The target alias values use dashes, such as `dev-041.linux-dev.app-servers.eng`. You do not need to follow these naming conventions.
</Note>
Create the `linux_dev_servers` SSH target, with `scope_id` set to `app_servers` and the host source `linux_dev_servers` (these resources are not shown):
```hcl
resource "boundary_target" "linux_dev_servers" {
name = "linux_dev_servers"
description = "linux_dev_servers target"
type = "ssh"
default_port = "22"
scope_id = boundary_scope.app_servers.id
host_source_ids = [
boundary_host_set_static.linux_dev_servers.id,
]
}
```
</Tab>
</Tabs>
@ -444,6 +561,20 @@ Create the `dev-040.linux-dev.app-servers.eng` alias for the host `dev-040`:
</CodeBlockConfig>
</Tab>
<Tab heading="Terraform" group="terraform">
```hcl
resource "boundary_alias_target" "dev_040" {
name = "dev_040"
description = "Example alias for target linux_dev_servers using host dev_040"