![Case Study Video Background](https://cdn.prod.website-files.com/63df9b273f861215467107c8/6632348c7f1ad700e0b42b56_vlcsnap_2024_03_06_22h56m17s649_2_2.webp)
![](https://cdn.prod.website-files.com/63eb9bf7fa9e2724829607c1/66549cf8d6de72bca9343da6_Variable%20sets.png)
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.
![](https://cdn.prod.website-files.com/63eb9bf7fa9e2724829607c1/66549bd7dcc736382c82e52c_1ybQ8tzouf2U8f_iMRZh29SVfAbUcYYJlBR1LLSMYn8vKwaKWAWghtd1UVO1X_DoQijFq6ZPcvvkWjTd46SuLsAbafT4hkq0UALB4ULiosG_Wf8kprLUJVJh-xwVze6AonDvuE1AWUwneqAeVJhJJIU.png)
![](https://cdn.prod.website-files.com/63eb9bf7fa9e2724829607c1/66549bd7d0b7da308acd2c48_rhV3oIlHJmKbJKr5WoH4qSD_yeruE4TC2zRq7SGEEqNbCfwHZ7qnj9jXcnuJ5RQ9fl0A5ZDQNbeKtCEgLhDsvP8FPnTbhjkk83kv9faROs3NuzQ6I0D4N3K3DIzNwrl9BFKu2TT0HWtCJLnrJh0sMFc.png)
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.”
![](https://cdn.prod.website-files.com/63eb9bf7fa9e2724829607c1/66549bd7a4e79e639ec1a469_XpeoPlBs0Tj67o-7obiHWxLixPKqvBdFAbXaAyfnmyx6-TWH2HERbr8KTf08o4EgwQ0rhAfF_pMbs1IwWyc79oiQ3NFnuDHGVN1-vs0GYBeig57QaDucRmd9TS2zKzL4egXyakD2JRuoXNio8lhcX8c.png)
![](https://cdn.prod.website-files.com/63eb9bf7fa9e2724829607c1/66549bd81e86778172955d0a_Rs6EWx8EIUMYssysdaDZSy6Rj2Sb-UWuqZ8vV2nKBxQUhVOKyRYxESRqxT35bBD26UhTbdLIqeC7C5oL0xLtoGMUrKKjA9ANLPmUIqLXOZJ4FK01HYOumR8LuAKdtq8i57ZylwKPhUg-SRSg5E90MW8.png)
![](https://cdn.prod.website-files.com/63eb9bf7fa9e2724829607c1/66549bd82075bac66e8fc94c_koSNQhd5JhM4yWO79YehuVMwov4V8d_Co__7wzmnNbL8ClV3GDSAgPYEeWmRg3DInwhjqFz4p6jMUEhKVzp5OMQxgQGUNbnijx784C2Hyw0Em8TsW-yM1VQpFdv4kaEr5nlgKDBzz9a1Gvk7ydTCoqE.png)
‍
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:
![](https://cdn.prod.website-files.com/63eb9bf7fa9e2724829607c1/66549bd7c6bd34bd648e870f_xD0X2J_JzhUmH2xbCamlqVkkhjndAe-JNop2f_DxaJ4m3DMwXB1wOFPP-A92uhuMynIziPvJIJY6sKUmF60gduYUTxz_2wEkufVwQfsI5sH3j7ZJCQFJTj9Xx-lTCWCLwrqi-9gcc2ePBDhE-srZGBM.png)
![](https://cdn.prod.website-files.com/63eb9bf7fa9e2724829607c1/66549bd896fdd8c8adf07d5c_GCGaKHnaFgbM9fKgeP75V1gAgYoOIvREr3wXecte48XGajWFNNfI7goS6YktT3IoXJX4XgJdBXv4WboBP1J5cEmhs5eKoWR3Pc9Mvx-SzZcNZr0bz_21jit-9Vvj7rKkPmbqwvnpCG8aN5cIhyMZdJw.png)
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.
![](https://cdn.prod.website-files.com/63eb9bf7fa9e2724829607c1/66549bd87635a18531fa53d7_AhIJShD0IbrkDpEJDt1wXL0ejP2wmExI5NQsdJnl202NLniFCfkOhS3a2yZiKSAAy3jIZESR4hfaIZNSiUOFf8eSfd_1DtTvlp7q0giQCVXd630G9ULjV4hsHYgXUpPCCI2ATrkcvCyTyscwfo01mgQ.png)
![](https://cdn.prod.website-files.com/63eb9bf7fa9e2724829607c1/66549bd8b2e3e731b0b4e1b7_JPOIXWrLvH0xnbckWB2bX4SE8uqHGH-8EIt-DjfgMvbvZHUlWE07NKpYbQEqlG5_emxKtuQgbGrsUXeFAKZmiF-sHCNA0PCSTe401n5VYQUIydpGflE8gv6uzX6vJHpPXJbCrbWNfkz9tgV1rm74bOI.png)
‍
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.
![](https://cdn.prod.website-files.com/63eb9bf7fa9e2724829607c1/66549bd7dcc736382c82e52c_1ybQ8tzouf2U8f_iMRZh29SVfAbUcYYJlBR1LLSMYn8vKwaKWAWghtd1UVO1X_DoQijFq6ZPcvvkWjTd46SuLsAbafT4hkq0UALB4ULiosG_Wf8kprLUJVJh-xwVze6AonDvuE1AWUwneqAeVJhJJIU.png)
![](https://cdn.prod.website-files.com/63eb9bf7fa9e2724829607c1/66549bd7d0b7da308acd2c48_rhV3oIlHJmKbJKr5WoH4qSD_yeruE4TC2zRq7SGEEqNbCfwHZ7qnj9jXcnuJ5RQ9fl0A5ZDQNbeKtCEgLhDsvP8FPnTbhjkk83kv9faROs3NuzQ6I0D4N3K3DIzNwrl9BFKu2TT0HWtCJLnrJh0sMFc.png)
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.”
![](https://cdn.prod.website-files.com/63eb9bf7fa9e2724829607c1/66549bd7a4e79e639ec1a469_XpeoPlBs0Tj67o-7obiHWxLixPKqvBdFAbXaAyfnmyx6-TWH2HERbr8KTf08o4EgwQ0rhAfF_pMbs1IwWyc79oiQ3NFnuDHGVN1-vs0GYBeig57QaDucRmd9TS2zKzL4egXyakD2JRuoXNio8lhcX8c.png)
![](https://cdn.prod.website-files.com/63eb9bf7fa9e2724829607c1/66549bd81e86778172955d0a_Rs6EWx8EIUMYssysdaDZSy6Rj2Sb-UWuqZ8vV2nKBxQUhVOKyRYxESRqxT35bBD26UhTbdLIqeC7C5oL0xLtoGMUrKKjA9ANLPmUIqLXOZJ4FK01HYOumR8LuAKdtq8i57ZylwKPhUg-SRSg5E90MW8.png)
![](https://cdn.prod.website-files.com/63eb9bf7fa9e2724829607c1/66549bd82075bac66e8fc94c_koSNQhd5JhM4yWO79YehuVMwov4V8d_Co__7wzmnNbL8ClV3GDSAgPYEeWmRg3DInwhjqFz4p6jMUEhKVzp5OMQxgQGUNbnijx784C2Hyw0Em8TsW-yM1VQpFdv4kaEr5nlgKDBzz9a1Gvk7ydTCoqE.png)
‍
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:
![](https://cdn.prod.website-files.com/63eb9bf7fa9e2724829607c1/66549bd7c6bd34bd648e870f_xD0X2J_JzhUmH2xbCamlqVkkhjndAe-JNop2f_DxaJ4m3DMwXB1wOFPP-A92uhuMynIziPvJIJY6sKUmF60gduYUTxz_2wEkufVwQfsI5sH3j7ZJCQFJTj9Xx-lTCWCLwrqi-9gcc2ePBDhE-srZGBM.png)
![](https://cdn.prod.website-files.com/63eb9bf7fa9e2724829607c1/66549bd896fdd8c8adf07d5c_GCGaKHnaFgbM9fKgeP75V1gAgYoOIvREr3wXecte48XGajWFNNfI7goS6YktT3IoXJX4XgJdBXv4WboBP1J5cEmhs5eKoWR3Pc9Mvx-SzZcNZr0bz_21jit-9Vvj7rKkPmbqwvnpCG8aN5cIhyMZdJw.png)
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.
![](https://cdn.prod.website-files.com/63eb9bf7fa9e2724829607c1/66549bd87635a18531fa53d7_AhIJShD0IbrkDpEJDt1wXL0ejP2wmExI5NQsdJnl202NLniFCfkOhS3a2yZiKSAAy3jIZESR4hfaIZNSiUOFf8eSfd_1DtTvlp7q0giQCVXd630G9ULjV4hsHYgXUpPCCI2ATrkcvCyTyscwfo01mgQ.png)
![](https://cdn.prod.website-files.com/63eb9bf7fa9e2724829607c1/66549bd8b2e3e731b0b4e1b7_JPOIXWrLvH0xnbckWB2bX4SE8uqHGH-8EIt-DjfgMvbvZHUlWE07NKpYbQEqlG5_emxKtuQgbGrsUXeFAKZmiF-sHCNA0PCSTe401n5VYQUIydpGflE8gv6uzX6vJHpPXJbCrbWNfkz9tgV1rm74bOI.png)
‍
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.
‍