Manage alias suffixes

Manage alias suffixes

출처: HashiCorp Boundary docs

You can edit or delete existing Boundary alias suffixes at any time. Editing a suffix doesn't affect aliases that already use the old value, only new aliases pick up the change. To delete an alias, you must first remove any aliases that depend on it.

Permissions

You must have write permissions for a scope to create, edit, or delete a suffix in that scope. Any user who has the * all action grant for a scope can set or remove aliases.

If you want to configure a new role to manage suffixes, use the following commands to create a new role with the required grants.

For a specified org:

$ boundary roles create -scope-id global -name "org-alias-suffix-manager" \

boundary roles add-grants -id $ROLE_ID \
  -grant "ids=$ORG_ID; type=scope;actions=set-alias-suffix,remove-alias-suffix"

boundary roles add-principals -id "ROLE_ID" \
  -principal "$USER_ID"

For a specified project:

$ boundary roles create -scope-id $ORG_ID -name "project-alias-suffix-manager" \

boundary roles add-grants -id $ROLE_ID \
  -grant "ids=$PROJECT_ID; type=scope;actions=set-alias-suffix,remove-alias-suffix"

boundary roles add-principals -id "$ROLE_ID" \
  -principal "$USER_ID"

For more information about creating roles and configuring them with permissions, refer to Manage access with roles .

Edit a suffix value

You can edit a suffix value. When you change a suffix value, existing aliases continue to use the old suffix, while new aliases use the updated suffix. If you update an existing alias, it will use the new suffix going forward.

Complete the following steps to edit a suffix:

Select whether you want to edit a suffix for an org or project scope:

  • Log in to Boundary.

  • Select Orgs in the navigation pane, and then select the org scope.

  • Select Org Settings in the navigation pane.

  • Click the suffix, and then click Edit suffix .

  • In the Alias suffix field, type a unique value for the suffix.

  • Click Save .

  • Confirm the change.

  • Log in to Boundary.

  • Select Orgs in the navigation pane, and then select the org scope that contains the project.

  • Select the project scope.

  • Select Project Settings in the navigation pane.

  • Click the suffix, and then click Edit suffix .

  • In the Alias suffix field, type a unique value for the suffix.

  • Click Save .

  • Confirm the change.

  • Log in to Boundary.

  • Use the following command to edit an existing alias suffix: $ boundary scopes set-alias-suffix \ -id o_1234567890 \ -alias-suffix org1 Example output: Scope information: ID: o_1234567890 Alias Suffix: org1 You must include the following attributes when you edit a suffix: -id= - The ID of the org or project scope for which you want to create the suffix. You can also specify the scope using the BOUNDARY_SCOPE_ID environment variable. -alias-suffix - Specifies the string that you want to use as the suffix to append to aliases in the designated scope or scopes. The alias-suffix can be a hostname or a DNS-like string.

Delete a suffix

You can delete a suffix if you no longer need it. Before deleting it, make sure no associated aliases are using the suffix.

Boundary prevents you from deleting a suffix if any aliases are using it. Org suffixes may be associated with aliases in projects nested under the org. You must delete any associated aliases before deleting the suffix.

Complete the following steps to delete a suffix:

Select whether you want to delete a suffix from an org scope or a project scope:

  • Log in to Boundary.

  • Select Orgs in the navigation pane, and then select the org scope.

  • Select Org Settings in the navigation pane.

  • Click the suffix, and then click Delete suffix .

  • Click Delete to confirm.

  • Log in to Boundary.

  • Select Orgs in the navigation pane, and then select the org scope that contains the project.

  • Select the project scope.

  • Select Project Settings in the navigation pane.

  • Click the suffix, and then click Delete suffix .

  • Click Delete to confirm.

  • Log in to Boundary.

  • Use the following command to delete an alias suffix: $ boundary scopes remove-alias-suffix \ -id o_1234567890 \ Example output: Scope information: ID: o_1234567890 Alias Suffix: (none) You must provide the following attribute when you delete a suffix: -id= - The ID of the project or org scope from which you want to delete the suffix. You can also specify the scope using the BOUNDARY_SCOPE_ID environment variable.

More information

For more information about aliases, refer to Overview of aliases .

If you haven't created a suffix yet, refer to Create an alias suffix for a scope . Edit this page on GitHub