Manage target aliases
Manage target aliases
You can edit or delete existing Boundary target aliases at any time. For example, you can change which target or host an alias points to, or update its name, description, or value.
For more information about aliases, including naming conventions and best practices, refer to Overview of aliases .
Edit an alias
You can edit an existing alias to associate it with a target or change the association to a new target. You can also change the name, description, value, or Host ID.
Complete the following steps to edit an alias:
Select whether you want to edit an alias in the global scope or a project scope:
-
Log in to Boundary.
-
Select Aliases in the navigation pane.
-
Select the alias you want to update.
-
Click Edit Form .
-
You can edit any of 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. 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 that contains the alias you want to edit.
-
Select Aliases in the navigation pane.
-
Select the alias you want to update.
-
Click Edit Form .
-
You can edit any of 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. 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.
-
Use the following command to update an alias: $ boundary aliases update target \ -destination-id tcp_1234567890 \ -id alt_1234567890 \ -authorize-session-host-id hst_1234567890 Example output: Alias information: ID: alt_1234567890 Destination ID: tcp_1234567890 Authorize Session Host ID: hst_1234567890 You can use any of the following attributes when you update 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. -id= - Specifies the ID of the alias to update. -name= - Specifies the optional name you want to use to describe the alias for identification purposes. -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. If the project and containing org scopes don't both have alias suffixes, the command will fail. Complete the steps in Create the suffixes to create the required suffixes, and then return to this procedure. -version= - Specifies the version of the alias to update. If you do not specify a version, the command performs a check-and-set automatically. -authorize-session-host-id= - Indicates the host ID to use when you use the alias to authorize a session.
If you created a boundary_alias_target resource without setting a destination_id attribute, update the destination_id and reapply the following policy:
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
}
Delete an alias
You can delete an alias if your organization no longer needs it. If you delete an alias, it may break existing workflows for other users.
Complete the following steps to delete an alias:
Select whether you want to delete an alias from the global scope or a project scope:
-
Log in to Boundary.
-
Select Aliases in the navigation pane.
-
Select the alias that you want to delete.
-
Click Manage , and then select Delete .
-
Click OK to confirm that you want to delete the alias.
-
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 that contains the alias you want to delete.
-
Select Aliases in the navigation pane.
-
Select the alias you want to delete.
-
Click Manage , and then select Delete .
-
Click OK to confirm that you want to delete the alias.
-
Log in to Boundary.
-
Use the following command to delete an alias: $ boundary aliases delete \ -id alt_1234567890 \ The output confirms the deletion: The delete operation completed successfully. You must provide the following attribute to delete a target alias: -id=
- The ID of the alias you want to delete.
If you created a boundary_alias_target resource without setting a destination_id attribute, update the destination_id and reapply the following policy:
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
}
More information
For more information about aliases, refer to Overview of aliases .
If you haven't created an alias yet, refer to Create target aliases . Edit this page on GitHub