Variables are an essential part of IaC configuration. With our new Variable Sets, managing variables in env0 is now simpler and more efficient.

A variable set is a collection of related variables that can be managed as a single unit, making it easier to organize frequently used or closely related variables.

At env0, variable sets can be linked to an entire Organization or to specific Projects, Templates, Workflows, or Environments.  This allows maximal flexibility and ensures that sets are available to the most relevant teams and projects.

Also, as with all other variables, when defined at the project level, variable sets will be inherited by sub-projects and environments under the parent project. 

This saves time and improves reliability and coherency, while still giving you the option to customize setups for specific sub-projects according to predefined rules.

Moreover, this also helps with:

1. Reducing clutter
In many tools, variable sets are stored at the organization level, creating an endless clutter of sets, many of which are created just for a very specific use cases. Storing sets at the project and sub-project levels helps keep things clean, clear and concise, ensuring that sets are available only to the relevant projects and teams. 

2. Simplifying TFC migration 
If you currently use Terraform Cloud (TFC), you can now easily transfer your existing variable sets to env0 using our TFC migration tool.  With the new Variable Sets feature, you can migrate these sets along with their original assignments, ensuring a smooth transition.

How it works

Let’s look at an example of a company called “Acme Solutions” that has two projects for each product component: Payments and Subscriptions.

Both teams use Kafka and a database (DB), but only the Payments team uses Redis as a caching layer on top of the DB. 

For both Redis and the DB, the admin wants to define two options with stronger or weaker capabilities, with costs adjusted accordingly. 

For Kafka, a set of variables will be defined for the credentials to be used by all teams.

Now let’s assume that the Payments team needs more powerful caching and database capabilities for the production environment. 

In contrast, the staging environment requires limited caching but strong database capabilities. The dev environment needs only a limited database and no caching at all.

Here are the steps that will be taken for this scenario:

1. Define Kafka Variable Set -  The Kafka credentials will be defined at the organization level, as they are used by multiple teams. This setup not only makes using credentials easier but also allows for efficient re-use and centralized updates. 

For example, if you need to update the credentials, you only have to make the change once in the variable set. After redeployment, all environments using this set will be automatically updated.

2. Define Database Variable Sets - The DB Variable Sets are defined at the organization level. Each set gets a proper name: the stronger set is called “Large DB” and the weaker set is called “Medium DB.”

3. Define Redis Variable Sets - The Redis Variable Sets will be defined at the Payments project level since they are only used by the Payments team. 

Here too, the different capabilities are named "Large" and "Small" Redis settings:

4. Assign the Variable Sets - For the staging environment, the user can choose to assign and use the Large DB Settings variable set from the organization and the Small Redis Settings set from the Payments project.

As mentioned above, Variable Sets can be defined at any project and sub-project level and be assigned to any projects, sub-projects, environments, workflows, and templates under that project. Accordingly, the DB sets can be assigned to anything in the organization, while the Redis sets can be assigned only at the Payments level.

Wrap up

With the flexible project hierarchy, combined with the inheritance mechanism and the new Variable Sets, env0 provides the most flexible and efficient way to manage your variables.

Want to learn more? Schedule a technical demo to see env0 in action.

Variables are an essential part of IaC configuration. With our new Variable Sets, managing variables in env0 is now simpler and more efficient.

A variable set is a collection of related variables that can be managed as a single unit, making it easier to organize frequently used or closely related variables.

At env0, variable sets can be linked to an entire Organization or to specific Projects, Templates, Workflows, or Environments.  This allows maximal flexibility and ensures that sets are available to the most relevant teams and projects.

Also, as with all other variables, when defined at the project level, variable sets will be inherited by sub-projects and environments under the parent project. 

This saves time and improves reliability and coherency, while still giving you the option to customize setups for specific sub-projects according to predefined rules.

Moreover, this also helps with:

1. Reducing clutter
In many tools, variable sets are stored at the organization level, creating an endless clutter of sets, many of which are created just for a very specific use cases. Storing sets at the project and sub-project levels helps keep things clean, clear and concise, ensuring that sets are available only to the relevant projects and teams. 

2. Simplifying TFC migration 
If you currently use Terraform Cloud (TFC), you can now easily transfer your existing variable sets to env0 using our TFC migration tool.  With the new Variable Sets feature, you can migrate these sets along with their original assignments, ensuring a smooth transition.

How it works

Let’s look at an example of a company called “Acme Solutions” that has two projects for each product component: Payments and Subscriptions.

Both teams use Kafka and a database (DB), but only the Payments team uses Redis as a caching layer on top of the DB. 

For both Redis and the DB, the admin wants to define two options with stronger or weaker capabilities, with costs adjusted accordingly. 

For Kafka, a set of variables will be defined for the credentials to be used by all teams.

Now let’s assume that the Payments team needs more powerful caching and database capabilities for the production environment. 

In contrast, the staging environment requires limited caching but strong database capabilities. The dev environment needs only a limited database and no caching at all.

Here are the steps that will be taken for this scenario:

1. Define Kafka Variable Set -  The Kafka credentials will be defined at the organization level, as they are used by multiple teams. This setup not only makes using credentials easier but also allows for efficient re-use and centralized updates. 

For example, if you need to update the credentials, you only have to make the change once in the variable set. After redeployment, all environments using this set will be automatically updated.

2. Define Database Variable Sets - The DB Variable Sets are defined at the organization level. Each set gets a proper name: the stronger set is called “Large DB” and the weaker set is called “Medium DB.”

3. Define Redis Variable Sets - The Redis Variable Sets will be defined at the Payments project level since they are only used by the Payments team. 

Here too, the different capabilities are named "Large" and "Small" Redis settings:

4. Assign the Variable Sets - For the staging environment, the user can choose to assign and use the Large DB Settings variable set from the organization and the Small Redis Settings set from the Payments project.

As mentioned above, Variable Sets can be defined at any project and sub-project level and be assigned to any projects, sub-projects, environments, workflows, and templates under that project. Accordingly, the DB sets can be assigned to anything in the organization, while the Redis sets can be assigned only at the Payments level.

Wrap up

With the flexible project hierarchy, combined with the inheritance mechanism and the new Variable Sets, env0 provides the most flexible and efficient way to manage your variables.

Want to learn more? Schedule a technical demo to see env0 in action.

Logo Podcast
With special guest
John Willis

Schedule a technical demo. See env0 in action.

Footer Illustration