We have multiple applications that in the same environment use the same Id server to authenticate. So traditionally, we would create a variable entry for each application:
Thanks for getting in touch, and for your question - it’s a really interesting one!
From what I know fuzzy matching is not supported in the Structured Configuration Variables feature (it was previously called JSON Configuration Variables, but was renamed in 2020.4 when we added support for YAML and XML).
I did wonder if using variable replacement e.g. having something like this in your variable set might work:
With this, you place your variable placeholders in your files, and then turn this feature on, and provide the path to the files you want values to be replaced with the variable value.
One downside to having placeholders in your json files is that your app might not be able to work correctly when running locally during development. Depending on your tech stack, you can configure some frameworks (.NET core for example) to load environment specific json files so that you can switch out the files used depending on which environment you are running your application in.
I’ll pass on the feedback to our product team about fuzzy matching / wildcard support, as I think it would be a handy addition.
Thank you for you feedback. You have correctly hit the nail on the head. When we used to use the web.configs and release configs, we were able to use the octopus variables in the checked in code. We switched to a bespoke json config as it was simpler to implement and the config was consistent across applications, but does give the draw back that to run the application as checked in, we can’t use the octopus replacements.
Hopefully the feature will be considered for a future release of Octopus. We are trying to keep our variables sets as small as possible so this would be very helpful.
They can see the appeal for this. The areas for consideration with this request is making sure that any change to the feature is backward compatible (so the : notation currently used still works), and also highlighting that the current way of working where the variable name is used as a selector means that you can end up with very verbose variable names (particularly when using it with XML XPath).
They’ve asked if you’d be able to create a user voice request for the feature enhancement.