Enable Scope Variable Sets to Steps

Does anyone know if there’s a way to have variables scoped to steps grouped together in a Variable Set?

I’m trying to put variables into tidier state by variable sets but I cannot do it if I want to have variables of the same name with step specific values assigned.

Example:
Project 1
Step A
Step B

Variable Set
Set A, variable X: xyz
Set B, variable X: wxy

With the above example, if I want X scoped to Steps A & B, I have to bring them out of the Variable Set into Project 1.

Hi,

Thanks for getting in touch! As variable sets are designed to be project-agnostic so you can apply them to any project, these variables cannot be scoped to project-specific deployment steps. Scoping to steps would have to be done with project variables, like you’ve mentioned.

If you have lots of variables in a set that you’d like to move over, we have a great example PowerShell script available to make the move a bit easier and quicker. From there you can then scope them to your deployment steps as needed. :slight_smile:

I hope this helps! Don’t hesitate to reach out if you have any further questions.

Best regards,

Kenny

Hi Kenny,

One of the biggest benefits of variable sets I found is it brings clarity and seperation of concern to variable setup, especially when you are going through hundreds of variables. Allow it to be scopes to specific steps of a project would fulfill that purpose properly.

Can I suggest this to be a feature request?

Cheers,
Jim

Hi Jim,

Thanks for following up and for sharing your suggestion. Unfortunately however, I would have to say implementing this functionality isn’t be something we could consider. Since variable sets are designed to be shared amongst multiple projects, allowing variables within a set to be scoped to project-specific deployment steps doesn’t fit within the functionality designed for them.

Sorry it’s not better news. Don’t hesitate to reach out if you have any further questions or concerns.

Best regards,

Kenny