Non-Default Variable list

I have a a LibraryVariableSet that is used by all my Octopus Tenants which have some default value.
How can I get a list of Tenants and their non-default values? Unfortunately once you click the ‘reset to default’ it just puts the default value in the DB whereas tenants that have never had the default value changed would not show up in a query as below:

select t.Name, v.[JSON]
from TenantVariable v JOIN Tenant t on t.Id = v.TenantId
where OwnerId = ‘LibraryVariableSets-101’
order by t.Name

Is there a better way to determine which variables are non-default?

Hi @Michael_Baumann,

Thanks for getting in touch! Unfortunately, there is no way to do this out of the box in Octopus. In order to do this, you will need to write some custom script and query the Octopus API.

Each Tenant has a /variables page you can query. This page contains the LibraryVariableSet connected to the project. Including the Default value and current values per environment. With some scripting logic you will be able to return the information you need.

I can link you to the documentation page on our API and our open source repository containing example scripts you can use to get started.

If you have any further thoughts or questions here, please let me know. :slight_smile:

Best regards,
Daniel

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