Tenant Common variable's values per Environment

Hello,

Is there a way to set environment dependent values for tenant common variables, in the same way as for Tenant Project variables ?

Eg.

Tenant = T1
Environment = E1
Value for Tenant Common Variable V1 = “A value”

Tenant = T1
Environment = E2
Value for Tenant Common Variable V1 = "Another different value

Hi @pr,
Thanks for getting in touch. So glad you asked the question.

In general, Common variables are meant to be used for values that are consistent across projects and environments for a specific tenant. They serve as a custom field of sorts for your tenants.

Can you provide me with more detail and context on what type of values you are managing with Tenant Common Variables? There might be a way around this limitation or possibly another way to handle these Environmental value changes that will work just as well.

Looking forward to hearing from you shortly.
Regards,
Tina

Hello Tina, many thanks for your feedback.

Here below is the typical use case we have:

Projects = API-1, API-2, API-3, DB
Tenant = T-1
Environments= DEV, PROD
Variables:

  • HostName-API-1 (Used by projects : API-2, API-3, DB)
  • HostName-API-2 (Used by projects : API-1, API-3, DB)
  • HostName-API-3 (Used by projects : API-1, API-2, DB)
  • ConnectionString-DB (Used by projects : API-1, API-2, API-3)

Variables’ values:

Environment = DEV:

Environment = PROD

Please consider that in the reality our use case is more complex, with more cross projects variables dependent on tenant/environment and more environments

What we need is to have Common variables to be used for values that are consistent across projects for a specific combination of (tenant, environment).

Regards
Pierpaolo

Hi Pierpaolo,
Sorry for my delayed response here. Ryan, one of our wonderful Advisory Team members, pointed me to a solution he created that might just work for you.

Take a look and let me know what you think.

Kind Regards,
Tina

Thanks Tina,

The solution Ryan is proposing is interesting and doable. But for me it is more a workaround and not a real solution.
There is a main drawback which mainly come out in complex setups as our one where we have many common variables. In our case we would be obliged to use API in order to generate the templates Ryan proposes.
Moreover our product evolve continuously and every time we add a new common variable then we have to create the environments template. Moreover if we add a new environment then we have to update all templates which can be many !
So that workaround can be source of errors and can be very time consuming for complex setups.
For us is then much more simple to duplicate tenants and postfix tenants with the acronym of the environment, e.g.:CUSTOMER1_ QA, CUSTOMER2_ QA, CUSTOMER1_PROD, CUSTOMER2_PROD.

Personally I consider simpler and more natural to add an additional dimension “environment” to the template common variables, as it is for project variables

OCTOPUS is a great and powerful CD solution. To have Template Common Variables scoped to environment as it for Template Projects Variables would make OCTOPUS better and more powerful. I hope Octopus’ team considers to implement this functionality soon !

Have a nice day
Pierpaolo

1 Like

Hi Pierpaolo,
Thank you for the detailed feedback and for your effort to help us make Octopus a better and more useful tool!

I raised this with our product team and if you haven’t already you may want to give it your vote at our UserVoice site.

Again we appreciate and value your feedback.
Kind Regards,
Tina

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