HashiCorp Terraform Cloud variable sets let you simplify the management of reusable variables across an entire organization — the feature is now generally available.
A few months ago, we released a public beta of a brand-new way to consistently manage variables across workspaces in a Terraform Cloud organization. The response has been amazing. We have received substantial feedback containing creative use cases and helpful suggestions, and noticed a general buzz of excitement. Since the beta release, we have been continuously working to improve and incorporate that feedback.
With that in mind, we are now happy to announce the general availability of variable sets for HashiCorp Terraform Cloud and Terraform Enterprise.
Variable sets allow Terraform Cloud users to reuse both Terraform-defined and environment variables in an efficient and centralized way. Organization owners can create variable sets, populate the associated variables, and assign them to specific workspaces or across the entire organization. As values for those associated variables change, they will be updated in real-time. This greatly reduces the management overhead when updating variables, such as credentials, used across several workspaces.
Variable sets also reduce complexity for workspace owners and administrators. Previously, you would have to create individual variables on a per workspace basis. Now, you can create your workspace and simply apply one or more variable sets to streamline the process of provisioning resources. Those newly created workspaces already have variables defined, and there is a detailed order of precedence available in the Terraform documentation.
The public beta phase of variable sets offered a well-documented API to automate the workflow for managing variable sets and their associated variables. A consistent theme throughout the feedback was adding support for variable sets to the TFE provider. We are happy to announce that version 0.30 of the TFE provider now supports variable sets. The TFE provider now offers a new resource and data source for variable sets. The variable resource also now supports the variable set argument.
The code sample below shows an example of creating a new variable set and assigning a variable to that variable set:
Variable sets are available for users of every tier on Terraform Cloud. Documentation on variable sets is available here: Managing Variables in Terraform Cloud. The TFE provider has also been updated to add support for variable sets.
Terraform Cloud is free to try, and organizations can upgrade to the Team & Governance or Business tiers at any time. To get started with Terraform Cloud, sign up and follow our Get Started with Terraform Cloud tutorial. To get started with variable sets, check out our new HashiCorp Learn guide: Manage Variable Sets in Terraform Cloud.
How one technologist’s Terraform certification journey helped him refresh his career as a practitioner after being a CTO at a small firm.
Terraform Cloud Operator for Kubernetes adds more Day 2 operations. Users can now start runs using workspace resource annotations.
The newest enhancements to HashiCorp Terraform Cloud’s run task feature empower users to seamlessly expand their use of essential third-party integrations.