From 67346f38070e5e9bf2c8c2fb18f887377f4390df Mon Sep 17 00:00:00 2001 From: Corey Underdown Date: Thu, 3 Dec 2026 14:59:02 +1100 Subject: [PATCH 1/2] Rename tenant project and common templates to variable templates Use the terms project variable templates and common variable templates in the tenant variables docs. Match the renamed Project and Common tabs and the Add variable button in the UI. Co-Authored-By: Claude Opus 5.5 --- .../tenants/update-tenant-variable.mdx | 6 +- .../projects/variables/tenant-variables.mdx | 58 ++++++++++--------- .../multi-tenant-saas-application/index.md | 6 +- src/pages/docs/tenants/tenant-variables.mdx | 26 ++++----- ...-which-variable-templates-apply.include.md | 2 +- 5 files changed, 51 insertions(+), 47 deletions(-) diff --git a/src/pages/docs/api/examples/tenants/update-tenant-variable.mdx b/src/pages/docs/api/examples/tenants/update-tenant-variable.mdx index 5c2aa79d8f..27da7676fc 100644 --- a/src/pages/docs/api/examples/tenants/update-tenant-variable.mdx +++ b/src/pages/docs/api/examples/tenants/update-tenant-variable.mdx @@ -1,7 +1,7 @@ --- layout: src/layouts/Default.astro pubDate: 2023-01-01 -modDate: 2026-01-20 +modDate: 2026-12-03 title: Update tenant variables description: Example scripts that update tenant variables for both project variables and common (library) variables in Octopus using the REST API and Octopus.Client. --- @@ -18,7 +18,7 @@ Provide values for: - Octopus API Key - Name of the space to use - Name of the tenant -- Name of the Project template +- Name of the project variable template - The new variable value - Choose whether the new variable value is bound to an Octopus variable value e.g. `#{MyVariable}` @@ -32,7 +32,7 @@ Provide values for: - Octopus API Key - Name of the space to use - Name of the tenant -- Name of the Library template +- Name of the common variable template - The new variable value - Choose whether the new variable value is bound to an Octopus variable value e.g. `#{MyVariable}` diff --git a/src/pages/docs/projects/variables/tenant-variables.mdx b/src/pages/docs/projects/variables/tenant-variables.mdx index df2ea28907..2303c066c8 100644 --- a/src/pages/docs/projects/variables/tenant-variables.mdx +++ b/src/pages/docs/projects/variables/tenant-variables.mdx @@ -1,7 +1,7 @@ --- layout: src/layouts/Default.astro pubDate: 2023-03-08 -modDate: 2025-12-09 +modDate: 2026-12-03 title: Tenant variables icon: fa-solid fa-house-chimney-user description: Tenant variables allow you to specify variables that can have different values for each tenant. @@ -11,30 +11,30 @@ import TenantsWhichVariableTemplatesApply from 'src/shared-content/tenants/tenan Tenant variables allow you to configure [variables](/docs/projects/variables/) that can have different values for each [tenant](/docs/tenants)/environment combination. -![The project templates screen showing tenant variable values per environment](/docs/img/tenants/images/project-template-screen.png) +![The Tenant Variables page showing project variable values per environment](/docs/img/tenants/images/project-template-screen.png) Tenant variables are provided using variable templates which map a single variable name to different values for each tenant. Each variable template can define the data type, name, label, help text, and default value. There are two types of variable templates: -- [Project templates](#project-templates) are variable values that differ between projects and environments for a tenant. For example, server names or database connection settings. -- [Common templates](#adding-a-variable-template) are variable values that are common across all tenants but need a unique value per tenant. For example, website names, titles, headers, images, logo, URLs, contact information. These values don't change across projects and environments for a tenant. +- [Project variable templates](#project-templates) are variable values that differ between projects and environments for a tenant. For example, server names or database connection settings. +- [Common variable templates](#common-templates) are variable values that are common across all tenants but need a unique value per tenant. For example, website names, titles, headers, images, logo, URLs, contact information. These values don't change across projects and environments for a tenant. :::div{.hint} [Easy Mode - Project Tenant Variables](https://octopus.com/blog/octo-easy-mode-10-project-templates) provides a practical example of project tenant variables you can apply to your own Octopus instance. ::: -## Project templates \{#project-templates} +## Project variable templates \{#project-templates} -Project templates allow you to specify variables that can have different values per tenant/environment combination. A perfect example would be a connection string or a database server. With project templates, you define them at the project level. +Project variable templates allow you to specify variables that can have different values per tenant/environment combination. A perfect example would be a connection string or a database server. With project variable templates, you define them at the project level. -Project templates can be scoped to zero or more environments. When a project template is not scoped to any environments (unscoped), it applies to all available environments. This behavior is consistent with how common tenant variables can be scoped. +Project variable templates can be scoped to zero or more environments. When a project variable template is not scoped to any environments (unscoped), it applies to all available environments. This behavior is consistent with how common tenant variables can be scoped. -To add a project template: +To add a project variable template: 1. Navigate to the **Tenant Variables** page in any project. -2. Click **Add project template**. -3. Add the details to your template and click **Add**. +2. Click **Add variable**. +3. Add the details to your variable template and click **Add**. | | Description | Example | | ---- | ---------------------------------------- | ------- | @@ -45,16 +45,16 @@ To add a project template: | **Default value** | The value that will be given to the variable if an actual value is not provided. The default value can contain [variable binding expressions](/docs/projects/variables/variable-substitutions). | `https://#{Tenant.Alias}.myapp.com` | | **Options** | (Only applies when control type is drop down). This defines the list of options available for the user to select from the drop down list. Enter each option on a new line. Use `\|` to separate values and display text. | `Value1\|Display text 1`
`Value2\|Display text 2` | -Values for your newly created templates will be displayed for each tenant/environment combination. If you don't see any values, make sure you've [connected tenants](/docs/projects/tenants/bulk-connection) to the project. You can filter the displayed values to a specific template by selecting it from the list on the side, or to specific tenants and environments using the provided filter options. +Values for your newly created variable templates will be displayed for each tenant/environment combination. If you don't see any values, make sure you've [connected tenants](/docs/projects/tenants/bulk-connection) to the project. You can filter the displayed values to a specific template by selecting it from the list on the side, or to specific tenants and environments using the provided filter options. -### Scoping project templates +### Scoping project variable templates \{#scoping-project-templates} -Project templates can be scoped by environment to control which tenant/environment combinations they apply to: +Project variable templates can be scoped by environment to control which tenant/environment combinations they apply to: - **Unscoped templates**: When no environment scope is specified, the template applies to all environments connected to the tenant - **Scoped templates**: When one or more environments are specified in the scope, the template only applies to those specific environments -Use the Scope column of the Project Template table to add scopes to your templates. The project template can then be used across all tenants connected to the environments in the template's scope. +Use the Scope column on the **Project** tab to add scopes to your variable templates. The project variable template can then be used across all tenants connected to the environments in the template's scope. For more information on assigning scopes, see [assigning scopes](/docs/projects/variables/getting-started/#using-multiple-scopes). @@ -62,24 +62,24 @@ To set the variable value for a tenant/environment, simply click the value and m ![Editing tenant variable values for each tenant and environment](/docs/img/projects/variables/images/tenant-variables-edit.png) -## Common templates +## Common variable templates \{#common-templates} To specify common variables that can be used across multiple tenants, you'll need to add a variable template to either an existing or new [variable set](/docs/projects/variables/library-variable-sets). You'll also need to [include the variable set in the project](/docs/projects/variables/library-variable-sets#adding-the-library-variable-set-to-a-project) to manage any template values. -To manage common template values, navigate to the **Tenant Variables** page in any project and select the **Common Templates** tab. +To manage common variable values, navigate to the **Tenant Variables** page in any project and select the **Common** tab. -The variable management experience for common templates is similar to project templates, however the side list will show included variable sets and the values will be grouped by variable set. +The variable management experience for common variable templates is similar to project variable templates, however the side list will show included variable sets and the values will be grouped by variable set. To edit a variable value, click the **Edit** icon on the right-side of a table row, update the value, then click **Update** to save the new value. Since the same variable set may be included in multiple projects, any change to a tenant's value will also affect other projects the tenant is connected to. -### Scoping common templates +### Scoping common variable templates \{#scoping-common-templates} -Common templates can be scoped by environment to control which environments they apply to: +Common variable templates can be scoped by environment to control which environments they apply to: -- **Unscoped common templates**: When no environment scope is specified, the template applies to all environments connected to the tenant -- **Scoped common templates**: When one or more environments are specified in the scope, the template only applies to those specific environments +- **Unscoped common variable templates**: When no environment scope is specified, the template applies to all environments connected to the tenant +- **Scoped common variable templates**: When one or more environments are specified in the scope, the template only applies to those specific environments -Use the Scope column of the Common Template table to add scopes to your templates. The common template can then be used across all projects that have a connection to the environments in the template's scope. +Use the Scope column on the **Common** tab to add scopes to your variable templates. The common variable template can then be used across all projects that have a connection to the environments in the template's scope. For more information on assigning scopes, see [assigning scopes](/docs/projects/variables/getting-started/#using-multiple-scopes). @@ -91,9 +91,9 @@ For more information on assigning scopes, see [assigning scopes](/docs/projects/ The following multi-tenancy variable management experience applies prior to Octopus Deploy 2024.1. -### Project templates +### Project variable templates -To add a project template: +To add a project variable template: 1. Navigate to the **Variables ➜ Project Templates** tab in your tenant connected project. 2. Click **ADD TEMPLATE**. @@ -104,9 +104,9 @@ To add a project template: Then to set the variable values for a tenant: 1. Navigate to the **Variables ➜ Project Variables** tab in the tenant screen: -1. Expand each connected environment and provide values for each project template: +1. Expand each connected environment and provide values for each project variable template: - ![Providing project template values for each connected environment](/docs/img/projects/variables/images/variable-templates-project-value.png) + ![Providing project variable values for each connected environment](/docs/img/projects/variables/images/variable-templates-project-value.png) ### Variable set templates \{#adding-a-variable-template} @@ -128,10 +128,14 @@ If you can't see any variables in the Common Variables tab, ensure you have incl Alternatively, you can set common variable values on an individual tenant: 1. Navigate to the **Variables ➜ Common Variables** tab in the tenant screen. -2. Provide values for each common template. +2. Provide values for each common variable template. ![Providing values for each common variable template](/docs/img/projects/variables/images/variable-templates-common-value.png) +## Version notes + +- Before [VERIFY: the first self-hosted Octopus Server version with the renamed labels — needs: the release that ships OctopusDeploy/OctopusDeploy#51403], the **Project** and **Common** tabs on a project's **Tenant Variables** page were called **Project Templates** and **Common Templates**. The **Add variable** button was called **Add project template**. + ## Learn more - [Variable blog posts](https://octopus.com/blog/tag/variables/1) diff --git a/src/pages/docs/tenants/guides/multi-tenant-saas-application/index.md b/src/pages/docs/tenants/guides/multi-tenant-saas-application/index.md index 16e53ffab3..260ab257ce 100644 --- a/src/pages/docs/tenants/guides/multi-tenant-saas-application/index.md +++ b/src/pages/docs/tenants/guides/multi-tenant-saas-application/index.md @@ -1,7 +1,7 @@ --- layout: src/layouts/Default.astro pubDate: 2023-01-01 -modDate: 2024-08-28 +modDate: 2026-12-03 title: Multi-tenant SaaS applications in Octopus navTitle: Multi-tenant SaaS applications icon: fa-solid fa-users @@ -59,14 +59,14 @@ Each customer has the option of applying custom branding. To ensure the deployme ## Creating tenant variables -Each customer has their own database for every environment with a unique name. To manage this, we can create a [project template variable](/docs/projects/variables/tenant-variables#project-templates) for the database name. Add a project template with the following properties: +Each customer has their own database for every environment with a unique name. To manage this, we can create a [project variable template](/docs/projects/variables/tenant-variables#project-templates) for the database name. Add a project variable template with the following properties: - **Name:** Tenant.Database.Name - **Label:** Database Name - **Help text:** Name of tenant database for Vet Clinic - **Control type:** Single-line text box -Once the template variable is added you'll be able to provide variable values for each tenant and environment combination. +Once the project variable template is added you'll be able to provide variable values for each tenant and environment combination. ## Creating infrastructure diff --git a/src/pages/docs/tenants/tenant-variables.mdx b/src/pages/docs/tenants/tenant-variables.mdx index 6e4200c422..f09d3b999a 100644 --- a/src/pages/docs/tenants/tenant-variables.mdx +++ b/src/pages/docs/tenants/tenant-variables.mdx @@ -1,7 +1,7 @@ --- layout: src/layouts/Default.astro pubDate: 2023-01-01 -modDate: 2025-12-09 +modDate: 2026-12-03 title: Tenant variables icon: fa-solid fa-square-root-variable description: Tenant variables in Octopus allow you to specify which variables are required to deploy a project to a tenant successfully; Project variables are values that differ between projects and environments. Common variables are common across multiple tenants that require a unique value per tenant. @@ -32,44 +32,44 @@ Both of these methods use the [variable templates](/docs/projects/variables/vari ## Project variables \{#project-variables} -Project variables allow you to specify a variable that a tenant can change. A perfect example would be a connection string or a database server. You define project variables using [project templates](/docs/projects/variables/variable-templates/#project-templates). +Project variables allow you to specify a variable that a tenant can change. A perfect example would be a connection string or a database server. You define project variables using [project variable templates](/docs/projects/variables/tenant-variables#project-templates). -Project templates can be scoped to zero or more environments. When a project template is not scoped to any environments (unscoped), it applies to all available environments connected to the tenant. This behavior is consistent with how common tenant variables can be scoped. +Project variable templates can be scoped to zero or more environments. When a project variable template is not scoped to any environments (unscoped), it applies to all available environments connected to the tenant. This behavior is consistent with how common tenant variables can be scoped. :::figure -![Project templates scoped to environments on the tenant variables screen](/docs/img/tenants/images/project-template-screen.png) +![Project variable templates scoped to environments on the tenant variables screen](/docs/img/tenants/images/project-template-screen.png) ::: -You can specify the variable type for the project template, just like regular variables. You can also provide a default value which the tenant can overwrite. +You can specify the variable type for the project variable template, just like regular variables. You can also provide a default value which the tenant can overwrite. :::figure -![Editing a project template's variable type and default value](/docs/img/tenants/images/project-template-edit.png) +![Editing a project variable template's variable type and default value](/docs/img/tenants/images/project-template-edit.png) ::: You can view and edit values for project's tenants and environments on a single screen. :::figure -![Editing project template values for every tenant and environment on one screen](/docs/img/tenants/images/project-template-screen-edit.png) +![Editing project variable values for every tenant and environment on one screen](/docs/img/tenants/images/project-template-screen-edit.png) ::: You can also set values for these variables on the tenant variables screen. :::figure -![Setting a project template value on the tenant variables screen](/docs/img/tenants/images/project-template-tenant-value.png) +![Setting a project variable value on the tenant variables screen](/docs/img/tenants/images/project-template-tenant-value.png) ::: -The great thing about project template variables is that they are treated like any other variable, and can be used in steps like regular project variables. +The great thing about project variables is that they are treated like any other variable, and can be used in steps like regular project variables. :::figure -![A project template variable used in a deployment step](/docs/img/tenants/images/project-template-variable-value-in-step.png) +![A project variable used in a deployment step](/docs/img/tenants/images/project-template-variable-value-in-step.png) ::: ### Project variable scoping Project variables can be scoped by environment to control which tenant/environment combinations they apply to: -- **Unscoped project variables**: When no environment scope is specified on the project template, the variable applies to all environments connected to the tenant -- **Scoped project variables**: When one or more environments are specified in the project template scope, the variable only applies to those specific environments +- **Unscoped project variables**: When no environment scope is specified on the project variable template, the variable applies to all environments connected to the tenant +- **Scoped project variables**: When one or more environments are specified in the project variable template scope, the variable only applies to those specific environments You can assign scopes to project variables using the **Tenant Variables** section of the project's page, or the **Tenant Variables** section of the tenant's page. The project variable can then be used across all projects that have a connection to that environment. @@ -83,7 +83,7 @@ For scoped project variables, a user will require variable editing permission fo ## Common variables \{#common-variables} -Common variables are similar to project variables. The main difference between the two is that common variables can be used across multiple projects, and they aren't scoped to environments. Common variables are defined using [variable set templates](/docs/projects/variables/variable-templates/#adding-a-variable-template) +Common variables are similar to project variables. The main difference between the two is that common variables can be used across multiple projects, and they aren't scoped to environments. Common variables are defined using [common variable templates](/docs/projects/variables/tenant-variables#common-templates) in variable sets. For example, if we wanted to define an abbreviation for the tenant to use in a deployment or runbook, we can configure a variable template for the variable set. diff --git a/src/shared-content/tenants/tenants-which-variable-templates-apply.include.md b/src/shared-content/tenants/tenants-which-variable-templates-apply.include.md index 1d0ccc4fc9..628505af3d 100644 --- a/src/shared-content/tenants/tenants-which-variable-templates-apply.include.md +++ b/src/shared-content/tenants/tenants-which-variable-templates-apply.include.md @@ -1,6 +1,6 @@ When you connect a tenant to a project, variable templates defined by the project itself, or by included variable sets, will be required by the tenant. -1. Variable Set templates will be collected once - they are considered to be constant for the tenant. Think of these like "custom fields" for your tenants. +1. Common variable templates from variable sets will be collected once - they are considered to be constant for the tenant. Think of these like "custom fields" for your tenants. 1. Project variable templates will be collected once for each project/environment combination the tenant is connected to. Think of these like database connection settings for the specific tenant/project/environment combination. By carefully designing your variable templates you can implement complex multi-tenant deployment scenarios. From 5ad41fe021b994cc9cb03f4e7471d38b2127fa5a Mon Sep 17 00:00:00 2001 From: Corey Underdown Date: Thu, 3 Dec 2026 17:41:31 +1100 Subject: [PATCH 2/2] Remove the version note about the renamed tenant variable labels Co-Authored-By: Claude Opus 5.5 --- src/pages/docs/projects/variables/tenant-variables.mdx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/pages/docs/projects/variables/tenant-variables.mdx b/src/pages/docs/projects/variables/tenant-variables.mdx index 2303c066c8..a020967557 100644 --- a/src/pages/docs/projects/variables/tenant-variables.mdx +++ b/src/pages/docs/projects/variables/tenant-variables.mdx @@ -132,10 +132,6 @@ Alternatively, you can set common variable values on an individual tenant: ![Providing values for each common variable template](/docs/img/projects/variables/images/variable-templates-common-value.png) -## Version notes - -- Before [VERIFY: the first self-hosted Octopus Server version with the renamed labels — needs: the release that ships OctopusDeploy/OctopusDeploy#51403], the **Project** and **Common** tabs on a project's **Tenant Variables** page were called **Project Templates** and **Common Templates**. The **Add variable** button was called **Add project template**. - ## Learn more - [Variable blog posts](https://octopus.com/blog/tag/variables/1)