Variables for Deployment Targets

I like the way it is possible to define variables for each Tenant:

I am looking for a way to do the same for Deployment Targets or Environments, but I cannot find a way to do it.

Is it even possible? How do I define common variable sets for deployment targets?

Hi @florian.boehmak,

Thank you for contacting Octopus Support.

Unfortunately, there isn’t a terribly elegant way to do this in Octopus since Common Variables are not scoped to anything other than the Tenant.

Tenant 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 Library variable set templates.

However, you can achieve this level of scoping (by Target or Environment + Tenants via Tenant Tags) using either Project level Variables or a Library Variable Set.

Example Variable with Scoping:

Example Tenant Preview:

Let me know if that makes sense and if you have any additional questions.

Best Regards,
Donny Bell

thanks I managed to achieve that using variables defined in the project and scoping them to environments.

1 Like