❗Regex Validation For Variables

env0 Variables is a very powerful tool for maintaining and configuring your infrastructure as code. It can help keep your code DRY, manage secrets and create a hierarchy to manage a large-scale infrastructure. But with great power comes great responsibility, and that's why you can also create policies and checks to validate your variables are intact. Now you can use regular expression validation to prevent users to enter something you didn't mean to prevent errors while deploying your Infrastructure as code.

✨ How it works ✨

Let's say you want developers to be able to spin up a microservice but use an existing database for it. You can create a template with a variable for the database IP, set the regular expression to validate it, but keep the value empty. When the developer deploys this template, she/he will get a message if the value is incorrect based on the regex you define.

You can also define those variables using our env0 terraform provider.


Validate IP address using regular expression

To learn more about this feature see our documentation