Variable Scoping by Tenant


We are now migrate some of our projects to use some new octopus features and are going to use the tenant feature for our project now.
As of now we were scoping variable by the environment name. But now we do not see how we can scope the variable and process steps with tenant.
below is how our current scoping looks like

As you ca see AOC-Training is the environment now and with the new tenant approach the tenant we added is AOC


Same goes to some of our process steps which we are currently scoping by environment names and now want to scope by tenant


I read something about tenant tags but we have 70+ tenants and it will be painful to create so many tags for each tenants.

Pretty new to this tenant if you can suggest how we can achieve this.


Hi Rasmita,

Thanks for getting in touch!

Tenant specific variables require a variable template to be created within the project, and then the value is set within the tenant.
There are more details on this here:

In order to scope process steps to tenants it will be necessary to configure tenants tagsets.
A single tenant tag can be shared by multiple tenants to allow grouping.

For example you could have a tenant tagset named Environment that includes tags named Test, Staging and Production.
You would then tag each of your tenants with the relevant tag and create those groupings.
We have more details on this here:


Thank you for the reply. We are also going in the same path.

One more question, Currently I am seeing project template variables are required and need a value to be provided. Is there a we default the project variables as null or empty string, as we need it to for some of our usage.
as below screenshot we need to be empty string as default value for some tenant.


Hi Rasmita,

In order to leave the value blank for a required variable, you need to “trick” Octopus with something like #{if DummyVariable}never_true#{/if}
This satisfies the UI requirement of a value being present, but it will evaluate to blank during the deployment.

We did this way. It worked


1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.