From the course: HashiCorp Certified: Terraform Associate (003) Cert Prep by KodeKloud

Unlock this course with a free trial

Join today to access over 23,400 courses taught by industry experts.

Version constraints

Version constraints

- [Instructor] In this lecture, we will go over provider versions and version constraints in Terraform. We now know that providers use a plugin based infrastructure and that they are available in the public Terraform Registry. Without additional configuration, the terraform init command downloads the latest version of the provider plugins that are needed by the configuration files. However, this is not something that we may desire every time. The functionality of a provider plugin may vary drastically from one version to another. Our Terraform configuration may not work as expected when we are using a version different than the one it was written in. Instead, we can make use of a specific version of a provider. The instructions on how to do this is available in the provider documentation in the registry. For example, if you look up the local provider within the registry, the default version will be the latest version, which in this case 2.0.0. Instead, let's say that we want to make…

Contents