Is there a way to mark a variable as "required" without it being a prompt?

The only way I see to make a variable required is to click “prompt” and then there’s a “required” checkbox. Is there a way for non-prompt variables to be marked as “required”?

Hello,

Thanks for reaching us! The goal of a “Required” variable is to force the users to put some data on it before starting the deployment. A “Required” variable also has to be “Prompt” to give the user the opportunity to input data. If it wasn’t set up as “prompt”, the user would have to go all the way back to the variables menu to setup a value on the variable.

What you can do though is setup a variable as “Prompt” and “Required”, but also put a default value on it(see variablesetup.jpg). This way, when you reach the Deployment screen, the variable will be “prompt” and “Required”, but it will already have a value(see deplotmentscreen.jpg) , so you could go straight to the “Deploy” button.

Hope this helps you achieve what you were trying to do.

dalmiro

Good morning Dalmiro,
The use case is a little different then you’re describing. We’re thinking of when a developer adds a variable to the deployment that he’s using in the web config that is required for his functionality to work. He doesn’t have access to the production deployment to set said variables (and quite possible wouldn’t know what to set it to anyway, like, a production encryption key, etc).

The setting is required for the site to work; however, the infrastructure team might miss it as part of the update steps and the deployment will release broken into that environment because of the missing setting.

We also don't want to prompt every time, because it doesn't change, it's a one time setup, we just want it to fail the first time if the infrastructure team hasn't put in the production settings with a clear message "This variable is required and you didn't insert it".  This would save a possible lengthy deployment into a new environment only to fail almost immediately for smoke testing and then having to troubleshoot why.

Hi Ed,

I understand your scenario. We have a Uservoice suggestion that I think resembles what you are talking about:

See if you can put some votes on it we we can move it up on our queue :slight_smile:

Thanks,

Dalmiro.