Update Octopus variables through deployment

I am trying to create new various clients using scripts that will run with every deployment.

After the deployment completes, I want to update those client Ids and client secrets as octopus variables, so that I can directly pick up those values from variables instead of re-creating those clients again.

I can see that variables could be used within the scope of a single deployment. But is it possible to add variables that can be used for subsequent deployments?

Hi @Sheena.Agrawal,

Thanks for getting in touch!

This is possible but it would require a script to interact with the API to add the variables to the project.
We have a sample script here that you could modify for your purposes (by default it creates variables as plain text so that may need changing for your secrets):

I hope this helps, please let me know if you have any further questions.

Regards,
Paul

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