HashiCorp Terraform 0.10
We're happy to announce the release of HashiCorp Terraform 0.10. Terraform is a tool to safely and efficiently build, combine, and launch any infrastructure. This release includes many new features and improvements.
Since our last major Terraform release, we’ve had 11 minor releases, adding 6 new Providers, 24 new Data Sources, and over 60 new Resources! In addition to all this, the Terraform project has now received contributions from over 1,100 contributors.
Terraform 0.10 adds major new functionality to Terraform. Highlights include:
- Terraform Core and Providers are now split
- Numerous Provider improvements
- State Environments are now Workspaces
» Terraform Core and Terraform Providers are now split
With Terraform 0.10, we have split the project into two logical components: Terraform Core and Terraform Providers. Terraform Core will continue to live at the original hashicorp/terraform repository on GitHub, and the providers are now hosted in their repositories in the new Terraform Providers organization on GitHub. The Terraform Providers binaries will also be released separately from Terraform Core. All releases can be downloaded from releases.hashicorp.com.
The goal of putting providers into separate GitHub repositories and deliverable binaries is to increase the velocity of Terraform improvements by giving more ownership and contribution access to community members.
Provider plugins are no longer included with the main Terraform binary distribution. Instead,they are distributed separately and are fetched and installed on-demand by the terraform init
command. This new approach allows users to upgrade individual providers, use custom or patched providers, and remove providers in isolation.
Since provider plugins are versioned separately from Terraform itself, individual version constraints allow users to protect against upstream breaking changes. Just like git init
, terraform init
will become a key part of the daily Terraform workflow.
You can read more about the details of the split in a previous blog post, Upcoming Provider Changes in Terraform 0.10.
» Provider Split
Each provider's source now lives independently in its own repository in the Terraform Providers GitHub organization. The split of individual providers from Terraform core enables each provider to define its own release cadence, versioning, and documentation.
Provider plugins are no longer included with the main Terraform binary distribution. Instead, they are distributed separately and are fetched and installed on-demand by the terraform init command. At the start of a new project, or with any change in your configuration to add or remove Providers, running terraform init
will cause Terraform to read your configuration and fetch any required binaries.
Terraform can automatically fetch any provider that is a part of the Terraform Providers GitHub organization. Binaries for these Providers are prebuilt by HashiCorp and hosted on releases.hashicorp.com.
» Provider Constraints
Part of splitting Providers and Core means that Providers now have their own version numbers, and can progress independently of core or other Providers. Terraform will dynamically fetch available providers as needed, and constrain them to the version specified in your configuration. For example, consider this basic configuration for two Providers, AWS and Fastly:
provider aws {
version = "~> v0.1.3"
region = "us-west-2"
}
provider fastly {
api_key = "exampleapikey"
}
Here, we declare two provider blocks, and specify that the AWS provider should be at least v0.1.3. We omit the version constraint in the Fastly provider declaration, so Terraform will fetch the latest release. You can see in the image above that Terraform reads the configuration on terraform init
and then fetches the required provider binaries dynamically.
» Provider Improvements
Terraform Providers have received numerous improvements and additions, including new Resources, new Data Sources, and bug fixes. Going forward, the Terraform Core Changelog will no longer record the changes to Terraform Providers. Each Provider now has its own independent repository on GitHub, complete with their own issue tracker and Changelog. For example:
View all the providers and their respective Changelogs in the Terraform Providers GitHub organization repository listing.
To further expand the Terraform ecosystem, we have also created the Terraform Provider Development Program. This is intended for vendors and users who would like to build a Terraform provider to support their infrastructure. The Terraform Provider Development Program is intended to be mostly self-serve, with links to information sources, clearly defined steps, and checkpoints.
» State Environments are now Workspaces
Terraform 0.9 introduced “State Environments”, a way of using namespaces with state files to allow a single folder of Terraform configurations to manage multiple distinct sets of infrastructure resources. After the initial release, we received community feedback that this terminology was confusing. Terraform 0.10 introduces the concept of “workspaces” to replace the“State Environments” terminology. The terraform env
family of commands have been renamed to terraform workspace
. The env
subcommand is still supported as an alias for backward compatibility, but will likely be removed altogether in a future release. It's recommended to update any automation or wrapper scripts that use these commands.
You can read more about Terraform workspaces on its documentation page.
» Upgrading
Because of the split of core and providers, users should carefully read our guide on Upgrading to Terraform 0.10. Terraform 0.10 has no core backwards incompatibilities, but includes deprecations and changes that should be addressed as soon as possible. Please review the upgrade guide which reviews all the necessary considerations when upgrading to 0.9.
In addition to these changes, the release has a number of changes to providers and resources which could impact you depending on your usage. Minor changes to providers and resources exist in almost every release. Please see the proper changelogs for more information.
» Conclusion
Terraform continues to grow and mature with every release. A sincere thank you to all of the Terraform community members who have helped to make Terraform the leading tool for managing infrastructure as code.
We will continue to ship releases of Terraform Core on a regular basis, but likely at a slower pace than previously given that the Providers are now separate. The Terraform Providers will now enjoy a flexible release schedule that they can each independently determine as they need.
Go download Terraform and give it a try!
Sign up for the latest HashiCorp news
More blog posts like this one
Terraform delivers launch-day support for Amazon S3 Tables, EKS Hybrid Nodes, and more at re:Invent
The Terraform provider for AWS now enables users to manage a variety of new services just announced at re:Invent.
HashiCorp at re:Invent 2024: Infrastructure Lifecycle Management with AWS
A recap of HashiCorp infrastructure news and developments on AWS from the past year, from a new provider launch to simplifying infrastructure provisioning and more.
Simplify policy adoption in Terraform with pre-written Sentinel policies for AWS
HashiCorp introduces a new pre-written policy library co-developed with AWS, aiming to reduce the barrier of adoption for policy as code infrastructure workflows.