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?
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.