Create target aliases
Create target aliases
Create a Boundary target alias to let users connect to a target with a short, memorable, DNS-like string instead of a target ID or a target-name-and-scope combination. You can create aliases in the global scope or in project scopes.
Aliases created in project scopes require suffixes. You must create suffixes for both the project scope and its containing org scope. Once you create them, you append the org and project suffixes to any aliases you create in the project scope using the following format:
alias.projectsuffix.orgsuffix
Note
You will not be able to create an alias in a project scope unless you have first created alias suffixes for the project and its containing org scope.
Refer to Create an alias suffix for a scope for more information.
You can associate a target alias with a target when you create the alias, or you can associate it with a target at a later time.
You can also create an alias and associate it with a target when you create a new target. For more information about creating targets and to view the available target types, refer to Overview of targets .
Create a target alias
Complete the following steps to create a target alias:
Select whether you want to create an alias in the global scope or a project scope:
-
Log in to Boundary.
-
Select Aliases in the navigation pane.
-
Click New Alias .
-
On the New alias page, complete the following fields: Name : (Optional) Enter an optional name for the alias to use for identification purposes. Description : (Optional) Enter an optional description for the alias to use for identification purposes. Alias Value : Enter the string that you want to use as the alias to represent the target. An alias's value can be a hostname or a DNS-like string. Target ID : (Optional) Specify the target you want to associate with the alias. You can associate the target alias with a target now or you can associate it with a target at a later time. Refer to Edit an alias to update the Target ID after the alias is created. Host ID : (Optional) Enter an optional host ID, if you would like to specify that the alias always uses the same host when you use it to connect to a target.
-
Click Save .
-
Log in to Boundary.
-
Select Orgs in the navigation pane, and then select the org scope that contains the project scope.
-
Select the project scope.
-
Select Aliases in the navigation pane.
-
Click New Alias . If you haven't created alias suffixes for the project and containing org scopes, you will be prompted to create them. Boundary will automatically append the suffixes to the alias using the following format: alias.projectsuffix.orgsuffix Complete the steps in Create the suffixes to create the required suffixes, and then return to this procedure.
-
On the New alias page, complete the following fields: Name : (Optional) Enter an optional name for the alias to use for identification purposes. Description : (Optional) Enter an optional description for the alias to use for identification purposes. Alias Value : Enter the string that you want to use as the alias to represent the target. An alias's value can be a hostname or a DNS-like string. Target ID : (Optional) Specify the target you want to associate with the alias. You can associate the target alias with a target now or you can associate it with a target at a later time. Refer to Edit an alias to update the Target ID after the alias is created. Host ID : (Optional) Enter an optional host ID, if you would like to specify that the alias always uses the same host when you use it to connect to a target.
-
Click Save .
Select whether you want to create an alias in the global scope or a project scope:
-
Log in to Boundary.
-
Use the following command to create an alias. $ boundary aliases create target \ -description 'This is an example alias for target tcp_1234567890' \ -destination-id tcp_1234567890 \ -name Example Boundary alias \ -scope-id global \ -value example.alias.boundary \ -authorize-session-host-id hst_1234567890 Example output: Alias information: Created Time: Thu, 14 Nov 2024 13:55:41 MST Description: This is an example alias for target tcp_1234567890 Destination ID: tcp_1234567890 ID: alt_QeCGTcvlq2 Name: Example Boundary alias Type: target Updated Time: Thu, 14 Nov 2024 13:55:41 MST Value: example.alias.boundary Version: 1 Scope: ID: global Name: global Type: global Authorized Actions: no-op read update delete Attributes: authorize_session_arguments: { "host_id": "hst_1234567890" } You can use any of the following attributes when you create a target alias: -description=
- Specifies the optional description you want to use to describe the alias for identification purposes. -destination-id= - Specifies the ID of the target that the alias points to. -name= - Specifies the optional name you want to use to describe the alias for identification purposes. -scope-id= - Scope in which to create the alias. The default is global . You can create aliases in the global and project scopes. You can also specify the scope using the BOUNDARY_SCOPE_ID environment variable. You must create org and project suffixes before you can create an alias in the target's project scope. Otherwise, you can only create the alias in the global scope. Refer to Create a suffix for a scope for more information. -value= - The string that you want to use as the alias to represent the target. If you are creating an alias in a project scope, you must include the org and project suffix in the format alias.projectsuffix.orgsuffix . The value must comply with DNS naming rules. -authorize-session-host-id= - Indicates the host ID to use when you use the alias to authorize a session. -
Log in to Boundary.
-
Use the following command to create an alias. Make sure to provide the ID for the project scope: $ boundary aliases create target \ -description 'This is an example alias for target tcp_1234567890' \ -destination-id tcp_1234567890 \ -name Example Boundary alias \ -scope-id p_1234567890 \ -value example.alias.boundary \ -authorize-session-host-id hst_1234567890 You can use any of the following attributes when you create a target alias: -description=
- Specifies the optional description you want to use to describe the alias for identification purposes. -destination-id= - Specifies the ID of the target that the alias points to. -name= - Specifies the optional name you want to use to describe the alias for identification purposes. -scope-id= - Scope in which to create the alias. The default is global . You can create aliases in the global and project scopes. You can also specify the scope using the BOUNDARY_SCOPE_ID environment variable. You must create org and project suffixes before you can create an alias in the target's project scope. Otherwise, you can only create the alias in the global scope. Refer to Create a suffix for a scope for more information. -value= - The string that you want to use as the alias to represent the target. If you are creating an alias in a project scope, you must include the org and project suffix in the format alias.projectsuffix.orgsuffix . The value must comply with DNS naming rules. -authorize-session-host-id= - Indicates the host ID to use when you use the alias to authorize a session.
Apply the following Terraform policy to create target alias example.bar.foo.boundary for an existing target foo_target and host bar_host :
resource "boundary_alias_target" "example_alias_target" {
name = "example_alias_target"
description = "Example alias to target foo using host boundary_host_static.bar_host"
scope_id = "global"
value = "example.bar.foo.boundary"
destination_id = boundary_target.foo_target.id
authorize_session_host_id = boundary_host_static.bar_host.id
}
Next steps
Once you have created a target alias, you can configure transparent sessions .
More information
-
For more information about aliases, refer to Overview of aliases .
-
To associate a target with an alias, or to update name, description, or host ID information, refer to Manage target aliases .
-
To change the name of a suffix or to delete it, refer to Manage alias suffixes .
-
For more information about creating targets and the available target types, refer to Overview of targets .
Edit this page on GitHub