New Terraform Tutorial: Lock and Upgrade Provider Versions
Learn to manage your provider versions with this new tutorial on HashiCorp Learn.
When multiple users or automation tools manage the same Terraform configuration, they should use the same versions of the configuration’s required providers.
» Manage Provider Versions
There are two ways for you to manage provider versions in your configuration:
- Specify provider version constraints in your configuration’s
terraform
block, or - Use the dependency lock file (introduced in Terraform 0.14)
If you do not scope provider versions, Terraform will download the latest version. This may lead to unexpected infrastructure changes. By specifying carefully scoped provider versions and using the dependency lock file, you ensure that Terraform uses the correct provider version to consistently manage your configuration.
The new tutorial, Lock and Upgrade Provider Versions, will guide you through how to manage provider versioning using both of these methods. In the tutorial, you will create an S3 bucket from an initialized Terraform configuration and upgrade the AWS provider to use the latest version.

By the end of this tutorial, you will understand how to use the dependency lock file to ensure consistent Terraform runs across multiple users and automation tools.
» Learn More
Get more hands-on experience with writing Terraform configurations with this collection of tutorials on HashiCorp Learn.
Sign up for the latest HashiCorp news
More blog posts like this one

Terraform ephemeral resources, Waypoint actions, and more at HashiDays 2025
HashiCorp Terraform, Waypoint, and Nomad continue to simplify hybrid cloud infrastructure with new capabilities that help secure infrastructure before deployment and effectively manage it over time.

Terraform migrate 1.1 adds VCS workspace support and enhanced GitOps
Terraform migrate 1.1 adds support for VCS workspaces, expanded Git capabilities, and greater control through both the CLI.

Terraform adds new pre-written Sentinel policies for AWS Foundational Security Best Practices
HashiCorp and AWS introduced a new pre-written policy library to help organizations meet AWS’s Foundational Best Security Practices (FSBP).