Create an alias suffix for a scope
Create an alias suffix for a scope
Create an alias suffix to give your Boundary org or project scope a unique namespace for its aliases. Every alias created in a project scope must be qualified by both an org suffix and a project suffix. You can have only one suffix per project or org scope. Org suffixes must be globally unique. Project suffixes must be unique within the org the project resides in, but they can be reused across orgs.
Once you create the suffixes, you append them to any aliases you create in the project scope. You can reuse alias values across scopes because the suffixes make them globally unique values.
For example, your organization might use an alias value postgres-db and differentiate between different departments using suffixes:
-
A marketing org might use the suffix mktg with suffixes for project scopes based on regions, east and west .
-
An engineering org might use the suffix eng with suffixes for project scopes based on departments, frontend and backend .
This structure would produce the following alias combinations:
[TABLE]
-
postgres-db
-
Alias in the global scope
-
postgres-db.east.mktg
-
Alias in the project scope with org and project suffixes
-
postgres-db.west.mktg
-
Alias in the project scope with org and project suffixes
-
postgres-db.backend.eng
-
Alias in the project scope with org and project suffixes
-
postgres-db.frontend.eng
-
Alias in the project scope with org and project suffixes
[/TABLE]
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 .
Create the suffixes
Complete the following steps to create suffixes for the org and project scopes:
Select whether you want to create a suffix for an org 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, and then click Create alias suffix .
-
In the Alias suffix field, type a unique value for the suffix.
-
Click Save . Boundary will append the org suffix to any aliases you create in the nested project scope using the following format: alias.projectsuffix.orgsuffix
-
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, and then click Create alias suffix .
-
In the Alias suffix field, type a unique value for the suffix.
-
Click Save . Boundary will append the project suffix to any aliases you create in the project scope using the following format: alias.projectsuffix.orgsuffix
Select whether you want to create a suffix for an org or a project scope:
-
Log in to Boundary.
-
Use the following command to create an alias suffix in the org scope that contains the project scope. Make sure to provide the ID for the org scope: $ boundary scopes set-alias-suffix \ -id o_1234567890 \ -alias-suffix org1 Example output: Scope information: ID: o_1234567890 Alias Suffix: org1 ... You must provide the the following attributes when you create 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. When you create an alias in the project scope, you must append the suffix using the following format: alias.projectsuffix.orgsuffix -
Log in to Boundary.
-
Use the following command to create an alias suffix in the project scope you want to create an alias for. Make sure to provide the ID for the project scope: $ boundary scopes set-alias-suffix \ -id p_1234567890 \ -alias-suffix proj1 You must provide the the following attributes when you create 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. When you create an alias in the project scope, you must append the suffix using the following format: alias.projectsuffix.orgsuffix
Apply the following Terraform configuration to create an alias suffix in a scope.
resource "boundary_scope_alias_suffix" "org" {
scope_id = boundary_scope.org.id
alias_suffix = "org1"
}
Next steps
Once you have created suffixes for the org and project scope, you can Create a target alias for targets in the project scope.
More information
-
For more information about aliases, refer to Overview of aliases .
-
To change the name of a suffix or to delete it, refer to Manage alias suffixes .
Edit this page on GitHub